@luzmo/lucero 1.0.1-alpha.2 → 1.0.1-alpha.21

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 (186) hide show
  1. package/components/accordion/index.cjs +4 -4
  2. package/components/accordion/index.js +8 -8
  3. package/components/action-bar/index.cjs +1 -1
  4. package/components/action-bar/index.js +7 -7
  5. package/components/action-button/index.cjs +2 -2
  6. package/components/action-button/index.js +5 -5
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +1 -1
  9. package/components/{action-group-DJGMcRHb.cjs → action-group-C54IxNZk.cjs} +1 -1
  10. package/components/{action-group-DBImibFn.js → action-group-C9dsPJg-.js} +2 -2
  11. package/components/action-menu/index.cjs +1 -1
  12. package/components/action-menu/index.js +6 -6
  13. package/components/{async-directive-BfcqVjDp.js → async-directive-BwIAw5tB.js} +1 -1
  14. package/components/{async-directive-BX1T1e1_.cjs → async-directive-DLz6JB0v.cjs} +1 -1
  15. package/components/avatar/index.cjs +1 -1
  16. package/components/avatar/index.js +5 -5
  17. package/components/{base-WsynuqaS.js → base-CFWO09N1.js} +62 -55
  18. package/components/{base-CBCg3yyw.cjs → base-Cy0MQrPT.cjs} +6 -6
  19. package/components/button/button-base.d.ts +16 -0
  20. package/components/button/button.d.ts +37 -1
  21. package/components/button/index.cjs +2 -2
  22. package/components/button/index.js +31 -28
  23. package/components/{button-base-DbkDzb71.js → button-base-BwbaTInD.js} +53 -38
  24. package/components/{button-base-XgPLmwP-.cjs → button-base-CC9ZL53k.cjs} +3 -3
  25. package/components/button-group/index.cjs +1 -1
  26. package/components/button-group/index.js +2 -2
  27. package/components/calendar/index.cjs +1 -1
  28. package/components/calendar/index.js +1 -1
  29. package/components/checkbox/index.cjs +1 -1
  30. package/components/checkbox/index.js +4 -4
  31. package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-BOTvuPEu.js} +2 -2
  32. package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-BVPpXtsq.cjs} +1 -1
  33. package/components/{class-map-NbVXqBU0.js → class-map-CGfNk3Ee.js} +1 -1
  34. package/components/{class-map-Di1D_rCm.cjs → class-map-D-Y-hsN5.cjs} +1 -1
  35. package/components/{clear-button-Qi1pMA5S.cjs → clear-button-CHcbu9Bz.cjs} +1 -1
  36. package/components/{clear-button-DoeRUWQ3.js → clear-button-ahIIuwV-.js} +4 -4
  37. package/components/{close-button-BWXdHSx3.js → close-button-DFh14y6u.js} +4 -4
  38. package/components/{close-button-BFMBEw3q.cjs → close-button-DMd52_KV.cjs} +1 -1
  39. package/components/color-area/index.cjs +1 -1
  40. package/components/color-area/index.js +5 -5
  41. package/components/{color-controller-DTp1juRz.js → color-controller-B0uX6Zso.js} +116 -84
  42. package/components/{color-controller-_ZwyhvaU.cjs → color-controller-CoUL5f9K.cjs} +1 -1
  43. package/components/color-field/color-field.d.ts +8 -0
  44. package/components/color-field/index.cjs +4 -4
  45. package/components/color-field/index.js +36 -24
  46. package/components/color-handle/index.cjs +1 -1
  47. package/components/color-handle/index.js +2 -2
  48. package/components/color-loupe/index.cjs +1 -1
  49. package/components/color-loupe/index.js +1 -1
  50. package/components/{color-loupe-CaA_Lfkk.cjs → color-loupe-CrM2DVY3.cjs} +1 -1
  51. package/components/{color-loupe-CmMsXbjT.js → color-loupe-DmQe3SpP.js} +1 -1
  52. package/components/color-menu/index.cjs +7 -7
  53. package/components/color-menu/index.js +44 -44
  54. package/components/color-palette/color-palette.d.ts +53 -0
  55. package/components/color-palette/index.cjs +18 -0
  56. package/components/color-palette/index.d.ts +7 -0
  57. package/components/color-palette/index.js +88 -0
  58. package/components/color-palette-group/color-palette-group.d.ts +79 -0
  59. package/components/color-palette-group/index.cjs +28 -0
  60. package/components/color-palette-group/index.d.ts +7 -0
  61. package/components/color-palette-group/index.js +205 -0
  62. package/components/color-picker/color-picker.d.ts +31 -2
  63. package/components/color-picker/index.cjs +4 -3
  64. package/components/color-picker/index.js +16 -12
  65. package/components/color-slider/index.cjs +1 -1
  66. package/components/color-slider/index.js +1 -1
  67. package/components/date-time-picker/index.cjs +3 -3
  68. package/components/date-time-picker/index.js +11 -11
  69. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
  70. package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
  71. package/components/{directive-helpers-Cm6gitnu.js → directive-helpers-D4KMv2dC.js} +1 -1
  72. package/components/{directive-helpers-DyIRTWwA.cjs → directive-helpers-t-TVum7J.cjs} +1 -1
  73. package/components/divider/index.cjs +1 -1
  74. package/components/divider/index.js +2 -2
  75. package/components/field-group/index.cjs +1 -1
  76. package/components/field-group/index.js +1 -1
  77. package/components/{field-group-DkGst3r5.cjs → field-group-5WQMBOk4.cjs} +1 -1
  78. package/components/{field-group-DXfBWrkO.js → field-group-D4B0IOdA.js} +2 -2
  79. package/components/field-label/index.cjs +1 -1
  80. package/components/field-label/index.js +1 -1
  81. package/components/{field-label-CZ2zzChK.js → field-label-DxmPiC5p.js} +2 -2
  82. package/components/{field-label-mO1AkUgR.cjs → field-label-Dz9kisdW.cjs} +1 -1
  83. package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
  84. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  85. package/components/{focusable-EbipgXRh.cjs → focusable-B_KwfEec.cjs} +1 -1
  86. package/components/{focusable-BxtpnzWp.js → focusable-C5JjRZmT.js} +2 -2
  87. package/components/icon/index.cjs +1 -1
  88. package/components/icon/index.js +4 -4
  89. package/components/{if-defined-DOaE2coe.js → if-defined-DULpqYwi.js} +1 -1
  90. package/components/{if-defined-C9YGdo33.cjs → if-defined-DaXWqfzc.cjs} +1 -1
  91. package/components/{index-BwxgAdzi.cjs → index-CNK8wHXu.cjs} +1 -1
  92. package/components/{index-A-yOTB_d.js → index-Cf6G4q52.js} +6 -6
  93. package/components/{index-HjQa8tew.js → index-D3ICqC7S.js} +6 -6
  94. package/components/{index-BLWuwZXx.cjs → index-hqVbNKYy.cjs} +3 -3
  95. package/components/index.cjs +1 -1
  96. package/components/index.js +141 -137
  97. package/components/infield-button/index.cjs +1 -1
  98. package/components/infield-button/index.js +3 -3
  99. package/components/label/index.cjs +1 -1
  100. package/components/label/index.js +1 -1
  101. package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
  102. package/components/{language-resolution-DJzmyzZq.cjs → language-resolution-EUER43cg.cjs} +1 -1
  103. package/components/{like-anchor-sod1C1fR.cjs → like-anchor-Bu3pXbjT.cjs} +1 -1
  104. package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-DCFJN0LV.js} +2 -2
  105. package/components/{luzmo-icons-DbwDQtuO.js → luzmo-icons-CiSek5iM.js} +25 -25
  106. package/components/{luzmo-icons-DletXGWU.cjs → luzmo-icons-CtA-TJPd.cjs} +2 -2
  107. package/components/{manage-help-text-syYnjKGL.js → manage-help-text-CHfMLzSa.js} +2 -2
  108. package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-DNqdEkTA.cjs} +1 -1
  109. package/components/menu/index.cjs +38 -13
  110. package/components/menu/index.js +132 -98
  111. package/components/menu/menu-item.d.ts +8 -1
  112. package/components/multi-language-field/index.cjs +1 -1
  113. package/components/multi-language-field/index.js +3 -3
  114. package/components/number-field/index.cjs +3 -3
  115. package/components/number-field/index.js +8 -8
  116. package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-C3moTjwy.js} +1 -1
  117. package/components/{observe-slot-text-Ceb7SvYT.cjs → observe-slot-text-D2VAEFSd.cjs} +1 -1
  118. package/components/options/index.cjs +4 -4
  119. package/components/options/index.js +22 -22
  120. package/components/overlay/index.cjs +1 -1
  121. package/components/overlay/index.js +5 -5
  122. package/components/overlay-B3ajDLLq.cjs +47 -0
  123. package/components/{overlay-Cig9r6uU.js → overlay-CUKs69yr.js} +74 -76
  124. package/components/{pending-state-DTX7ggyF.js → pending-state-B2wWssTo.js} +2 -2
  125. package/components/{pending-state-CaH1si5b.cjs → pending-state-bJr-nEJl.cjs} +1 -1
  126. package/components/picker/index.cjs +1 -1
  127. package/components/picker/index.js +2 -2
  128. package/components/{picker-BmoXv1jt.js → picker-BsQJBF9j.js} +38 -37
  129. package/components/{picker-DWsBWdPN.cjs → picker-X96xmLAw.cjs} +7 -7
  130. package/components/picker-button/index.cjs +1 -1
  131. package/components/picker-button/index.js +5 -5
  132. package/components/popover/index.cjs +1 -1
  133. package/components/popover/index.js +1 -1
  134. package/components/{popover-KFfO0IYL.cjs → popover-fwJeZHMQ.cjs} +1 -1
  135. package/components/{popover-DjX0aAnY.js → popover-iD8f5Jkp.js} +2 -2
  136. package/components/progress-circle/index.cjs +1 -1
  137. package/components/progress-circle/index.js +1 -1
  138. package/components/{progress-circle-BvRJNuNo.cjs → progress-circle-DZxaMe8L.cjs} +1 -1
  139. package/components/{progress-circle-DXH9z8-6.js → progress-circle-USIIU1up.js} +3 -3
  140. package/components/radio/index.cjs +1 -1
  141. package/components/radio/index.js +4 -4
  142. package/components/search/index.cjs +4 -4
  143. package/components/search/index.js +4 -4
  144. package/components/select/index.cjs +15 -15
  145. package/components/select/index.js +80 -79
  146. package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-CJbBHWRQ.js} +1 -1
  147. package/components/{sized-mixin-CPxE5C96.cjs → sized-mixin-WPHH0a_D.cjs} +1 -1
  148. package/components/slider/index.cjs +1 -1
  149. package/components/slider/index.js +2 -2
  150. package/components/{state-Deh-vKYE.js → state-DwIwYPvt.js} +1 -1
  151. package/components/{state-D8JEtYqe.cjs → state-vf0PJN3_.cjs} +1 -1
  152. package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
  153. package/components/strategies-CNgBb6dM.cjs +18 -0
  154. package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BQ68fKMa.js} +2 -2
  155. package/components/{streaming-listener-B00MvALi.cjs → streaming-listener-DeGQYM-9.cjs} +1 -1
  156. package/components/{style-map-IgqIKvlE.js → style-map-Bnhf_mVZ.js} +1 -1
  157. package/components/{style-map-CeilmSgs.cjs → style-map-DuMd5xlY.cjs} +1 -1
  158. package/components/swatch/index.cjs +5 -5
  159. package/components/swatch/index.js +12 -12
  160. package/components/switch/index.cjs +1 -1
  161. package/components/switch/index.js +4 -4
  162. package/components/tabs/index.cjs +3 -3
  163. package/components/tabs/index.js +9 -9
  164. package/components/tags/index.cjs +1 -1
  165. package/components/tags/index.js +4 -4
  166. package/components/text-field/index.cjs +2 -2
  167. package/components/text-field/index.js +4 -4
  168. package/components/{text-field-D5d_Gt0t.cjs → text-field-BkFPYo7S.cjs} +3 -3
  169. package/components/{text-field-BIADXoLC.js → text-field-C2n3rzCK.js} +9 -9
  170. package/components/{text-field.module-ColtFhf_.js → text-field.module-C2KVUJcX.js} +1 -1
  171. package/components/{text-field.module-p_VF2tC_.cjs → text-field.module-DXhFA9G-.cjs} +1 -1
  172. package/components/toast/index.cjs +3 -3
  173. package/components/toast/index.js +4 -4
  174. package/components/tooltip/index.cjs +2 -2
  175. package/components/tooltip/index.js +55 -32
  176. package/components/tooltip/tooltip.d.ts +12 -1
  177. package/components/unit-input/index.cjs +3 -3
  178. package/components/unit-input/index.js +21 -21
  179. package/components/utils.cjs +1 -1
  180. package/components/utils.js +5 -5
  181. package/custom-elements.json +1 -1
  182. package/index.d.ts +2 -0
  183. package/package.json +12 -2
  184. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  185. package/components/overlay-KSKMzzkh.cjs +0 -47
  186. package/components/strategies-BACP6MhR.cjs +0 -18
@@ -0,0 +1,47 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";const x=require("./base-Cy0MQrPT.cjs"),Ce=require("./state-vf0PJN3_.cjs"),oe=require("./query-BL-TJj7K.cjs"),Pe=require("./query-assigned-elements-DsKsfk7G.cjs"),Dt=require("./if-defined-DaXWqfzc.cjs"),jt=require("./style-map-DuMd5xlY.cjs"),Nt=require("./random-id-CqvckpWe.cjs"),Yt=require("./element-resolution-BvRLGqIU.cjs"),ht=require("./focusable-selectors-BgFlyFcY.cjs"),Gt=require("./slottable-request-event-BfUUt1Mh.cjs"),St=require("./condition-attribute-with-id-DrQYZzFS.cjs"),vt=require("./platform-BiXhwqk3.cjs");function Oe(e,t,i=[]){for(const[n,o]of t.entries()){const s=e[n],r=s.parentElement||s.getRootNode();i[n]&&i[n](o),r&&r!==s&&s.replaceWith(o),delete e[n]}return t}const Te=(e,t,{position:i,prepareCallback:n}={position:"beforeend"})=>{let{length:o}=e;if(o===0)return()=>e;let s=1,r=0;(i==="afterbegin"||i==="afterend")&&(s=-1,r=o-1);const a=new Array(o),l=new Array(o),h=typeof document<"u"?document.createComment("placeholder for reparented element"):null;do{const c=e[r];n&&(l[r]=n(c)),a[r]=h.cloneNode();const d=c.parentElement||c.getRootNode();d&&d!==c&&d.replaceChild(a[r],c),t.insertAdjacentElement(i,c),r+=s}while(--o>0);return function(){return Oe(a,e,l)}},Ae=1e3,Re=1e3;class De{constructor(t={}){this.warmUpDelay=Ae,this.coolDownDelay=Re,this.isWarm=!1,this.timeout=0,Object.assign(this,t)}openTimer(t){if(this.cancelCooldownTimer(),!this.component||t!==this.component)return this.component&&(this.close(this.component),this.cancelCooldownTimer()),this.component=t,this.isWarm?Promise.resolve(!1):(this.promise=new Promise(i=>{this.resolve=i,this.timeout=typeof window<"u"?window.setTimeout(()=>{this.resolve&&(this.resolve(!1),this.isWarm=!0)},this.warmUpDelay):0}),this.promise);if(this.promise)return this.promise;throw new Error("Inconsistent state")}close(t){this.component&&this.component===t&&(this.resetCooldownTimer(),this.timeout>0&&(clearTimeout(this.timeout),this.timeout=0),this.resolve&&(this.resolve(!0),delete this.resolve),delete this.promise,delete this.component)}resetCooldownTimer(){this.isWarm&&(this.cooldownTimeout&&typeof window<"u"&&window.clearTimeout(this.cooldownTimeout),this.cooldownTimeout=typeof window<"u"?window.setTimeout(()=>{this.isWarm=!1,delete this.cooldownTimeout},this.coolDownDelay):void 0)}cancelCooldownTimer(){this.cooldownTimeout&&typeof window<"u"&&window.clearTimeout(this.cooldownTimeout),delete this.cooldownTimeout}}const lt=new De,Y=()=>{},Pt=(e,t,i)=>{const n=new AbortController,o=new Map,s=()=>{n.abort(),i()};let r,a;const l=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{s()})})}),h=d=>{d.target===e&&(o.set(d.propertyName,o.get(d.propertyName)-1),o.get(d.propertyName)||o.delete(d.propertyName),o.size===0&&s())},c=d=>{d.target===e&&(o.has(d.propertyName)||o.set(d.propertyName,0),o.set(d.propertyName,o.get(d.propertyName)+1),cancelAnimationFrame(l),cancelAnimationFrame(r),cancelAnimationFrame(a))};e.addEventListener("transitionrun",c,{signal:n.signal}),e.addEventListener("transitionend",h,{signal:n.signal}),e.addEventListener("transitioncancel",h,{signal:n.signal}),t()};function R(){return new Promise(e=>requestAnimationFrame(()=>e()))}class it extends x.LuzmoElement{constructor(){super(...arguments),this.dispose=Y,this.offset=0,this.willPreventClose=!1}applyFocus(t,i){}get delayed(){return!1}set delayed(t){}get disabled(){return!1}set disabled(t){}get elementResolver(){return this._elementResolver}set elementResolver(t){this._elementResolver=t}ensureOnDOM(t){}makeTransition(t){return null}manageDelay(t){}manageDialogOpen(){}managePopoverOpen(){}managePosition(){}get open(){return!1}set open(t){}get placementController(){return this._placementController}set placementController(t){this._placementController=t}requestSlottable(){}returnFocus(){}get state(){return"closed"}set state(t){}manuallyKeepOpen(){}static update(){const t=new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0});document.dispatchEvent(t)}static async open(t,i,n,o){await Promise.resolve().then(()=>Ct);const s=arguments.length===2,r=n||t,a=new this;let l=!1;const h=Te([r],a,{position:"beforeend",prepareCallback:f=>{const u=f.slot;return f.removeAttribute("slot"),()=>{f.slot=u}}});if(a.dispose=()=>{a.addEventListener("luzmo-closed",()=>{l||(h(),l=!0),requestAnimationFrame(()=>{a.remove()})}),a.open=!1,a.dispose=Y},!s&&r&&o){const f=t,u=i,p=o;return it.applyOptions(a,{...p,delayed:p.delayed||r.hasAttribute("delayed"),trigger:p.virtualTrigger||f,type:u==="modal"?"modal":u==="hover"?"hint":"auto"}),f.after(a),await a.updateComplete,a.open=!0,a.dispose}const d=i;return a.append(r),it.applyOptions(a,{...d,delayed:d.delayed||r.hasAttribute("delayed")}),a.updateComplete.then(()=>{a.open=!0}),a}static applyOptions(t,i){t.delayed=!!i.delayed,t.receivesFocus=i.receivesFocus??"auto",t.triggerElement=i.trigger||null,t.type=i.type||"modal",t.offset=i.offset??0,t.placement=i.placement,t.willPreventClose=!!i.notImmediatelyClosable}}const _t=e=>e.querySelector(ht.userFocusableSelector),It=e=>e.assignedElements().find(i=>i.matches(ht.userFocusableSelector));class qt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="open",this.newState="closed"}}class Mt extends Event{constructor(){super("beforetoggle",{bubbles:!1,composed:!1}),this.currentState="closed",this.newState="open"}}class F extends Event{constructor(t,i,{publish:n,interaction:o,reason:s}){super(t,{bubbles:n,composed:n}),this.overlay=i,this.detail={interaction:o,reason:s}}}class dt{constructor(t,i){this.x=0,this.y=0,this.x=t,this.y=i}updateBoundingClientRect(t,i){this.x=t,this.y=i,it.update()}getBoundingClientRect(){return{width:0,height:0,top:this.y,right:this.x,y:this.y,x:this.x,bottom:this.y,left:this.x,toJSON(){}}}}function Le(e){class t extends e{async manageDialogOpen(){const n=this.open;if(await R(),await this.managePosition(),this.open!==n)return;const o=await this.dialogMakeTransition(n);this.open===n&&await this.dialogApplyFocus(n,o)}dialogMakeTransition(n){let o=null;const s=(a,l)=>()=>{if(a.open=n,!n){const c=()=>{a.removeEventListener("close",c)};a.addEventListener("close",c)}if(l>0)return;const h=n?Mt:qt;this.dispatchEvent(new h),n&&(a.matches(ht.userFocusableSelector)&&(o=a),o=o||_t(a),o||a.querySelectorAll("slot").forEach(d=>{o||(o=It(d))}),!(!this.isConnected||this.dialogEl.open)&&this.dialogEl.showModal())},r=(a,l)=>()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(l>0){a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1}));return}if(!this.isConnected||n!==this.open)return;const c=async()=>{const d=this.triggerElement instanceof dt;this.dispatchEvent(new F(h,this,{interaction:this.type,publish:d})),a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1})),this.triggerElement&&!d&&this.triggerElement.dispatchEvent(new F(h,this,{interaction:this.type,publish:!0})),this.state=n?"opened":"closed",this.returnFocus(),await R(),await R(),n===this.open&&n===!1&&this.requestSlottable()};!n&&this.dialogEl.open?(this.dialogEl.addEventListener("close",()=>{c()},{once:!0}),this.dialogEl.close()):c()};return this.elements.forEach((a,l)=>{Pt(a,s(a,l),r(a,l))}),o}dialogApplyFocus(n,o){this.applyFocus(n,o)}}return t}function Se(e){class t extends e{async managePopoverOpen(){await this.managePosition()}async manageDelay(n){if(n===!1||n!==this.open){lt.close(this);return}this.delayed&&await lt.openTimer(this)&&(this.open=!n)}ensureOnDOM(n){document.body.offsetHeight}makeTransition(n){if(this.open!==n)return null;let o=null;const s=(a,l)=>()=>{if(n!==this.open)return;if(a.open=n,l===0){const c=n?Mt:qt;this.dispatchEvent(new c)}if(n!==!0||(a.matches(ht.userFocusableSelector)&&(o=a),o=o||_t(a),o))return;a.querySelectorAll("slot").forEach(c=>{o||(o=It(c))})},r=(a,l)=>async()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(a.dispatchEvent(new F(h,this,{interaction:this.type})),l>0)return;const c=this.triggerElement instanceof dt;this.dispatchEvent(new F(h,this,{interaction:this.type,publish:c})),this.triggerElement&&!c&&this.triggerElement.dispatchEvent(new F(h,this,{interaction:this.type,publish:!0})),this.state=n?"opened":"closed",this.returnFocus(),await R(),await R(),n===this.open&&n===!1&&this.requestSlottable()};return this.elements.forEach((a,l)=>{Pt(a,s(a,l),r(a,l))}),o}}return t}const Fe=CSS.supports("(overlay: auto)");function Xt(e){let t=!1;try{t=e.matches(":popover-open")}catch{}let i=!1;try{i=e.matches(":open")}catch{}return t||i}function ke(e){class t extends e{async manageDelay(n){if(n===!1||n!==this.open){lt.close(this);return}this.delayed&&await lt.openTimer(this)&&(this.open=!n)}shouldHidePopover(n){if(n&&this.open!==n)return;const o=async({newState:s}={})=>{s!=="open"&&await this.placementController.resetOverlayPosition()};if(!Xt(this.dialogEl)){o();return}this.dialogEl.addEventListener("toggle",o,{once:!0})}shouldShowPopover(n){let o=!1;try{o=this.dialogEl.matches(":popover-open")}catch{}let s=!1;try{s=this.dialogEl.matches(":open")}catch{}n&&this.open===n&&!o&&!s&&this.isConnected&&(this.dialogEl.showPopover(),this.managePosition())}async ensureOnDOM(n){Fe||await this.shouldHidePopover(n),this.shouldShowPopover(n),await R()}makeTransition(n){if(this.open!==n)return null;let o=null;const s=(a,l)=>()=>{if(a.open=n,l===0){const c=n?Mt:qt;this.dispatchEvent(new c)}if(!n||(a.matches(ht.userFocusableSelector)&&(o=a),o=o||_t(a),o))return;a.querySelectorAll("slot").forEach(c=>{o||(o=It(c))})},r=(a,l)=>()=>{if(this.open!==n)return;const h=n?"luzmo-opened":"luzmo-closed";if(l>0){a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1}));return}const c=async()=>{if(this.open!==n)return;await R();const f=this.triggerElement instanceof dt;this.dispatchEvent(new F(h,this,{interaction:this.type,publish:f})),a.dispatchEvent(new F(h,this,{interaction:this.type,publish:!1})),this.triggerElement&&!f&&this.triggerElement.dispatchEvent(new F(h,this,{interaction:this.type,publish:!0})),this.state=n?"opened":"closed",this.returnFocus(),await R(),await R(),n===this.open&&n===!1&&this.requestSlottable()};if(this.open!==n)return;const d=Xt(this.dialogEl);n!==!0&&d&&this.isConnected?(this.dialogEl.addEventListener("beforetoggle",()=>{c()},{once:!0}),this.dialogEl.hidePopover()):c()};return this.elements.forEach((a,l)=>{Pt(a,s(a,l),r(a,l))}),o}}return t}const ze=typeof document<"u"&&"showPopover"in document.createElement("div");class Ne{constructor(){this.root=typeof document>"u"?null:document.body,this.stack=[],this.handleScroll=t=>{typeof document<"u"&&t.target!==document&&t.target!==document.documentElement&&t.target!==document.body||this.stack.forEach(i=>{i.open&&(i.type==="auto"&&i.triggerElement instanceof HTMLElement&&i.triggerElement.closest("luzmo-picker, luzmo-select, luzmo-action-menu")&&t.stopPropagation(),typeof document<"u"&&document.dispatchEvent(new CustomEvent("luzmo-update-overlays",{bubbles:!0,composed:!0,cancelable:!0})))})},this.handlePointerdown=t=>{this.pointerdownPath=t.composedPath(),this.lastOverlay=this.stack.at(-1)},this.handlePointerup=()=>{const t=this.pointerdownPath;if(this.pointerdownPath=void 0,this.stack.length===0||!(t!=null&&t.length))return;const i=this.lastOverlay;this.lastOverlay=void 0;const n=this.stack.length-1,o=this.stack.filter((s,r)=>!t.find(l=>l===s||l===(s==null?void 0:s.triggerElement)&&(s==null?void 0:s.type)==="hint"||r===n&&s!==i&&s.triggerInteraction==="longpress")&&!s.shouldPreventClose()&&s.type!=="manual"&&!(s.type==="modal"&&i!==s));o.reverse(),o.forEach(s=>{this.closeOverlay(s);let r=s.parentOverlayToForceClose;for(;r;)this.closeOverlay(r),r=r.parentOverlayToForceClose})},this.handleBeforetoggle=t=>{const{target:i,newState:n}=t;n!=="open"&&this.closeOverlay(i)},this.handleKeydown=t=>{if(t.code!=="Escape"||this.stack.length===0)return;const i=this.stack.at(-1);if((i==null?void 0:i.type)==="page"){t.preventDefault();return}if((i==null?void 0:i.type)==="manual"){this.closeOverlay(i);return}ze||i&&this.closeOverlay(i)},typeof document<"u"&&this.bindEvents()}get document(){return this.root.ownerDocument||document}bindEvents(){typeof document<"u"&&(this.document.addEventListener("pointerdown",this.handlePointerdown),this.document.addEventListener("pointerup",this.handlePointerup),this.document.addEventListener("keydown",this.handleKeydown),this.document.addEventListener("scroll",this.handleScroll,{capture:!0}))}closeOverlay(t){const i=this.stack.indexOf(t);i!==-1&&this.stack.splice(i,1),t.open=!1}overlaysByTriggerElement(t){return this.stack.filter(i=>i.triggerElement===t)}add(t){if(this.stack.includes(t)){const i=this.stack.indexOf(t);i!==-1&&(this.stack.splice(i,1),this.stack.push(t));return}if(t.type==="auto"||t.type==="modal"||t.type==="page"){const i="luzmo-overlay-query-path",n=new Event(i,{composed:!0,bubbles:!0});t.addEventListener(i,o=>{const s=o.composedPath();this.stack.forEach(r=>{!s.find(l=>l===r)&&r.type!=="manual"&&r.type!=="modal"&&this.closeOverlay(r)})},{once:!0}),t.dispatchEvent(n)}else if(t.type==="hint"){if(this.stack.some(n=>n.type!=="manual"&&n.triggerElement&&n.triggerElement===t.triggerElement)){t.open=!1;return}this.stack.forEach(n=>{n.type==="hint"&&this.closeOverlay(n)})}requestAnimationFrame(()=>{this.stack.push(t),t.addEventListener("beforetoggle",this.handleBeforetoggle,{once:!0})})}remove(t){this.closeOverlay(t)}}const Jt=new Ne,_e=':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}',G=Math.min,A=Math.max,wt=Math.round,pt=Math.floor,q=e=>({x:e,y:e}),Ie={left:"right",right:"left",bottom:"top",top:"bottom"},qe={start:"end",end:"start"};function Ft(e,t,i){return A(e,G(t,i))}function st(e,t){return typeof e=="function"?e(t):e}function X(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function se(e){return e==="x"?"y":"x"}function Wt(e){return e==="y"?"height":"width"}function Q(e){return["top","bottom"].includes(X(e))?"y":"x"}function $t(e){return se(Q(e))}function Me(e,t,i){i===void 0&&(i=!1);const n=rt(e),o=$t(e),s=Wt(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=bt(r)),[r,bt(r)]}function We(e){const t=bt(e);return[kt(e),t,kt(t)]}function kt(e){return e.replace(/start|end/g,t=>qe[t])}function $e(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function He(e,t,i,n){const o=rt(e);let s=$e(X(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(kt)))),s}function bt(e){return e.replace(/left|right|bottom|top/g,t=>Ie[t])}function Be(e){return{top:0,right:0,bottom:0,left:0,...e}}function re(e){return typeof e!="number"?Be(e):{top:e,right:e,bottom:e,left:e}}function Et(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Qt(e,t,i){let{reference:n,floating:o}=e;const s=Q(t),r=$t(t),a=Wt(r),l=X(t),h=s==="y",c=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:c,y:n.y-o.height};break;case"bottom":u={x:c,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-o.width,y:d};break;default:u={x:n.x,y:n.y}}switch(rt(t)){case"start":u[r]-=f*(i&&h?-1:1);break;case"end":u[r]+=f*(i&&h?-1:1);break}return u}const Ve=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let h=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Qt(h,n,l),f=n,u={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:g}=a[m],{x:v,y:w,data:E,reset:b}=await g({x:c,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:u,rects:h,platform:r,elements:{reference:e,floating:t}});c=v??c,d=w??d,u={...u,[y]:{...u[y],...E}},b&&p<=50&&(p++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(h=b.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:c,y:d}=Qt(h,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:u}};async function Ht(e,t){var i;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:h="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:u=0}=st(t,e),p=re(u),y=a[f?d==="floating"?"reference":"floating":d],g=Et(await s.getClippingRect({element:(i=await(s.isElement==null?void 0:s.isElement(y)))==null||i?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:h,rootBoundary:c,strategy:l})),v=d==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},b=Et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(g.top-b.top+p.top)/E.y,bottom:(b.bottom-g.bottom+p.bottom)/E.y,left:(g.left-b.left+p.left)/E.x,right:(b.right-g.right+p.right)/E.x}}const Ue=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:n,placement:o,rects:s,platform:r,elements:a,middlewareData:l}=t,{element:h,padding:c=0}=st(e,t)||{};if(h==null)return{};const d=re(c),f={x:i,y:n},u=$t(o),p=Wt(u),m=await r.getDimensions(h),y=u==="y",g=y?"top":"left",v=y?"bottom":"right",w=y?"clientHeight":"clientWidth",E=s.reference[p]+s.reference[u]-f[u]-s.floating[p],b=f[u]-s.reference[u],L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(h));let C=L?L[w]:0;(!C||!await(r.isElement==null?void 0:r.isElement(L)))&&(C=a.floating[w]||s.floating[p]);const $=E/2-b/2,N=C/2-m[p]/2-1,S=G(d[g],N),V=G(d[v],N),_=S,U=C-m[p]-V,O=C/2-m[p]/2+$,tt=Ft(_,O,U),H=!l.arrow&&rt(o)!=null&&O!==tt&&s.reference[p]/2-(O<_?S:V)-m[p]/2<0,I=H?O<_?O-_:O-U:0;return{[u]:f[u]+I,data:{[u]:tt,centerOffset:O-tt-I,...H&&{alignmentOffset:I}},reset:H}}}),Ke=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,n;const{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:h}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=st(e,t);if((i=s.arrow)!=null&&i.alignmentOffset)return{};const g=X(o),v=Q(a),w=X(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(h.floating)),b=f||(w||!m?[bt(a)]:We(a)),L=p!=="none";!f&&L&&b.push(...He(a,m,p,E));const C=[a,...b],$=await Ht(t,y),N=[];let S=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&N.push($[g]),d){const O=Me(o,r,E);N.push($[O[0]],$[O[1]])}if(S=[...S,{placement:o,overflows:N}],!N.every(O=>O<=0)){var V,_;const O=(((V=s.flip)==null?void 0:V.index)||0)+1,tt=C[O];if(tt)return{data:{index:O,overflows:S},reset:{placement:tt}};let H=(_=S.filter(I=>I.overflows[0]<=0).sort((I,K)=>I.overflows[1]-K.overflows[1])[0])==null?void 0:_.placement;if(!H)switch(u){case"bestFit":{var U;const I=(U=S.filter(K=>{if(L){const j=Q(K.placement);return j===v||j==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(j=>j>0).reduce((j,xe)=>j+xe,0)]).sort((K,j)=>K[1]-j[1])[0])==null?void 0:U[0];I&&(H=I);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};async function je(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=X(i),a=rt(i),l=Q(i)==="y",h=["left","top"].includes(r)?-1:1,c=s&&l?-1:1,d=st(t,e);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(u=a==="end"?p*-1:p),l?{x:u*c,y:f*h}:{x:f*h,y:u*c}}const Ye=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:a}=t,l=await je(t,e);return r===((i=a.offset)==null?void 0:i.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},Ge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...l}=st(e,t),h={x:i,y:n},c=await Ht(t,l),d=Q(X(o)),f=se(d);let u=h[f],p=h[d];if(s){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=u+c[y],w=u-c[g];u=Ft(v,u,w)}if(r){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=p+c[y],w=p-c[g];p=Ft(v,p,w)}const m=a.fn({...t,[f]:u,[d]:p});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[f]:s,[d]:r}}}}}},Xe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var i,n;const{placement:o,rects:s,platform:r,elements:a}=t,{apply:l=()=>{},...h}=st(e,t),c=await Ht(t,h),d=X(o),f=rt(o),u=Q(o)==="y",{width:p,height:m}=s.floating;let y,g;d==="top"||d==="bottom"?(y=d,g=f===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,y=f==="end"?"top":"bottom");const v=m-c.top-c.bottom,w=p-c.left-c.right,E=G(m-c[y],v),b=G(p-c[g],w),L=!t.middlewareData.shift;let C=E,$=b;if((i=t.middlewareData.shift)!=null&&i.enabled.x&&($=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=v),L&&!f){const S=A(c.left,0),V=A(c.right,0),_=A(c.top,0),U=A(c.bottom,0);u?$=p-2*(S!==0||V!==0?S+V:A(c.left,c.right)):C=m-2*(_!==0||U!==0?_+U:A(c.top,c.bottom))}await l({...t,availableWidth:$,availableHeight:C});const N=await r.getDimensions(a.floating);return p!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Ot(){return typeof window<"u"}function at(e){return ae(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function W(e){var t;return(t=(ae(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ae(e){return Ot()?e instanceof Node||e instanceof D(e).Node:!1}function k(e){return Ot()?e instanceof Element||e instanceof D(e).Element:!1}function M(e){return Ot()?e instanceof HTMLElement||e instanceof D(e).HTMLElement:!1}function Zt(e){return!Ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof D(e).ShadowRoot}function ut(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Je(e){return["table","td","th"].includes(at(e))}function Tt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Bt(e){const t=Vt(),i=k(e)?z(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>i[n]?i[n]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Qe(e){let t=J(e);for(;M(t)&&!nt(t);){if(Bt(t))return t;if(Tt(t))return null;t=J(t)}return null}function Vt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(e){return["html","body","#document"].includes(at(e))}function z(e){return D(e).getComputedStyle(e)}function At(e){return k(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(at(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zt(e)&&e.host||W(e);return Zt(t)?t.host:t}function le(e){const t=J(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&ut(t)?t:le(t)}function ct(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=le(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=D(o);if(s){const a=zt(r);return t.concat(r,r.visualViewport||[],ut(o)?o:[],a&&i?ct(a):[])}return t.concat(o,ct(o,[],i))}function zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ce(e){const t=z(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=M(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,a=wt(i)!==s||wt(n)!==r;return a&&(i=s,n=r),{width:i,height:n,$:a}}function Ut(e){return k(e)?e:e.contextElement}function et(e){const t=Ut(e);if(!M(t))return q(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=ce(t);let r=(s?wt(i.width):i.width)/n,a=(s?wt(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ze=q(0);function he(e){const t=D(e);return!Vt()||!t.visualViewport?Ze:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ti(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==D(e)?!1:t}function Z(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=Ut(e);let r=q(1);t&&(n?k(n)&&(r=et(n)):r=et(e));const a=ti(s,i,n)?he(s):q(0);let l=(o.left+a.x)/r.x,h=(o.top+a.y)/r.y,c=o.width/r.x,d=o.height/r.y;if(s){const f=D(s),u=n&&k(n)?D(n):n;let p=f,m=zt(p);for(;m&&n&&u!==p;){const y=et(m),g=m.getBoundingClientRect(),v=z(m),w=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,E=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,h*=y.y,c*=y.x,d*=y.y,l+=w,h+=E,p=D(m),m=zt(p)}}return Et({width:c,height:d,x:l,y:h})}function Kt(e,t){const i=At(e).scrollLeft;return t?t.left+i:Z(W(e)).left+i}function de(e,t,i){i===void 0&&(i=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(i?0:Kt(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function ei(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=W(n),a=t?Tt(t.floating):!1;if(n===r||a&&s)return i;let l={scrollLeft:0,scrollTop:0},h=q(1);const c=q(0),d=M(n);if((d||!d&&!s)&&((at(n)!=="body"||ut(r))&&(l=At(n)),M(n))){const u=Z(n);h=et(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}const f=r&&!d&&!s?de(r,l,!0):q(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-l.scrollLeft*h.x+c.x+f.x,y:i.y*h.y-l.scrollTop*h.y+c.y+f.y}}function ii(e){return Array.from(e.getClientRects())}function ni(e){const t=W(e),i=At(e),n=e.ownerDocument.body,o=A(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=A(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Kt(e);const a=-i.scrollTop;return z(n).direction==="rtl"&&(r+=A(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:a}}function oi(e,t){const i=D(e),n=W(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;const h=Vt();(!h||h&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a,y:l}}function si(e,t){const i=Z(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=M(e)?et(e):q(1),r=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,h=n*s.y;return{width:r,height:a,x:l,y:h}}function te(e,t,i){let n;if(t==="viewport")n=oi(e,i);else if(t==="document")n=ni(W(e));else if(k(t))n=si(t,i);else{const o=he(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Et(n)}function ue(e,t){const i=J(e);return i===t||!k(i)||nt(i)?!1:z(i).position==="fixed"||ue(i,t)}function ri(e,t){const i=t.get(e);if(i)return i;let n=ct(e,[],!1).filter(a=>k(a)&&at(a)!=="body"),o=null;const s=z(e).position==="fixed";let r=s?J(e):e;for(;k(r)&&!nt(r);){const a=z(r),l=Bt(r);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ut(r)&&!l&&ue(e,r))?n=n.filter(c=>c!==r):o=a,r=J(r)}return t.set(e,n),n}function ai(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const r=[...i==="clippingAncestors"?Tt(t)?[]:ri(t,this._c):[].concat(i),n],a=r[0],l=r.reduce((h,c)=>{const d=te(t,c,o);return h.top=A(d.top,h.top),h.right=G(d.right,h.right),h.bottom=G(d.bottom,h.bottom),h.left=A(d.left,h.left),h},te(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function li(e){const{width:t,height:i}=ce(e);return{width:t,height:i}}function ci(e,t,i){const n=M(t),o=W(t),s=i==="fixed",r=Z(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=q(0);if(n||!n&&!s)if((at(t)!=="body"||ut(o))&&(a=At(t)),n){const f=Z(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Kt(o));const h=o&&!n&&!s?de(o,a):q(0),c=r.left+a.scrollLeft-l.x-h.x,d=r.top+a.scrollTop-l.y-h.y;return{x:c,y:d,width:r.width,height:r.height}}function Lt(e){return z(e).position==="static"}function ee(e,t){if(!M(e)||z(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return W(e)===i&&(i=i.ownerDocument.body),i}function pe(e,t){const i=D(e);if(Tt(e))return i;if(!M(e)){let o=J(e);for(;o&&!nt(o);){if(k(o)&&!Lt(o))return o;o=J(o)}return i}let n=ee(e,t);for(;n&&Je(n)&&Lt(n);)n=ee(n,t);return n&&nt(n)&&Lt(n)&&!Bt(n)?i:n||Qe(e)||i}const hi=async function(e){const t=this.getOffsetParent||pe,i=this.getDimensions,n=await i(e.floating);return{reference:ci(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function di(e){return z(e).direction==="rtl"}const ui={convertOffsetParentRelativeRectToViewportRelativeRect:ei,getDocumentElement:W,getClippingRect:ai,getOffsetParent:pe,getElementRects:hi,getClientRects:ii,getDimensions:li,getScale:et,isElement:k,isRTL:di};function fe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pi(e,t){let i=null,n;const o=W(e);function s(){var a;clearTimeout(n),(a=i)==null||a.disconnect(),i=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const h=e.getBoundingClientRect(),{left:c,top:d,width:f,height:u}=h;if(a||t(),!f||!u)return;const p=pt(d),m=pt(o.clientWidth-(c+f)),y=pt(o.clientHeight-(d+u)),g=pt(c),w={rootMargin:-p+"px "+-m+"px "+-y+"px "+-g+"px",threshold:A(0,G(1,l))||1};let E=!0;function b(L){const C=L[0].intersectionRatio;if(C!==l){if(!E)return r();C?r(!1,C):n=setTimeout(()=>{r(!1,1e-7)},1e3)}C===1&&!fe(h,e.getBoundingClientRect())&&r(),E=!1}try{i=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{i=new IntersectionObserver(b,w)}i.observe(e)}return r(!0),s}function ie(e,t,i,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,h=Ut(e),c=o||s?[...h?ct(h):[],...ct(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",i,{passive:!0}),s&&g.addEventListener("resize",i)});const d=h&&a?pi(h,i):null;let f=-1,u=null;r&&(u=new ResizeObserver(g=>{let[v]=g;v&&v.target===h&&u&&(u.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=u)==null||w.observe(t)})),i()}),h&&!l&&u.observe(h),u.observe(t));let p,m=l?Z(e):null;l&&y();function y(){const g=Z(e);m&&!fe(m,g)&&i(),m=g,p=requestAnimationFrame(y)}return i(),()=>{var g;c.forEach(v=>{o&&v.removeEventListener("scroll",i),s&&v.removeEventListener("resize",i)}),d==null||d(),(g=u)==null||g.disconnect(),u=null,l&&cancelAnimationFrame(p)}}const fi=Ye,mi=Ge,ne=Ke,gi=Xe,yi=Ue,vi=(e,t,i)=>{const n=new Map,o={platform:ui,...i},s={...o.platform,_c:n};return Ve(e,t,{...o,platform:s})};function ft(e){if(e===void 0)return 0;const t=window.devicePixelRatio||1;return Math.round(e*t)/t}const mt=8,wi=100,bi=e=>({left:["right","bottom","top"],"left-start":["right-start","bottom","top"],"left-end":["right-end","bottom","top"],right:["left","bottom","top"],"right-start":["left-start","bottom","top"],"right-end":["left-end","bottom","top"],top:["bottom","left","right"],"top-start":["bottom-start","left","right"],"top-end":["bottom-end","left","right"],bottom:["top","left","right"],"bottom-start":["top-start","left","right"],"bottom-end":["top-end","left","right"]})[e]??[e],Ei=Symbol("placement updated");class me{constructor(t){this.originalPlacements=new WeakMap,this.allowPlacementUpdate=!1,this.closeForAncestorUpdate=()=>{!this.allowPlacementUpdate&&this.options.type!=="modal"&&this.cleanup&&this.target.dispatchEvent(new Event("close",{bubbles:!0})),this.allowPlacementUpdate=!1},this.updatePlacement=()=>{this.computePlacement()},this.resetOverlayPosition=()=>{!this.target||!this.options||(this.clearOverlayPosition(),this.host.offsetHeight,this.computePlacement())},this.host=t,this.host.addController(this)}placeOverlay(t=this.target,i=this.options){if(this.target=t,this.options=i,!t||!i)return;const n=ie(i.trigger,t,this.closeForAncestorUpdate,{ancestorResize:!1,elementResize:!1,layoutShift:!1}),o=ie(i.trigger,t,this.updatePlacement,{ancestorScroll:!1});this.cleanup=()=>{var s;(s=this.host.elements)==null||s.forEach(r=>{r.addEventListener("luzmo-closed",()=>{const a=this.originalPlacements.get(r);a&&r.setAttribute("placement",a),this.originalPlacements.delete(r)},{once:!0})}),n(),o()}}async computePlacement(){var f,u;const{options:t,target:i}=this;await(document.fonts?document.fonts.ready:Promise.resolve());const n=t.trigger instanceof HTMLElement?ne():ne({padding:mt,fallbackPlacements:bi(t.placement)}),[o=0,s=0]=Array.isArray(t==null?void 0:t.offset)?t.offset:[t.offset,0],r=(f=this.host.elements.find(p=>p.tipElement))==null?void 0:f.tipElement,a=[fi({mainAxis:o,crossAxis:s}),mi({padding:mt}),n,gi({padding:mt,apply:({availableWidth:p,availableHeight:m,rects:{floating:y}})=>{const g=Math.max(wi,Math.floor(m)),v=y.height;this.initialHeight=this.isConstrained&&this.initialHeight||v,this.isConstrained=v<this.initialHeight||g<=v;const w=this.isConstrained?`${g}px`:"";Object.assign(i.style,{maxWidth:`${Math.floor(p)}px`,maxHeight:w})}}),...r?[yi({element:r,padding:t.tipPadding||mt})]:[]],{x:l,y:h,placement:c,middlewareData:d}=await vi(t.trigger,i,{placement:t.placement,middleware:a,strategy:"fixed"});if(Object.assign(i.style,{top:"0px",left:"0px",translate:`${ft(l)}px ${ft(h)}px`}),i.setAttribute("actual-placement",c),(u=this.host.elements)==null||u.forEach(p=>{this.originalPlacements.has(p)||this.originalPlacements.set(p,p.getAttribute("placement")),p.setAttribute("placement",c)}),r&&d.arrow){const{x:p,y:m}=d.arrow;Object.assign(r.style,{top:c.startsWith("right")||c.startsWith("left")?"0px":"",left:c.startsWith("bottom")||c.startsWith("top")?"0px":"",translate:`${ft(p)}px ${ft(m)}px`})}}clearOverlayPosition(){this.target&&(this.target.style.removeProperty("max-height"),this.target.style.removeProperty("max-width"),this.initialHeight=void 0,this.isConstrained=!1)}hostConnected(){document.addEventListener("luzmo-update-overlays",this.resetOverlayPosition)}hostUpdated(){var t;this.host.open||((t=this.cleanup)==null||t.call(this),this.cleanup=void 0)}hostDisconnected(){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0,document.removeEventListener("luzmo-update-overlays",this.resetOverlayPosition)}}var ot=(e=>(e.click="click",e.hover="hover",e.longpress="longpress",e))(ot||{});const xt=Symbol("lastInteractionType"),gt="remove-focus-ring-safari-hack";class Rt{constructor(t,{overlay:i,isPersistent:n,handleOverlayReady:o}){this.target=t,this.isLazilyOpen=!1,this.isPersistent=!1,this.isPersistent=!!n,this.handleOverlayReady=o,this.isPersistent&&this.init(),this.overlay=i}get activelyOpening(){return!1}get open(){var t;return((t=this.overlay)==null?void 0:t.open)??this.isLazilyOpen}set open(t){if(t!==this.open){if(this.isLazilyOpen=t,this.overlay){this.overlay.open=t,this.target[xt]=this.type;return}t&&(customElements.whenDefined("luzmo-overlay").then(async()=>{const{LuzmoOverlay:i}=await Promise.resolve().then(()=>Ct);this.overlay=new i,this.overlay.open=!0,this.target[xt]=this.type}),Promise.resolve().then(()=>Ct))}}get overlay(){return this._overlay}set overlay(t){var i;t&&this.overlay!==t&&(this.overlay&&this.overlay.removeController(this),this._overlay=t,this.overlay.addController(this),this.initOverlay(),this.prepareDescription(this.target),(i=this.handleOverlayReady)==null||i.call(this,this.overlay))}prepareDescription(t){}releaseDescription(){}shouldCompleteOpen(){}init(){}initOverlay(){}abort(){var t;this.releaseDescription(),(t=this.abortController)==null||t.abort()}hostConnected(){this.init()}hostDisconnected(){this.isPersistent||this.abort()}}class ge extends Rt{constructor(){super(...arguments),this.type=ot.click,this.preventNextToggle=!1}handleClick(){this.preventNextToggle||(this.open=!this.open),this.preventNextToggle=!1}handlePointerdown(){this.preventNextToggle=this.open}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("click",()=>this.handleClick(),{signal:t}),this.target.addEventListener("pointerdown",()=>this.handlePointerdown(),{signal:t})}}const xi=300;class ye extends Rt{constructor(){super(...arguments),this.type=ot.hover,this.elementIds=[],this.focusedin=!1,this.pointerentered=!1}handleKeyup(t){(t.code==="Tab"||t.code==="Escape")&&(this.open=!0,this.removeSafariFocusRingClass())}handleTargetFocusin(){if(this.target.matches(":focus-visible")){if(vt.isWebKit()&&this.target[xt]===ot.click){this.target.classList.add(gt);return}this.open=!0,this.focusedin=!0,this.removeSafariFocusRingClass()}}handleTargetFocusout(){this.removeSafariFocusRingClass(),this.focusedin=!1,!this.pointerentered&&(this.open=!1)}handleTargetPointerenter(){var t;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0),!((t=this.overlay)!=null&&t.disabled)&&(this.open=!0,this.pointerentered=!0)}handleTargetPointerleave(){this.doPointerleave()}handleHostPointerenter(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=void 0)}handleHostPointerleave(){this.doPointerleave()}prepareDescription(){if(this.overlay.elements.length===0)return;const t=this.target.getRootNode(),i=this.overlay.elements[0].getRootNode(),n=this.overlay.getRootNode();t===n?this.prepareOverlayRelativeDescription():t===i&&this.prepareContentRelativeDescription()}prepareOverlayRelativeDescription(){const t=St.conditionAttributeWithId(this.target,"aria-describedby",[this.overlay.id]);this.releaseDescription=()=>{t(),this.releaseDescription=Y}}prepareContentRelativeDescription(){const t=[],i=this.overlay.elements.map(o=>(t.push(o.id),o.id||(o.id=`${this.overlay.tagName.toLowerCase()}-helper-${Nt.randomID()}`),o.id));this.elementIds=t;const n=St.conditionAttributeWithId(this.target,"aria-describedby",i);this.releaseDescription=()=>{n(),this.overlay.elements.map((o,s)=>{o.id=this.elementIds[s]}),this.releaseDescription=Y}}doPointerleave(){this.pointerentered=!1;const t=this.target;this.focusedin&&t.matches(":focus-visible")||(this.hoverTimeout=setTimeout(()=>{this.open=!1},xi))}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("keyup",n=>this.handleKeyup(n),{signal:t}),this.target.addEventListener("focusin",()=>this.handleTargetFocusin(),{signal:t}),this.target.addEventListener("focusout",()=>this.handleTargetFocusout(),{signal:t}),this.target.addEventListener("pointerenter",()=>this.handleTargetPointerenter(),{signal:t}),this.target.addEventListener("pointerleave",()=>this.handleTargetPointerleave(),{signal:t}),this.overlay&&this.initOverlay()}initOverlay(){if(!this.abortController)return;const{signal:t}=this.abortController;this.overlay.addEventListener("pointerenter",()=>this.handleHostPointerenter(),{signal:t}),this.overlay.addEventListener("pointerleave",()=>this.handleHostPointerleave(),{signal:t})}removeSafariFocusRingClass(){vt.isWebKit()&&this.target.classList.contains(gt)&&this.target.classList.remove(gt)}}const Ci=300,ve={touch:"Double tap and long press for additional options",keyboard:"Press Space or Alt+Down Arrow for additional options",mouse:"Click and hold for additional options"};class we extends Rt{constructor(){super(...arguments),this.type=ot.longpress,this.longpressState=null,this.releaseDescription=Y,this.handlePointerup=()=>{var t;clearTimeout(this.timeout),this.target&&(this.longpressState=((t=this.overlay)==null?void 0:t.state)==="opening"?"pressed":null,document.removeEventListener("pointerup",this.handlePointerup),document.removeEventListener("pointercancel",this.handlePointerup))}}get activelyOpening(){return this.longpressState==="opening"||this.longpressState==="pressed"}handleLongpress(){this.open=!0,this.longpressState=this.longpressState==="potential"?"opening":"pressed"}handlePointerdown(t){!this.target||t.button!==0||(this.longpressState="potential",document.addEventListener("pointerup",this.handlePointerup),document.addEventListener("pointercancel",this.handlePointerup),"holdAffordance"in this.target)||(this.timeout=setTimeout(()=>{this.target&&this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"pointer"}}))},Ci))}handleKeydown(t){const{code:i,altKey:n}=t;n&&i==="ArrowDown"&&(t.stopPropagation(),t.stopImmediatePropagation())}handleKeyup(t){const{code:i,altKey:n}=t;if(i==="Space"||n&&i==="ArrowDown"){if(!this.target)return;t.stopPropagation(),this.target.dispatchEvent(new CustomEvent("longpress",{bubbles:!0,composed:!0,detail:{source:"keyboard"}})),setTimeout(()=>{this.longpressState=null})}}prepareDescription(t){if(this.releaseDescription!==Y||this.overlay.elements.length===0)return;const i=document.createElement("div");i.id=`longpress-describedby-descriptor-${Nt.randomID()}`;const n=vt.isIOS()||vt.isAndroid()?"touch":"keyboard";i.textContent=ve[n],i.slot="longpress-describedby-descriptor";const o=t.getRootNode(),s=this.overlay.getRootNode();o===s?this.overlay.append(i):(i.hidden=!("host"in o),t.after(i));const r=St.conditionAttributeWithId(t,"aria-describedby",[i.id]);this.releaseDescription=()=>{r(),i.remove(),this.releaseDescription=Y}}shouldCompleteOpen(){this.longpressState=this.longpressState==="pressed"?null:this.longpressState}init(){var i;(i=this.abortController)==null||i.abort(),this.abortController=new AbortController;const{signal:t}=this.abortController;this.target.addEventListener("longpress",()=>this.handleLongpress(),{signal:t}),this.target.addEventListener("pointerdown",n=>this.handlePointerdown(n),{signal:t}),this.prepareDescription(this.target),!this.target.holdAffordance&&(this.target.addEventListener("keydown",n=>this.handleKeydown(n),{signal:t}),this.target.addEventListener("keyup",n=>this.handleKeyup(n),{signal:t}))}}const be={click:ge,longpress:we,hover:ye};var Pi=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,T=(e,t,i,n)=>{for(var o=n>1?void 0:n?Oi(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Pi(t,i,o),o};const Ti=typeof document<"u"&&"showPopover"in document.createElement("div");let yt=Le(it);yt=Ti?ke(yt):Se(yt);var B;const P=(B=class extends yt{constructor(){super(...arguments),this._delayed=!1,this._disabled=!1,this.offset=0,this._open=!1,this.lastRequestSlottableState=!1,this.receivesFocus="auto",this._state="closed",this.triggerElement=null,this.type="auto",this.wasOpen=!1,this.closeOnFocusOut=t=>{if(!t.relatedTarget)return;const i=new Event("overlay-relation-query",{bubbles:!0,composed:!0});t.relatedTarget.addEventListener(i.type,n=>{n.composedPath().includes(this)||(this.open=!1)}),t.relatedTarget.dispatchEvent(i)}}get delayed(){var t;return((t=this.elements.at(-1))==null?void 0:t.hasAttribute("delayed"))||this._delayed}set delayed(t){this._delayed=t}get disabled(){return this._disabled}set disabled(t){var i;this._disabled=t,t?((i=this.strategy)==null||i.abort(),this.wasOpen=this.open,this.open=!1):(this.bindEvents(),this.open=this.open||this.wasOpen,this.wasOpen=!1)}get hasNonVirtualTrigger(){return!!this.triggerElement&&!(this.triggerElement instanceof dt)}get placementController(){return this._placementController||(this._placementController=new me(this)),this._placementController}get open(){return this._open}set open(t){var i;t&&this.disabled||t!==this.open&&((i=this.strategy)!=null&&i.activelyOpening&&!t||(this._open=t,this.open&&(B.openCount+=1),this.requestUpdate("open",!this.open),this.open&&this.requestSlottable()))}get state(){return this._state}set state(t){var n;if(t===this.state)return;const i=this.state;this._state=t,(this.state==="opened"||this.state==="closed")&&((n=this.strategy)==null||n.shouldCompleteOpen()),this.requestUpdate("state",i)}get elementResolver(){return this._elementResolver||(this._elementResolver=new Yt.ElementResolutionController(this)),this._elementResolver}get usesDialog(){return this.type==="modal"||this.type==="page"}get popoverValue(){if("popover"in this)switch(this.type){case"modal":case"page":return;case"hint":return"manual";default:return this.type}}get requiresPositioning(){return!(this.type==="page"||!this.open||!this.triggerElement||!this.placement&&this.type!=="hint")}managePosition(){if(!this.requiresPositioning||!this.open)return;const t=this.offset||0,i=this.triggerElement,n=this.placement||"right",o=this.tipPadding;this.placementController.placeOverlay(this.dialogEl,{offset:t,placement:n,tipPadding:o,trigger:i,type:this.type})}async managePopoverOpen(){super.managePopoverOpen();const t=this.open;if(this.open!==t||(await this.manageDelay(t),this.open!==t)||(this.triggerInteraction==="longpress"&&await R(),await this.ensureOnDOM(t),this.open!==t))return;const i=await this.makeTransition(t);this.open===t&&await this.applyFocus(t,i)}async applyFocus(t,i){if(!(this.receivesFocus==="false"||this.type==="hint")){if(await R(),await R(),t===this.open&&!this.open){this.hasNonVirtualTrigger&&this.contains(this.getRootNode().activeElement)&&this.triggerElement.focus();return}i==null||i.focus()}}returnFocus(){var i;if(this.open||this.type==="hint")return;const t=()=>{var s,r;const n=[];let o=typeof document<"u"?document.activeElement:null;for(;(s=o==null?void 0:o.shadowRoot)!=null&&s.activeElement;)o=o.shadowRoot.activeElement;for(;o;){const a=o.assignedSlot||o.parentElement||((r=o.getRootNode())==null?void 0:r.host);a&&n.push(a),o=a}return n};this.receivesFocus!=="false"&&((i=this.triggerElement)!=null&&i.focus)&&(this.contains(this.getRootNode().activeElement)||t().includes(this)||typeof document<"u"&&document.activeElement===document.body)&&this.triggerElement.focus()}async manageOpen(t){if(!(!this.isConnected&&this.open)&&(this.hasUpdated||await this.updateComplete,this.open?(Jt.add(this),this.willPreventClose&&(document.addEventListener("pointerup",()=>{this.dialogEl.classList.toggle("not-immediately-closable",!1),this.willPreventClose=!1},{once:!0}),this.dialogEl.classList.toggle("not-immediately-closable",!0))):(t&&this.dispose(),Jt.remove(this)),this.open&&this.state!=="opened"?this.state="opening":!this.open&&this.state!=="closed"&&(this.state="closing"),this.usesDialog?this.manageDialogOpen():this.managePopoverOpen(),this.type==="auto")){const i=this.getRootNode();this.open?i.addEventListener("focusout",this.closeOnFocusOut,{capture:!0}):i.removeEventListener("focusout",this.closeOnFocusOut,{capture:!0})}}bindEvents(){var t;(t=this.strategy)==null||t.abort(),this.strategy=void 0,this.hasNonVirtualTrigger&&this.triggerInteraction&&(this.strategy=new be[this.triggerInteraction](this.triggerElement,{overlay:this}))}handleBeforetoggle(t){t.newState!=="open"&&this.handleBrowserClose(t)}handleBrowserClose(t){var i;if(t.stopPropagation(),!((i=this.strategy)!=null&&i.activelyOpening)){this.open=!1;return}this.manuallyKeepOpen()}manuallyKeepOpen(){this.open=!0,this.placementController.allowPlacementUpdate=!0,this.manageOpen(!1)}handleSlotchange(){var t,i;this.elements.length===0?(t=this.strategy)==null||t.releaseDescription():this.hasNonVirtualTrigger&&((i=this.strategy)==null||i.prepareDescription(this.triggerElement))}shouldPreventClose(){const t=this.willPreventClose;return this.willPreventClose=!1,t}requestSlottable(){this.lastRequestSlottableState!==this.open&&(this.open||document.body.offsetHeight,this.dispatchEvent(new Gt.SlottableRequestEvent("overlay-content",this.open?{}:Gt.removeSlottableRequest)),this.lastRequestSlottableState=this.open)}willUpdate(t){var n;if(this.hasAttribute("id")||this.setAttribute("id",`${this.tagName.toLowerCase()}-${Nt.randomID()}`),t.has("open")&&(this.hasUpdated||this.open)&&this.manageOpen(t.get("open")),t.has("trigger")){const[o,s]=((n=this.trigger)==null?void 0:n.split("@"))||[];this.elementResolver.selector=o?`#${o}`:"",this.triggerInteraction=s}let i=!1;t.has(Yt.elementResolverUpdatedSymbol)&&(i=this.triggerElement,this.triggerElement=this.elementResolver.element),t.has("triggerElement")&&(i=t.get("triggerElement")),i!==!1&&this.bindEvents()}updated(t){super.updated(t),t.has("placement")&&(this.placement?this.dialogEl.setAttribute("actual-placement",this.placement):this.dialogEl.removeAttribute("actual-placement"),this.open&&t.get("placement")!==void 0&&this.placementController.resetOverlayPosition()),t.has("state")&&this.state==="closed"&&t.get("state")!==void 0&&this.placementController.clearOverlayPosition()}renderContent(){return x.x` <slot @slotchange=${this.handleSlotchange}></slot> `}get dialogStyleMap(){return{"--luzmo-overlay-open-count":B.openCount.toString()}}renderDialog(){return x.x`
19
+ <dialog
20
+ class="dialog"
21
+ part="dialog"
22
+ placement=${Dt.o(this.requiresPositioning?this.placement||"right":void 0)}
23
+ style=${jt.o(this.dialogStyleMap)}
24
+ @close=${this.handleBrowserClose}
25
+ @cancel=${this.handleBrowserClose}
26
+ @beforetoggle=${this.handleBeforetoggle}
27
+ ?is-visible=${this.state!=="closed"}
28
+ >
29
+ ${this.renderContent()}
30
+ </dialog>
31
+ `}renderPopover(){return x.x`
32
+ <div
33
+ class="dialog"
34
+ part="dialog"
35
+ placement=${Dt.o(this.requiresPositioning?this.placement||"right":void 0)}
36
+ popover=${Dt.o(this.popoverValue)}
37
+ style=${jt.o(this.dialogStyleMap)}
38
+ @beforetoggle=${this.handleBeforetoggle}
39
+ @close=${this.handleBrowserClose}
40
+ ?is-visible=${this.state!=="closed"}
41
+ >
42
+ ${this.renderContent()}
43
+ </div>
44
+ `}render(){const t=this.type==="modal"||this.type==="page";return x.x`
45
+ ${t?this.renderDialog():this.renderPopover()}
46
+ <slot name="longpress-describedby-descriptor"></slot>
47
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("close",()=>{this.open=!1}),this.hasUpdated&&this.bindEvents()}disconnectedCallback(){var t;(t=this.strategy)==null||t.releaseDescription(),this.open=!1,super.disconnectedCallback()}},B.styles=[x.r(_e)],B.openCount=1,B);T([x.n({type:Boolean})],P.prototype,"delayed",1);T([oe.e(".dialog")],P.prototype,"dialogEl",2);T([x.n({type:Boolean})],P.prototype,"disabled",1);T([Pe.o({flatten:!0,selector:':not([slot="longpress-describedby-descriptor"], slot)'})],P.prototype,"elements",2);T([x.n({type:Number})],P.prototype,"offset",2);T([x.n({type:Boolean,reflect:!0})],P.prototype,"open",1);T([x.n()],P.prototype,"placement",2);T([x.n({attribute:"receives-focus"})],P.prototype,"receivesFocus",2);T([oe.e("slot")],P.prototype,"slotEl",2);T([Ce.r()],P.prototype,"state",1);T([x.n({type:Number,attribute:"tip-padding"})],P.prototype,"tipPadding",2);T([x.n()],P.prototype,"trigger",2);T([x.n({attribute:!1})],P.prototype,"triggerElement",2);T([x.n({attribute:!1})],P.prototype,"triggerInteraction",2);T([x.n()],P.prototype,"type",2);let Ee=P;const Ct=Object.freeze(Object.defineProperty({__proto__:null,LuzmoOverlay:Ee},Symbol.toStringTag,{value:"Module"}));exports.ClickController=ge;exports.HoverController=ye;exports.InteractionController=Rt;exports.InteractionTypes=ot;exports.LONGPRESS_INSTRUCTIONS=ve;exports.LongpressController=we;exports.LuzmoAbstractOverlay=it;exports.LuzmoOverlay=Ee;exports.PlacementController=me;exports.SAFARI_FOCUS_RING_CLASS=gt;exports.VirtualTrigger=dt;exports.guaranteedAllTransitionend=Pt;exports.lastInteractionType=xt;exports.nextFrame=R;exports.noop=Y;exports.overlay=Ct;exports.overlayTimer=lt;exports.placementUpdatedSymbol=Ei;exports.strategies=be;
@@ -15,12 +15,12 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { a as me, r as ge, x as dt, n as z } from "./base-WsynuqaS.js";
19
- import { r as ve } from "./state-Deh-vKYE.js";
18
+ import { a as me, r as ge, x as dt, n as z } from "./base-CFWO09N1.js";
19
+ import { r as ye } from "./state-DwIwYPvt.js";
20
20
  import { e as ne } from "./query-D_KR_GUc.js";
21
- import { o as ye } from "./query-assigned-elements-DjfhL1cl.js";
22
- import { o as Pt } from "./if-defined-DOaE2coe.js";
23
- import { o as Kt } from "./style-map-IgqIKvlE.js";
21
+ import { o as ve } from "./query-assigned-elements-DjfhL1cl.js";
22
+ import { o as Pt } from "./if-defined-DULpqYwi.js";
23
+ import { o as Kt } from "./style-map-Bnhf_mVZ.js";
24
24
  import { r as Ft } from "./random-id-ByCz1xaq.js";
25
25
  import { E as we, e as be } from "./element-resolution-FCUT-wql.js";
26
26
  import { u as ct } from "./focusable-selectors-B4YgbghQ.js";
@@ -43,9 +43,7 @@ const Te = (e, t, {
43
43
  return () => e;
44
44
  let s = 1, r = 0;
45
45
  (i === "afterbegin" || i === "afterend") && (s = -1, r = o - 1);
46
- const a = new Array(o), l = new Array(o), h = document.createComment(
47
- "placeholder for reparented element"
48
- );
46
+ const a = new Array(o), l = new Array(o), h = typeof document < "u" ? document.createComment("placeholder for reparented element") : null;
49
47
  do {
50
48
  const c = e[r];
51
49
  n && (l[r] = n(c)), a[r] = h.cloneNode();
@@ -63,9 +61,9 @@ class De {
63
61
  openTimer(t) {
64
62
  if (this.cancelCooldownTimer(), !this.component || t !== this.component)
65
63
  return this.component && (this.close(this.component), this.cancelCooldownTimer()), this.component = t, this.isWarm ? Promise.resolve(!1) : (this.promise = new Promise((i) => {
66
- this.resolve = i, this.timeout = window.setTimeout(() => {
64
+ this.resolve = i, this.timeout = typeof window < "u" ? window.setTimeout(() => {
67
65
  this.resolve && (this.resolve(!1), this.isWarm = !0);
68
- }, this.warmUpDelay);
66
+ }, this.warmUpDelay) : 0;
69
67
  }), this.promise);
70
68
  if (this.promise)
71
69
  return this.promise;
@@ -75,12 +73,12 @@ class De {
75
73
  this.component && this.component === t && (this.resetCooldownTimer(), this.timeout > 0 && (clearTimeout(this.timeout), this.timeout = 0), this.resolve && (this.resolve(!0), delete this.resolve), delete this.promise, delete this.component);
76
74
  }
77
75
  resetCooldownTimer() {
78
- this.isWarm && (this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), this.cooldownTimeout = window.setTimeout(() => {
76
+ this.isWarm && (this.cooldownTimeout && typeof window < "u" && window.clearTimeout(this.cooldownTimeout), this.cooldownTimeout = typeof window < "u" ? window.setTimeout(() => {
79
77
  this.isWarm = !1, delete this.cooldownTimeout;
80
- }, this.coolDownDelay));
78
+ }, this.coolDownDelay) : void 0);
81
79
  }
82
80
  cancelCooldownTimer() {
83
- this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
81
+ this.cooldownTimeout && typeof window < "u" && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
84
82
  }
85
83
  }
86
84
  const gt = new De(), J = () => {
@@ -552,14 +550,14 @@ function Fe(e) {
552
550
  }
553
551
  return t;
554
552
  }
555
- const ze = "showPopover" in document.createElement("div");
553
+ const ze = typeof document < "u" && "showPopover" in document.createElement("div");
556
554
  class Ne {
557
555
  constructor() {
558
- this.root = document.body, this.stack = [], this.handleScroll = (t) => {
559
- t.target !== document && t.target !== document.documentElement && t.target !== document.body || this.stack.forEach((i) => {
556
+ this.root = typeof document > "u" ? null : document.body, this.stack = [], this.handleScroll = (t) => {
557
+ typeof document < "u" && t.target !== document && t.target !== document.documentElement && t.target !== document.body || this.stack.forEach((i) => {
560
558
  i.open && (i.type === "auto" && i.triggerElement instanceof HTMLElement && i.triggerElement.closest(
561
559
  "luzmo-picker, luzmo-select, luzmo-action-menu"
562
- ) && t.stopPropagation(), document.dispatchEvent(
560
+ ) && t.stopPropagation(), typeof document < "u" && document.dispatchEvent(
563
561
  new CustomEvent("luzmo-update-overlays", {
564
562
  bubbles: !0,
565
563
  composed: !0,
@@ -607,15 +605,15 @@ class Ne {
607
605
  return;
608
606
  }
609
607
  ze || i && this.closeOverlay(i);
610
- }, this.bindEvents();
608
+ }, typeof document < "u" && this.bindEvents();
611
609
  }
612
610
  get document() {
613
611
  return this.root.ownerDocument || document;
614
612
  }
615
613
  bindEvents() {
616
- this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown), this.document.addEventListener("scroll", this.handleScroll, {
614
+ typeof document < "u" && (this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown), this.document.addEventListener("scroll", this.handleScroll, {
617
615
  capture: !0
618
- });
616
+ }));
619
617
  }
620
618
  closeOverlay(t) {
621
619
  const i = this.stack.indexOf(t);
@@ -682,7 +680,7 @@ class Ne {
682
680
  this.closeOverlay(t);
683
681
  }
684
682
  }
685
- const Xt = new Ne(), _e = ':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}', Y = Math.min, T = Math.max, vt = Math.round, ut = Math.floor, M = (e) => ({
683
+ const Xt = new Ne(), _e = ':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}', Y = Math.min, T = Math.max, yt = Math.round, ut = Math.floor, M = (e) => ({
686
684
  x: e,
687
685
  y: e
688
686
  }), $e = {
@@ -722,10 +720,10 @@ function He(e, t, i) {
722
720
  i === void 0 && (i = !1);
723
721
  const n = ot(e), o = Wt(e), s = Ht(o);
724
722
  let r = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
725
- return t.reference[s] > t.floating[s] && (r = yt(r)), [r, yt(r)];
723
+ return t.reference[s] > t.floating[s] && (r = vt(r)), [r, vt(r)];
726
724
  }
727
725
  function We(e) {
728
- const t = yt(e);
726
+ const t = vt(e);
729
727
  return [Dt(e), t, Dt(t)];
730
728
  }
731
729
  function Dt(e) {
@@ -749,7 +747,7 @@ function Be(e, t, i, n) {
749
747
  let s = Ie(G(e), i === "start", n);
750
748
  return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(Dt)))), s;
751
749
  }
752
- function yt(e) {
750
+ function vt(e) {
753
751
  return e.replace(/left|right|bottom|top/g, (t) => $e[t]);
754
752
  }
755
753
  function qe(e) {
@@ -852,10 +850,10 @@ const Ve = async (e, t, i) => {
852
850
  } = Jt(h, n, l), f = n, u = {}, p = 0;
853
851
  for (let m = 0; m < a.length; m++) {
854
852
  const {
855
- name: v,
853
+ name: y,
856
854
  fn: g
857
855
  } = a[m], {
858
- x: y,
856
+ x: v,
859
857
  y: w,
860
858
  data: E,
861
859
  reset: b
@@ -873,10 +871,10 @@ const Ve = async (e, t, i) => {
873
871
  floating: t
874
872
  }
875
873
  });
876
- c = y ?? c, d = w ?? d, u = {
874
+ c = v ?? c, d = w ?? d, u = {
877
875
  ...u,
878
- [v]: {
879
- ...u[v],
876
+ [y]: {
877
+ ...u[y],
880
878
  ...E
881
879
  }
882
880
  }, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (f = b.placement), b.rects && (h = b.rects === !0 ? await r.getElementRects({
@@ -912,12 +910,12 @@ async function It(e, t) {
912
910
  elementContext: d = "floating",
913
911
  altBoundary: f = !1,
914
912
  padding: u = 0
915
- } = nt(t, e), p = se(u), v = a[f ? d === "floating" ? "reference" : "floating" : d], g = wt(await s.getClippingRect({
916
- element: (i = await (s.isElement == null ? void 0 : s.isElement(v))) == null || i ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
913
+ } = nt(t, e), p = se(u), y = a[f ? d === "floating" ? "reference" : "floating" : d], g = wt(await s.getClippingRect({
914
+ element: (i = await (s.isElement == null ? void 0 : s.isElement(y))) == null || i ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
917
915
  boundary: h,
918
916
  rootBoundary: c,
919
917
  strategy: l
920
- })), y = d === "floating" ? {
918
+ })), v = d === "floating" ? {
921
919
  x: n,
922
920
  y: o,
923
921
  width: r.floating.width,
@@ -930,10 +928,10 @@ async function It(e, t) {
930
928
  y: 1
931
929
  }, b = wt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
932
930
  elements: a,
933
- rect: y,
931
+ rect: v,
934
932
  offsetParent: w,
935
933
  strategy: l
936
- }) : y);
934
+ }) : v);
937
935
  return {
938
936
  top: (g.top - b.top + p.top) / E.y,
939
937
  bottom: (b.bottom - g.bottom + p.bottom) / E.y,
@@ -962,10 +960,10 @@ const Ue = (e) => ({
962
960
  const d = se(c), f = {
963
961
  x: i,
964
962
  y: n
965
- }, u = Wt(o), p = Ht(u), m = await r.getDimensions(h), v = u === "y", g = v ? "top" : "left", y = v ? "bottom" : "right", w = v ? "clientHeight" : "clientWidth", E = s.reference[p] + s.reference[u] - f[u] - s.floating[p], b = f[u] - s.reference[u], D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
963
+ }, u = Wt(o), p = Ht(u), m = await r.getDimensions(h), y = u === "y", g = y ? "top" : "left", v = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", E = s.reference[p] + s.reference[u] - f[u] - s.floating[p], b = f[u] - s.reference[u], D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
966
964
  let x = D ? D[w] : 0;
967
965
  (!x || !await (r.isElement == null ? void 0 : r.isElement(D))) && (x = a.floating[w] || s.floating[p]);
968
- const I = E / 2 - b / 2, N = x / 2 - m[p] / 2 - 1, L = Y(d[g], N), V = Y(d[y], N), _ = L, U = x - m[p] - V, P = x / 2 - m[p] / 2 + I, tt = Rt(_, P, U), B = !l.arrow && ot(o) != null && P !== tt && s.reference[p] / 2 - (P < _ ? L : V) - m[p] / 2 < 0, $ = B ? P < _ ? P - _ : P - U : 0;
966
+ const I = E / 2 - b / 2, N = x / 2 - m[p] / 2 - 1, L = Y(d[g], N), V = Y(d[v], N), _ = L, U = x - m[p] - V, P = x / 2 - m[p] / 2 + I, tt = Rt(_, P, U), B = !l.arrow && ot(o) != null && P !== tt && s.reference[p] / 2 - (P < _ ? L : V) - m[p] / 2 < 0, $ = B ? P < _ ? P - _ : P - U : 0;
969
967
  return {
970
968
  [u]: f[u] + $,
971
969
  data: {
@@ -998,13 +996,13 @@ const Ue = (e) => ({
998
996
  fallbackStrategy: u = "bestFit",
999
997
  fallbackAxisSideDirection: p = "none",
1000
998
  flipAlignment: m = !0,
1001
- ...v
999
+ ...y
1002
1000
  } = nt(e, t);
1003
1001
  if ((i = s.arrow) != null && i.alignmentOffset)
1004
1002
  return {};
1005
- const g = G(o), y = Q(a), w = G(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), b = f || (w || !m ? [yt(a)] : We(a)), D = p !== "none";
1003
+ const g = G(o), v = Q(a), w = G(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), b = f || (w || !m ? [vt(a)] : We(a)), D = p !== "none";
1006
1004
  !f && D && b.push(...Be(a, m, p, E));
1007
- const x = [a, ...b], I = await It(t, v), N = [];
1005
+ const x = [a, ...b], I = await It(t, y), N = [];
1008
1006
  let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
1009
1007
  if (c && N.push(I[g]), d) {
1010
1008
  const P = He(o, r, E);
@@ -1034,7 +1032,7 @@ const Ue = (e) => ({
1034
1032
  const $ = (U = L.filter((j) => {
1035
1033
  if (D) {
1036
1034
  const K = Q(j.placement);
1037
- return K === y || // Create a bias to the `y` side axis due to horizontal
1035
+ return K === v || // Create a bias to the `y` side axis due to horizontal
1038
1036
  // reading directions favoring greater width.
1039
1037
  K === "y";
1040
1038
  }
@@ -1120,14 +1118,14 @@ const Ye = function(e) {
1120
1118
  mainAxis: s = !0,
1121
1119
  crossAxis: r = !1,
1122
1120
  limiter: a = {
1123
- fn: (v) => {
1121
+ fn: (y) => {
1124
1122
  let {
1125
1123
  x: g,
1126
- y
1127
- } = v;
1124
+ y: v
1125
+ } = y;
1128
1126
  return {
1129
1127
  x: g,
1130
- y
1128
+ y: v
1131
1129
  };
1132
1130
  }
1133
1131
  },
@@ -1138,12 +1136,12 @@ const Ye = function(e) {
1138
1136
  }, c = await It(t, l), d = Q(G(o)), f = oe(d);
1139
1137
  let u = h[f], p = h[d];
1140
1138
  if (s) {
1141
- const v = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", y = u + c[v], w = u - c[g];
1142
- u = Rt(y, u, w);
1139
+ const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", v = u + c[y], w = u - c[g];
1140
+ u = Rt(v, u, w);
1143
1141
  }
1144
1142
  if (r) {
1145
- const v = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", y = p + c[v], w = p - c[g];
1146
- p = Rt(y, p, w);
1143
+ const y = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", v = p + c[y], w = p - c[g];
1144
+ p = Rt(v, p, w);
1147
1145
  }
1148
1146
  const m = a.fn({
1149
1147
  ...t,
@@ -1182,11 +1180,11 @@ const Ye = function(e) {
1182
1180
  width: p,
1183
1181
  height: m
1184
1182
  } = s.floating;
1185
- let v, g;
1186
- d === "top" || d === "bottom" ? (v = d, g = f === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = d, v = f === "end" ? "top" : "bottom");
1187
- const y = m - c.top - c.bottom, w = p - c.left - c.right, E = Y(m - c[v], y), b = Y(p - c[g], w), D = !t.middlewareData.shift;
1183
+ let y, g;
1184
+ d === "top" || d === "bottom" ? (y = d, g = f === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = d, y = f === "end" ? "top" : "bottom");
1185
+ const v = m - c.top - c.bottom, w = p - c.left - c.right, E = Y(m - c[y], v), b = Y(p - c[g], w), D = !t.middlewareData.shift;
1188
1186
  let x = E, I = b;
1189
- if ((i = t.middlewareData.shift) != null && i.enabled.x && (I = w), (n = t.middlewareData.shift) != null && n.enabled.y && (x = y), D && !f) {
1187
+ if ((i = t.middlewareData.shift) != null && i.enabled.x && (I = w), (n = t.middlewareData.shift) != null && n.enabled.y && (x = v), D && !f) {
1190
1188
  const L = T(c.left, 0), V = T(c.right, 0), _ = T(c.top, 0), U = T(c.bottom, 0);
1191
1189
  u ? I = p - 2 * (L !== 0 || V !== 0 ? L + V : T(c.left, c.right)) : x = m - 2 * (_ !== 0 || U !== 0 ? _ + U : T(c.top, c.bottom));
1192
1190
  }
@@ -1316,7 +1314,7 @@ function Lt(e) {
1316
1314
  function le(e) {
1317
1315
  const t = F(e);
1318
1316
  let i = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
1319
- const o = H(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, a = vt(i) !== s || vt(n) !== r;
1317
+ const o = H(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, a = yt(i) !== s || yt(n) !== r;
1320
1318
  return a && (i = s, n = r), {
1321
1319
  width: i,
1322
1320
  height: n,
@@ -1335,7 +1333,7 @@ function et(e) {
1335
1333
  height: o,
1336
1334
  $: s
1337
1335
  } = le(t);
1338
- let r = (s ? vt(i.width) : i.width) / n, a = (s ? vt(i.height) : i.height) / o;
1336
+ let r = (s ? yt(i.width) : i.width) / n, a = (s ? yt(i.height) : i.height) / o;
1339
1337
  return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1340
1338
  x: r,
1341
1339
  y: a
@@ -1363,8 +1361,8 @@ function Z(e, t, i, n) {
1363
1361
  const f = A(s), u = n && k(n) ? A(n) : n;
1364
1362
  let p = f, m = Lt(p);
1365
1363
  for (; m && n && u !== p; ) {
1366
- const v = et(m), g = m.getBoundingClientRect(), y = F(m), w = g.left + (m.clientLeft + parseFloat(y.paddingLeft)) * v.x, E = g.top + (m.clientTop + parseFloat(y.paddingTop)) * v.y;
1367
- l *= v.x, h *= v.y, c *= v.x, d *= v.y, l += w, h += E, p = A(m), m = Lt(p);
1364
+ const y = et(m), g = m.getBoundingClientRect(), v = F(m), w = g.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x, E = g.top + (m.clientTop + parseFloat(v.paddingTop)) * y.y;
1365
+ l *= y.x, h *= y.y, c *= y.x, d *= y.y, l += w, h += E, p = A(m), m = Lt(p);
1368
1366
  }
1369
1367
  }
1370
1368
  return wt({
@@ -1614,8 +1612,8 @@ function pi(e, t) {
1614
1612
  } = h;
1615
1613
  if (a || t(), !f || !u)
1616
1614
  return;
1617
- const p = ut(d), m = ut(o.clientWidth - (c + f)), v = ut(o.clientHeight - (d + u)), g = ut(c), w = {
1618
- rootMargin: -p + "px " + -m + "px " + -v + "px " + -g + "px",
1615
+ const p = ut(d), m = ut(o.clientWidth - (c + f)), y = ut(o.clientHeight - (d + u)), g = ut(c), w = {
1616
+ rootMargin: -p + "px " + -m + "px " + -y + "px " + -g + "px",
1619
1617
  threshold: T(0, Y(1, l)) || 1
1620
1618
  };
1621
1619
  let E = !0;
@@ -1660,26 +1658,26 @@ function ee(e, t, i, n) {
1660
1658
  const d = h && a ? pi(h, i) : null;
1661
1659
  let f = -1, u = null;
1662
1660
  r && (u = new ResizeObserver((g) => {
1663
- let [y] = g;
1664
- y && y.target === h && u && (u.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1661
+ let [v] = g;
1662
+ v && v.target === h && u && (u.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1665
1663
  var w;
1666
1664
  (w = u) == null || w.observe(t);
1667
1665
  })), i();
1668
1666
  }), h && !l && u.observe(h), u.observe(t));
1669
1667
  let p, m = l ? Z(e) : null;
1670
- l && v();
1671
- function v() {
1668
+ l && y();
1669
+ function y() {
1672
1670
  const g = Z(e);
1673
- m && !pe(m, g) && i(), m = g, p = requestAnimationFrame(v);
1671
+ m && !pe(m, g) && i(), m = g, p = requestAnimationFrame(y);
1674
1672
  }
1675
1673
  return i(), () => {
1676
1674
  var g;
1677
- c.forEach((y) => {
1678
- o && y.removeEventListener("scroll", i), s && y.removeEventListener("resize", i);
1675
+ c.forEach((v) => {
1676
+ o && v.removeEventListener("scroll", i), s && v.removeEventListener("resize", i);
1679
1677
  }), d == null || d(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(p);
1680
1678
  };
1681
1679
  }
1682
- const fi = Ye, mi = Ge, ie = je, gi = Xe, vi = Ue, yi = (e, t, i) => {
1680
+ const fi = Ye, mi = Ge, ie = je, gi = Xe, yi = Ue, vi = (e, t, i) => {
1683
1681
  const n = /* @__PURE__ */ new Map(), o = {
1684
1682
  platform: ui,
1685
1683
  ...i
@@ -1798,12 +1796,12 @@ class Ei {
1798
1796
  n,
1799
1797
  gi({
1800
1798
  padding: ft,
1801
- apply: ({ availableWidth: p, availableHeight: m, rects: { floating: v } }) => {
1799
+ apply: ({ availableWidth: p, availableHeight: m, rects: { floating: y } }) => {
1802
1800
  const g = Math.max(
1803
1801
  wi,
1804
1802
  Math.floor(m)
1805
- ), y = v.height;
1806
- this.initialHeight = this.isConstrained && this.initialHeight || y, this.isConstrained = y < this.initialHeight || g <= y;
1803
+ ), v = y.height;
1804
+ this.initialHeight = this.isConstrained && this.initialHeight || v, this.isConstrained = v < this.initialHeight || g <= v;
1807
1805
  const w = this.isConstrained ? `${g}px` : "";
1808
1806
  Object.assign(i.style, {
1809
1807
  maxWidth: `${Math.floor(p)}px`,
@@ -1812,12 +1810,12 @@ class Ei {
1812
1810
  }
1813
1811
  }),
1814
1812
  ...r ? [
1815
- vi({
1813
+ yi({
1816
1814
  element: r,
1817
1815
  padding: t.tipPadding || ft
1818
1816
  })
1819
1817
  ] : []
1820
- ], { x: l, y: h, placement: c, middlewareData: d } = await yi(
1818
+ ], { x: l, y: h, placement: c, middlewareData: d } = await vi(
1821
1819
  t.trigger,
1822
1820
  i,
1823
1821
  {
@@ -2188,7 +2186,7 @@ var Di = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, O = (e, t,
2188
2186
  (r = e[s]) && (o = (n ? r(t, i, o) : r(o)) || o);
2189
2187
  return n && o && Di(t, i, o), o;
2190
2188
  };
2191
- const Si = "showPopover" in document.createElement("div");
2189
+ const Si = typeof document < "u" && "showPopover" in document.createElement("div");
2192
2190
  let mt = Le(rt);
2193
2191
  mt = Si ? Fe(mt) : Se(mt);
2194
2192
  var q;
@@ -2383,7 +2381,7 @@ const C = (q = class extends mt {
2383
2381
  const t = () => {
2384
2382
  var s, r;
2385
2383
  const n = [];
2386
- let o = document.activeElement;
2384
+ let o = typeof document < "u" ? document.activeElement : null;
2387
2385
  for (; (s = o == null ? void 0 : o.shadowRoot) != null && s.activeElement; )
2388
2386
  o = o.shadowRoot.activeElement;
2389
2387
  for (; o; ) {
@@ -2392,7 +2390,7 @@ const C = (q = class extends mt {
2392
2390
  }
2393
2391
  return n;
2394
2392
  };
2395
- this.receivesFocus !== "false" && ((i = this.triggerElement) != null && i.focus) && (this.contains(this.getRootNode().activeElement) || t().includes(this) || document.activeElement === document.body) && this.triggerElement.focus();
2393
+ this.receivesFocus !== "false" && ((i = this.triggerElement) != null && i.focus) && (this.contains(this.getRootNode().activeElement) || t().includes(this) || typeof document < "u" && document.activeElement === document.body) && this.triggerElement.focus();
2396
2394
  }
2397
2395
  /**
2398
2396
  * Manages the process of opening or closing the overlay.
@@ -2681,7 +2679,7 @@ O([
2681
2679
  z({ type: Boolean })
2682
2680
  ], C.prototype, "disabled", 1);
2683
2681
  O([
2684
- ye({
2682
+ ve({
2685
2683
  flatten: !0,
2686
2684
  selector: ':not([slot="longpress-describedby-descriptor"], slot)'
2687
2685
  })
@@ -2702,7 +2700,7 @@ O([
2702
2700
  ne("slot")
2703
2701
  ], C.prototype, "slotEl", 2);
2704
2702
  O([
2705
- ve()
2703
+ ye()
2706
2704
  ], C.prototype, "state", 1);
2707
2705
  O([
2708
2706
  z({ type: Number, attribute: "tip-padding" })
@@ -15,8 +15,8 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { x as s } from "./base-WsynuqaS.js";
19
- import "./progress-circle-DXH9z8-6.js";
18
+ import { x as s } from "./base-CFWO09N1.js";
19
+ import "./progress-circle-USIIU1up.js";
20
20
  class o {
21
21
  /**
22
22
  * Creates an instance of PendingStateController.
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";const s=require("./base-CBCg3yyw.cjs");require("./progress-circle-BvRJNuNo.cjs");class r{constructor(e){this.cachedAriaLabel=null,this.host=e,this.host.addController(this)}renderPendingState(){const e=this.host.pendingLabel||"Pending";return this.host.pending?s.x`
18
+ "use strict";const s=require("./base-Cy0MQrPT.cjs");require("./progress-circle-DZxaMe8L.cjs");class r{constructor(e){this.cachedAriaLabel=null,this.host=e,this.host.addController(this)}renderPendingState(){const e=this.host.pendingLabel||"Pending";return this.host.pending?s.x`
19
19
  <luzmo-progress-circle
20
20
  id="loader"
21
21
  size="s"