@esri/calcite-components 6.0.0-next.33 → 6.0.0-next.35

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 (147) hide show
  1. package/dist/cdn/{N72FKUWM.js → 2BRZBSTI.js} +1 -1
  2. package/dist/cdn/{TOZDS6EO.js → 36NBQURH.js} +1 -1
  3. package/dist/cdn/{QVPPJ5MH.js → 3BB64I3Y.js} +1 -1
  4. package/dist/cdn/{DQWHY52J.js → 3HGP3YNQ.js} +1 -1
  5. package/dist/cdn/{SGA27RSE.js → 3LFH6GRF.js} +1 -1
  6. package/dist/cdn/{NEVU5H6J.js → 3Z6K5AJO.js} +1 -1
  7. package/dist/cdn/{RIW4G62N.js → 4AGX5QON.js} +1 -1
  8. package/dist/cdn/{OWPXECEC.js → 4BSIUBYC.js} +1 -1
  9. package/dist/cdn/{AB6P7MSJ.js → 4DK4NDYM.js} +1 -1
  10. package/dist/cdn/{JAZY6WI5.js → 4UCJSQ74.js} +1 -1
  11. package/dist/cdn/{JIZAOJJY.js → 4ULODE4O.js} +1 -1
  12. package/dist/cdn/{2ZFHNAXZ.js → 5EUTBUYN.js} +1 -1
  13. package/dist/cdn/{6HLLKG6Y.js → 5UA6626W.js} +1 -1
  14. package/dist/cdn/{3C2HB7CY.js → 6AZJ2GT4.js} +1 -1
  15. package/dist/cdn/{BVWV6V6T.js → 6CVC25Y4.js} +1 -1
  16. package/dist/cdn/{IYH3JXKS.js → 6XMCVAN6.js} +1 -1
  17. package/dist/cdn/{HCZQ3TCB.js → 7A5557NP.js} +1 -1
  18. package/dist/cdn/{TF4USKPA.js → 7BLGEIZ6.js} +1 -1
  19. package/dist/cdn/{J66LFDMN.js → 7QO4KZRQ.js} +1 -1
  20. package/dist/cdn/{SOZY3VOT.js → 7YOQW5K4.js} +1 -1
  21. package/dist/cdn/{WSJYVPSL.js → AMXSW3WN.js} +1 -1
  22. package/dist/cdn/{7OQZCK5X.js → AUNDQFRR.js} +1 -1
  23. package/dist/cdn/{TNH3QVHR.js → AYCBH4DC.js} +1 -1
  24. package/dist/cdn/{5VP66O25.js → AZT356ZW.js} +1 -1
  25. package/dist/cdn/{VBKFLHXE.js → B5KUJSNG.js} +1 -1
  26. package/dist/cdn/{UCPJI7AH.js → B75IY2Z2.js} +1 -1
  27. package/dist/cdn/{FY4M2W2D.js → BU4ICFFZ.js} +1 -1
  28. package/dist/cdn/{DFOFJ7ZA.js → BWSK2TRU.js} +1 -1
  29. package/dist/cdn/{GIQ6J25X.js → CEMR27ST.js} +1 -1
  30. package/dist/cdn/{JLHY2463.js → CIEL5S7P.js} +1 -1
  31. package/dist/cdn/{5SDMSGT3.js → CL6POMDX.js} +1 -1
  32. package/dist/cdn/{CCKBSHLN.js → CTG52KS2.js} +1 -1
  33. package/dist/cdn/{GQHLEO5S.js → CZ75K7DI.js} +1 -1
  34. package/dist/cdn/{KCKCV752.js → D34OXKEF.js} +1 -1
  35. package/dist/cdn/{3EPPXFMX.js → D65VLP5P.js} +1 -1
  36. package/dist/cdn/{O3DJRND5.js → DHSWWP33.js} +1 -1
  37. package/dist/cdn/{MGGEICJM.js → DHYHGCNT.js} +1 -1
  38. package/dist/cdn/{V5EGTCRW.js → DUVBA3CY.js} +1 -1
  39. package/dist/cdn/{ECMMT2MZ.js → DZIKAA2A.js} +1 -1
  40. package/dist/cdn/{66765WFJ.js → EDQZ57RS.js} +1 -1
  41. package/dist/cdn/{CSEZ4GFT.js → EOHL7O6K.js} +1 -1
  42. package/dist/cdn/{AMWDZTHP.js → EQ4CWDCC.js} +1 -1
  43. package/dist/cdn/{NIDV4UEV.js → F4MQFTSR.js} +1 -1
  44. package/dist/cdn/{ECCTAVBE.js → F6Y4UN4J.js} +1 -1
  45. package/dist/cdn/{DR5Y35HC.js → FAMY4RAB.js} +1 -1
  46. package/dist/cdn/{57JJ6ZZV.js → FEHYMFKH.js} +1 -1
  47. package/dist/cdn/{G7HEA6KZ.js → FFG334BY.js} +1 -1
  48. package/dist/cdn/{A5MXGGUV.js → FG35O2TI.js} +1 -1
  49. package/dist/cdn/{KYLAU6IL.js → FJBY3JWA.js} +1 -1
  50. package/dist/cdn/{UWG3CQLP.js → FPKHQRVB.js} +1 -1
  51. package/dist/cdn/{BOSX3N3S.js → FQ3NEJBC.js} +1 -1
  52. package/dist/cdn/{YCXXUZSU.js → FTPXHYUM.js} +1 -1
  53. package/dist/cdn/{UEZ5DNUC.js → FVYW7W3L.js} +1 -1
  54. package/dist/cdn/{5KQ2IA3C.js → G22C2ZMX.js} +1 -1
  55. package/dist/cdn/{JVJOB75Y.js → G3LMPCHS.js} +1 -1
  56. package/dist/cdn/{7JK6M2KQ.js → GI3X4LRL.js} +1 -1
  57. package/dist/cdn/{LAAL7KCJ.js → GV4J5PRK.js} +1 -1
  58. package/dist/cdn/{2XRRZZNX.js → H3I7WACM.js} +1 -1
  59. package/dist/cdn/{JKD2MQOI.js → HDGFJLSF.js} +1 -1
  60. package/dist/cdn/{OCSQ2II3.js → HEYW3BN6.js} +1 -1
  61. package/dist/cdn/{56F7DPON.js → HJQ36VT7.js} +1 -1
  62. package/dist/cdn/{4FC6ZNYV.js → HXTM3NXE.js} +1 -1
  63. package/dist/cdn/{B22C5ARQ.js → I7SM6STY.js} +1 -1
  64. package/dist/cdn/{OTDNC5KR.js → ICVKMQOX.js} +1 -1
  65. package/dist/cdn/{ZM6DBYIT.js → IHTLCAAZ.js} +1 -1
  66. package/dist/cdn/{BPQQK2PE.js → IWORUG5T.js} +1 -1
  67. package/dist/cdn/{X2IH4REQ.js → J4YI2TU3.js} +1 -1
  68. package/dist/cdn/{OIIPFKBZ.js → J6SDQZRH.js} +1 -1
  69. package/dist/cdn/{5BMXXMRC.js → K2F26XH4.js} +1 -1
  70. package/dist/cdn/{TD6RR4II.js → KIZ5H4NQ.js} +1 -1
  71. package/dist/cdn/{QNAZ4SXK.js → KN2LZPWP.js} +1 -1
  72. package/dist/cdn/{T7QXXMRX.js → KPV7VAJS.js} +1 -1
  73. package/dist/cdn/{NL4MR6BH.js → KQIZLHW2.js} +1 -1
  74. package/dist/cdn/{K2BXNIQO.js → L4EGKE5Z.js} +1 -1
  75. package/dist/cdn/{EDGTAZ5W.js → LAMR36RX.js} +1 -1
  76. package/dist/cdn/{NQUV4A65.js → LLKQ7TX7.js} +1 -1
  77. package/dist/cdn/{TTODQJRR.js → LO2B6LPY.js} +1 -1
  78. package/dist/cdn/{WBV45A6Q.js → LYSJFR43.js} +1 -1
  79. package/dist/cdn/{LUBZNR4Y.js → MA6XR4L2.js} +1 -1
  80. package/dist/cdn/{35NRDMCX.js → MJ6HK3JH.js} +1 -1
  81. package/dist/cdn/{5AWH7Z3B.js → MPWY3Z45.js} +1 -1
  82. package/dist/cdn/{6PIQA36G.js → MTBIXRQ7.js} +1 -1
  83. package/dist/cdn/{W3HWQYI4.js → MWW6XMD3.js} +1 -1
  84. package/dist/cdn/{VEHPEKTJ.js → MY7ASGHV.js} +1 -1
  85. package/dist/cdn/{JZTVLSQS.js → N6YGUT6A.js} +1 -1
  86. package/dist/cdn/{QJTUTYOH.js → N74LOYWW.js} +1 -1
  87. package/dist/cdn/{BQNZBFBZ.js → NJN5G4UY.js} +1 -1
  88. package/dist/cdn/{TV44WGYF.js → NQOPLORW.js} +1 -1
  89. package/dist/cdn/{B4DKARFC.js → NYOXROIM.js} +1 -1
  90. package/dist/cdn/{5MKSLN45.js → O4PYWOHX.js} +1 -1
  91. package/dist/cdn/{L2RFAHN5.js → OIW4I4C2.js} +1 -1
  92. package/dist/cdn/{2VWNFQUM.js → OIXBTRKC.js} +1 -1
  93. package/dist/cdn/{KP3LS4UE.js → OML32CAX.js} +1 -1
  94. package/dist/cdn/{UXUBLL7B.js → OPC3AXX7.js} +1 -1
  95. package/dist/cdn/{XUBVPXWY.js → P3FV4UMG.js} +1 -1
  96. package/dist/cdn/{VQISU4CH.js → P3UAVD2E.js} +1 -1
  97. package/dist/cdn/{6IEIN32F.js → PCDEZ3A2.js} +1 -1
  98. package/dist/cdn/{FF5B7ZTI.js → PNHIBHV7.js} +1 -1
  99. package/dist/cdn/{HPGYEYX3.js → PYHRXB7L.js} +1 -1
  100. package/dist/cdn/{PHU2JCF5.js → Q2IVHQWV.js} +1 -1
  101. package/dist/cdn/{PAFJUPOZ.js → Q6ESZDOZ.js} +1 -1
  102. package/dist/cdn/{YAZJPF5S.js → QC3Z5J6R.js} +1 -1
  103. package/dist/cdn/{3NPDLRO4.js → QCZSN6XZ.js} +1 -1
  104. package/dist/cdn/{QRHJ2A57.js → QIVSUBHR.js} +1 -1
  105. package/dist/cdn/{VAF5ZWJY.js → QJQG5TLH.js} +1 -1
  106. package/dist/cdn/{PUHGVOYL.js → QMBCTXBP.js} +1 -1
  107. package/dist/cdn/{AELAOQDK.js → QWX4EGTZ.js} +1 -1
  108. package/dist/cdn/{HMTZ2NNR.js → RBO4BCWH.js} +1 -1
  109. package/dist/cdn/{RMYMCVZL.js → RM5B7CIM.js} +1 -1
  110. package/dist/cdn/{6KXXZDEC.js → S4UWLELO.js} +1 -1
  111. package/dist/cdn/{DUP7FV32.js → S4WE2SO2.js} +1 -1
  112. package/dist/cdn/{VWKMABNH.js → SLQTZKPD.js} +1 -1
  113. package/dist/cdn/{OUJAE5RB.js → SSBCAA2K.js} +1 -1
  114. package/dist/cdn/{HCCYK35J.js → TF5TRLU2.js} +1 -1
  115. package/dist/cdn/{HP327QNA.js → UITARQM7.js} +1 -1
  116. package/dist/cdn/{GFUEZCFE.js → UJUKQASK.js} +1 -1
  117. package/dist/cdn/{OWKELGVS.js → UORALTUQ.js} +1 -1
  118. package/dist/cdn/{C55GX5QU.js → UXKRZCTK.js} +1 -1
  119. package/dist/cdn/{MCYGB35M.js → V2I7OEHG.js} +1 -1
  120. package/dist/cdn/{C5KJFCKP.js → V6PDTYZJ.js} +1 -1
  121. package/dist/cdn/{7FSMYW6V.js → VZ3XS4TA.js} +1 -1
  122. package/dist/cdn/{ZAL3DHIT.js → WCO5P2JH.js} +1 -1
  123. package/dist/cdn/{I23IFMUU.js → WKWVCOIG.js} +1 -1
  124. package/dist/cdn/{GKTW7VMU.js → WXHKWVY6.js} +1 -1
  125. package/dist/cdn/{5GSCFOQS.js → WZLK6FF3.js} +1 -1
  126. package/dist/cdn/{CEKDUGEY.js → XB3WZDSZ.js} +1 -1
  127. package/dist/cdn/{3C3TBDGV.js → XO6F4EUM.js} +1 -1
  128. package/dist/cdn/{LAJTPUC3.js → YA3CJFJS.js} +1 -1
  129. package/dist/cdn/{JB42MFYM.js → YDQP3IQW.js} +1 -1
  130. package/dist/cdn/{VPNZVJUQ.js → YFYGKLY2.js} +1 -1
  131. package/dist/cdn/{KXEAX4VX.js → YT4LIOWF.js} +1 -1
  132. package/dist/cdn/{5RMWMCMK.js → YZYK7DMP.js} +1 -1
  133. package/dist/cdn/{EK4CLXUZ.js → Z2JSHKJZ.js} +1 -1
  134. package/dist/cdn/{VQDYKKWG.js → ZHELEVWD.js} +1 -1
  135. package/dist/cdn/{C2FSRNVO.js → ZT43CYF5.js} +1 -1
  136. package/dist/cdn/{KWAIBA22.js → ZZSS6ASQ.js} +1 -1
  137. package/dist/cdn/{IKS2OZTW.js → ZZUTC4SF.js} +1 -1
  138. package/dist/cdn/assets/icon/diamondGem16.json +1 -0
  139. package/dist/cdn/assets/icon/diamondGem24.json +1 -0
  140. package/dist/cdn/assets/icon/diamondGem32.json +1 -0
  141. package/dist/cdn/index.js +1 -1
  142. package/dist/chunks/runtime.js +3 -3
  143. package/dist/components/calcite-tile/customElement.js +1 -1
  144. package/dist/docs/api.json +1 -1
  145. package/dist/docs/docs.json +1 -1
  146. package/dist/docs/web-types.json +1 -1
  147. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as b}from"./CASNTUXN.js";import{a as x}from"./OTDNC5KR.js";import"./MGGEICJM.js";import"./MCYGB35M.js";import{G as u,H as l,I as z,K as k,T as y,g as h,h as r,i as p,l as f}from"./7OQZCK5X.js";var a={percentage:"percentage",progressRing:"ring--progress",ring:"ring",rings:"rings",text:"text",trackRing:"ring--track"},$=h`:host{display:flex;position:relative;margin-inline:auto;align-items:center;justify-content:center;opacity:var(--calcite-opacity-full);flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-loader-font-size: var(--calcite-font-size-relative-md);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-loader-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);display:block;text-align:center;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal)));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:var(--calcite-opacity-full);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:var(--calcite-space-none);transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:var(--calcite-space-none);stroke:currentColor;stroke-width:2;padding-block:var(--calcite-space-none);block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));min-block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));vertical-align:calc(var(--calcite-loader-size, var(--calcite-internal-loader-size-inline)) * -1 * .2)}:host([inline]) .rings{inset-block-start:var(--calcite-space-none);margin:var(--calcite-space-none);inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends u{constructor(){super(...arguments),this.messages=x({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=$}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==0)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||this.type!=="indeterminate")||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}formatValue(){return this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){this.type!=="determinate-value"||this.formatter?.resolvedOptions().locale===this.messages._lang||(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){let{el:e,inline:n,label:c,text:s,type:t,value:g}=this,o=e.id||b(),i=t!=="indeterminate",d=t==="determinate-value",m=Math.floor(g);return this.el.ariaLabel=c,this.el.ariaValueMax=i?"100":null,this.el.ariaValueMin=i?"0":null,this.el.ariaValueNow=i?m.toString():null,k(this.el,"id",o),this.el.role="progressbar",r`<div class=${l(a.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!n&&d&&r`<div class=${l(a.percentage)}>${this.formatValue()}</div>`||""}</div>${!n&&s&&r`<div class=${l(a.text)}>${s}</div>`||""}`}renderRing(e){let{inline:n,scale:c,value:s}=this,t=n?this.getInlineSize(c):this.getSize(c),o=t*.45,i;if(e==="progress"){let d=2*o*Math.PI,m=(this.type.startsWith("determinate")?s:24)/100*d,w=d-m;i={"stroke-dasharray":`${m} ${w}`}}return r`<svg aria-hidden=true class=${l({[a.ring]:!0,[a.trackRing]:e==="track",[a.progressRing]:e==="progress"})} style=${z(i)} viewBox=${`0 0 ${t} ${t}`}>${p`<circle cx=${t/2} cy=${t/2} r=${o??f} />`}</svg>`}};y("calcite-loader",v);export{v as Loader};
2
+ import{a as b}from"./CASNTUXN.js";import{a as x}from"./ICVKMQOX.js";import"./DHYHGCNT.js";import"./V2I7OEHG.js";import{G as u,H as l,I as z,K as k,T as y,g as h,h as r,i as p,l as f}from"./AUNDQFRR.js";var a={percentage:"percentage",progressRing:"ring--progress",ring:"ring",rings:"rings",text:"text",trackRing:"ring--track"},$=h`:host{display:flex;position:relative;margin-inline:auto;align-items:center;justify-content:center;opacity:var(--calcite-opacity-full);flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-loader-font-size: var(--calcite-font-size-relative-md);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-loader-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);display:block;text-align:center;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal)));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:var(--calcite-opacity-full);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:var(--calcite-space-none);transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:var(--calcite-space-none);stroke:currentColor;stroke-width:2;padding-block:var(--calcite-space-none);block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));min-block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));vertical-align:calc(var(--calcite-loader-size, var(--calcite-internal-loader-size-inline)) * -1 * .2)}:host([inline]) .rings{inset-block-start:var(--calcite-space-none);margin:var(--calcite-space-none);inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size-inline))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends u{constructor(){super(...arguments),this.messages=x({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=$}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==0)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||this.type!=="indeterminate")||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}formatValue(){return this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){this.type!=="determinate-value"||this.formatter?.resolvedOptions().locale===this.messages._lang||(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){let{el:e,inline:n,label:c,text:s,type:t,value:g}=this,o=e.id||b(),i=t!=="indeterminate",d=t==="determinate-value",m=Math.floor(g);return this.el.ariaLabel=c,this.el.ariaValueMax=i?"100":null,this.el.ariaValueMin=i?"0":null,this.el.ariaValueNow=i?m.toString():null,k(this.el,"id",o),this.el.role="progressbar",r`<div class=${l(a.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!n&&d&&r`<div class=${l(a.percentage)}>${this.formatValue()}</div>`||""}</div>${!n&&s&&r`<div class=${l(a.text)}>${s}</div>`||""}`}renderRing(e){let{inline:n,scale:c,value:s}=this,t=n?this.getInlineSize(c):this.getSize(c),o=t*.45,i;if(e==="progress"){let d=2*o*Math.PI,m=(this.type.startsWith("determinate")?s:24)/100*d,w=d-m;i={"stroke-dasharray":`${m} ${w}`}}return r`<svg aria-hidden=true class=${l({[a.ring]:!0,[a.trackRing]:e==="track",[a.progressRing]:e==="progress"})} style=${z(i)} viewBox=${`0 0 ${t} ${t}`}>${p`<circle cx=${t/2} cy=${t/2} r=${o??f} />`}</svg>`}};y("calcite-loader",v);export{v as Loader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as et}from"./6IEIN32F.js";import{a as tt}from"./5K4OZJAZ.js";import{a as _}from"./FDHY2TZA.js";import{b as it}from"./6FZVJGKC.js";import{a as y,b as F}from"./7XS2SBMV.js";import{a as m,d as f}from"./HJHRSII7.js";import{c as $,e as b}from"./TJGNWJF6.js";import{c as p}from"./UTXN6YZB.js";import{a as Z}from"./OTDNC5KR.js";import"./2IM7ZZ7U.js";import{a as Y}from"./G7HEA6KZ.js";import"./VMHJHFFS.js";import{e as Q}from"./MGGEICJM.js";import"./MCYGB35M.js";import{A as J,B as X,J as v,s as R}from"./RRBGCYLX.js";import{E as I,F as M,G as K,H as k,N as j,Q as H,T as V,g as q,h as x,l as W,p as D}from"./7OQZCK5X.js";var nt={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function ct(l,t){return t||l.closest("calcite-shell-panel")?.position||"start"}function lt({actions:l,expandables:t,expanded:e}){l.filter(i=>i.slot!==m.menuActions).forEach(i=>i.textEnabled=e),t.forEach(i=>i.expanded=e)}var dt=({tooltip:l,referenceElement:t,expanded:e,ref:i})=>(l&&(l.referenceElement=!e&&t?t:void 0),i&&i(t),t),ht=({collapseText:l,collapseLabel:t,direction:e,expanded:i,expandText:n,expandLabel:o,toggle:s,el:a,position:c,tooltip:r,ref:d,scale:G})=>{let T=e==="rtl",S=i?l:n,g=i?t:o,h=[nt.chevronsLeft,nt.chevronsRight];T&&h.reverse();let A=ct(a,c)==="end",C=A?h[1]:h[0],u=A?h[0]:h[1];return x`<calcite-action .aria=${{expanded:i}} .icon=${i?C:u} id=expand-toggle .label=${g} @click=${s} .scale=${G} .text=${S} .textEnabled=${i} title=${(!i&&!r?S:void 0)??W} ${M(z=>dt({tooltip:r,referenceElement:z,expanded:i,ref:d}))}></calcite-action>`},ut=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,n=e.length,o=0;for(let[s,a]of e.entries())if(o=o+a,o>i){n=s;break}else continue;return n},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ut({bufferSize:l,itemSizes:e,containerSize:t}),0),ft=l=>l.flatMap(t=>f(t)?t.actions:b(t)?t.actions.filter(e=>e.slot===$.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let n=l.getBoundingClientRect();return e?n.top-t.top:i?t.right-n.right:n.left-t.left},vt=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(n=>{let o=0,s=n.actions.filter(a=>a.parentElement===n).reverse();s.forEach(a=>{a.slot===m.menuActions&&(a.removeAttribute("slot"),a.textEnabled=t)}),i>0&&!n.overflowActionsDisabled&&s.some(a=>(s.filter(r=>!r.slot).length>1&&s.length>2&&!a.closest("calcite-action-menu")&&!a.overflowDisabled&&(a.textEnabled=!0,a.setAttribute("slot",m.menuActions),o++,o>1&&i--),i<1)),n.manager.component.requestUpdate()})},mt=q`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc( var(--calcite-theme-space-base, var(--calcite-spacing-base)) + 1px )}.container{display:inline-flex;flex-direction:column;flex:1 1 auto;background-color:var(--calcite-action-bar-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,U=class extends K{constructor(){super(),this.actions=[],this.navigationItems=[],this.containerRef=I(),this.defaultSlotRef=I(),this.actionsStartSlotRef=I(),this.actionsEndSlotRef=I(),this.actionsStartGroupRef=I(),this.actionsEndGroupRef=I(),this.direction=Q(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.automaticallyOverflowedActions=[],this.authoredMenuActions=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=et()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:n,layout:o,expandPosition:s}=this;if(!this.el.isConnected||!this.containerRef.value)return;if(this.updateGroups(),this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||o==="vertical"&&!e||o==="horizontal"&&!t)return;let a=this.getItemSizes(),{actionGroups:c,actionsEnd:r,actionsEndGroups:d,actionsStart:G,actionsStartGroups:T,defaultSlotItems:S}=this,g=[...T,...c,...d],h=this.hasActionsEnd||!n&&s==="end"?1:0,A=this.hasActionsStart||!n&&s==="start"?1:0,C=S.length+h+A,u=C,E=getComputedStyle(this.containerRef.value);if(u+=v(o==="horizontal"?E.paddingInlineStart:E.paddingBlockStart)+v(o==="horizontal"?E.paddingInlineEnd:E.paddingBlockEnd),g.length>0){let O=g.length-1;g.forEach((N,L)=>{let w=getComputedStyle(N),B=v(w.gap),P=this.getActionGroupItemCount(N),rt=Math.max(P-1,0);u+=B*rt,L!==O&&(u+=v(o==="horizontal"?w.paddingInlineEnd:w.paddingBlockEnd),u+=v(o==="horizontal"?w.borderInlineEndWidth:w.borderBlockEndWidth))})}let z=(O,N,L)=>{if(!N||O.length<1)return;let w=getComputedStyle(N),B=v(w.gap),P=O.length+(L?1:0);u+=B*Math.max(P-1,0)},at=!n&&s==="start",ot=!n&&s==="end";z(G,this.actionsStartGroupRef.value,at),z(r,this.actionsEndGroupRef.value,ot),C>1&&(u+=v(E.gap)*(C-1));let st=pt({bufferSize:u,containerSize:o==="horizontal"?t:e,itemSizes:a});this.runOverflowActions({actionGroups:g,expanded:i,overflowCount:st})},j.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.target&&t.target!==this.el?{width:this.el.clientWidth,height:this.el.clientHeight}:t.contentRect,n=this.layout==="horizontal"?"width":"height",o=n==="width"?e:i;this.lastOverflowAxisSize?.axis===n&&this.lastOverflowAxisSize.size===o||(this.lastOverflowAxisSize={axis:n,size:o},this.resize({width:e,height:i}))},this.resizeObserver=_("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=Z({blocking:!0}),this.focusSetter=Y()(this).setFocus,this.setExpandToggleEl=t=>{this.expandToggleEl=t,this.syncNavigationItemTabIndexes()},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=D({cancelable:!1}),this.calciteActionBarExpand=D({cancelable:!1}),this.calciteActionBarToggle=D({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("click",this.handleFocusIn),this.listen("keydown",this.handleKeyDown),this.listen("focusin",this.handleFocusIn)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=mt}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}get expandDisabled(){return this.expandToggleDisabled}set expandDisabled(t){H.deprecated("property",{component:this,name:"expandDisabled",removalVersion:6,suggested:"expandToggleDisabled"}),this.expandToggleDisabled=t}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){H.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.overflowActions(),this.updateActions(),this.overflowActionsDisabledHandler(this.overflowActionsDisabled),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)||t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=t==="horizontal"?"clientWidth":"clientHeight",n=this.actions.map(a=>a[i]||0);this.getTrackedActionGroups().flatMap(a=>R(a,"calcite-action-menu")).forEach(a=>{let c=(a.actions??[]).find(r=>r.slot===$.trigger);n.push((c??a)[i]||0)}),e&&n.push(e[i]||0);let s=Math.max(...n,0);return n.map(a=>a||s)}getActionGroupItemCount(t){let e=t.actions.filter(n=>n.parentElement===t),i=R(t,"calcite-action-menu").length;return e.length+i}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}overflowActionsDisabledHandler(t){if(t){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.containerRef.value&&this.resizeObserver?.observe(this.containerRef.value),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(n=>f(n)||b(n));i&&(f(i)&&!i.menuOpen||b(i)&&!i.open||(this.getTrackedActionGroups().forEach(n=>{e.includes(n)||(n.menuOpen=!1)}),this.getTrackedActionMenus().forEach(n=>{e.includes(n)||(n.open=!1)}),this.updateActions()))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let n=++this.overflowPassId,o=t.flatMap(a=>a.actions.filter(c=>c.parentElement===a));this.automaticallyOverflowedActions=this.automaticallyOverflowedActions.filter(a=>o.includes(a)),this.authoredMenuActions=this.authoredMenuActions.filter(a=>o.includes(a)&&a.slot===m.menuActions),o.forEach(a=>{a.slot===m.menuActions&&!this.automaticallyOverflowedActions.includes(a)&&!this.authoredMenuActions.includes(a)&&this.authoredMenuActions.push(a)});let s=new Map;t.forEach(a=>{let c=a.actions.filter(r=>r.parentElement===a);s.set(a,c.map(r=>r.slot??"").join("|"))}),vt({actionGroups:t,expanded:e,overflowCount:i}),this.authoredMenuActions.forEach(a=>{a.slot=m.menuActions,a.textEnabled=!0}),this.automaticallyOverflowedActions=o.filter(a=>a.slot===m.menuActions&&!this.authoredMenuActions.includes(a)),t.forEach(a=>{let r=a.actions.filter(d=>d.parentElement===a).map(d=>d.slot??"").join("|");s.get(a)!==r&&(this.suppressedActionGroupActionsChange.set(a,n),this.queueSuppressedActionGroupActionsChangeCleanup(a,n))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale}),this.syncNavItems()}syncNavItems(){this.el.isConnected&&(this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions())}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(n=>{n.hidden||t.push(n)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",n=t.getBoundingClientRect(),o=this.getWrapItems(),s=[],a=null;o.forEach(r=>{let d=gt({item:r,containerRect:n,horizontal:e,rtl:i});a!==null&&Math.abs(d-a)>1&&s.push(d),a=d}),(s.length!==this.lineOffsets.length||s.some((r,d)=>r!==this.lineOffsets[d]))&&(this.lineOffsets=s)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions(),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot()),this.syncNavigationItemTabIndexes()}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot()),this.syncNavigationItemTabIndexes()}handleTooltipSlotChange(t){let e=J(t).filter(it);this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}updateNavigationItems(){let t=[...this.getNavigationItems(this.actionsStart),...this.getNavigationItems(this.defaultSlotItems),...this.getNavigationItems(this.actionsEnd)],{expandToggleEl:e}=this;this.navigationItems=e&&this.isNavigableAction(e)?this.expandPosition==="start"?[e,...t]:[...t,e]:t}getNavigationItems(t){return t.flatMap(e=>p(e)?this.isNavigableAction(e)?[e]:[]:b(e)?this.isNavigableActionMenu(e)?[e]:[]:this.getActionGroupNavigationItems(e))}getActionGroupNavigationItems(t){if(t.hasAttribute("hidden"))return[];let e=(t.actions??[]).filter(s=>this.isNavigableAction(s)),i=R(t,"calcite-action-menu").filter(s=>this.isNavigableActionMenu(s)),n=[...e,...i].sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),{actionMenu:o}=t;return o&&this.isNavigableActionMenu(o)&&!n.includes(o)&&n.push(o),n}isNavigableAction(t){return!t.disabled&&!t.hidden&&!t.inert&&t.slot!=="menu-actions"&&!t.closest("calcite-action-menu")}isNavigableActionMenu(t){let e=t.menuButtonEl??t.actions?.find(i=>i.slot===$.trigger);return!t.hidden&&!t.inert&&!e?.disabled&&!e?.hidden&&!e?.inert}syncActions(){this.actions=ft([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&lt({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>b(t))}getAssignedActionBarItems(t){return t?X(t).filter(e=>p(e)||f(e)||b(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>f(t)),this.actionMenus=this.defaultSlotItems.filter(t=>b(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>f(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>f(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes()))}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes())}handleKeyDown(t){if((this.getEventActionMenu(t)||this.getOpenActionMenu())?.open)return t.key==="Escape",void 0;if(t.defaultPrevented)return;this.updateNavigationItems();let i=this.getNavigationItemFromEvent(t);if(!i||!this.navigationItems.length)return;if(this.layout==="grid"&&["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(t.key)){let r=t.key==="ArrowDown"||t.key==="ArrowRight"?"next":"previous";this.focusNavigationItem(r,i),t.preventDefault();return}let n=this.layout!=="horizontal",o=t.composedPath().find(f),s=n?"ArrowRight":"ArrowDown",a=n?"ArrowLeft":"ArrowUp",c=i.matches("calcite-action-menu")&&!i.open;if((o?.selectionMode==="multiple"||o?.selectionMode==="none")&&(t.key===s||t.key===a)&&!c){t.preventDefault();return}if(!this.handleSecondaryArrowActionMenuOpen(t,i,n))switch(t.key){case"ArrowDown":n?(this.focusNavigationItem("next",i),t.preventDefault()):this.focusActionGroupItem("next",i,o)&&t.preventDefault();break;case"ArrowUp":n?(this.focusNavigationItem("previous",i),t.preventDefault()):this.focusActionGroupItem("previous",i,o)&&t.preventDefault();break;case"ArrowRight":n?this.focusActionGroupItem("next",i,o)&&t.preventDefault():(this.focusNavigationItem("next",i),t.preventDefault());break;case"ArrowLeft":n?this.focusActionGroupItem("previous",i,o)&&t.preventDefault():(this.focusNavigationItem("previous",i),t.preventDefault());break;case"Home":this.focusNavigationItem("first",i),t.preventDefault();break;case"End":this.focusNavigationItem("last",i),t.preventDefault();break;case"Tab":t.composedPath().some(r=>p(r)&&r.aria?.role==="menuitem")||this.setNavigationItemTabIndexes(i);break}}handleSecondaryArrowActionMenuOpen(t,e,i){if(!e.matches("calcite-action-menu")||e.open)return!1;let n=i?"ArrowRight":"ArrowDown",o=i?"ArrowLeft":"ArrowUp";return t.key!==n&&t.key!==o?!1:(t.preventDefault(),this.openActionMenuAndFocusBoundaryItem(e,t.key===n?"first":"last"),!0)}openActionMenuAndFocusBoundaryItem(t,e){t.open=!0,this.focusActionMenuBoundaryItem(t,e)}async focusActionMenuBoundaryItem(t,e){if(await t.componentOnReady(),!t.open)return;let i=t.actions.filter(o=>o.aria?.role==="menuitem"&&!o.disabled&&!o.hidden&&!o.inert);await(e==="first"?i[0]:i[i.length-1])?.setFocus({preventScroll:!0})}handleFocusIn(t){this.updateNavigationItems();let e=this.getNavigationItemFromEvent(t);if(t instanceof MouseEvent){t.detail>0&&e&&p(e)&&this.setNavigationItemTabIndexes(e);return}let i=this.getEventActionMenu(t)||this.getOpenActionMenu();if(!i?.open){if(e?.matches("calcite-action-menu")&&i){this.syncClosedActionMenu(i);return}this.syncNavigationItemTabIndexes(e??void 0)}}focusNavigationItem(t,e){let{navigationItems:i}=this,n=i.indexOf(e);if(n===-1)return;let o=n;t==="first"?o=0:t==="last"?o=i.length-1:t==="next"?o=(n+1)%i.length:o=(n-1+i.length)%i.length;let s=i[o];s&&s!==e&&s.setFocus(),this.syncNavigationItemTabIndexes(s)}focusActionGroupItem(t,e,i){if(!p(e)||!i||i.selectionMode==="multiple"||i.selectionMode==="none")return!1;let n=this.navigationItems.filter(c=>p(c)&&i.actions.includes(c)),o=n.indexOf(e);if(n.length<2||o===-1)return!1;let s=t==="next"?(o+1)%n.length:(o-1+n.length)%n.length,a=n[s];return!a||a===e?!1:(a.setFocus(),this.syncNavigationItemTabIndexes(a),!0)}getCurrentNavigationItem(){let{activeElement:t}=document;if(t instanceof HTMLElement){let i=t.matches("calcite-action, calcite-action-menu")?t:t.closest("calcite-action, calcite-action-menu");if(i&&this.navigationItems.includes(i))return i;let n=t.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}let e=this.getCurrentFocusItem();return e||this.getDefaultNavigationItem()}getCurrentFocusItem(){let{currentFocusItem:t}=this;return t?this.navigationItems.find(e=>e===t):void 0}getDefaultNavigationItem(){return this.navigationItems.find(t=>p(t)&&t!==this.expandToggleEl)||this.navigationItems[0]}getEventActionMenu(t){let e=t.composedPath().find(n=>n instanceof HTMLElement&&n.matches("calcite-action-menu"));if(e)return e;let i=t.target;if(i instanceof HTMLElement){let n=i.closest("calcite-action-menu");if(n)return n}return null}getOpenActionMenu(){return this.navigationItems.find(t=>t.matches("calcite-action-menu")&&t.open)}syncClosedActionMenu(t){this.updateNavigationItems();let e=this.navigationItems.find(i=>i===t);e&&this.setNavigationItemTabIndexes(e)}getNavigationItemFromEvent(t){for(let e of t.composedPath()){if(!(e instanceof HTMLElement)||!e.matches("calcite-action, calcite-action-menu"))continue;let i=this.navigationItems.find(o=>o===e);if(i)return i;let n=e.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}return null}syncNavigationItemTabIndexes(t){this.updateNavigationItems();let i=(t?this.navigationItems.find(n=>n===t):void 0)||this.getCurrentNavigationItem();i&&(this.setNavigationItemTabIndexes(i),this.updateActions())}setNavigationItemTabIndexes(t){t.matches(":focus-within")&&(this.currentFocusItem=t),this.navigationItems.forEach(e=>{let i=e===t;if(p(e)){i&&!e.disabled&&!e.hidden?e.removeAttribute("tabindex"):e.tabIndex=-1;return}i?e.removeAttribute("tabindex"):e.tabIndex=-1;let{menuButtonEl:n}=e;n&&(i&&!e.open?n.removeAttribute("tabindex"):n.tabIndex=-1)})}renderExpandTooltipSlot(){return x`<slot name=${F.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:n,position:o,scale:s}=this;return ht({collapseLabel:n.collapseLabel,collapseText:n.collapse,direction:this.direction,el:t,expanded:e,expandLabel:n.expandLabel,expandText:n.expand,position:o,ref:this.setExpandToggleEl,scale:s,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:n,overlayPositioning:o,expandPosition:s}=this,a=t==="start",c=!e&&s===t,r=a?this.hasActionsStart:this.hasActionsEnd,d=a?F.actionsStart:F.actionsEnd,G=a?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=a?this.actionsStartGroupLabel:this.actionsEndGroupLabel,S=!c&&!r&&!(a?this.hasActionsStart:this.hasActionsEnd),g=a?this.actionsStartGroupRef:this.actionsEndGroupRef,h=a?this.actionsStartSlotRef:this.actionsEndSlotRef,A=c?this.renderExpandToggle():null;return x`<calcite-action-group class=${k({[y.actionGroupStart]:a,[y.actionGroupEnd]:!a})} .hidden=${S} .label=${T} .layout=${n} .overlayPositioning=${o} .scale=${i} ${M(g)}>${a?A:null}<slot name=${d??W} @slotchange=${G} ${M(h)}></slot>${c?this.renderExpandTooltipSlot():null}${a?null:A}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return x`<div .ariaOrientation=${t} class=${k({[y.container]:!0,[y.hasActionGroups]:this.hasActionGroups})} role=toolbar ${M(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${M(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?x`<div aria-hidden=true class=${k(y.lineOverlay)}>${this.lineOffsets.map(e=>x`<div class=${k(y.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};V("calcite-action-bar",U);export{U as ActionBar};
2
+ import{a as et}from"./PCDEZ3A2.js";import{a as tt}from"./5K4OZJAZ.js";import{a as _}from"./FDHY2TZA.js";import{b as it}from"./6FZVJGKC.js";import{a as y,b as F}from"./7XS2SBMV.js";import{a as m,d as f}from"./HJHRSII7.js";import{c as $,e as b}from"./TJGNWJF6.js";import{c as p}from"./UTXN6YZB.js";import{a as Z}from"./ICVKMQOX.js";import"./2IM7ZZ7U.js";import{a as Y}from"./FFG334BY.js";import"./VMHJHFFS.js";import{e as Q}from"./DHYHGCNT.js";import"./V2I7OEHG.js";import{A as J,B as X,J as v,s as R}from"./RRBGCYLX.js";import{E as I,F as M,G as K,H as k,N as j,Q as H,T as V,g as q,h as x,l as W,p as D}from"./AUNDQFRR.js";var nt={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function ct(l,t){return t||l.closest("calcite-shell-panel")?.position||"start"}function lt({actions:l,expandables:t,expanded:e}){l.filter(i=>i.slot!==m.menuActions).forEach(i=>i.textEnabled=e),t.forEach(i=>i.expanded=e)}var dt=({tooltip:l,referenceElement:t,expanded:e,ref:i})=>(l&&(l.referenceElement=!e&&t?t:void 0),i&&i(t),t),ht=({collapseText:l,collapseLabel:t,direction:e,expanded:i,expandText:n,expandLabel:o,toggle:s,el:a,position:c,tooltip:r,ref:d,scale:G})=>{let T=e==="rtl",S=i?l:n,g=i?t:o,h=[nt.chevronsLeft,nt.chevronsRight];T&&h.reverse();let A=ct(a,c)==="end",C=A?h[1]:h[0],u=A?h[0]:h[1];return x`<calcite-action .aria=${{expanded:i}} .icon=${i?C:u} id=expand-toggle .label=${g} @click=${s} .scale=${G} .text=${S} .textEnabled=${i} title=${(!i&&!r?S:void 0)??W} ${M(z=>dt({tooltip:r,referenceElement:z,expanded:i,ref:d}))}></calcite-action>`},ut=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,n=e.length,o=0;for(let[s,a]of e.entries())if(o=o+a,o>i){n=s;break}else continue;return n},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ut({bufferSize:l,itemSizes:e,containerSize:t}),0),ft=l=>l.flatMap(t=>f(t)?t.actions:b(t)?t.actions.filter(e=>e.slot===$.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let n=l.getBoundingClientRect();return e?n.top-t.top:i?t.right-n.right:n.left-t.left},vt=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(n=>{let o=0,s=n.actions.filter(a=>a.parentElement===n).reverse();s.forEach(a=>{a.slot===m.menuActions&&(a.removeAttribute("slot"),a.textEnabled=t)}),i>0&&!n.overflowActionsDisabled&&s.some(a=>(s.filter(r=>!r.slot).length>1&&s.length>2&&!a.closest("calcite-action-menu")&&!a.overflowDisabled&&(a.textEnabled=!0,a.setAttribute("slot",m.menuActions),o++,o>1&&i--),i<1)),n.manager.component.requestUpdate()})},mt=q`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-bar-gap: var( --calcite-action-bar-items-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)) );--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc( var(--calcite-theme-space-base, var(--calcite-spacing-base)) + 1px )}.container{display:inline-flex;flex-direction:column;flex:1 1 auto;background-color:var(--calcite-action-bar-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,U=class extends K{constructor(){super(),this.actions=[],this.navigationItems=[],this.containerRef=I(),this.defaultSlotRef=I(),this.actionsStartSlotRef=I(),this.actionsEndSlotRef=I(),this.actionsStartGroupRef=I(),this.actionsEndGroupRef=I(),this.direction=Q(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.automaticallyOverflowedActions=[],this.authoredMenuActions=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=et()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:n,layout:o,expandPosition:s}=this;if(!this.el.isConnected||!this.containerRef.value)return;if(this.updateGroups(),this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||o==="vertical"&&!e||o==="horizontal"&&!t)return;let a=this.getItemSizes(),{actionGroups:c,actionsEnd:r,actionsEndGroups:d,actionsStart:G,actionsStartGroups:T,defaultSlotItems:S}=this,g=[...T,...c,...d],h=this.hasActionsEnd||!n&&s==="end"?1:0,A=this.hasActionsStart||!n&&s==="start"?1:0,C=S.length+h+A,u=C,E=getComputedStyle(this.containerRef.value);if(u+=v(o==="horizontal"?E.paddingInlineStart:E.paddingBlockStart)+v(o==="horizontal"?E.paddingInlineEnd:E.paddingBlockEnd),g.length>0){let O=g.length-1;g.forEach((N,L)=>{let w=getComputedStyle(N),B=v(w.gap),P=this.getActionGroupItemCount(N),rt=Math.max(P-1,0);u+=B*rt,L!==O&&(u+=v(o==="horizontal"?w.paddingInlineEnd:w.paddingBlockEnd),u+=v(o==="horizontal"?w.borderInlineEndWidth:w.borderBlockEndWidth))})}let z=(O,N,L)=>{if(!N||O.length<1)return;let w=getComputedStyle(N),B=v(w.gap),P=O.length+(L?1:0);u+=B*Math.max(P-1,0)},at=!n&&s==="start",ot=!n&&s==="end";z(G,this.actionsStartGroupRef.value,at),z(r,this.actionsEndGroupRef.value,ot),C>1&&(u+=v(E.gap)*(C-1));let st=pt({bufferSize:u,containerSize:o==="horizontal"?t:e,itemSizes:a});this.runOverflowActions({actionGroups:g,expanded:i,overflowCount:st})},j.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.target&&t.target!==this.el?{width:this.el.clientWidth,height:this.el.clientHeight}:t.contentRect,n=this.layout==="horizontal"?"width":"height",o=n==="width"?e:i;this.lastOverflowAxisSize?.axis===n&&this.lastOverflowAxisSize.size===o||(this.lastOverflowAxisSize={axis:n,size:o},this.resize({width:e,height:i}))},this.resizeObserver=_("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=Z({blocking:!0}),this.focusSetter=Y()(this).setFocus,this.setExpandToggleEl=t=>{this.expandToggleEl=t,this.syncNavigationItemTabIndexes()},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=D({cancelable:!1}),this.calciteActionBarExpand=D({cancelable:!1}),this.calciteActionBarToggle=D({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("click",this.handleFocusIn),this.listen("keydown",this.handleKeyDown),this.listen("focusin",this.handleFocusIn)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=mt}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}get expandDisabled(){return this.expandToggleDisabled}set expandDisabled(t){H.deprecated("property",{component:this,name:"expandDisabled",removalVersion:6,suggested:"expandToggleDisabled"}),this.expandToggleDisabled=t}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){H.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.overflowActions(),this.updateActions(),this.overflowActionsDisabledHandler(this.overflowActionsDisabled),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)||t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=t==="horizontal"?"clientWidth":"clientHeight",n=this.actions.map(a=>a[i]||0);this.getTrackedActionGroups().flatMap(a=>R(a,"calcite-action-menu")).forEach(a=>{let c=(a.actions??[]).find(r=>r.slot===$.trigger);n.push((c??a)[i]||0)}),e&&n.push(e[i]||0);let s=Math.max(...n,0);return n.map(a=>a||s)}getActionGroupItemCount(t){let e=t.actions.filter(n=>n.parentElement===t),i=R(t,"calcite-action-menu").length;return e.length+i}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}overflowActionsDisabledHandler(t){if(t){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.containerRef.value&&this.resizeObserver?.observe(this.containerRef.value),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(n=>f(n)||b(n));i&&(f(i)&&!i.menuOpen||b(i)&&!i.open||(this.getTrackedActionGroups().forEach(n=>{e.includes(n)||(n.menuOpen=!1)}),this.getTrackedActionMenus().forEach(n=>{e.includes(n)||(n.open=!1)}),this.updateActions()))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let n=++this.overflowPassId,o=t.flatMap(a=>a.actions.filter(c=>c.parentElement===a));this.automaticallyOverflowedActions=this.automaticallyOverflowedActions.filter(a=>o.includes(a)),this.authoredMenuActions=this.authoredMenuActions.filter(a=>o.includes(a)&&a.slot===m.menuActions),o.forEach(a=>{a.slot===m.menuActions&&!this.automaticallyOverflowedActions.includes(a)&&!this.authoredMenuActions.includes(a)&&this.authoredMenuActions.push(a)});let s=new Map;t.forEach(a=>{let c=a.actions.filter(r=>r.parentElement===a);s.set(a,c.map(r=>r.slot??"").join("|"))}),vt({actionGroups:t,expanded:e,overflowCount:i}),this.authoredMenuActions.forEach(a=>{a.slot=m.menuActions,a.textEnabled=!0}),this.automaticallyOverflowedActions=o.filter(a=>a.slot===m.menuActions&&!this.authoredMenuActions.includes(a)),t.forEach(a=>{let r=a.actions.filter(d=>d.parentElement===a).map(d=>d.slot??"").join("|");s.get(a)!==r&&(this.suppressedActionGroupActionsChange.set(a,n),this.queueSuppressedActionGroupActionsChangeCleanup(a,n))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale}),this.syncNavItems()}syncNavItems(){this.el.isConnected&&(this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions())}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(n=>{n.hidden||t.push(n)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",n=t.getBoundingClientRect(),o=this.getWrapItems(),s=[],a=null;o.forEach(r=>{let d=gt({item:r,containerRect:n,horizontal:e,rtl:i});a!==null&&Math.abs(d-a)>1&&s.push(d),a=d}),(s.length!==this.lineOffsets.length||s.some((r,d)=>r!==this.lineOffsets[d]))&&(this.lineOffsets=s)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.updateGroups(),this.updateNavigationItems(),this.syncNavigationItemTabIndexes(),this.updateActions(),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot()),this.syncNavigationItemTabIndexes()}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot()),this.syncNavigationItemTabIndexes()}handleTooltipSlotChange(t){let e=J(t).filter(it);this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}updateNavigationItems(){let t=[...this.getNavigationItems(this.actionsStart),...this.getNavigationItems(this.defaultSlotItems),...this.getNavigationItems(this.actionsEnd)],{expandToggleEl:e}=this;this.navigationItems=e&&this.isNavigableAction(e)?this.expandPosition==="start"?[e,...t]:[...t,e]:t}getNavigationItems(t){return t.flatMap(e=>p(e)?this.isNavigableAction(e)?[e]:[]:b(e)?this.isNavigableActionMenu(e)?[e]:[]:this.getActionGroupNavigationItems(e))}getActionGroupNavigationItems(t){if(t.hasAttribute("hidden"))return[];let e=(t.actions??[]).filter(s=>this.isNavigableAction(s)),i=R(t,"calcite-action-menu").filter(s=>this.isNavigableActionMenu(s)),n=[...e,...i].sort((s,a)=>s===a?0:s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),{actionMenu:o}=t;return o&&this.isNavigableActionMenu(o)&&!n.includes(o)&&n.push(o),n}isNavigableAction(t){return!t.disabled&&!t.hidden&&!t.inert&&t.slot!=="menu-actions"&&!t.closest("calcite-action-menu")}isNavigableActionMenu(t){let e=t.menuButtonEl??t.actions?.find(i=>i.slot===$.trigger);return!t.hidden&&!t.inert&&!e?.disabled&&!e?.hidden&&!e?.inert}syncActions(){this.actions=ft([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&lt({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>b(t))}getAssignedActionBarItems(t){return t?X(t).filter(e=>p(e)||f(e)||b(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>f(t)),this.actionMenus=this.defaultSlotItems.filter(t=>b(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>f(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>f(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes()))}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&(this.syncActionsAndOverflow(),this.syncNavigationItemTabIndexes())}handleKeyDown(t){if((this.getEventActionMenu(t)||this.getOpenActionMenu())?.open)return t.key==="Escape",void 0;if(t.defaultPrevented)return;this.updateNavigationItems();let i=this.getNavigationItemFromEvent(t);if(!i||!this.navigationItems.length)return;if(this.layout==="grid"&&["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(t.key)){let r=t.key==="ArrowDown"||t.key==="ArrowRight"?"next":"previous";this.focusNavigationItem(r,i),t.preventDefault();return}let n=this.layout!=="horizontal",o=t.composedPath().find(f),s=n?"ArrowRight":"ArrowDown",a=n?"ArrowLeft":"ArrowUp",c=i.matches("calcite-action-menu")&&!i.open;if((o?.selectionMode==="multiple"||o?.selectionMode==="none")&&(t.key===s||t.key===a)&&!c){t.preventDefault();return}if(!this.handleSecondaryArrowActionMenuOpen(t,i,n))switch(t.key){case"ArrowDown":n?(this.focusNavigationItem("next",i),t.preventDefault()):this.focusActionGroupItem("next",i,o)&&t.preventDefault();break;case"ArrowUp":n?(this.focusNavigationItem("previous",i),t.preventDefault()):this.focusActionGroupItem("previous",i,o)&&t.preventDefault();break;case"ArrowRight":n?this.focusActionGroupItem("next",i,o)&&t.preventDefault():(this.focusNavigationItem("next",i),t.preventDefault());break;case"ArrowLeft":n?this.focusActionGroupItem("previous",i,o)&&t.preventDefault():(this.focusNavigationItem("previous",i),t.preventDefault());break;case"Home":this.focusNavigationItem("first",i),t.preventDefault();break;case"End":this.focusNavigationItem("last",i),t.preventDefault();break;case"Tab":t.composedPath().some(r=>p(r)&&r.aria?.role==="menuitem")||this.setNavigationItemTabIndexes(i);break}}handleSecondaryArrowActionMenuOpen(t,e,i){if(!e.matches("calcite-action-menu")||e.open)return!1;let n=i?"ArrowRight":"ArrowDown",o=i?"ArrowLeft":"ArrowUp";return t.key!==n&&t.key!==o?!1:(t.preventDefault(),this.openActionMenuAndFocusBoundaryItem(e,t.key===n?"first":"last"),!0)}openActionMenuAndFocusBoundaryItem(t,e){t.open=!0,this.focusActionMenuBoundaryItem(t,e)}async focusActionMenuBoundaryItem(t,e){if(await t.componentOnReady(),!t.open)return;let i=t.actions.filter(o=>o.aria?.role==="menuitem"&&!o.disabled&&!o.hidden&&!o.inert);await(e==="first"?i[0]:i[i.length-1])?.setFocus({preventScroll:!0})}handleFocusIn(t){this.updateNavigationItems();let e=this.getNavigationItemFromEvent(t);if(t instanceof MouseEvent){t.detail>0&&e&&p(e)&&this.setNavigationItemTabIndexes(e);return}let i=this.getEventActionMenu(t)||this.getOpenActionMenu();if(!i?.open){if(e?.matches("calcite-action-menu")&&i){this.syncClosedActionMenu(i);return}this.syncNavigationItemTabIndexes(e??void 0)}}focusNavigationItem(t,e){let{navigationItems:i}=this,n=i.indexOf(e);if(n===-1)return;let o=n;t==="first"?o=0:t==="last"?o=i.length-1:t==="next"?o=(n+1)%i.length:o=(n-1+i.length)%i.length;let s=i[o];s&&s!==e&&s.setFocus(),this.syncNavigationItemTabIndexes(s)}focusActionGroupItem(t,e,i){if(!p(e)||!i||i.selectionMode==="multiple"||i.selectionMode==="none")return!1;let n=this.navigationItems.filter(c=>p(c)&&i.actions.includes(c)),o=n.indexOf(e);if(n.length<2||o===-1)return!1;let s=t==="next"?(o+1)%n.length:(o-1+n.length)%n.length,a=n[s];return!a||a===e?!1:(a.setFocus(),this.syncNavigationItemTabIndexes(a),!0)}getCurrentNavigationItem(){let{activeElement:t}=document;if(t instanceof HTMLElement){let i=t.matches("calcite-action, calcite-action-menu")?t:t.closest("calcite-action, calcite-action-menu");if(i&&this.navigationItems.includes(i))return i;let n=t.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}let e=this.getCurrentFocusItem();return e||this.getDefaultNavigationItem()}getCurrentFocusItem(){let{currentFocusItem:t}=this;return t?this.navigationItems.find(e=>e===t):void 0}getDefaultNavigationItem(){return this.navigationItems.find(t=>p(t)&&t!==this.expandToggleEl)||this.navigationItems[0]}getEventActionMenu(t){let e=t.composedPath().find(n=>n instanceof HTMLElement&&n.matches("calcite-action-menu"));if(e)return e;let i=t.target;if(i instanceof HTMLElement){let n=i.closest("calcite-action-menu");if(n)return n}return null}getOpenActionMenu(){return this.navigationItems.find(t=>t.matches("calcite-action-menu")&&t.open)}syncClosedActionMenu(t){this.updateNavigationItems();let e=this.navigationItems.find(i=>i===t);e&&this.setNavigationItemTabIndexes(e)}getNavigationItemFromEvent(t){for(let e of t.composedPath()){if(!(e instanceof HTMLElement)||!e.matches("calcite-action, calcite-action-menu"))continue;let i=this.navigationItems.find(o=>o===e);if(i)return i;let n=e.closest("calcite-action-menu");if(n){let o=this.navigationItems.find(s=>s===n);if(o)return o}}return null}syncNavigationItemTabIndexes(t){this.updateNavigationItems();let i=(t?this.navigationItems.find(n=>n===t):void 0)||this.getCurrentNavigationItem();i&&(this.setNavigationItemTabIndexes(i),this.updateActions())}setNavigationItemTabIndexes(t){t.matches(":focus-within")&&(this.currentFocusItem=t),this.navigationItems.forEach(e=>{let i=e===t;if(p(e)){i&&!e.disabled&&!e.hidden?e.removeAttribute("tabindex"):e.tabIndex=-1;return}i?e.removeAttribute("tabindex"):e.tabIndex=-1;let{menuButtonEl:n}=e;n&&(i&&!e.open?n.removeAttribute("tabindex"):n.tabIndex=-1)})}renderExpandTooltipSlot(){return x`<slot name=${F.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:n,position:o,scale:s}=this;return ht({collapseLabel:n.collapseLabel,collapseText:n.collapse,direction:this.direction,el:t,expanded:e,expandLabel:n.expandLabel,expandText:n.expand,position:o,ref:this.setExpandToggleEl,scale:s,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:n,overlayPositioning:o,expandPosition:s}=this,a=t==="start",c=!e&&s===t,r=a?this.hasActionsStart:this.hasActionsEnd,d=a?F.actionsStart:F.actionsEnd,G=a?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=a?this.actionsStartGroupLabel:this.actionsEndGroupLabel,S=!c&&!r&&!(a?this.hasActionsStart:this.hasActionsEnd),g=a?this.actionsStartGroupRef:this.actionsEndGroupRef,h=a?this.actionsStartSlotRef:this.actionsEndSlotRef,A=c?this.renderExpandToggle():null;return x`<calcite-action-group class=${k({[y.actionGroupStart]:a,[y.actionGroupEnd]:!a})} .hidden=${S} .label=${T} .layout=${n} .overlayPositioning=${o} .scale=${i} ${M(g)}>${a?A:null}<slot name=${d??W} @slotchange=${G} ${M(h)}></slot>${c?this.renderExpandTooltipSlot():null}${a?null:A}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return x`<div .ariaOrientation=${t} class=${k({[y.container]:!0,[y.hasActionGroups]:this.hasActionGroups})} role=toolbar ${M(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${M(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?x`<div aria-hidden=true class=${k(y.lineOverlay)}>${this.lineOffsets.map(e=>x`<div class=${k(y.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};V("calcite-action-bar",U);export{U as ActionBar};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as F}from"./YCXXUZSU.js";import{a as O,b as B}from"./NQUV4A65.js";import{c as f,e as z,f as C,g as D,h as L,i as h}from"./CSEZ4GFT.js";import"./WTNYMVTD.js";import"./5K4OZJAZ.js";import{a as d}from"./6FZVJGKC.js";import{a as E}from"./ECMMT2MZ.js";import{a as w}from"./CNNZUX2A.js";import"./JN6YLTUP.js";import{a as k}from"./AELAOQDK.js";import"./2IM7ZZ7U.js";import{e as x}from"./MGGEICJM.js";import"./MCYGB35M.js";import"./RRBGCYLX.js";import{E as g,F as p,G as b,H as o,T as y,g as u,h as v,p as t}from"./7OQZCK5X.js";var S=u`:host{display:contents;--calcite-internal-tooltip-padding-block: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-tooltip-padding-inline: var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-tooltip)}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;border-radius:var(--calcite-corner-radius-sm);z-index:var(--calcite-z-index)}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{z-index:calc(var(--calcite-z-index) * -1);position:absolute;pointer-events:none;fill:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]){--calcite-internal-tooltip-padding-block: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-tooltip-padding-inline: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .container{font-size:var(--calcite-font-size-relative-xs);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}.container{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);overflow-wrap:break-word;word-break:break-word;position:relative;overflow:hidden;font-weight:var(--calcite-font-weight-medium);padding-block:var(--calcite-internal-tooltip-padding-block);padding-inline:var(--calcite-internal-tooltip-padding-inline);border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:var(--calcite-border-width-sm);border-style:solid;box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-tooltip-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,T=B({hover:!0}),m=class extends b{constructor(){super(...arguments),this.direction=x(),this.referenceElementType="hover",this.referenceElementController=O({manager:T})(this),this.transitionProp="opacity",this.transitionRef=g(),this.topLayer=E({disabledOverride:()=>this.open&&!this.referenceEl,target:()=>this.floatingEl})(this),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=h,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.pointerDisabled=!1,this.scale="m",this.topLayerDisabled=!1,this.calciteTooltipBeforeClose=t({cancelable:!1}),this.calciteTooltipBeforeOpen=t({cancelable:!1}),this.calciteTooltipClose=t({cancelable:!1}),this.calciteTooltipOpen=t({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async reposition(e=!1){let{referenceEl:a,placement:r,overlayPositioning:l,offsetDistance:n,offsetSkidding:i,arrowEl:c,floatingEl:s}=this;return z(this,{direction:this.direction,floatingEl:s,referenceEl:a,overlayPositioning:l,placement:r,offsetDistance:n,offsetSkidding:i,arrowEl:c,type:"tooltip"},e)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==h)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){e.has("referenceEl")&&D(this)}disconnectedCallback(){super.disconnectedCallback(),L(this)}openHandler(){w(this),this.reposition(!0)}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),C(this),this.topLayer.hide()}setFloatingEl(e){this.floatingEl=e}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}render(){let{referenceEl:e,label:a,open:r,pointerDisabled:l,floatingLayout:n}=this,i=e&&r,c=!i,s=l?null:k("floating-arrow",F({floatingLayout:n,ref:this.setArrowEl}));return this.el.inert=c,this.el.ariaLabel=a??null,this.el.role="tooltip",v`<div class=${o(d.positionContainer)} popover=manual ${p(this.setFloatingEl)}><div class=${o({[f.animation]:!0,[f.animationActive]:i})} ${p(this.transitionRef)}>${s}<div class=${o(d.container)}><slot></slot></div></div></div>`}};y("calcite-tooltip",m);export{m as Tooltip};
2
+ import{a as F}from"./FTPXHYUM.js";import{a as O,b as B}from"./LLKQ7TX7.js";import{c as f,e as z,f as C,g as D,h as L,i as h}from"./EOHL7O6K.js";import"./WTNYMVTD.js";import"./5K4OZJAZ.js";import{a as d}from"./6FZVJGKC.js";import{a as E}from"./DZIKAA2A.js";import{a as w}from"./CNNZUX2A.js";import"./JN6YLTUP.js";import{a as k}from"./QWX4EGTZ.js";import"./2IM7ZZ7U.js";import{e as x}from"./DHYHGCNT.js";import"./V2I7OEHG.js";import"./RRBGCYLX.js";import{E as g,F as p,G as b,H as o,T as y,g as u,h as v,p as t}from"./AUNDQFRR.js";var S=u`:host{display:contents;--calcite-internal-tooltip-padding-block: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-tooltip-padding-inline: var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-tooltip)}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;border-radius:var(--calcite-corner-radius-sm);z-index:var(--calcite-z-index)}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{z-index:calc(var(--calcite-z-index) * -1);position:absolute;pointer-events:none;fill:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]){--calcite-internal-tooltip-padding-block: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-tooltip-padding-inline: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .container{font-size:var(--calcite-font-size-relative-xs);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}.container{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);overflow-wrap:break-word;word-break:break-word;position:relative;overflow:hidden;font-weight:var(--calcite-font-weight-medium);padding-block:var(--calcite-internal-tooltip-padding-block);padding-inline:var(--calcite-internal-tooltip-padding-inline);border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:var(--calcite-border-width-sm);border-style:solid;box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-tooltip-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,T=B({hover:!0}),m=class extends b{constructor(){super(...arguments),this.direction=x(),this.referenceElementType="hover",this.referenceElementController=O({manager:T})(this),this.transitionProp="opacity",this.transitionRef=g(),this.topLayer=E({disabledOverride:()=>this.open&&!this.referenceEl,target:()=>this.floatingEl})(this),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=h,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.pointerDisabled=!1,this.scale="m",this.topLayerDisabled=!1,this.calciteTooltipBeforeClose=t({cancelable:!1}),this.calciteTooltipBeforeOpen=t({cancelable:!1}),this.calciteTooltipClose=t({cancelable:!1}),this.calciteTooltipOpen=t({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async reposition(e=!1){let{referenceEl:a,placement:r,overlayPositioning:l,offsetDistance:n,offsetSkidding:i,arrowEl:c,floatingEl:s}=this;return z(this,{direction:this.direction,floatingEl:s,referenceEl:a,overlayPositioning:l,placement:r,offsetDistance:n,offsetSkidding:i,arrowEl:c,type:"tooltip"},e)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==h)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){e.has("referenceEl")&&D(this)}disconnectedCallback(){super.disconnectedCallback(),L(this)}openHandler(){w(this),this.reposition(!0)}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),C(this),this.topLayer.hide()}setFloatingEl(e){this.floatingEl=e}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}render(){let{referenceEl:e,label:a,open:r,pointerDisabled:l,floatingLayout:n}=this,i=e&&r,c=!i,s=l?null:k("floating-arrow",F({floatingLayout:n,ref:this.setArrowEl}));return this.el.inert=c,this.el.ariaLabel=a??null,this.el.role="tooltip",v`<div class=${o(d.positionContainer)} popover=manual ${p(this.setFloatingEl)}><div class=${o({[f.animation]:!0,[f.animationActive]:i})} ${p(this.transitionRef)}>${s}<div class=${o(d.container)}><slot></slot></div></div></div>`}};y("calcite-tooltip",m);export{m as Tooltip};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as M,c as D,d as _}from"./MCYGB35M.js";import{a as L,b as P,c as m,d as f,e as A,f as b,n as N,o as v,q as E}from"./7OQZCK5X.js";var j=t=>(...o)=>{let e=f(),s=new t(...o),r=s.exports;m(e.at(-1));let n=s.component.manager;n.W(s,r),s.watchExports(n.W.bind(n,s)),A(s);let i=[s.component,...e].reverse();return v(i,a=>a===void 0?void 0:U(s,a,r),r)},U=(t,{host:o,key:e,isReactive:s},r)=>{let n=o,i=n[e]!==t.exports,a=n[e]!==r,c=r!==t.exports;if(i&&!a&&c&&(n[e]=t.exports),o===t.component){if(s){let l=t.component.manager;a&&l.W(t,n[e]),t.onUpdate(d=>{if(d.has(e)){let w=n[e];w!==t.exports&&l.W(t,w)}})}t.O=s?void 0:e}let u=t.component.constructor.elementProperties.get(e)?.readOnly;t.watchExports(()=>{n[e]!==t.exports&&(u?b(()=>{n[e]=t.exports}):n[e]=t.exports)})};var k=(t,o)=>{let e=t;for(;e;){if(e===o)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},h=(t,o,e)=>{let s=K(o).subscribe;return s(r=>{r.some(i=>k(t,i.target))&&e()})},y={},K=t=>{let o=t.join(","),e=y[o];if(e!==void 0)return e;let s=new Set,r=new MutationObserver(i=>s.forEach(a=>a(i)));globalThis.document&&r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});let n={subscribe:i=>(s.add(i),()=>{s.delete(i),s.size===0&&(r.disconnect(),y[o]=void 0)})};return y[o]=n,n},R=(t,o)=>{let e=t;for(;e;){let s=e.closest?.(o);if(s)return s;let r=e.getRootNode?.();if(r===globalThis.document)return;e=r?.host}};var g=(t,o,e)=>R(t,`[${o}]`)?.getAttribute(o)??e;var x=t=>{let o=g(t,"lang",globalThis.navigator?.language||M);return{lang:o,t9nLocale:_(o)}},T=(t,o,e,s)=>{let r,n=()=>$(t,o(),s).then(i=>{(r?.lang!==i.lang||r.t9nLocale!==i.t9nLocale||r.t9nStrings!==i.t9nStrings)&&e(i),r=i}).catch(i=>{N("error","intl","Error updating component locale state",{detail:{error:i}})});return queueMicrotask(n),h(t,["lang"],n)},$=async(t,o,e=t.localName.split("-").slice(1).join("-"))=>{let{lang:s,t9nLocale:r}=x(t),n=`${o}/${e}/t9n`,a=e===null?{}:await D(r,n,"messages.");return{lang:s,t9nLocale:r,t9nStrings:a}};var S=t=>W(void 0,t),ge=t=>o=>W(o,t),C=class extends E{constructor(o,e){super(o);let s=this.exports;try{P(this.component);let r=e(this.component,this),n=this.exports!==s;if(L(r)){n||this.setProvisionalExports(r);let i=r.then(a=>{this.exports=a,super.catchUpLifecycle()}).catch(a=>{this.P.reject(a)});this.onLoad(async()=>await i)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},W=j(C),be=(t,o)=>new O(t,o),O=class extends E{#e;#t;#o;constructor(o,e){super(),!!1&&(this.#t=o,this.#o=e,this.#e=new MutationObserver(s=>{s.forEach(r=>{o.includes(r.attributeName)&&e.call(this.component,this.component.el.getAttribute(r.attributeName),r.oldValue,r.attributeName)})}))}hostConnected(){this.#t.forEach(o=>{this.component.el.hasAttribute(o)&&this.#o.call(this.component,this.component.el.getAttribute(o),null,o)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}};var ve=t=>(...o)=>{let e=f(),s=new t(...o);return m(e.at(-1)),s};var V="ltr",Ee=()=>S((t,o)=>{o.exports=V,o.onLifecycle(()=>{let e=()=>{let s=g(t.el,"dir",V);o.exports=s==="rtl"?"rtl":"ltr"};return e(),h(t.el,["dir"],e)})}),ye=t=>(o={})=>S((e,s)=>{let r=x(e.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},i=e;s.onLifecycle(()=>T(e.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:u})=>{let l={...p,_lang:u,_t9nLocale:c,_loading:!1};s.exports=l;let d=p.componentLabel;typeof d=="string"&&"label"in e&&e.label==null&&(e.label??=d),a(i.messageOverrides)},o.name));let a=c=>{let p=s.exports,u=p._original??p,l=F(u,c);c&&(l._original=u),s.exports=l};return"messageOverrides"in i&&s.onUpdate(c=>{c.has("messageOverrides")&&a(i.messageOverrides)}),o.blocking?(s.setProvisionalExports(n,!1),s.ready):n}),F=(t,o)=>{if(!o)return t;let e={...t};return Object.entries(o).forEach(([s,r])=>{t[s]!==void 0&&(typeof r=="object"?e[s]=F(t[s],r):e[s]=r??t[s])}),e};export{S as a,ge as b,be as c,ve as d,Ee as e,ye as f};
2
+ import{b as M,c as D,d as _}from"./V2I7OEHG.js";import{a as L,b as P,c as m,d as f,e as A,f as b,n as N,o as v,q as E}from"./AUNDQFRR.js";var j=t=>(...o)=>{let e=f(),s=new t(...o),r=s.exports;m(e.at(-1));let n=s.component.manager;n.W(s,r),s.watchExports(n.W.bind(n,s)),A(s);let i=[s.component,...e].reverse();return v(i,a=>a===void 0?void 0:U(s,a,r),r)},U=(t,{host:o,key:e,isReactive:s},r)=>{let n=o,i=n[e]!==t.exports,a=n[e]!==r,c=r!==t.exports;if(i&&!a&&c&&(n[e]=t.exports),o===t.component){if(s){let l=t.component.manager;a&&l.W(t,n[e]),t.onUpdate(d=>{if(d.has(e)){let w=n[e];w!==t.exports&&l.W(t,w)}})}t.O=s?void 0:e}let u=t.component.constructor.elementProperties.get(e)?.readOnly;t.watchExports(()=>{n[e]!==t.exports&&(u?b(()=>{n[e]=t.exports}):n[e]=t.exports)})};var k=(t,o)=>{let e=t;for(;e;){if(e===o)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},h=(t,o,e)=>{let s=K(o).subscribe;return s(r=>{r.some(i=>k(t,i.target))&&e()})},y={},K=t=>{let o=t.join(","),e=y[o];if(e!==void 0)return e;let s=new Set,r=new MutationObserver(i=>s.forEach(a=>a(i)));globalThis.document&&r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});let n={subscribe:i=>(s.add(i),()=>{s.delete(i),s.size===0&&(r.disconnect(),y[o]=void 0)})};return y[o]=n,n},R=(t,o)=>{let e=t;for(;e;){let s=e.closest?.(o);if(s)return s;let r=e.getRootNode?.();if(r===globalThis.document)return;e=r?.host}};var g=(t,o,e)=>R(t,`[${o}]`)?.getAttribute(o)??e;var x=t=>{let o=g(t,"lang",globalThis.navigator?.language||M);return{lang:o,t9nLocale:_(o)}},T=(t,o,e,s)=>{let r,n=()=>$(t,o(),s).then(i=>{(r?.lang!==i.lang||r.t9nLocale!==i.t9nLocale||r.t9nStrings!==i.t9nStrings)&&e(i),r=i}).catch(i=>{N("error","intl","Error updating component locale state",{detail:{error:i}})});return queueMicrotask(n),h(t,["lang"],n)},$=async(t,o,e=t.localName.split("-").slice(1).join("-"))=>{let{lang:s,t9nLocale:r}=x(t),n=`${o}/${e}/t9n`,a=e===null?{}:await D(r,n,"messages.");return{lang:s,t9nLocale:r,t9nStrings:a}};var S=t=>W(void 0,t),ge=t=>o=>W(o,t),C=class extends E{constructor(o,e){super(o);let s=this.exports;try{P(this.component);let r=e(this.component,this),n=this.exports!==s;if(L(r)){n||this.setProvisionalExports(r);let i=r.then(a=>{this.exports=a,super.catchUpLifecycle()}).catch(a=>{this.P.reject(a)});this.onLoad(async()=>await i)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},W=j(C),be=(t,o)=>new O(t,o),O=class extends E{#e;#t;#o;constructor(o,e){super(),!!1&&(this.#t=o,this.#o=e,this.#e=new MutationObserver(s=>{s.forEach(r=>{o.includes(r.attributeName)&&e.call(this.component,this.component.el.getAttribute(r.attributeName),r.oldValue,r.attributeName)})}))}hostConnected(){this.#t.forEach(o=>{this.component.el.hasAttribute(o)&&this.#o.call(this.component,this.component.el.getAttribute(o),null,o)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}};var ve=t=>(...o)=>{let e=f(),s=new t(...o);return m(e.at(-1)),s};var V="ltr",Ee=()=>S((t,o)=>{o.exports=V,o.onLifecycle(()=>{let e=()=>{let s=g(t.el,"dir",V);o.exports=s==="rtl"?"rtl":"ltr"};return e(),h(t.el,["dir"],e)})}),ye=t=>(o={})=>S((e,s)=>{let r=x(e.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},i=e;s.onLifecycle(()=>T(e.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:u})=>{let l={...p,_lang:u,_t9nLocale:c,_loading:!1};s.exports=l;let d=p.componentLabel;typeof d=="string"&&"label"in e&&e.label==null&&(e.label??=d),a(i.messageOverrides)},o.name));let a=c=>{let p=s.exports,u=p._original??p,l=F(u,c);c&&(l._original=u),s.exports=l};return"messageOverrides"in i&&s.onUpdate(c=>{c.has("messageOverrides")&&a(i.messageOverrides)}),o.blocking?(s.setProvisionalExports(n,!1),s.ready):n}),F=(t,o)=>{if(!o)return t;let e={...t};return Object.entries(o).forEach(([s,r])=>{t[s]!==void 0&&(typeof r=="object"?e[s]=F(t[s],r):e[s]=r??t[s])}),e};export{S as a,ge as b,be as c,ve as d,Ee as e,ye as f};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as S,b}from"./6RCNPDD6.js";import{b as v}from"./22NLVRMQ.js";import{c as A}from"./ODU6JYNH.js";import{a as $}from"./BPQQK2PE.js";import{a as k}from"./JN6YLTUP.js";import{a}from"./AELAOQDK.js";import"./2IM7ZZ7U.js";import{a as T}from"./VMHJHFFS.js";import"./MGGEICJM.js";import"./MCYGB35M.js";import{B as g,E as h}from"./RRBGCYLX.js";import{E as r,F as o,G as C,H as R,T as y,g as w,h as s,m,p as u}from"./7OQZCK5X.js";var I=w`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) tr{opacity:var(--calcite-opacity-disabled);pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}:host([slot=table-header]) tr{position:var(--calcite-internal-table-header-row-position);inset-block-start:var(--calcite-internal-table-header-offset, 0);z-index:var(--calcite-internal-table-header-z-index, calc(var(--calcite-z-index) + 1))}:host([selected]) calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color-selected, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}tr{--calcite-internal-table-row-border-block-end-width: var(--calcite-border-width-sm);--calcite-internal-table-row-border-block-end-color: var(--calcite-table-row-border-color, transparent);background-color:var(--calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}tr.last-visible-row{--calcite-internal-table-row-border-block-end-width: 0;--calcite-internal-table-row-border-block-end-color: transparent}:host([item-hidden]){display:none}`,f=class extends C{constructor(){super(),this.numberedCellRef=r(),this.numberedHeaderRef=r(),this.rowCells=[],this.rowSlotRef=r(),this.selectionCellRef=r(),this.selectionHeaderRef=r(),this.userTriggered=!1,this._selected=!1,this.clickHandler=()=>{this.handleRowSelection()},this.handleKeyboardSelection=e=>{k(e.key)&&(e.key===" "&&e.preventDefault(),this.handleRowSelection())},this.interactiveContainer=$(this),this.itemHidden=!1,this.disabled=!1,this.interactionMode="interactive",this.lastVisibleRow=!1,this.numbered=!1,this.stickyHeaderEnabled=!1,this.selectionMode="none",this.calciteInternalTableRowFocusRequest=u({cancelable:!1}),this.calciteInternalTableRowSelect=u({cancelable:!1}),this.calciteTableRowSelect=u({cancelable:!1})}static{this.properties={alignment:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],bodyRowCount:[9,{},{type:Number}],cellCount:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,lastVisibleRow:[5,{},{type:Boolean}],numbered:[5,{},{type:Boolean}],positionAll:[9,{},{type:Number}],positionSection:[9,{},{type:Number}],positionSectionLocalized:1,readCellContentsToAT:[5,{},{type:Boolean}],rowType:1,scale:1,stickyHeaderEnabled:[5,{},{type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionMode:1}}static{this.styles=I}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.handleCellChanges())}load(){this.listenOn(document,"calciteInternalTableRowFocusChange",this.calciteInternalTableRowFocusChangeHandler),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("bodyRowCount")||e.has("scale")||e.has("selectedRowCount")||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive"))&&this.handleCellChanges(),(e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.handleDelayedCellChanges(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&!this.userTriggered&&this.calciteInternalTableRowSelect.emit()}loaded(){this.rowCells.length>0&&this.updateCells()}handleSlotChange(){this.updateCells()}handleCellChanges(){this.rowCells.length>0&&this.updateCells()}handleDelayedCellChanges(){this.rowCells.length>0&&requestAnimationFrame(()=>this.updateCells())}calciteInternalTableRowFocusChangeHandler(e){if(e.target.contains(this.el)){let l=e.detail.cellPosition,n=e.detail.rowPosition,i=e.detail.destination,t=e.detail.lastCell;if(n===this.positionAll){if(this.disabled){let d=i==="last"?"previous":i==="first"?"next":i;this.emitTableRowFocusRequest(l,this.positionAll,d);return}let c=t?this.rowCells[this.rowCells.length-1]:this.rowCells?.find((d,p)=>p+1===l);c&&c.setFocus()}}}keyDownHandler(e){if(this.interactionMode!=="interactive")return;let l=e.target,n=e.key,i=e.ctrlKey,t=this.rowCells;if(v(l)||A(l))switch(n){case"ArrowUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"previous"),e.preventDefault();break;case"ArrowDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"next"),e.preventDefault();break;case"PageUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"first"),e.preventDefault();break;case"PageDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"last"),e.preventDefault();break;case"ArrowLeft":h(t,l,"previous",!1,!1),e.preventDefault();break;case"ArrowRight":h(t,l,"next",!1,!1),e.preventDefault();break;case"Home":i?(this.emitTableRowFocusRequest(1,this.positionAll,"first"),e.preventDefault()):(h(t,l,"first",!1,!1),e.preventDefault());break;case"End":i?(this.emitTableRowFocusRequest(this.rowCells?.length,this.positionAll,"last",!0),e.preventDefault()):(h(t,l,"last",!1,!1),e.preventDefault());break}}emitTableRowFocusRequest(e,l,n,i=!1){this.calciteInternalTableRowFocusRequest.emit({cellPosition:e,rowPosition:l,destination:n,lastCell:i})}updateCells(){let e=this.alignment?this.alignment:this.rowType!=="head"?"center":"start",l=this.rowSlotRef.value?g(this.rowSlotRef.value,"calcite-table-cell, calcite-table-header"):[],i=[this.numberedCellRef.value,this.numberedHeaderRef.value,this.selectionCellRef.value,this.selectionHeaderRef.value].filter(t=>t!=null).concat(l);i.length>0&&i?.forEach((t,c)=>{if(t.interactionMode=this.interactionMode,t.lastCell=c===i.length-1,t.parentRowAlignment=e,t.parentRowIsSelected=this.selected,t.parentRowType=this.rowType,t.positionInRow=c+1,t.scale=this.scale,t.nodeName==="CALCITE-TABLE-CELL"){let d=t.rowSpan||1,p=this.rowType==="body"&&d>1&&this.positionSection+d>=this.bodyRowCount;t.readCellContentsToAT=this.readCellContentsToAT,t.disabled=this.disabled,t.reachesBodyEnd=p}}),this.rowCells=i||[],this.cellCount=i?.length}async handleRowSelection(){(this.rowType==="body"||this.rowType==="head"&&this.selectionMode==="multiple")&&(this.userTriggered=!0,this.selected=!this.selected,await this.updateComplete,this.calciteTableRowSelect.emit())}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?b.checkSquare:this.selectionMode==="multiple"?b.square:this.selected?b.circleF:b.circle;return s`<calcite-icon .icon=${e} .scale=${T(this.scale)}></calcite-icon>`}renderSelectableCell(){return this.rowType==="head"?a("selection-head",s`<calcite-table-header alignment=center .bodyRowCount=${this.bodyRowCount} @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .selectedRowCount=${this.selectedRowCount} .selectedRowCountLocalized=${this.selectedRowCountLocalized} .selectionCell=${!0} .selectionMode=${this.selectionMode} ${o(this.selectionHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("selection-body",s`<calcite-table-cell alignment=center @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .parentRowIsSelected=${this.selected} .parentRowPositionLocalized=${this.positionSectionLocalized} .selectionCell=${!0} ${o(this.selectionCellRef)}>${this.renderSelectionIcon()}</calcite-table-cell>`):a("selection-foot",s`<calcite-table-cell alignment=center .parentRowAlignment=${this.alignment} .selectionCell=${!0} ${o(this.selectionCellRef)}></calcite-table-cell>`)}renderNumberedCell(){return this.rowType==="head"?a("numbered-head",s`<calcite-table-header alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("numbered-body",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}>${this.positionSectionLocalized}</calcite-table-cell>`):a("numbered-foot",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}></calcite-table-cell>`)}render(){return this.interactiveContainer({disabled:this.disabled,children:s`<tr .ariaRowIndex=${this.positionAll+1} .ariaSelected=${this.selected} class=${R({[S.lastVisibleRow]:this.lastVisibleRow})} @keydown=${this.keyDownHandler} ${o(e=>{e&&m(s`${this.numbered&&this.renderNumberedCell()||""}${this.selectionMode!=="none"&&this.renderSelectableCell()||""}<slot ${o(this.rowSlotRef)}></slot>`,e)})}></tr>`})}};y("calcite-table-row",f);export{f as TableRow};
2
+ import{a as S,b}from"./6RCNPDD6.js";import{b as v}from"./22NLVRMQ.js";import{c as A}from"./ODU6JYNH.js";import{a as $}from"./IWORUG5T.js";import{a as k}from"./JN6YLTUP.js";import{a}from"./QWX4EGTZ.js";import"./2IM7ZZ7U.js";import{a as T}from"./VMHJHFFS.js";import"./DHYHGCNT.js";import"./V2I7OEHG.js";import{B as g,E as h}from"./RRBGCYLX.js";import{E as r,F as o,G as C,H as R,T as y,g as w,h as s,m,p as u}from"./AUNDQFRR.js";var I=w`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) tr{opacity:var(--calcite-opacity-disabled);pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}:host([slot=table-header]) tr{position:var(--calcite-internal-table-header-row-position);inset-block-start:var(--calcite-internal-table-header-offset, 0);z-index:var(--calcite-internal-table-header-z-index, calc(var(--calcite-z-index) + 1))}:host([selected]) calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color-selected, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}tr{--calcite-internal-table-row-border-block-end-width: var(--calcite-border-width-sm);--calcite-internal-table-row-border-block-end-color: var(--calcite-table-row-border-color, transparent);background-color:var(--calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}tr.last-visible-row{--calcite-internal-table-row-border-block-end-width: 0;--calcite-internal-table-row-border-block-end-color: transparent}:host([item-hidden]){display:none}`,f=class extends C{constructor(){super(),this.numberedCellRef=r(),this.numberedHeaderRef=r(),this.rowCells=[],this.rowSlotRef=r(),this.selectionCellRef=r(),this.selectionHeaderRef=r(),this.userTriggered=!1,this._selected=!1,this.clickHandler=()=>{this.handleRowSelection()},this.handleKeyboardSelection=e=>{k(e.key)&&(e.key===" "&&e.preventDefault(),this.handleRowSelection())},this.interactiveContainer=$(this),this.itemHidden=!1,this.disabled=!1,this.interactionMode="interactive",this.lastVisibleRow=!1,this.numbered=!1,this.stickyHeaderEnabled=!1,this.selectionMode="none",this.calciteInternalTableRowFocusRequest=u({cancelable:!1}),this.calciteInternalTableRowSelect=u({cancelable:!1}),this.calciteTableRowSelect=u({cancelable:!1})}static{this.properties={alignment:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],bodyRowCount:[9,{},{type:Number}],cellCount:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,lastVisibleRow:[5,{},{type:Boolean}],numbered:[5,{},{type:Boolean}],positionAll:[9,{},{type:Number}],positionSection:[9,{},{type:Number}],positionSectionLocalized:1,readCellContentsToAT:[5,{},{type:Boolean}],rowType:1,scale:1,stickyHeaderEnabled:[5,{},{type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionMode:1}}static{this.styles=I}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.handleCellChanges())}load(){this.listenOn(document,"calciteInternalTableRowFocusChange",this.calciteInternalTableRowFocusChangeHandler),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("bodyRowCount")||e.has("scale")||e.has("selectedRowCount")||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive"))&&this.handleCellChanges(),(e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.handleDelayedCellChanges(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&!this.userTriggered&&this.calciteInternalTableRowSelect.emit()}loaded(){this.rowCells.length>0&&this.updateCells()}handleSlotChange(){this.updateCells()}handleCellChanges(){this.rowCells.length>0&&this.updateCells()}handleDelayedCellChanges(){this.rowCells.length>0&&requestAnimationFrame(()=>this.updateCells())}calciteInternalTableRowFocusChangeHandler(e){if(e.target.contains(this.el)){let l=e.detail.cellPosition,n=e.detail.rowPosition,i=e.detail.destination,t=e.detail.lastCell;if(n===this.positionAll){if(this.disabled){let d=i==="last"?"previous":i==="first"?"next":i;this.emitTableRowFocusRequest(l,this.positionAll,d);return}let c=t?this.rowCells[this.rowCells.length-1]:this.rowCells?.find((d,p)=>p+1===l);c&&c.setFocus()}}}keyDownHandler(e){if(this.interactionMode!=="interactive")return;let l=e.target,n=e.key,i=e.ctrlKey,t=this.rowCells;if(v(l)||A(l))switch(n){case"ArrowUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"previous"),e.preventDefault();break;case"ArrowDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"next"),e.preventDefault();break;case"PageUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"first"),e.preventDefault();break;case"PageDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"last"),e.preventDefault();break;case"ArrowLeft":h(t,l,"previous",!1,!1),e.preventDefault();break;case"ArrowRight":h(t,l,"next",!1,!1),e.preventDefault();break;case"Home":i?(this.emitTableRowFocusRequest(1,this.positionAll,"first"),e.preventDefault()):(h(t,l,"first",!1,!1),e.preventDefault());break;case"End":i?(this.emitTableRowFocusRequest(this.rowCells?.length,this.positionAll,"last",!0),e.preventDefault()):(h(t,l,"last",!1,!1),e.preventDefault());break}}emitTableRowFocusRequest(e,l,n,i=!1){this.calciteInternalTableRowFocusRequest.emit({cellPosition:e,rowPosition:l,destination:n,lastCell:i})}updateCells(){let e=this.alignment?this.alignment:this.rowType!=="head"?"center":"start",l=this.rowSlotRef.value?g(this.rowSlotRef.value,"calcite-table-cell, calcite-table-header"):[],i=[this.numberedCellRef.value,this.numberedHeaderRef.value,this.selectionCellRef.value,this.selectionHeaderRef.value].filter(t=>t!=null).concat(l);i.length>0&&i?.forEach((t,c)=>{if(t.interactionMode=this.interactionMode,t.lastCell=c===i.length-1,t.parentRowAlignment=e,t.parentRowIsSelected=this.selected,t.parentRowType=this.rowType,t.positionInRow=c+1,t.scale=this.scale,t.nodeName==="CALCITE-TABLE-CELL"){let d=t.rowSpan||1,p=this.rowType==="body"&&d>1&&this.positionSection+d>=this.bodyRowCount;t.readCellContentsToAT=this.readCellContentsToAT,t.disabled=this.disabled,t.reachesBodyEnd=p}}),this.rowCells=i||[],this.cellCount=i?.length}async handleRowSelection(){(this.rowType==="body"||this.rowType==="head"&&this.selectionMode==="multiple")&&(this.userTriggered=!0,this.selected=!this.selected,await this.updateComplete,this.calciteTableRowSelect.emit())}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?b.checkSquare:this.selectionMode==="multiple"?b.square:this.selected?b.circleF:b.circle;return s`<calcite-icon .icon=${e} .scale=${T(this.scale)}></calcite-icon>`}renderSelectableCell(){return this.rowType==="head"?a("selection-head",s`<calcite-table-header alignment=center .bodyRowCount=${this.bodyRowCount} @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .selectedRowCount=${this.selectedRowCount} .selectedRowCountLocalized=${this.selectedRowCountLocalized} .selectionCell=${!0} .selectionMode=${this.selectionMode} ${o(this.selectionHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("selection-body",s`<calcite-table-cell alignment=center @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .parentRowIsSelected=${this.selected} .parentRowPositionLocalized=${this.positionSectionLocalized} .selectionCell=${!0} ${o(this.selectionCellRef)}>${this.renderSelectionIcon()}</calcite-table-cell>`):a("selection-foot",s`<calcite-table-cell alignment=center .parentRowAlignment=${this.alignment} .selectionCell=${!0} ${o(this.selectionCellRef)}></calcite-table-cell>`)}renderNumberedCell(){return this.rowType==="head"?a("numbered-head",s`<calcite-table-header alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("numbered-body",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}>${this.positionSectionLocalized}</calcite-table-cell>`):a("numbered-foot",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}></calcite-table-cell>`)}render(){return this.interactiveContainer({disabled:this.disabled,children:s`<tr .ariaRowIndex=${this.positionAll+1} .ariaSelected=${this.selected} class=${R({[S.lastVisibleRow]:this.lastVisibleRow})} @keydown=${this.keyDownHandler} ${o(e=>{e&&m(s`${this.numbered&&this.renderNumberedCell()||""}${this.selectionMode!=="none"&&this.renderSelectableCell()||""}<slot ${o(this.rowSlotRef)}></slot>`,e)})}></tr>`})}};y("calcite-table-row",f);export{f as TableRow};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as i}from"./MGGEICJM.js";var d=e=>i((t,n)=>{let a=!1;n.onConnected(()=>{a&&o(!0)});async function o(s){await t.componentOnReady();let r=typeof e.target=="function"?e.target():e.target.value;if(!r||!r.hasAttribute("popover"))return;if(e.disabledOverride?.()||"topLayerDisabled"in t&&t.topLayerDisabled===!0||!s){a=!1,r.hidePopover();return}a=!0,r.showPopover()}return{show:async()=>{await o(!0)},hide:async()=>{await o(!1)}}});export{d as a};
2
+ import{b as i}from"./DHYHGCNT.js";var d=e=>i((t,n)=>{let a=!1;n.onConnected(()=>{a&&o(!0)});async function o(s){await t.componentOnReady();let r=typeof e.target=="function"?e.target():e.target.value;if(!r||!r.hasAttribute("popover"))return;if(e.disabledOverride?.()||"topLayerDisabled"in t&&t.topLayerDisabled===!0||!s){a=!1,r.hidePopover();return}a=!0,r.showPopover()}return{show:async()=>{await o(!0)},hide:async()=>{await o(!1)}}});export{d as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as L}from"./3NPDLRO4.js";import{b as y}from"./M7VG3ZLQ.js";import{b as d}from"./QNAZ4SXK.js";import"./JN6YLTUP.js";import{a as F}from"./OTDNC5KR.js";import{a as U}from"./G7HEA6KZ.js";import{a as E,c as C}from"./VMHJHFFS.js";import{e as R}from"./MGGEICJM.js";import"./MCYGB35M.js";import"./RRBGCYLX.js";import{E as s,F as l,G as D,H as i,T as H,g as S,h as n,p as x}from"./7OQZCK5X.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:v=>`scale-${v}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},o={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-style:solid;border-width:var(--calcite-border-width-sm);font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));line-height:var(--calcite-font-line-height-md);overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.time-picker .button:hover,.time-picker .button:focus{outline:var(--calcite-border-width-md) solid transparent;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-none)}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size-relative-base)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));padding-block:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.time-picker.scale-m{font-size:var(--calcite-font-size-relative-md)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-theme-space-md, var(--calcite-spacing-md));padding-block:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-theme-space-xl, var(--calcite-spacing-xl))}.time-picker.scale-l{font-size:var(--calcite-font-size-relative-lg)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-theme-space-lg, var(--calcite-spacing-lg));padding-block:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl))}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.direction=R(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this).setFocus,this.showFractionalSecond=!1,this.showSecond=!1,this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:c,key:r}=t;if(c)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:r==="ArrowLeft"&&(this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault()));break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await C(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl?.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let c=t.detail;c!==this.value&&(this.value=c),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:c,scale:r}=this,{_lang:u}=c,{fractionalSecond:b,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),a=E(r),J=d(m),Q=d(p),W=d(b),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${c.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h,10)||"0"} .ariaValueText=${h??void 0} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${c.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${c.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m,10)||"0"} .ariaValueText=${m??void 0} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${c.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${c.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p,10)||"0"} .ariaValueText=${p??void 0} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${c.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${c.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(b,10)||"0"} .ariaValueText=${k??void 0} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${c.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||this.direction==="rtl"})} role=group><span .ariaLabel=${c.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w??void 0} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${c.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
2
+ import{a as L}from"./QCZSN6XZ.js";import{b as y}from"./M7VG3ZLQ.js";import{b as d}from"./KN2LZPWP.js";import"./JN6YLTUP.js";import{a as F}from"./ICVKMQOX.js";import{a as U}from"./FFG334BY.js";import{a as E,c as C}from"./VMHJHFFS.js";import{e as R}from"./DHYHGCNT.js";import"./V2I7OEHG.js";import"./RRBGCYLX.js";import{E as s,F as l,G as D,H as i,T as H,g as S,h as n,p as x}from"./AUNDQFRR.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:v=>`scale-${v}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},o={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-style:solid;border-width:var(--calcite-border-width-sm);font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));line-height:var(--calcite-font-line-height-md);overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.time-picker .button:hover,.time-picker .button:focus{outline:var(--calcite-border-width-md) solid transparent;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-corner-radius))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-none)}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size-relative-base)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));padding-block:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.time-picker.scale-m{font-size:var(--calcite-font-size-relative-md)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-theme-space-md, var(--calcite-spacing-md));padding-block:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-theme-space-xl, var(--calcite-spacing-xl))}.time-picker.scale-l{font-size:var(--calcite-font-size-relative-lg)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-theme-space-lg, var(--calcite-spacing-lg));padding-block:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl))}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.direction=R(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this).setFocus,this.showFractionalSecond=!1,this.showSecond=!1,this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:c,key:r}=t;if(c)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:r==="ArrowLeft"&&(this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault()));break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await C(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl&&this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl&&this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl&&this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl&&this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl?.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let c=t.detail;c!==this.value&&(this.value=c),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:c,scale:r}=this,{_lang:u}=c,{fractionalSecond:b,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),a=E(r),J=d(m),Q=d(p),W=d(b),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${c.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h,10)||"0"} .ariaValueText=${h??void 0} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${c.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${c.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m,10)||"0"} .ariaValueText=${m??void 0} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${c.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${c.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p,10)||"0"} .ariaValueText=${p??void 0} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${c.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${c.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(b,10)||"0"} .ariaValueText=${k??void 0} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${c.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||this.direction==="rtl"})} role=group><span .ariaLabel=${c.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${o.chevronUp} .scale=${a}></calcite-icon></span><span .ariaLabel=${c.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w??void 0} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${c.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${o.chevronDown} .scale=${a}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as Dt}from"./5K4OZJAZ.js";import{N as Lt,Q as Tt}from"./7OQZCK5X.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(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,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="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,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),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:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(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:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.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",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,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"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*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:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(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/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,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 N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["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",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(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 be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),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 be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
2
+ import{a as Dt}from"./5K4OZJAZ.js";import{N as Lt,Q as Tt}from"./AUNDQFRR.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(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,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="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,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),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:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(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:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.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",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,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"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*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:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(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/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,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 N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["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",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(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 be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),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 be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};