@esri/calcite-components 5.2.0-next.37 → 5.2.0-next.39

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 (194) hide show
  1. package/dist/cdn/{EW7GPA46.js → 22ECBKLY.js} +1 -1
  2. package/dist/cdn/{VV5DGG2U.js → 27IOZ3HP.js} +1 -1
  3. package/dist/cdn/{ACHAJM4Q.js → 2GSJDEKZ.js} +1 -1
  4. package/dist/cdn/{YR25OT6N.js → 3C2CSHVN.js} +1 -1
  5. package/dist/cdn/{X3LX7UIG.js → 3KOE7F4D.js} +1 -1
  6. package/dist/cdn/{ZEHTYN4M.js → 44OG6QKJ.js} +1 -1
  7. package/dist/cdn/{BGKTHYM7.js → 47O4R6V2.js} +1 -1
  8. package/dist/cdn/{BVMBGYVW.js → 4ELILXBC.js} +1 -1
  9. package/dist/cdn/{KWTQKAQB.js → 4GYKTKRW.js} +1 -1
  10. package/dist/cdn/{LXNEHEQM.js → 4OHAZOQT.js} +1 -1
  11. package/dist/cdn/{ZSHE4M5A.js → 4QTI3HVD.js} +1 -1
  12. package/dist/cdn/{6LNC7NYJ.js → 4XMXZMCX.js} +1 -1
  13. package/dist/cdn/{BRXOAD2H.js → 55VDQZWO.js} +1 -1
  14. package/dist/cdn/{6E6KHBYD.js → 5W75FKIR.js} +1 -1
  15. package/dist/cdn/{DOVHVGQX.js → 6C3PU5X7.js} +1 -1
  16. package/dist/cdn/{PCZKXEI6.js → 6EAOC2IJ.js} +1 -1
  17. package/dist/cdn/{4XYU6LKI.js → 6PBUE23F.js} +1 -1
  18. package/dist/cdn/{VVG36FGJ.js → 75FHQQDY.js} +1 -1
  19. package/dist/cdn/{I6QH5T36.js → 7AHHG4ED.js} +1 -1
  20. package/dist/cdn/{UTHCHNRW.js → 7BBFXCAH.js} +1 -1
  21. package/dist/cdn/{WKCDD54X.js → 7CT7S65J.js} +1 -1
  22. package/dist/cdn/{Q57ZTUYR.js → 7KWJF3VZ.js} +1 -1
  23. package/dist/cdn/{CAWJG5BQ.js → 7M6KKEQQ.js} +1 -1
  24. package/dist/cdn/{A6COMQGH.js → 7T7WXQFC.js} +1 -1
  25. package/dist/cdn/{ICB5EZNS.js → 7TLKDWPQ.js} +1 -1
  26. package/dist/cdn/{JXEI7O5M.js → AUEA3I2W.js} +1 -1
  27. package/dist/cdn/{REXWX46J.js → BJ7PYZUH.js} +1 -1
  28. package/dist/cdn/{FW72A53A.js → BKDHHKAQ.js} +1 -1
  29. package/dist/cdn/{VDTQWZQY.js → C5YGPPOH.js} +1 -1
  30. package/dist/cdn/{S4AGPVF6.js → CCFSSUTX.js} +1 -1
  31. package/dist/cdn/{3KAKVYNN.js → CJADH26O.js} +1 -1
  32. package/dist/cdn/{TUDNDIL5.js → CJYVVWEX.js} +1 -1
  33. package/dist/cdn/{HQKYM5LH.js → CTTYZUMF.js} +1 -1
  34. package/dist/cdn/{SZFGDWDP.js → CVNMVI6O.js} +1 -1
  35. package/dist/cdn/CWEJ76BW.js +2 -0
  36. package/dist/cdn/{XCVGS3GX.js → CYPUVTS6.js} +1 -1
  37. package/dist/cdn/{63H2EK5A.js → D52EA7BH.js} +1 -1
  38. package/dist/cdn/DGVV6CD5.js +2 -0
  39. package/dist/cdn/{UWZ55ZGN.js → DN6T7B3G.js} +1 -1
  40. package/dist/cdn/{SXSJLG7U.js → DP6XECDO.js} +1 -1
  41. package/dist/cdn/{YL643OEY.js → DVKQ62BA.js} +1 -1
  42. package/dist/cdn/{2BUMGBOD.js → E47BULS4.js} +1 -1
  43. package/dist/cdn/{GHU7UNWL.js → E5HK35KB.js} +1 -1
  44. package/dist/cdn/{GHJVSLSN.js → EA7VH2CD.js} +1 -1
  45. package/dist/cdn/{MICCC26W.js → EDHRCU5T.js} +1 -1
  46. package/dist/cdn/{TI3KGXED.js → EFFGK5FB.js} +1 -1
  47. package/dist/cdn/{4PST7BFA.js → EI3CD27F.js} +1 -1
  48. package/dist/cdn/{IWWBANAO.js → ENRM3CHG.js} +1 -1
  49. package/dist/cdn/{L6MSOJ4P.js → EV7N3T6A.js} +1 -1
  50. package/dist/cdn/{KZTLIXPK.js → EWG43ARI.js} +1 -1
  51. package/dist/cdn/{BDZAY5XM.js → EXYCCOWD.js} +1 -1
  52. package/dist/cdn/{YHXTGMTI.js → FBOBNK7O.js} +1 -1
  53. package/dist/cdn/{FW3XNHYP.js → FFHDFGYR.js} +1 -1
  54. package/dist/cdn/{SWUKA2PM.js → FRXFGNXM.js} +1 -1
  55. package/dist/cdn/{RUXAFMYP.js → FYGT27LR.js} +1 -1
  56. package/dist/cdn/{3NJCPWV3.js → GC6NW53U.js} +1 -1
  57. package/dist/cdn/{O6JWUDPN.js → GGJKZUJC.js} +1 -1
  58. package/dist/cdn/{4YDYHQ4D.js → GTYO7V5V.js} +1 -1
  59. package/dist/cdn/{VZN4NCYA.js → GYTQTYLT.js} +1 -1
  60. package/dist/cdn/{BBYMGWKD.js → H6HPTETI.js} +1 -1
  61. package/dist/cdn/{OQYQACVK.js → HCF2WALN.js} +1 -1
  62. package/dist/cdn/{TDJRKJIC.js → HJAINVQP.js} +1 -1
  63. package/dist/cdn/{7SUOLGY3.js → HOUWVYKK.js} +1 -1
  64. package/dist/cdn/{5EMNNNGX.js → HT277MNX.js} +1 -1
  65. package/dist/cdn/{YGVZY2DO.js → ID7266VQ.js} +1 -1
  66. package/dist/cdn/{F3XJLNUY.js → IMIPLZ2W.js} +1 -1
  67. package/dist/cdn/{L5YQUKCF.js → IUGAY3DD.js} +1 -1
  68. package/dist/cdn/{7K5NTFNF.js → JAUZTNHP.js} +1 -1
  69. package/dist/cdn/{PQB2PBDG.js → KMJ5M6ZZ.js} +1 -1
  70. package/dist/cdn/{QXPRMPJ4.js → KWZCTE3H.js} +1 -1
  71. package/dist/cdn/{5COU3WVK.js → LEEMNJUS.js} +1 -1
  72. package/dist/cdn/{BMM2NN2I.js → LHL3XX6R.js} +1 -1
  73. package/dist/cdn/{3J2ISMHN.js → LHPKKUWM.js} +1 -1
  74. package/dist/cdn/{S3XVRQHO.js → M2IXJBRP.js} +1 -1
  75. package/dist/cdn/{67GDZ4CL.js → MGOHAYRE.js} +1 -1
  76. package/dist/cdn/{2HNEL6FP.js → MLFFGESU.js} +1 -1
  77. package/dist/cdn/{JFR647PM.js → MR3GG47O.js} +1 -1
  78. package/dist/cdn/{Q6YCFCRR.js → MUIO2KPI.js} +1 -1
  79. package/dist/cdn/{EGMAPOMP.js → MWBF65FN.js} +1 -1
  80. package/dist/cdn/{2BQLJYEJ.js → NJV6CKHH.js} +1 -1
  81. package/dist/cdn/{M7NQCXER.js → NUOMOSY5.js} +1 -1
  82. package/dist/cdn/{QHTETSWO.js → NWNHC4NR.js} +1 -1
  83. package/dist/cdn/{3Y46XDCQ.js → O2Y5V27M.js} +1 -1
  84. package/dist/cdn/{22RVMVH2.js → O3IOYDIJ.js} +1 -1
  85. package/dist/cdn/{7UTBJBY4.js → O4JAXHAB.js} +1 -1
  86. package/dist/cdn/{EJXAEXFQ.js → O73VPEB2.js} +1 -1
  87. package/dist/cdn/{K3EWP5BV.js → ODF43DLD.js} +1 -1
  88. package/dist/cdn/{5AAUILP4.js → OKBSVTW7.js} +1 -1
  89. package/dist/cdn/{7GVBWJRX.js → ONOVNUCS.js} +1 -1
  90. package/dist/cdn/{GAR2SNCJ.js → OP3QIZSJ.js} +1 -1
  91. package/dist/cdn/{LSE6ATNR.js → OPM3CB5R.js} +1 -1
  92. package/dist/cdn/{GFTNY35T.js → P2CL2EY3.js} +1 -1
  93. package/dist/cdn/{4BUI272X.js → PAPBK4NX.js} +1 -1
  94. package/dist/cdn/{4S6XJFKZ.js → PBBKXHCW.js} +1 -1
  95. package/dist/cdn/{NYMFCMKR.js → PK262T3F.js} +1 -1
  96. package/dist/cdn/{N3ZRNBUA.js → PK4JTHVG.js} +1 -1
  97. package/dist/cdn/{OPR3A5B6.js → PLILTGIS.js} +1 -1
  98. package/dist/cdn/PM2LVCRS.js +2 -0
  99. package/dist/cdn/{HRVSXV2O.js → PTGJFASD.js} +1 -1
  100. package/dist/cdn/{YQFXUAMB.js → QKDVZQ3I.js} +1 -1
  101. package/dist/cdn/{J4JCOC4V.js → QO7C3GN5.js} +1 -1
  102. package/dist/cdn/{4GVM3CFW.js → QQFO7XZH.js} +1 -1
  103. package/dist/cdn/{DXQ3GYVG.js → QW2FRGNP.js} +1 -1
  104. package/dist/cdn/{DBQVR77T.js → R2EYWRJD.js} +1 -1
  105. package/dist/cdn/{FPRCLNFF.js → R5B3LO32.js} +1 -1
  106. package/dist/cdn/{DYE3FENV.js → RLEAJQOH.js} +1 -1
  107. package/dist/cdn/{7YFR5BRF.js → RMVZE7RV.js} +1 -1
  108. package/dist/cdn/{BZ7QYBS3.js → RO2UD3AT.js} +1 -1
  109. package/dist/cdn/{X2JF4PN2.js → RRLOMGRR.js} +1 -1
  110. package/dist/cdn/{GG6ZN7WZ.js → S7SUKLJV.js} +1 -1
  111. package/dist/cdn/{TRTUATBQ.js → SA7LHQL7.js} +1 -1
  112. package/dist/cdn/{IN5SLEQG.js → SHRCFAF3.js} +1 -1
  113. package/dist/cdn/{3HTNQKQ6.js → SLNICHDO.js} +1 -1
  114. package/dist/cdn/{TFFUGIZK.js → SNL56OQY.js} +1 -1
  115. package/dist/cdn/{DL7AWYY2.js → SUCZ76AT.js} +1 -1
  116. package/dist/cdn/{GK56RM45.js → T66UG27N.js} +1 -1
  117. package/dist/cdn/{VFY6TEKV.js → TOEXET2Q.js} +1 -1
  118. package/dist/cdn/{ZSHPCI5L.js → TRTHZH64.js} +1 -1
  119. package/dist/cdn/{EI4DXCDM.js → TXQG24O6.js} +1 -1
  120. package/dist/cdn/{FLNAJQAF.js → TYUD2DS3.js} +1 -1
  121. package/dist/cdn/{NBC4D7RW.js → U5RBZPNA.js} +1 -1
  122. package/dist/cdn/{NNR5CIMD.js → UD3TLG5W.js} +1 -1
  123. package/dist/cdn/{VIEY5YIF.js → UDD5HTYF.js} +1 -1
  124. package/dist/cdn/{AG7Q36R7.js → USSMJARG.js} +1 -1
  125. package/dist/cdn/{UCZJIRPC.js → UUNLCIAY.js} +1 -1
  126. package/dist/cdn/{MAAXJSIV.js → VK2EKXXX.js} +1 -1
  127. package/dist/cdn/VO3KFJWD.js +2 -0
  128. package/dist/cdn/{QPMYT2NT.js → VTUXB5LG.js} +1 -1
  129. package/dist/cdn/{5I5D2TVQ.js → VTY5EMXX.js} +1 -1
  130. package/dist/cdn/{M45LSNAX.js → VYDSPX7I.js} +1 -1
  131. package/dist/cdn/{Y4KQR3XS.js → WIRQFFX7.js} +1 -1
  132. package/dist/cdn/{RLY6TZF7.js → XA25MY32.js} +1 -1
  133. package/dist/cdn/XVFT5R4C.js +2 -0
  134. package/dist/cdn/{GWSNTV2P.js → Y4PVVEHZ.js} +1 -1
  135. package/dist/cdn/{2D52ODTY.js → YCKBWDPR.js} +1 -1
  136. package/dist/cdn/{MUU77FH6.js → YCUHUX7Q.js} +1 -1
  137. package/dist/cdn/{4PTSQJ3R.js → YG7WXWOU.js} +1 -1
  138. package/dist/cdn/{KVBKSLTV.js → YVEH5FM5.js} +1 -1
  139. package/dist/cdn/{A7PKPQ4C.js → YWZMXWDG.js} +1 -1
  140. package/dist/cdn/{HHPQK23B.js → Z2AZKEVA.js} +1 -1
  141. package/dist/cdn/{YFVGT52L.js → ZH4XCTIT.js} +1 -1
  142. package/dist/cdn/{NFEMUXXU.js → ZMOUWJSO.js} +1 -1
  143. package/dist/cdn/assets/icon/publish32.json +1 -1
  144. package/dist/cdn/index.js +1 -1
  145. package/dist/chunks/runtime.js +3 -3
  146. package/dist/components/calcite-accordion-item/customElement.js +1 -1
  147. package/dist/components/calcite-action/customElement.js +1 -1
  148. package/dist/components/calcite-alert/customElement.js +1 -1
  149. package/dist/components/calcite-autocomplete/customElement.js +1 -1
  150. package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
  151. package/dist/components/calcite-block/customElement.js +1 -1
  152. package/dist/components/calcite-block-section/customElement.js +1 -1
  153. package/dist/components/calcite-button/customElement.js +1 -1
  154. package/dist/components/calcite-chip/customElement.js +1 -1
  155. package/dist/components/calcite-combobox/customElement.js +1 -1
  156. package/dist/components/calcite-combobox-item/customElement.js +1 -1
  157. package/dist/components/calcite-dialog/customElement.js +1 -1
  158. package/dist/components/calcite-dropdown-item/customElement.js +1 -1
  159. package/dist/components/calcite-fab/customElement.js +1 -1
  160. package/dist/components/calcite-flow-item/customElement.js +1 -1
  161. package/dist/components/calcite-icon/customElement.js +1 -1
  162. package/dist/components/calcite-input/customElement.js +1 -1
  163. package/dist/components/calcite-input-date-picker/customElement.js +1 -1
  164. package/dist/components/calcite-input-message/customElement.js +4 -4
  165. package/dist/components/calcite-input-number/customElement.js +1 -1
  166. package/dist/components/calcite-input-text/customElement.js +1 -1
  167. package/dist/components/calcite-input-time-picker/customElement.js +2 -2
  168. package/dist/components/calcite-input-time-zone/customElement.js +1 -1
  169. package/dist/components/calcite-link/customElement.js +1 -1
  170. package/dist/components/calcite-list-item/customElement.js +1 -1
  171. package/dist/components/calcite-menu-item/customElement.js +1 -1
  172. package/dist/components/calcite-navigation-logo/customElement.js +1 -1
  173. package/dist/components/calcite-notice/customElement.js +1 -1
  174. package/dist/components/calcite-panel/customElement.js +1 -1
  175. package/dist/components/calcite-radio-button-group/customElement.js +1 -1
  176. package/dist/components/calcite-rating/customElement.js +1 -1
  177. package/dist/components/calcite-segmented-control/customElement.js +1 -1
  178. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  179. package/dist/components/calcite-select/customElement.js +1 -1
  180. package/dist/components/calcite-slider/customElement.js +1 -1
  181. package/dist/components/calcite-split-button/customElement.js +1 -1
  182. package/dist/components/calcite-tab-title/customElement.js +1 -1
  183. package/dist/components/calcite-text-area/customElement.js +1 -1
  184. package/dist/components/calcite-tile/customElement.js +1 -1
  185. package/dist/components/calcite-tree-item/customElement.js +1 -1
  186. package/dist/docs/api.json +1 -1
  187. package/dist/docs/docs.json +1 -1
  188. package/dist/docs/web-types.json +1 -1
  189. package/package.json +3 -3
  190. package/dist/cdn/DCP5W4HA.js +0 -2
  191. package/dist/cdn/J45XY5VW.js +0 -2
  192. package/dist/cdn/K2OB3ABB.js +0 -2
  193. package/dist/cdn/OXNQDCP3.js +0 -2
  194. package/dist/cdn/SH2F76BY.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as M}from"./LXNEHEQM.js";import{e as c}from"./UWAER5W3.js";import{a as C}from"./TFFUGIZK.js";import{a as A}from"./QPMYT2NT.js";import{a as G}from"./5EBGPCB7.js";import{a as y}from"./T6CCMW7H.js";import{a as S}from"./VI7SBYXT.js";import{a as x}from"./EJXAEXFQ.js";import"./ZWPNZ5XW.js";import"./GHJVSLSN.js";import{e as O,t as D}from"./4BUI272X.js";import{E as I,F as h,L as B,Q as E,g as k,h as p,p as d}from"./HQKYM5LH.js";var m={container:"container",groupContainer:"group-container",scrim:"scrim",assistiveText:"assistive-text"},b="calcite-block-group",f="calcite-block",P=k`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.container{position:relative}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;function H(u){u.forEach(e=>{e.setPosition=u.indexOf(e)+1,e.setSize=u.length})}var g=class extends I{constructor(){super(),this.dragSelector=f,this.handleSelector="calcite-sort-handle",this.mutationObserver=S("mutation",()=>{this.updateBlockItemsDebounced()}),this.blockAndGroups=[],this.cancelable=A()(this),this.focusSetter=x()(this),this.sortable=M()(this),this.updateBlockItemsDebounced=G(this.updateBlockItems,B.nextTick),this.interactiveContainer=C(this),this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.loading=!1,this.scale="m",this.sortDisabled=!1,this.calciteBlockGroupDragEnd=d({cancelable:!1}),this.calciteBlockGroupDragStart=d({cancelable:!1}),this.calciteBlockGroupMoveHalt=d({cancelable:!1}),this.calciteBlockGroupOrderChange=d({cancelable:!1}),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteBlockSortHandleBeforeOpen",this.updateBlockItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd)}static{this.properties={assistiveText:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],group:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=P}emitOrderChangeEvent(e){this.calciteBlockGroupOrderChange.emit(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.updateBlockItemsDebounced(),this.sortable.reset(),this.setParentBlockGroup(),this.cancelable.add(this.updateBlockItemsDebounced)}willUpdate(e){(e.has("group")||e.has("canPull")&&this.hasUpdated||e.has("canPut")&&this.hasUpdated||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1))&&this.updateBlockItemsDebounced(),e.has("scale")&&this.hasUpdated&&this.updateBlockAndGroupScale()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver()}updateBlockItems(){this.updateGroupItems();let{dragEnabled:e,el:a,sortDisabled:t,sortHandleMenuItems:o}=this,s=Array.from(this.el.querySelectorAll(f)),n=a,l=Array.from(n.children).filter(c);s.forEach(r=>{r.closest(b)===a&&(r.moveToItems=o.filter(i=>this.validateSortMenuItem({type:"move",fromEl:n,toEl:i.element,dragEl:r,newIndex:0,oldIndex:l.indexOf(r)})),r.addToItems=this.sortHandleMenuItems.filter(i=>this.validateSortMenuItem({type:"add",fromEl:n,toEl:i.element,dragEl:r,newIndex:0,oldIndex:l.indexOf(r)})),r.dragHandle=e,r.sortDisabled=t)}),this.sortable.reset()}updateGroupItems(){let{el:e,group:a}=this,t=O(e),o=a?Array.from(t.querySelectorAll(`${b}[group="${a}"]`)).filter(s=>!s.disabled&&s.dragEnabled):[];this.sortHandleMenuItems=o.map(s=>({element:s,label:s.label??s.id,id:y()}))}handleCalciteInternalAssistiveTextChange(e){this.assistiveText=e.detail.message,e.stopPropagation()}handleSortReorder(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleReorder(e))}handleSortAdd(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleAdd(e))}handleSortMove(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleMove(e))}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(e){this.calciteBlockGroupDragEnd.emit(e)}onDragStart(e){e.dragEl.sortHandleOpen=!1,this.calciteBlockGroupDragStart.emit(e)}onDragSort(e){this.setParentBlockGroup(),this.updateBlockItemsDebounced(),this.calciteBlockGroupOrderChange.emit(e)}setParentBlockGroup(){this.parentBlockGroupEl=this.el.parentElement?.closest(b)||void 0}handleDefaultSlotChange(e){let a=[];this.blockAndGroups=D(e).filter(t=>(c(t)&&a.push(t),t.matches(f)||t.matches(b))),H(a),this.updateBlockAndGroupScale()}updateBlockAndGroupScale(){this.blockAndGroups.forEach(e=>{e.scale=this.scale})}validateSortMenuItem({fromEl:e,toEl:a,dragEl:t,newIndex:o,oldIndex:s,type:n}){if(!e||!a||a===e||t.contains(a))return!1;let l=e.canPull?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0,r=a.canPut?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0;return(n==="add"?l==="clone":l===!0)&&r}handleAdd(e){let{addTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,l=Array.from(o.children).filter(c).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:l}))return;t.sortHandleOpen=!1,this.disconnectObserver();let i=t.cloneNode();s.prepend(i),this.updateBlockItemsDebounced(),this.connectObserver();let v={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:l};this.calciteBlockGroupOrderChange.emit(v),s.emitOrderChangeEvent(v)}handleMove(e){let{moveTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,l=Array.from(o.children).filter(c).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:l}))return;t.sortHandleOpen=!1,this.disconnectObserver(),s.prepend(t),this.updateBlockItemsDebounced(),this.connectObserver();let i={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:l};this.calciteBlockGroupOrderChange.emit(i),s.emitOrderChangeEvent(i)}handleReorder(e){let{reorder:a}=e.detail,t=e.target,o=t?.parentElement;if(!o)return;t.sortHandleOpen=!1;let s=Array.from(o.children).filter(c),n=s.length-1,l=s.indexOf(t),r=l;switch(a){case"top":r=0;break;case"bottom":r=n;break;case"up":r=l===0?0:l-1;break;case"down":r=l===n?n:l+1;break}this.disconnectObserver();let i=a==="up"||a==="top"?s[r]:s[r].nextSibling;o.insertBefore(t,i),this.updateBlockItemsDebounced(),this.connectObserver(),this.calciteBlockGroupOrderChange.emit({dragEl:t,fromEl:o,toEl:o,newIndex:r,oldIndex:l})}render(){let{loading:e,label:a}=this;return this.interactiveContainer({disabled:this.disabled,children:p`<div class=${h(m.container)}>${this.dragEnabled?p`<span aria-live=assertive class=${h(m.assistiveText)}>${this.assistiveText}</span>`:null}${e?p`<calcite-scrim class=${h(m.scrim)} .loading=${e}></calcite-scrim>`:null}<div .ariaBusy=${e} .ariaLabel=${a||""} class=${h(m.groupContainer)} role=group><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></div>`})}};E("calcite-block-group",g);export{g as BlockGroup};
2
+ import{a as M}from"./4OHAZOQT.js";import{e as c}from"./UWAER5W3.js";import{a as C}from"./SNL56OQY.js";import{a as A}from"./VTUXB5LG.js";import{a as G}from"./5EBGPCB7.js";import{a as y}from"./T6CCMW7H.js";import{a as S}from"./VI7SBYXT.js";import{a as x}from"./O73VPEB2.js";import"./ZWPNZ5XW.js";import"./EA7VH2CD.js";import{e as O,t as D}from"./PAPBK4NX.js";import{E as I,F as h,L as B,Q as E,g as k,h as p,p as d}from"./CTTYZUMF.js";var m={container:"container",groupContainer:"group-container",scrim:"scrim",assistiveText:"assistive-text"},b="calcite-block-group",f="calcite-block",P=k`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.container{position:relative}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;function H(u){u.forEach(e=>{e.setPosition=u.indexOf(e)+1,e.setSize=u.length})}var g=class extends I{constructor(){super(),this.dragSelector=f,this.handleSelector="calcite-sort-handle",this.mutationObserver=S("mutation",()=>{this.updateBlockItemsDebounced()}),this.blockAndGroups=[],this.cancelable=A()(this),this.focusSetter=x()(this),this.sortable=M()(this),this.updateBlockItemsDebounced=G(this.updateBlockItems,B.nextTick),this.interactiveContainer=C(this),this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.loading=!1,this.scale="m",this.sortDisabled=!1,this.calciteBlockGroupDragEnd=d({cancelable:!1}),this.calciteBlockGroupDragStart=d({cancelable:!1}),this.calciteBlockGroupMoveHalt=d({cancelable:!1}),this.calciteBlockGroupOrderChange=d({cancelable:!1}),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteBlockSortHandleBeforeOpen",this.updateBlockItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd)}static{this.properties={assistiveText:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],group:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=P}emitOrderChangeEvent(e){this.calciteBlockGroupOrderChange.emit(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.updateBlockItemsDebounced(),this.sortable.reset(),this.setParentBlockGroup(),this.cancelable.add(this.updateBlockItemsDebounced)}willUpdate(e){(e.has("group")||e.has("canPull")&&this.hasUpdated||e.has("canPut")&&this.hasUpdated||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1))&&this.updateBlockItemsDebounced(),e.has("scale")&&this.hasUpdated&&this.updateBlockAndGroupScale()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver()}updateBlockItems(){this.updateGroupItems();let{dragEnabled:e,el:a,sortDisabled:t,sortHandleMenuItems:o}=this,s=Array.from(this.el.querySelectorAll(f)),n=a,l=Array.from(n.children).filter(c);s.forEach(r=>{r.closest(b)===a&&(r.moveToItems=o.filter(i=>this.validateSortMenuItem({type:"move",fromEl:n,toEl:i.element,dragEl:r,newIndex:0,oldIndex:l.indexOf(r)})),r.addToItems=this.sortHandleMenuItems.filter(i=>this.validateSortMenuItem({type:"add",fromEl:n,toEl:i.element,dragEl:r,newIndex:0,oldIndex:l.indexOf(r)})),r.dragHandle=e,r.sortDisabled=t)}),this.sortable.reset()}updateGroupItems(){let{el:e,group:a}=this,t=O(e),o=a?Array.from(t.querySelectorAll(`${b}[group="${a}"]`)).filter(s=>!s.disabled&&s.dragEnabled):[];this.sortHandleMenuItems=o.map(s=>({element:s,label:s.label??s.id,id:y()}))}handleCalciteInternalAssistiveTextChange(e){this.assistiveText=e.detail.message,e.stopPropagation()}handleSortReorder(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleReorder(e))}handleSortAdd(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleAdd(e))}handleSortMove(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleMove(e))}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(e){this.calciteBlockGroupDragEnd.emit(e)}onDragStart(e){e.dragEl.sortHandleOpen=!1,this.calciteBlockGroupDragStart.emit(e)}onDragSort(e){this.setParentBlockGroup(),this.updateBlockItemsDebounced(),this.calciteBlockGroupOrderChange.emit(e)}setParentBlockGroup(){this.parentBlockGroupEl=this.el.parentElement?.closest(b)||void 0}handleDefaultSlotChange(e){let a=[];this.blockAndGroups=D(e).filter(t=>(c(t)&&a.push(t),t.matches(f)||t.matches(b))),H(a),this.updateBlockAndGroupScale()}updateBlockAndGroupScale(){this.blockAndGroups.forEach(e=>{e.scale=this.scale})}validateSortMenuItem({fromEl:e,toEl:a,dragEl:t,newIndex:o,oldIndex:s,type:n}){if(!e||!a||a===e||t.contains(a))return!1;let l=e.canPull?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0,r=a.canPut?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0;return(n==="add"?l==="clone":l===!0)&&r}handleAdd(e){let{addTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,l=Array.from(o.children).filter(c).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:l}))return;t.sortHandleOpen=!1,this.disconnectObserver();let i=t.cloneNode();s.prepend(i),this.updateBlockItemsDebounced(),this.connectObserver();let v={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:l};this.calciteBlockGroupOrderChange.emit(v),s.emitOrderChangeEvent(v)}handleMove(e){let{moveTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,l=Array.from(o.children).filter(c).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:l}))return;t.sortHandleOpen=!1,this.disconnectObserver(),s.prepend(t),this.updateBlockItemsDebounced(),this.connectObserver();let i={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:l};this.calciteBlockGroupOrderChange.emit(i),s.emitOrderChangeEvent(i)}handleReorder(e){let{reorder:a}=e.detail,t=e.target,o=t?.parentElement;if(!o)return;t.sortHandleOpen=!1;let s=Array.from(o.children).filter(c),n=s.length-1,l=s.indexOf(t),r=l;switch(a){case"top":r=0;break;case"bottom":r=n;break;case"up":r=l===0?0:l-1;break;case"down":r=l===n?n:l+1;break}this.disconnectObserver();let i=a==="up"||a==="top"?s[r]:s[r].nextSibling;o.insertBefore(t,i),this.updateBlockItemsDebounced(),this.connectObserver(),this.calciteBlockGroupOrderChange.emit({dragEl:t,fromEl:o,toEl:o,newIndex:r,oldIndex:l})}render(){let{loading:e,label:a}=this;return this.interactiveContainer({disabled:this.disabled,children:p`<div class=${h(m.container)}>${this.dragEnabled?p`<span aria-live=assertive class=${h(m.assistiveText)}>${this.assistiveText}</span>`:null}${e?p`<calcite-scrim class=${h(m.scrim)} .loading=${e}></calcite-scrim>`:null}<div .ariaBusy=${e} .ariaLabel=${a||""} class=${h(m.groupContainer)} role=group><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></div>`})}};E("calcite-block-group",g);export{g as BlockGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as Tt}from"./5EBGPCB7.js";import{L as Lt}from"./HQKYM5LH.js";var yt=["top","right","bottom","left"],Dt=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Dt[0],e+"-"+Dt[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Ae={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 Nt(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 Ft=["left","right"],Mt=["right","left"],Oe=["top","bottom"],Re=["bottom","top"];function Pe(t,e,n){switch(t){case"top":case"bottom":return n?e?Mt:Ft:e?Ft:Mt;case"left":case"right":return e?Oe:Re;default:return[]}}function $t(t,e,n,o){let i=F(t),s=Pe(_(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 Ae[e]+t.slice(e.length)}function Ce(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"?Ce(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 kt(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 _t(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 Se=50,Ht=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:_t},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=kt(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<Se&&(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}=kt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},Vt=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 Ee(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 zt=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?Ee(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}}:{}}}},Ut=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)]:Nt(c)),A=g!=="none";!m&&A&&O.push(...$t(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,be)=>z+be,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 Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bt(t){return yt.some(e=>t[e]>=0)}var It=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=Wt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bt(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Wt(r,n.floating);return{data:{escapedOffsets:c,escaped:Bt(c)}}}default:return{}}}}};var Le=new Set(["left","top"]);async function Te(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=Le.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 jt=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 Te(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}}}}},Xt=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 Kt(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=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(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 Yt(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 qt(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 De=/transform|translate|scale|rotate|perspective|filter/,Fe=/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))||De.test(e.willChange||"")||Fe.test(e.contain||"")}function Gt(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||Yt(t)&&t.host||k(t);return Yt(e)?e.host:e}function Jt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Jt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(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 te(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}=te(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 Me=$(0);function ee(t){let e=C(t);return!gt()||!e.visualViewport?Me:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ne(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=Ne(s,n,o)?ee(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 ne(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 $e(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?ne(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 ke(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function We(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 Be=25;function _e(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<=Be&&(c-=h)}return{width:c,height:a,x:l,y:d}}function He(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 Qt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=_e(t,n,e);else if(e==="document")o=We(k(t));else if(M(e))o=He(e,n);else{let i=ee(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function Ve(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 ze(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:Ve(e,this._c):[].concat(n),o],c=Qt(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=Qt(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 Ue(t){let{width:e,height:n}=te(t);return{width:e,height:n}}function Ie(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?ne(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 Zt(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 oe(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=Zt(t,e);for(;o&&qt(o)&&Ct(o);)o=Zt(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Gt(t)||n}var je=async function(t){let e=this.getOffsetParent||oe,n=this.getDimensions,o=await n(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Xe(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:$e,getDocumentElement:k,getClippingRect:ze,getOffsetParent:oe,getElementRects:je,getClientRects:ke,getDimensions:Ue,getScale:nt,isElement:M,isRTL:Xe};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ye(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(!ie(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 se(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?Ye(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&&!ie(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 re=jt,ce=zt,le=Xt,ae=Ut;var fe=It,ue=Vt;var de=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Ht(t,e,{...i,platform:s})};function me(t){return Ke(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ke(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,me)}})();function ge(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var xe=(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 de(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:he(l,m),middleware:Ge({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>he(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=Ze[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(qe,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${ge(f)}px,${ge(g)}px)`,visibility:y})}),qe="data-placement",ye=["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"],An="bottom-start",On="bottom-end",Rn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Ge({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=[le({rootBoundary:c})];if(l.push(re({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(ce({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(ae(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(ue({element:s})),l.push(fe({rootBoundary:c})),l}function Je(t){return ye.includes(t)}function Pn(t,e){let n=t.filter(Je);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ye.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function he(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Cn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return ve(t);await(n?Qe(t):xe)(t,e)}function Qe(t){let e=xt.get(t);return e||(e=Tt(xe,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var Ze={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function ve(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=se;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 tn(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function Sn(t){let{floatingEl:e,referenceEl:n}=t;if(tn(t),en(t),!(!e||!n||!t.open))return ve(t)}function en(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var pe=4,En=Math.ceil(Math.hypot(pe,pe));export{An as a,On as b,Rn as c,Pn as d,Cn as e,tn as f,Sn as g,en as h,En as i};
2
+ import{a as Tt}from"./5EBGPCB7.js";import{L as Lt}from"./CTTYZUMF.js";var yt=["top","right","bottom","left"],Dt=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Dt[0],e+"-"+Dt[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Ae={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 Nt(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 Ft=["left","right"],Mt=["right","left"],Oe=["top","bottom"],Re=["bottom","top"];function Pe(t,e,n){switch(t){case"top":case"bottom":return n?e?Mt:Ft:e?Ft:Mt;case"left":case"right":return e?Oe:Re;default:return[]}}function $t(t,e,n,o){let i=F(t),s=Pe(_(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 Ae[e]+t.slice(e.length)}function Ce(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"?Ce(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 kt(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 _t(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 Se=50,Ht=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:_t},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=kt(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<Se&&(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}=kt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},Vt=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 Ee(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 zt=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?Ee(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}}:{}}}},Ut=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)]:Nt(c)),A=g!=="none";!m&&A&&O.push(...$t(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,be)=>z+be,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 Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bt(t){return yt.some(e=>t[e]>=0)}var It=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=Wt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bt(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Wt(r,n.floating);return{data:{escapedOffsets:c,escaped:Bt(c)}}}default:return{}}}}};var Le=new Set(["left","top"]);async function Te(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=Le.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 jt=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 Te(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}}}}},Xt=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 Kt(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=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(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 Yt(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 qt(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 De=/transform|translate|scale|rotate|perspective|filter/,Fe=/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))||De.test(e.willChange||"")||Fe.test(e.contain||"")}function Gt(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||Yt(t)&&t.host||k(t);return Yt(e)?e.host:e}function Jt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Jt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(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 te(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}=te(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 Me=$(0);function ee(t){let e=C(t);return!gt()||!e.visualViewport?Me:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ne(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=Ne(s,n,o)?ee(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 ne(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 $e(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?ne(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 ke(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function We(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 Be=25;function _e(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<=Be&&(c-=h)}return{width:c,height:a,x:l,y:d}}function He(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 Qt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=_e(t,n,e);else if(e==="document")o=We(k(t));else if(M(e))o=He(e,n);else{let i=ee(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function Ve(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 ze(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:Ve(e,this._c):[].concat(n),o],c=Qt(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=Qt(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 Ue(t){let{width:e,height:n}=te(t);return{width:e,height:n}}function Ie(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?ne(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 Zt(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 oe(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=Zt(t,e);for(;o&&qt(o)&&Ct(o);)o=Zt(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Gt(t)||n}var je=async function(t){let e=this.getOffsetParent||oe,n=this.getDimensions,o=await n(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Xe(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:$e,getDocumentElement:k,getClippingRect:ze,getOffsetParent:oe,getElementRects:je,getClientRects:ke,getDimensions:Ue,getScale:nt,isElement:M,isRTL:Xe};function ie(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ye(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(!ie(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 se(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?Ye(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&&!ie(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 re=jt,ce=zt,le=Xt,ae=Ut;var fe=It,ue=Vt;var de=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Ht(t,e,{...i,platform:s})};function me(t){return Ke(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ke(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,me)}})();function ge(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var xe=(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 de(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:he(l,m),middleware:Ge({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>he(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=Ze[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(qe,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${ge(f)}px,${ge(g)}px)`,visibility:y})}),qe="data-placement",ye=["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"],An="bottom-start",On="bottom-end",Rn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Ge({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=[le({rootBoundary:c})];if(l.push(re({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(ce({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(ae(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(ue({element:s})),l.push(fe({rootBoundary:c})),l}function Je(t){return ye.includes(t)}function Pn(t,e){let n=t.filter(Je);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ye.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function he(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Cn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return ve(t);await(n?Qe(t):xe)(t,e)}function Qe(t){let e=xt.get(t);return e||(e=Tt(xe,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var Ze={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function ve(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=se;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 tn(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function Sn(t){let{floatingEl:e,referenceEl:n}=t;if(tn(t),en(t),!(!e||!n||!t.open))return ve(t)}function en(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var pe=4,En=Math.ceil(Math.hypot(pe,pe));export{An as a,On as b,Rn as c,Pn as d,Cn as e,tn as f,Sn as g,en as h,En as i};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as L}from"./J4JCOC4V.js";import{a as y,b as R}from"./L5YQUKCF.js";import{d as n}from"./BLWTCPBG.js";import{a as A}from"./VFY6TEKV.js";import{a as M}from"./735UOYTJ.js";import{a as I}from"./UCZJIRPC.js";import{a as P}from"./4PTSQJ3R.js";import{a as O}from"./6E6KHBYD.js";import{a as C}from"./VI7SBYXT.js";import{a as B}from"./A7PKPQ4C.js";import{a as E}from"./EJXAEXFQ.js";import"./ZWPNZ5XW.js";import"./GHJVSLSN.js";import{C as u}from"./4BUI272X.js";import{C as k,D as w,E as D,F as b,N as c,Q as T,g as S,h as x,p as f}from"./HQKYM5LH.js";var g={dialog:"dialog",panel:"panel",scrim:"scrim",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",assistiveText:"assistive-text"},s={actionBar:"action-bar",alerts:"alerts",customContent:"custom-content",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerStart:"footer-start",footerEnd:"footer-end"},U={x:0,y:0},F={top:0,right:0,bottom:0,left:0},j=S`:host{--calcite-dialog-scrim-background-color: rgba(0, 0, 0, .85);pointer-events:none;inset:0;display:flex;--calcite-internal-dialog-animation-offset: 20px}:host([top-layer-disabled]),:host([top-layer-disabled]) .container,:host([embedded]),.container--embedded{z-index:var(--calcite-z-index-overlay)}:host([embedded][modal]){position:absolute}.container{pointer-events:auto;position:fixed;inset:0;display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;overflow:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}:host([placement=top]) .container{align-items:flex-start;justify-content:center}:host([placement=top-start]) .container{align-items:flex-start;justify-content:flex-start}:host([placement=top-end]) .container{align-items:flex-start;justify-content:flex-end}:host([placement=bottom]) .container{align-items:flex-end;justify-content:center}:host([placement=bottom-start]) .container{align-items:flex-end;justify-content:flex-start}:host([placement=bottom-end]) .container{align-items:flex-end;justify-content:flex-end}:host(:not([modal])) .container{pointer-events:none}:host([scale=s]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-sm));--calcite-internal-dialog-min-size-x: 198px;--calcite-internal-dialog-min-size-y: 140px}:host([scale=m]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md));--calcite-internal-dialog-min-size-x: 288px;--calcite-internal-dialog-min-size-y: 180px}:host([scale=l]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md-plus));--calcite-internal-dialog-min-size-x: 388px;--calcite-internal-dialog-min-size-y: 220px}.scrim{--calcite-scrim-background: var(--calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim));--calcite-scrim-background-color: var( --calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim) );position:fixed;inset:0;display:flex;overflow-y:hidden;z-index:calc(var(--calcite-z-index) * -1)}:host([top-layer-disabled]) .scrim{z-index:unset}calcite-panel{--calcite-panel-content-space: var(--calcite-dialog-content-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-content-top-space: var( --calcite-dialog-content-top-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-content-bottom-space: var( --calcite-dialog-content-bottom-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-footer-space: var(--calcite-dialog-footer-space);--calcite-panel-border-color: var(--calcite-dialog-border-color);--calcite-panel-background-color: var(--calcite-dialog-background-color, var(--calcite-color-foreground-1));--calcite-panel-icon-color: var(--calcite-dialog-icon-color);--calcite-panel-heading-text-color: var(--calcite-dialog-heading-text-color);--calcite-panel-description-text-color: var(--calcite-dialog-description-text-color);--calcite-panel-header-background-color: var(--calcite-dialog-header-background-color);--calcite-panel-header-action-background-color: var(--calcite-dialog-header-action-background-color);--calcite-panel-header-action-background-color-hover: var(--calcite-dialog-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-dialog-header-action-background-color-press);--calcite-panel-header-action-text-color: var(--calcite-dialog-header-action-text-color);--calcite-panel-header-action-text-color-press: var(--calcite-dialog-header-action-text-color-press);--calcite-panel-footer-background-color: var(--calcite-dialog-footer-background-color);--calcite-panel-space: var(--calcite-dialog-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-header-content-space: var(--calcite-dialog-header-content-space, var(--calcite-dialog-content-space));--calcite-popover-border-color: var(--calcite-dialog-action-menu-border-color, var(--calcite-color-border-1));--calcite-panel-corner-radius: var(--calcite-dialog-corner-radius)}:host([kind=brand]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-brand))}:host([kind=danger]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-danger))}:host([kind=info]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-info))}:host([kind=success]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-success))}:host([kind=warning]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-warning))}::slotted(*){--calcite-panel-background-color: initial}[popover]{padding:0;border:none;background-color:transparent;position:fixed;display:flex}[popover]:popover-open{display:flex}.dialog{pointer-events:none;position:relative;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;opacity:0;box-shadow:var(--calcite-shadow-md);-webkit-overflow-scrolling:touch;visibility:hidden;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));min-inline-size:var(--calcite-dialog-min-size-x, var(--calcite-internal-dialog-min-size-x));max-inline-size:var(--calcite-dialog-max-size-x, 100%);min-block-size:var(--calcite-dialog-min-size-y, var(--calcite-internal-dialog-min-size-y));max-block-size:var(--calcite-dialog-max-size-y, 100%);--calcite-internal-dialog-hidden-position: calc( var(--calcite-dialog-offset-y, 0px) + var(--calcite-internal-dialog-animation-offset) );--calcite-internal-dialog-shown-position: var(--calcite-dialog-offset-y, 0);inset-inline-start:var(--calcite-dialog-offset-x, 0);inset-block-start:var(--calcite-internal-dialog-hidden-position)}:host([top-layer-disabled]) .dialog,:host([embedded]) .dialog{z-index:var(--calcite-z-index-modal)}:host([menu-open]) .dialog{transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.panel{visibility:hidden;opacity:0;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open .panel{visibility:visible;opacity:1;transition:visibility 0ms linear,opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open{opacity:1;visibility:visible;transition-delay:0ms}.container--open .dialog{pointer-events:auto;visibility:visible;opacity:1;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;transition-delay:0ms}.width-s{inline-size:auto;inline-size:var(--calcite-dialog-size-x, 32rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:35rem){:host(:not([fullscreen-disabled])) .width-s{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-m{inline-size:var(--calcite-dialog-size-x, 48rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:51rem){:host(:not([fullscreen-disabled])) .width-m{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-l{inline-size:var(--calcite-dialog-size-x, 94rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:97rem){:host(:not([fullscreen-disabled])) .width-l{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}:host([placement=cover]) .dialog{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0}:host([placement=cover]) .panel{border-radius:0}:host([kind]) .panel{border-start-start-radius:0px;border-start-end-radius:0px}:host([kind]) .dialog{overflow:hidden}:host([kind=brand]) .dialog{border-color:var(--calcite-color-brand)}:host([kind=danger]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-danger))}:host([kind=info]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-info))}:host([kind=success]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-success))}:host([kind=warning]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-warning))}:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-shown-position)}@starting-style{:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-hidden-position);opacity:0}}:host([kind=brand][open]) .dialog,:host([kind=danger][open]) .dialog,:host([kind=info][open]) .dialog,:host([kind=success][open]) .dialog,:host([kind=warning][open]) .dialog{border-width:0px;border-block-start-width:4px;border-style:solid}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,$=class extends D{constructor(){super(...arguments),this.dragPosition={...U},this.focusTrap=A({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>!this.modal||this.embedded,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.usePreventDocumentScroll=L()(this),this.mutationObserver=C("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openProp="opened",this.transitionProp="opacity",this.panelRef=k(),this.popoverRef=k(),this.resizePosition={...F},this.messages=B(),this.focusSetter=E()(this),this.sizeOverride=R({targetElement:()=>({value:this.transitionEl}),getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),fullscreenDisabled:()=>this.fullscreenDisabled,onResize:e=>{this.resizeValues=e}}),this.topLayer=I({disabledOverride:()=>this.embedded,target:this.popoverRef})(this),this.assistiveText=null,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasFooter=!0,this.opened=!1,this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.closeDisabled=!1,this.dragEnabled=!1,this.embedded=!1,this.escapeDisabled=!1,this.fullscreenDisabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.modal=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.overlayPositioning="absolute",this.placement="center",this.resizable=!1,this.scale="m",this.topLayerDisabled=!1,this.widthScale="m",this.calciteDialogBeforeClose=f({cancelable:!1}),this.calciteDialogBeforeOpen=f({cancelable:!1}),this.calciteDialogClose=f({cancelable:!1}),this.calciteDialogOpen=f({cancelable:!1}),this.calciteDialogScroll=f({cancelable:!1})}static{this.properties={assistiveText:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasFooter:[16,{},{state:!0}],opened:[16,{},{state:!0}],resizeValues:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closeDisabled:[7,{},{reflect:!0,type:Boolean}],description:1,dragEnabled:[7,{},{reflect:!0,type:Boolean}],embedded:[7,{},{reflect:!0,type:Boolean}],escapeDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],fullscreenDisabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],kind:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],modal:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],outsideCloseDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=j}get preventDocumentScroll(){return!this.embedded&&this.modal}get open(){return this._open}set open(e){let t=this._open;e!==t&&this.setOpenState(e)}async scrollContentTo(e){await this.panelRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.panelRef.value??this.el,e)}async updateFocusTrapElements(e){this.focusTrap.setExtraContainers(e),this.focusTrap.updateContainerElements()}async updateSize(e){this.updateSizeInternal(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setUpInteractions()}willUpdate(e){(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("placement")&&(this.hasUpdated||this.placement!=="center")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1))&&this.setUpInteractions(),(e.has("messages")||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.updateAssistiveText(),e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&this.handleOpenedChange()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanUpInteractions()}focusTrapDisabledOverride(){return!this.modal&&this.focusTrapDisabled}updateAssistiveText(){let{messages:e}=this;this.assistiveText=e&&(this.dragEnabled||this.resizable)?`${this.dragEnabled?e.dragEnabled:""} ${this.resizable?e.resizeEnabled:""}`:null}onBeforeOpen(){this.calciteDialogBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.focusTrapDisabled&&this.setFocus(),this.focusTrap.activate(),this.calciteDialogOpen.emit()}onBeforeClose(){this.calciteDialogBeforeClose.emit()}onClose(){this.focusTrap.deactivate(),this.calciteDialogClose.emit(),this.topLayer.hide()}async setOpenState(e){if(this.beforeClose&&!e)try{await this.beforeClose?.()}catch{return}this._open=e,e&&await this.componentOnReady(),this.opened=e}handleOpenedChange(){P(this)}async triggerInteractModifiers(){let{interaction:e}=this;e&&(await e.reflow({name:"drag"}),await e.reflow({name:"resize"}))}getTransitionRefDOMRect(){return this.transitionEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,shiftKey:i,defaultPrevented:r}=e,{dragEnabled:a,resizable:o,resizePosition:d,dragPosition:l,transitionEl:p}=this;if(!(r||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))switch(t){case"ArrowUp":if(i&&o&&p){let{minBlockSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().height;if(v<=h)return;this.updateSizeInternal({block:v-c}),d.bottom-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.y-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowDown":i&&o&&p?(this.updateSizeInternal({block:this.getTransitionRefDOMRect().height+c}),d.bottom+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.y+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowLeft":if(i&&o&&p){let{minInlineSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().width;if(v<=h)return;this.updateSizeInternal({inline:v-c}),d.right-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.x-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowRight":i&&o&&p?(this.updateSizeInternal({inline:this.getTransitionRefDOMRect().width+c}),d.right+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.x+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break}}updateTransform(){let{dragPosition:{x:e,y:t},resizePosition:i,transitionEl:r,dragEnabled:a,resizable:o}=this;if(!r)return;if(!a&&!o){r.style.transform="";return}let{top:d,right:l,bottom:p,left:z}=this.getAdjustedResizePosition(i),m=Math.round(e+z+l),h=Math.round(t+d+p);this.transitionEl.style.transform=m||h?`translate(${m}px, ${h}px)`:""}cleanUpInteractions(){this.interaction?.unset(),this.updateSizeInternal({inline:null,block:null}),this.dragPosition={...U},this.resizePosition={...F},this.updateTransform()}async setUpInteractions(){this.cleanUpInteractions();let{el:e,transitionEl:t,resizable:i,dragEnabled:r,resizePosition:a,dragPosition:o}=this;if(!(!t||!this.open)){if((i||r)&&(this.interaction=y(t,{context:e.ownerDocument})),i){await this.el.componentOnReady();let{minInlineSize:d,minBlockSize:l,maxInlineSize:p,maxBlockSize:z}=window.getComputedStyle(this.transitionEl);this.interaction.resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},modifiers:[y.modifiers.restrictSize({min:{width:u(d),height:u(l)},max:{width:u(p)||window.innerWidth,height:u(z)||window.innerHeight}}),y.modifiers.restrict({restriction:"parent"})],listeners:{move:({rect:m,deltaRect:h})=>{h&&(a.top+=h.top,a.right+=h.right,a.bottom+=h.bottom,a.left+=h.left),this.updateSizeInternal({inline:m.width,block:m.height}),this.updateTransform()}}})}r&&this.interaction.draggable({modifiers:[y.modifiers.restrictRect({restriction:"parent"})],listeners:{move:({dx:d,dy:l})=>{o.x+=d,o.y+=l,this.updateTransform()}}})}}getAdjustedResizePosition({top:e,right:t,bottom:i,left:r}){let a=e/2,o=t/2,d=i/2,l=r/2;switch(this.placement){case"top":return{top:e,right:o,bottom:0,left:l};case"top-start":return{top:e,right:0,bottom:0,left:r};case"top-end":return{top:e,right:t,bottom:0,left:0};case"bottom":return{top:0,right:o,bottom:i,left:l};case"bottom-start":return{top:0,right:0,bottom:i,left:r};case"bottom-end":return{top:0,right:t,bottom:i,left:0};default:return{top:a,right:o,bottom:d,left:l}}}setTransitionEl(e){e&&(this.transitionEl=e,this.setUpInteractions())}handleInternalPanelScroll(e){e.target===this.panelRef.value&&(e.stopPropagation(),this.calciteDialogScroll.emit())}handleInternalPanelCloseClick(e){e.target===this.panelRef.value&&(e.preventDefault(),e.stopPropagation(),this.open=!1)}handlePanelKeyDown(e){this.escapeDisabled&&e.key==="Escape"&&!e.defaultPrevented&&e.preventDefault()}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}handleMutationObserver(){this.focusTrap.updateContainerElements()}updateSizeInternal(e){this.transitionEl&&this.sizeOverride.resize(e)}render(){let{assistiveText:e,description:t,heading:i,opened:r,icon:a,iconFlipRtl:o}=this;return x`<div .ariaDescription=${t} .ariaLabel=${i} .ariaModal=${this.modal} class=${b({[g.container]:!0,[g.containerOpen]:r,[g.containerEmbedded]:this.embedded})} .popover=${this.embedded?void 0:"manual"} role=dialog ${w(this.popoverRef)}>${this.modal?x`<calcite-scrim class=${b(g.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>`:null}<div class=${b({[g.dialog]:!0,[M("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} @keydown=${this.handleKeyDown} ${w(this.setTransitionEl)}>${e?O("assistive-text",x`<div aria-live=polite class=${b(g.assistiveText)}>${e}</div>`):null}<slot name=${s.customContent}><calcite-panel class=${b(g.panel)} .closable=${!this.closeDisabled} .description=${t} .heading=${i} .headingLevel=${this.headingLevel} .hidden=${!this.opened} .icon=${a} .iconFlipRtl=${o} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} @keydown=${this.handlePanelKeyDown} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${w(this.panelRef)}><slot name=${s.actionBar} slot=${n.actionBar}></slot><slot name=${s.alerts} slot=${n.alerts}></slot><slot name=${s.headerActionsStart} slot=${n.headerActionsStart}></slot><slot name=${s.headerActionsEnd} slot=${n.headerActionsEnd}></slot><slot name=${s.description} slot=${n.description}></slot><slot name=${s.heading} slot=${n.heading}></slot><slot name=${s.headerContent} slot=${n.headerContent}></slot><slot name=${s.headerMenuActions} slot=${n.headerMenuActions}></slot><slot name=${s.fab} slot=${n.fab}></slot><slot name=${s.contentTop} slot=${n.contentTop}></slot><slot name=${s.contentBottom} slot=${n.contentBottom}></slot><slot name=${s.footerStart} slot=${n.footerStart}></slot><slot name=${s.footer} slot=${n.footer}></slot><slot name=${s.footerEnd} slot=${n.footerEnd}></slot><slot></slot></calcite-panel></slot></div></div>`}};T("calcite-dialog",$);export{$ as Dialog};
2
+ import{a as L}from"./QO7C3GN5.js";import{a as y,b as R}from"./IUGAY3DD.js";import{d as n}from"./BLWTCPBG.js";import{a as A}from"./TOEXET2Q.js";import{a as M}from"./735UOYTJ.js";import{a as I}from"./UUNLCIAY.js";import{a as P}from"./YG7WXWOU.js";import{a as O}from"./5W75FKIR.js";import{a as C}from"./VI7SBYXT.js";import{a as B}from"./YWZMXWDG.js";import{a as E}from"./O73VPEB2.js";import"./ZWPNZ5XW.js";import"./EA7VH2CD.js";import{C as u}from"./PAPBK4NX.js";import{C as k,D as w,E as S,F as b,N as c,Q as T,g as D,h as x,p as f}from"./CTTYZUMF.js";var g={dialog:"dialog",panel:"panel",scrim:"scrim",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",assistiveText:"assistive-text"},s={actionBar:"action-bar",alerts:"alerts",customContent:"custom-content",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerStart:"footer-start",footerEnd:"footer-end"},U={x:0,y:0},F={top:0,right:0,bottom:0,left:0},j=D`:host{--calcite-dialog-scrim-background-color: rgba(0, 0, 0, .85);pointer-events:none;inset:0;display:flex;--calcite-internal-dialog-animation-offset: 20px}:host([top-layer-disabled]),:host([top-layer-disabled]) .container,:host([embedded]),.container--embedded{z-index:var(--calcite-z-index-overlay)}:host([embedded][modal]){position:absolute}.container{pointer-events:auto;position:fixed;inset:0;display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;overflow:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}:host([placement=top]) .container{align-items:flex-start;justify-content:center}:host([placement=top-start]) .container{align-items:flex-start;justify-content:flex-start}:host([placement=top-end]) .container{align-items:flex-start;justify-content:flex-end}:host([placement=bottom]) .container{align-items:flex-end;justify-content:center}:host([placement=bottom-start]) .container{align-items:flex-end;justify-content:flex-start}:host([placement=bottom-end]) .container{align-items:flex-end;justify-content:flex-end}:host(:not([modal])) .container{pointer-events:none}:host([scale=s]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-sm));--calcite-internal-dialog-min-size-x: 198px;--calcite-internal-dialog-min-size-y: 140px}:host([scale=m]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md));--calcite-internal-dialog-min-size-x: 288px;--calcite-internal-dialog-min-size-y: 180px}:host([scale=l]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md-plus));--calcite-internal-dialog-min-size-x: 388px;--calcite-internal-dialog-min-size-y: 220px}.scrim{--calcite-scrim-background: var(--calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim));--calcite-scrim-background-color: var( --calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim) );position:fixed;inset:0;display:flex;overflow-y:hidden;z-index:calc(var(--calcite-z-index) * -1)}:host([top-layer-disabled]) .scrim{z-index:unset}calcite-panel{--calcite-panel-content-space: var(--calcite-dialog-content-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-content-top-space: var( --calcite-dialog-content-top-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-content-bottom-space: var( --calcite-dialog-content-bottom-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-footer-space: var(--calcite-dialog-footer-space);--calcite-panel-border-color: var(--calcite-dialog-border-color);--calcite-panel-background-color: var(--calcite-dialog-background-color, var(--calcite-color-foreground-1));--calcite-panel-icon-color: var(--calcite-dialog-icon-color);--calcite-panel-heading-text-color: var(--calcite-dialog-heading-text-color);--calcite-panel-description-text-color: var(--calcite-dialog-description-text-color);--calcite-panel-header-background-color: var(--calcite-dialog-header-background-color);--calcite-panel-header-action-background-color: var(--calcite-dialog-header-action-background-color);--calcite-panel-header-action-background-color-hover: var(--calcite-dialog-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-dialog-header-action-background-color-press);--calcite-panel-header-action-text-color: var(--calcite-dialog-header-action-text-color);--calcite-panel-header-action-text-color-press: var(--calcite-dialog-header-action-text-color-press);--calcite-panel-footer-background-color: var(--calcite-dialog-footer-background-color);--calcite-panel-space: var(--calcite-dialog-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-header-content-space: var(--calcite-dialog-header-content-space, var(--calcite-dialog-content-space));--calcite-popover-border-color: var(--calcite-dialog-action-menu-border-color, var(--calcite-color-border-1));--calcite-panel-corner-radius: var(--calcite-dialog-corner-radius)}:host([kind=brand]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-brand))}:host([kind=danger]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-danger))}:host([kind=info]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-info))}:host([kind=success]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-success))}:host([kind=warning]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-warning))}::slotted(*){--calcite-panel-background-color: initial}[popover]{padding:0;border:none;background-color:transparent;position:fixed;display:flex}[popover]:popover-open{display:flex}.dialog{pointer-events:none;position:relative;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;opacity:0;box-shadow:var(--calcite-shadow-md);-webkit-overflow-scrolling:touch;visibility:hidden;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));min-inline-size:var(--calcite-dialog-min-size-x, var(--calcite-internal-dialog-min-size-x));max-inline-size:var(--calcite-dialog-max-size-x, 100%);min-block-size:var(--calcite-dialog-min-size-y, var(--calcite-internal-dialog-min-size-y));max-block-size:var(--calcite-dialog-max-size-y, 100%);--calcite-internal-dialog-hidden-position: calc( var(--calcite-dialog-offset-y, 0px) + var(--calcite-internal-dialog-animation-offset) );--calcite-internal-dialog-shown-position: var(--calcite-dialog-offset-y, 0);inset-inline-start:var(--calcite-dialog-offset-x, 0);inset-block-start:var(--calcite-internal-dialog-hidden-position)}:host([top-layer-disabled]) .dialog,:host([embedded]) .dialog{z-index:var(--calcite-z-index-modal)}:host([menu-open]) .dialog{transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.panel{visibility:hidden;opacity:0;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open .panel{visibility:visible;opacity:1;transition:visibility 0ms linear,opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open{opacity:1;visibility:visible;transition-delay:0ms}.container--open .dialog{pointer-events:auto;visibility:visible;opacity:1;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;transition-delay:0ms}.width-s{inline-size:auto;inline-size:var(--calcite-dialog-size-x, 32rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:35rem){:host(:not([fullscreen-disabled])) .width-s{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-m{inline-size:var(--calcite-dialog-size-x, 48rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:51rem){:host(:not([fullscreen-disabled])) .width-m{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-l{inline-size:var(--calcite-dialog-size-x, 94rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:97rem){:host(:not([fullscreen-disabled])) .width-l{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}:host([placement=cover]) .dialog{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0}:host([placement=cover]) .panel{border-radius:0}:host([kind]) .panel{border-start-start-radius:0px;border-start-end-radius:0px}:host([kind]) .dialog{overflow:hidden}:host([kind=brand]) .dialog{border-color:var(--calcite-color-brand)}:host([kind=danger]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-danger))}:host([kind=info]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-info))}:host([kind=success]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-success))}:host([kind=warning]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-warning))}:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-shown-position)}@starting-style{:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-hidden-position);opacity:0}}:host([kind=brand][open]) .dialog,:host([kind=danger][open]) .dialog,:host([kind=info][open]) .dialog,:host([kind=success][open]) .dialog,:host([kind=warning][open]) .dialog{border-width:0px;border-block-start-width:4px;border-style:solid}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,$=class extends S{constructor(){super(...arguments),this.dragPosition={...U},this.focusTrap=A({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>!this.modal||this.embedded,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.usePreventDocumentScroll=L()(this),this.mutationObserver=C("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openProp="opened",this.transitionProp="opacity",this.panelRef=k(),this.popoverRef=k(),this.resizePosition={...F},this.messages=B(),this.focusSetter=E()(this),this.sizeOverride=R({targetElement:()=>({value:this.transitionEl}),getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),fullscreenDisabled:()=>this.fullscreenDisabled,onResize:e=>{this.resizeValues=e}}),this.topLayer=I({disabledOverride:()=>this.embedded,target:this.popoverRef})(this),this.assistiveText=null,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasFooter=!0,this.opened=!1,this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.closeDisabled=!1,this.dragEnabled=!1,this.embedded=!1,this.escapeDisabled=!1,this.fullscreenDisabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.modal=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.overlayPositioning="absolute",this.placement="center",this.resizable=!1,this.scale="m",this.topLayerDisabled=!1,this.widthScale="m",this.calciteDialogBeforeClose=f({cancelable:!1}),this.calciteDialogBeforeOpen=f({cancelable:!1}),this.calciteDialogClose=f({cancelable:!1}),this.calciteDialogOpen=f({cancelable:!1}),this.calciteDialogScroll=f({cancelable:!1})}static{this.properties={assistiveText:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasFooter:[16,{},{state:!0}],opened:[16,{},{state:!0}],resizeValues:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closeDisabled:[7,{},{reflect:!0,type:Boolean}],description:1,dragEnabled:[7,{},{reflect:!0,type:Boolean}],embedded:[7,{},{reflect:!0,type:Boolean}],escapeDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],fullscreenDisabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],kind:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],modal:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],outsideCloseDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=j}get preventDocumentScroll(){return!this.embedded&&this.modal}get open(){return this._open}set open(e){let t=this._open;e!==t&&this.setOpenState(e)}async scrollContentTo(e){await this.panelRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.panelRef.value??this.el,e)}async updateFocusTrapElements(e){this.focusTrap.setExtraContainers(e),this.focusTrap.updateContainerElements()}async updateSize(e){this.updateSizeInternal(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setUpInteractions()}willUpdate(e){(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("placement")&&(this.hasUpdated||this.placement!=="center")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1))&&this.setUpInteractions(),(e.has("messages")||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.updateAssistiveText(),e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&this.handleOpenedChange()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanUpInteractions()}focusTrapDisabledOverride(){return!this.modal&&this.focusTrapDisabled}updateAssistiveText(){let{messages:e}=this;this.assistiveText=e&&(this.dragEnabled||this.resizable)?`${this.dragEnabled?e.dragEnabled:""} ${this.resizable?e.resizeEnabled:""}`:null}onBeforeOpen(){this.calciteDialogBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.focusTrapDisabled&&this.setFocus(),this.focusTrap.activate(),this.calciteDialogOpen.emit()}onBeforeClose(){this.calciteDialogBeforeClose.emit()}onClose(){this.focusTrap.deactivate(),this.calciteDialogClose.emit(),this.topLayer.hide()}async setOpenState(e){if(this.beforeClose&&!e)try{await this.beforeClose?.()}catch{return}this._open=e,e&&await this.componentOnReady(),this.opened=e}handleOpenedChange(){P(this)}async triggerInteractModifiers(){let{interaction:e}=this;e&&(await e.reflow({name:"drag"}),await e.reflow({name:"resize"}))}getTransitionRefDOMRect(){return this.transitionEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,shiftKey:i,defaultPrevented:r}=e,{dragEnabled:a,resizable:o,resizePosition:d,dragPosition:l,transitionEl:p}=this;if(!(r||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))switch(t){case"ArrowUp":if(i&&o&&p){let{minBlockSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().height;if(v<=h)return;this.updateSizeInternal({block:v-c}),d.bottom-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.y-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowDown":i&&o&&p?(this.updateSizeInternal({block:this.getTransitionRefDOMRect().height+c}),d.bottom+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.y+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowLeft":if(i&&o&&p){let{minInlineSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().width;if(v<=h)return;this.updateSizeInternal({inline:v-c}),d.right-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.x-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowRight":i&&o&&p?(this.updateSizeInternal({inline:this.getTransitionRefDOMRect().width+c}),d.right+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.x+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break}}updateTransform(){let{dragPosition:{x:e,y:t},resizePosition:i,transitionEl:r,dragEnabled:a,resizable:o}=this;if(!r)return;if(!a&&!o){r.style.transform="";return}let{top:d,right:l,bottom:p,left:z}=this.getAdjustedResizePosition(i),m=Math.round(e+z+l),h=Math.round(t+d+p);this.transitionEl.style.transform=m||h?`translate(${m}px, ${h}px)`:""}cleanUpInteractions(){this.interaction?.unset(),this.updateSizeInternal({inline:null,block:null}),this.dragPosition={...U},this.resizePosition={...F},this.updateTransform()}async setUpInteractions(){this.cleanUpInteractions();let{el:e,transitionEl:t,resizable:i,dragEnabled:r,resizePosition:a,dragPosition:o}=this;if(!(!t||!this.open)){if((i||r)&&(this.interaction=y(t,{context:e.ownerDocument})),i){await this.el.componentOnReady();let{minInlineSize:d,minBlockSize:l,maxInlineSize:p,maxBlockSize:z}=window.getComputedStyle(this.transitionEl);this.interaction.resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},modifiers:[y.modifiers.restrictSize({min:{width:u(d),height:u(l)},max:{width:u(p)||window.innerWidth,height:u(z)||window.innerHeight}}),y.modifiers.restrict({restriction:"parent"})],listeners:{move:({rect:m,deltaRect:h})=>{h&&(a.top+=h.top,a.right+=h.right,a.bottom+=h.bottom,a.left+=h.left),this.updateSizeInternal({inline:m.width,block:m.height}),this.updateTransform()}}})}r&&this.interaction.draggable({modifiers:[y.modifiers.restrictRect({restriction:"parent"})],listeners:{move:({dx:d,dy:l})=>{o.x+=d,o.y+=l,this.updateTransform()}}})}}getAdjustedResizePosition({top:e,right:t,bottom:i,left:r}){let a=e/2,o=t/2,d=i/2,l=r/2;switch(this.placement){case"top":return{top:e,right:o,bottom:0,left:l};case"top-start":return{top:e,right:0,bottom:0,left:r};case"top-end":return{top:e,right:t,bottom:0,left:0};case"bottom":return{top:0,right:o,bottom:i,left:l};case"bottom-start":return{top:0,right:0,bottom:i,left:r};case"bottom-end":return{top:0,right:t,bottom:i,left:0};default:return{top:a,right:o,bottom:d,left:l}}}setTransitionEl(e){e&&(this.transitionEl=e,this.setUpInteractions())}handleInternalPanelScroll(e){e.target===this.panelRef.value&&(e.stopPropagation(),this.calciteDialogScroll.emit())}handleInternalPanelCloseClick(e){e.target===this.panelRef.value&&(e.preventDefault(),e.stopPropagation(),this.open=!1)}handlePanelKeyDown(e){this.escapeDisabled&&e.key==="Escape"&&!e.defaultPrevented&&e.preventDefault()}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}handleMutationObserver(){this.focusTrap.updateContainerElements()}updateSizeInternal(e){this.transitionEl&&this.sizeOverride.resize(e)}render(){let{assistiveText:e,description:t,heading:i,opened:r,icon:a,iconFlipRtl:o}=this;return x`<div .ariaDescription=${t} .ariaLabel=${i} .ariaModal=${this.modal} class=${b({[g.container]:!0,[g.containerOpen]:r,[g.containerEmbedded]:this.embedded})} .popover=${this.embedded?void 0:"manual"} role=dialog ${w(this.popoverRef)}>${this.modal?x`<calcite-scrim class=${b(g.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>`:null}<div class=${b({[g.dialog]:!0,[M("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} @keydown=${this.handleKeyDown} ${w(this.setTransitionEl)}>${e?O("assistive-text",x`<div aria-live=polite class=${b(g.assistiveText)}>${e}</div>`):null}<slot name=${s.customContent}><calcite-panel class=${b(g.panel)} .closable=${!this.closeDisabled} .description=${t} .heading=${i} .headingLevel=${this.headingLevel} .hidden=${!this.opened} .icon=${a} .iconFlipRtl=${o} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} @keydown=${this.handlePanelKeyDown} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${w(this.panelRef)}><slot name=${s.actionBar} slot=${n.actionBar}></slot><slot name=${s.alerts} slot=${n.alerts}></slot><slot name=${s.headerActionsStart} slot=${n.headerActionsStart}></slot><slot name=${s.headerActionsEnd} slot=${n.headerActionsEnd}></slot><slot name=${s.description} slot=${n.description}></slot><slot name=${s.heading} slot=${n.heading}></slot><slot name=${s.headerContent} slot=${n.headerContent}></slot><slot name=${s.headerMenuActions} slot=${n.headerMenuActions}></slot><slot name=${s.fab} slot=${n.fab}></slot><slot name=${s.contentTop} slot=${n.contentTop}></slot><slot name=${s.contentBottom} slot=${n.contentBottom}></slot><slot name=${s.footerStart} slot=${n.footerStart}></slot><slot name=${s.footer} slot=${n.footer}></slot><slot name=${s.footerEnd} slot=${n.footerEnd}></slot><slot></slot></calcite-panel></slot></div></div>`}};T("calcite-dialog",$);export{$ as Dialog};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l,b as a,c as u}from"./QBJZUEM2.js";import{b as c}from"./4BUI272X.js";function p(e){let r=e.parentElement?.closest(u),t=r?.parentElement?.closest(u);return[r,t].filter(n=>!!n)}function b(e){return e.ancestors?.filter(r=>r.nodeName==="CALCITE-COMBOBOX-ITEM")||[]}function A(e){return c(e.querySelectorAll("calcite-combobox-item"))}function C(e){return c(e.querySelectorAll("calcite-combobox-item")).filter(t=>t.selected).length>0}function E(e){if(!1)return 0;let r=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),t=r.snapshotLength;if(t>0&&e.nodeName===l){for(let n=0;n<t;n++)if(r.snapshotItem(n).nodeName===a)return t}else if(e.nodeName===a)return t;return t+1}function S(e){return e.includes("single")}function O(e){return e.shortHeading||e.heading}function x(e,r){if(e.length<2||r.length===0)return e;let t=new Map(r.map((n,o)=>[n,o]));return[...e].sort((n,o)=>{let i=t.get(n),s=t.get(o);return i!==void 0&&s!==void 0?i-s:i!==void 0?-1:s!==void 0?1:0})}function f(e,r){let t=e.get(r)??0;return t===0?!1:(t===1?e.delete(r):e.set(r,t-1),!0)}function I(e,r){if(e.length<2||r.length===0)return e;let t=new Map;e.forEach(o=>{t.set(o,(t.get(o)??0)+1)});let n=r.filter(o=>f(t,o));return n.length===0?e:(e.forEach(o=>{f(t,o)&&n.push(o)}),n)}export{p as a,b,A as c,C as d,E as e,S as f,O as g,x as h,I as i};
2
+ import{a as l,b as a,c as u}from"./QBJZUEM2.js";import{b as c}from"./PAPBK4NX.js";function p(e){let r=e.parentElement?.closest(u),t=r?.parentElement?.closest(u);return[r,t].filter(n=>!!n)}function b(e){return e.ancestors?.filter(r=>r.nodeName==="CALCITE-COMBOBOX-ITEM")||[]}function A(e){return c(e.querySelectorAll("calcite-combobox-item"))}function C(e){return c(e.querySelectorAll("calcite-combobox-item")).filter(t=>t.selected).length>0}function E(e){if(!1)return 0;let r=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),t=r.snapshotLength;if(t>0&&e.nodeName===l){for(let n=0;n<t;n++)if(r.snapshotItem(n).nodeName===a)return t}else if(e.nodeName===a)return t;return t+1}function S(e){return e.includes("single")}function O(e){return e.shortHeading||e.heading}function x(e,r){if(e.length<2||r.length===0)return e;let t=new Map(r.map((n,o)=>[n,o]));return[...e].sort((n,o)=>{let i=t.get(n),s=t.get(o);return i!==void 0&&s!==void 0?i-s:i!==void 0?-1:s!==void 0?1:0})}function f(e,r){let t=e.get(r)??0;return t===0?!1:(t===1?e.delete(r):e.set(r,t-1),!0)}function I(e,r){if(e.length<2||r.length===0)return e;let t=new Map;e.forEach(o=>{t.set(o,(t.get(o)??0)+1)});let n=r.filter(o=>f(t,o));return n.length===0?e:(e.forEach(o=>{f(t,o)&&n.push(o)}),n)}export{p as a,b,A as c,C as d,E as e,S as f,O as g,x as h,I as i};