@orangelogic/design-system 2.60.0 → 2.61.0

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 (248) hide show
  1. package/library/apps/cortex/src/types.d.ts +2 -0
  2. package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
  3. package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
  4. package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
  5. package/library/chunks/animate.El-MpOws.js +37 -0
  6. package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
  7. package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
  8. package/library/chunks/array.DCtvHiLS.js +81 -0
  9. package/library/chunks/asset.CG_yXtWK.js +288 -0
  10. package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
  11. package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
  12. package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
  13. package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
  14. package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
  15. package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
  16. package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
  17. package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
  18. package/library/chunks/color.vLD2sNTs.js +164 -0
  19. package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
  20. package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
  21. package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
  22. package/library/chunks/converters.DkDtLstb.js +11 -0
  23. package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
  24. package/library/chunks/custom-element.L4WJXn1j.js +14 -0
  25. package/library/chunks/debounce.DaHuiSGU.js +15 -0
  26. package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
  27. package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
  28. package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
  29. package/library/chunks/dom.CZrJ64Dm.js +92 -0
  30. package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
  31. package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
  32. package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
  33. package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
  34. package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
  35. package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
  36. package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
  37. package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
  38. package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
  39. package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
  40. package/library/chunks/identity.ByMq8VxU.js +6 -0
  41. package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
  42. package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
  43. package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
  44. package/library/chunks/image.mbpyiQpQ.js +82 -0
  45. package/library/chunks/index.S0wy3rzm.js +373 -0
  46. package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
  47. package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
  48. package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
  49. package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
  50. package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
  51. package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
  52. package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
  53. package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
  54. package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
  55. package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
  56. package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
  57. package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
  58. package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
  59. package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
  60. package/library/chunks/responsive.CA6dcNiM.js +17 -0
  61. package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
  62. package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
  63. package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
  64. package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
  65. package/library/chunks/string.Cp_XNbnV.js +160 -0
  66. package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
  67. package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
  68. package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
  69. package/library/chunks/template.CsJd8Pb_.js +20 -0
  70. package/library/chunks/time.D_uFZqqe.js +118 -0
  71. package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
  72. package/library/chunks/toast.BXNbwZV8.js +25 -0
  73. package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
  74. package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
  75. package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
  76. package/library/chunks/url.LjsR2sB5.js +15 -0
  77. package/library/chunks/user-agent.D9aPuOyL.js +4 -0
  78. package/library/chunks/watch.q1sEjPWL.js +501 -0
  79. package/library/components/alert.js +38 -35
  80. package/library/components/animated-image.js +25 -23
  81. package/library/components/animation.js +7 -5
  82. package/library/components/array-line-clamp.d.ts +3 -0
  83. package/library/components/array-line-clamp.js +195 -0
  84. package/library/components/asset-link-format.js +223 -212
  85. package/library/components/atoms.js +164 -162
  86. package/library/components/avatar.js +28 -26
  87. package/library/components/badge.js +10 -8
  88. package/library/components/bicolor-picker.js +21 -19
  89. package/library/components/border-input-group.js +11 -9
  90. package/library/components/breadcrumb-item.js +14 -12
  91. package/library/components/breadcrumb.js +24 -22
  92. package/library/components/button-group.js +26 -24
  93. package/library/components/button.js +14 -13
  94. package/library/components/card.js +28 -19
  95. package/library/components/checkbox.js +29 -23
  96. package/library/components/color-picker.js +19 -17
  97. package/library/components/color-swatch-group.js +20 -17
  98. package/library/components/color-swatch.js +16 -13
  99. package/library/components/confirm-popover.js +11 -9
  100. package/library/components/copy-button.js +15 -13
  101. package/library/components/corner-position-input-group.js +13 -11
  102. package/library/components/cortex-element.d.ts +3 -0
  103. package/library/components/cortex-element.js +5 -0
  104. package/library/components/cropper.js +7 -5
  105. package/library/components/details.js +23 -20
  106. package/library/components/dialog.js +19 -16
  107. package/library/components/divider.js +13 -11
  108. package/library/components/dot-pagination.js +11 -9
  109. package/library/components/dot-status.js +10 -8
  110. package/library/components/drawer.js +63 -51
  111. package/library/components/dropdown.js +29 -26
  112. package/library/components/dynamic-select.js +12 -10
  113. package/library/components/element-clamp.js +28 -25
  114. package/library/components/file-on-demand.js +21 -20
  115. package/library/components/folder-select.js +12 -10
  116. package/library/components/format-bytes.js +11 -10
  117. package/library/components/format-date.js +11 -9
  118. package/library/components/format-number.js +16 -15
  119. package/library/components/format-time.js +118 -9
  120. package/library/components/grid-item.js +48 -46
  121. package/library/components/grid.js +31 -29
  122. package/library/components/header.js +10 -9
  123. package/library/components/hub-connection.js +6 -5
  124. package/library/components/icon-button.js +20 -18
  125. package/library/components/icon.js +17 -15
  126. package/library/components/iframe.js +10 -8
  127. package/library/components/image-comparer.js +27 -25
  128. package/library/components/image.js +14 -11
  129. package/library/components/include.js +26 -24
  130. package/library/components/input-group.js +15 -13
  131. package/library/components/input.js +23 -21
  132. package/library/components/line-clamp.js +12 -10
  133. package/library/components/list-editor.js +17 -15
  134. package/library/components/markdown.js +80 -78
  135. package/library/components/masonry.js +46 -44
  136. package/library/components/menu-item.js +151 -136
  137. package/library/components/menu-label.js +15 -13
  138. package/library/components/menu-section.js +18 -16
  139. package/library/components/menu.js +10 -8
  140. package/library/components/molecules.js +5 -5
  141. package/library/components/mutation-observer.js +12 -10
  142. package/library/components/option.js +10 -8
  143. package/library/components/organisms.js +2 -2
  144. package/library/components/padding-input-group.js +30 -28
  145. package/library/components/pagination.js +14 -12
  146. package/library/components/popup.js +3296 -9
  147. package/library/components/position-picker.js +12 -10
  148. package/library/components/progress-bar.js +13 -11
  149. package/library/components/progress-ring.js +15 -13
  150. package/library/components/qr-code.js +54 -52
  151. package/library/components/radio-button.js +19 -17
  152. package/library/components/radio-card.js +14 -12
  153. package/library/components/radio-group.js +20 -18
  154. package/library/components/radio.js +15 -13
  155. package/library/components/range.js +25 -23
  156. package/library/components/rating.js +17 -15
  157. package/library/components/relative-time.js +16 -14
  158. package/library/components/resize-observer.js +21 -19
  159. package/library/components/select.js +1442 -25
  160. package/library/components/shadow-input-group.js +19 -17
  161. package/library/components/share-option-list.js +20 -18
  162. package/library/components/sidebar.js +14 -12
  163. package/library/components/size-input-group.js +35 -33
  164. package/library/components/skeleton.js +12 -10
  165. package/library/components/space.js +12 -10
  166. package/library/components/spinner.js +17 -15
  167. package/library/components/split-panel.js +15 -13
  168. package/library/components/step.js +18 -16
  169. package/library/components/stepper-wizard.js +11 -9
  170. package/library/components/stepper.js +13 -11
  171. package/library/components/switch.js +21 -19
  172. package/library/components/tab-group.js +15 -13
  173. package/library/components/tab-panel.js +20 -18
  174. package/library/components/tab.js +18 -16
  175. package/library/components/table.js +69 -67
  176. package/library/components/tag.js +11 -9
  177. package/library/components/textarea.js +20 -18
  178. package/library/components/timecode.js +98 -8
  179. package/library/components/tooltip.js +24 -21
  180. package/library/components/tree-item.js +14 -11
  181. package/library/components/tree.js +12 -10
  182. package/library/components/typeface.js +13 -11
  183. package/library/components/types.js +15487 -15444
  184. package/library/components/typography.js +6 -4
  185. package/library/components/video.js +13 -11
  186. package/library/components/visually-hidden.js +15 -13
  187. package/library/events.d.ts +1 -0
  188. package/library/events.js +1 -0
  189. package/library/package.json +11 -2
  190. package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
  191. package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
  192. package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
  193. package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
  194. package/library/packages/atoms/src/components/include/include.d.ts +1 -0
  195. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
  196. package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
  197. package/library/packages/atoms/src/index.d.ts +1 -0
  198. package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
  199. package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
  200. package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
  201. package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
  202. package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
  203. package/library/packages/events/src/events.d.ts +6 -2
  204. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
  205. package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
  206. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
  207. package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
  208. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
  209. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
  210. package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
  211. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
  212. package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
  213. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
  214. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
  215. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
  216. package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
  217. package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
  218. package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
  219. package/library/packages/services/src/api/folder/folder.d.ts +4 -8
  220. package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
  221. package/library/packages/types/src/file-on-demand.d.ts +4 -0
  222. package/library/packages/types/src/folder-select.d.ts +9 -2
  223. package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
  224. package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
  225. package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
  226. package/library/packages/utils/src/font/font.d.ts +26 -0
  227. package/library/packages/utils/src/font/index.d.ts +1 -0
  228. package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
  229. package/library/packages/utils/src/history-manager/index.d.ts +1 -0
  230. package/library/packages/utils/src/index.d.ts +45 -0
  231. package/library/packages/utils/src/template/index.d.ts +1 -0
  232. package/library/packages/utils/src/template/template.d.ts +3 -0
  233. package/library/react-web-component.d.ts +418 -360
  234. package/library/utils.d.ts +1 -0
  235. package/library/utils.js +180 -0
  236. package/package.json +11 -2
  237. package/library/chunks/animation-registry.DavRkTTr.js +0 -69
  238. package/library/chunks/asset.Ba-CxnNM.js +0 -309
  239. package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
  240. package/library/chunks/dom.C0OFx7ND.js +0 -78
  241. package/library/chunks/format-time.BW6-ZWCX.js +0 -226
  242. package/library/chunks/isObjectLike.z36Fu426.js +0 -34
  243. package/library/chunks/popup._w5T7x8f.js +0 -3307
  244. package/library/chunks/select.DfO4de04.js +0 -1441
  245. package/library/chunks/string.BCk3SmdZ.js +0 -144
  246. package/library/chunks/timecode.D7XTiQ_3.js +0 -105
  247. package/library/chunks/watch.BCJD77bD.js +0 -547
  248. package/library/packages/events/src/cx-load-more.d.ts +0 -8
@@ -1,3307 +0,0 @@
1
- import { a as _e, i as Vt, r as ze, x as j, n as v, C as Be, c as Ie } from "./custom-element.vnXBMQxc.js";
2
- import { r as Me } from "./state.Cw55xXlb.js";
3
- import { e as ut } from "./query.BBf1UFkC.js";
4
- import { e as He } from "./base.D76d76ww.js";
5
- import { o as Lt } from "./if-defined.MfEgpxEN.js";
6
- import { o as se } from "./style-map.CZovMmo_.js";
7
- import { i as mt, p as ne, f as We, a as qe } from "./browser.Va59Ix3P.js";
8
- import { c as ye } from "./component.styles.CI-v8BZa.js";
9
- import { L as Ve } from "./i18n.BP2FRO1v.js";
10
- import { e as Dt } from "./class-map.CoZTSvbM.js";
11
- import { n as Ue } from "./when.Dr1es41R.js";
12
- /**
13
- * @license
14
- * Copyright 2021 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */
17
- function je(e) {
18
- return (t, o) => {
19
- const { slot: i, selector: s } = e ?? {}, r = "slot" + (i ? `[name=${i}]` : ":not([name])");
20
- return He(t, o, { get() {
21
- const n = this.renderRoot?.querySelector(r), a = n?.assignedElements(e) ?? [];
22
- return s === void 0 ? a : a.filter((l) => l.matches(s));
23
- } });
24
- };
25
- }
26
- const Ke = (e, t = !1) => {
27
- const o = Symbol(), i = Symbol();
28
- return (s, r, n) => {
29
- const a = n.value;
30
- n.value = function(...l) {
31
- const c = this;
32
- clearTimeout(c[o]), t && !c[i] && (a.apply(this, l), c[i] = !0), c[o] = window.setTimeout(() => {
33
- t || a.apply(this, l), c[i] = !1;
34
- }, e);
35
- }, n.configurable === !1 && (n.configurable = !0);
36
- };
37
- }, re = /* @__PURE__ */ new Set(), Ye = (e) => e?.startManagingContentDirection !== void 0 || e?.tagName === "SP-THEME";
38
- function Xe(e) {
39
- class t extends e {
40
- /**
41
- * @private
42
- */
43
- get isLTR() {
44
- return this.dir === "ltr";
45
- }
46
- hasVisibleFocusInTree() {
47
- const s = ((r = document) => {
48
- let n = r.activeElement;
49
- for (; n?.shadowRoot && n.shadowRoot.activeElement; )
50
- n = n.shadowRoot.activeElement;
51
- const a = n ? [n] : [];
52
- for (; n; ) {
53
- const l = n.assignedSlot || n.parentElement || n.getRootNode()?.host;
54
- l && a.push(l), n = l;
55
- }
56
- return a;
57
- })(this.getRootNode())[0];
58
- if (!s)
59
- return !1;
60
- try {
61
- return s.matches(":focus-visible") || s.matches(".focus-visible");
62
- } catch {
63
- return s.matches(".focus-visible");
64
- }
65
- }
66
- connectedCallback() {
67
- if (!this.hasAttribute("dir")) {
68
- let i = this.assignedSlot || this.parentNode;
69
- for (; i && i !== document.documentElement && !Ye(i); )
70
- i = i.assignedSlot || // step into the shadow DOM of the parent of a slotted node
71
- i.parentNode || // DOM Element detected
72
- i.host;
73
- if (this.dir = i?.dir === "rtl" ? i.dir : this.dir || "ltr", i === document.documentElement)
74
- re.add(this);
75
- else if (i) {
76
- const { localName: s } = i;
77
- s.search("-") > -1 && !customElements.get(s) ? customElements.whenDefined(s).then(() => {
78
- i.startManagingContentDirection(this);
79
- }) : i.startManagingContentDirection(this);
80
- }
81
- this._dirParent = i;
82
- }
83
- super.connectedCallback();
84
- }
85
- disconnectedCallback() {
86
- super.disconnectedCallback(), this._dirParent && (this._dirParent === document.documentElement ? re.delete(this) : this._dirParent.stopManagingContentDirection(this), this.removeAttribute("dir"));
87
- }
88
- }
89
- return t;
90
- }
91
- class Ge extends Xe(_e) {
92
- }
93
- function Qe(e, t, o) {
94
- const i = e.getAttribute(t);
95
- let s = i ? i.split(/\s+/) : [];
96
- s = s.filter(
97
- (r) => !o.find((n) => r === n)
98
- ), s.length ? e.setAttribute(t, s.join(" ")) : e.removeAttribute(t);
99
- }
100
- function $t(e, t, o) {
101
- const i = Array.isArray(o) ? o : [o], s = e.getAttribute(t), r = s ? s.split(/\s+/) : [];
102
- return i.every((a) => r.indexOf(a) > -1) ? () => {
103
- } : (r.push(...i), e.setAttribute(t, r.join(" ")), () => Qe(e, t, i));
104
- }
105
- function Je(e, t) {
106
- customElements.get(e) || customElements.define(e, t);
107
- }
108
- function Ze(e, t, o = []) {
109
- for (let i = 0; i < t.length; ++i) {
110
- const s = t[i], r = e[i], n = r.parentElement || r.getRootNode();
111
- o[i] && o[i](s), n && n !== r && n.replaceChild(s, r), delete e[i];
112
- }
113
- return t;
114
- }
115
- const ti = (e, t, {
116
- position: o,
117
- prepareCallback: i
118
- } = { position: "beforeend" }) => {
119
- let { length: s } = e;
120
- if (s === 0)
121
- return () => e;
122
- let r = 1, n = 0;
123
- (o === "afterbegin" || o === "afterend") && (r = -1, n = s - 1);
124
- const a = new Array(s), l = new Array(s), c = document.createComment(
125
- "placeholder for reparented element"
126
- );
127
- do {
128
- const h = e[n];
129
- i && (l[n] = i(h)), a[n] = c.cloneNode();
130
- const d = h.parentElement || h.getRootNode();
131
- d && d !== h && d.replaceChild(a[n], h), t.insertAdjacentElement(o, h), n += r;
132
- } while (--s > 0);
133
- return function() {
134
- return Ze(a, e, l);
135
- };
136
- };
137
- function Ut() {
138
- return Array.from(
139
- crypto.getRandomValues(new Uint8Array(4)),
140
- (e) => `0${(e & 255).toString(16)}`.slice(-2)
141
- ).join("");
142
- }
143
- const ei = [
144
- "button",
145
- "[focusable]",
146
- "[href]",
147
- "input",
148
- "label",
149
- "select",
150
- "textarea",
151
- "[tabindex]"
152
- ], ae = ':not([tabindex="-1"])', ft = ei.join(`${ae}, `) + ae, jt = (e) => e.querySelector(
153
- ft
154
- ), Kt = (e) => e.assignedElements().find(
155
- (o) => o.matches(ft)
156
- );
157
- function ii(e) {
158
- return typeof window < "u" && window.navigator != null ? e.test(window.navigator.userAgent) : !1;
159
- }
160
- function Yt(e) {
161
- return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : !1;
162
- }
163
- function oi() {
164
- return Yt(/^Mac/);
165
- }
166
- function si() {
167
- return Yt(/^iPhone/);
168
- }
169
- function ni() {
170
- return Yt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
171
- oi() && navigator.maxTouchPoints > 1;
172
- }
173
- function ri() {
174
- return si() || ni();
175
- }
176
- function ai() {
177
- return ii(/Android/);
178
- }
179
- const li = 1e3, ci = 1e3;
180
- class hi {
181
- constructor(t = {}) {
182
- this.warmUpDelay = li, this.coolDownDelay = ci, this.isWarm = !1, this.timeout = 0, Object.assign(this, t);
183
- }
184
- async openTimer(t) {
185
- if (this.cancelCooldownTimer(), !this.component || t !== this.component)
186
- return this.component && (this.close(this.component), this.cancelCooldownTimer()), this.component = t, this.isWarm ? !1 : (this.promise = new Promise((o) => {
187
- this.resolve = o, this.timeout = window.setTimeout(() => {
188
- this.resolve && (this.resolve(!1), this.isWarm = !0);
189
- }, this.warmUpDelay);
190
- }), this.promise);
191
- if (this.promise)
192
- return this.promise;
193
- throw new Error("Inconsistent state");
194
- }
195
- close(t) {
196
- 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);
197
- }
198
- resetCooldownTimer() {
199
- this.isWarm && (this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), this.cooldownTimeout = window.setTimeout(() => {
200
- this.isWarm = !1, delete this.cooldownTimeout;
201
- }, this.coolDownDelay));
202
- }
203
- cancelCooldownTimer() {
204
- this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
205
- }
206
- }
207
- const wt = new hi(), it = () => {
208
- }, Xt = (e, t, o) => {
209
- const i = new AbortController(), s = /* @__PURE__ */ new Map(), r = () => {
210
- i.abort(), o();
211
- };
212
- let n, a;
213
- const l = requestAnimationFrame(() => {
214
- n = requestAnimationFrame(() => {
215
- a = requestAnimationFrame(() => {
216
- r();
217
- });
218
- });
219
- }), c = (d) => {
220
- d.target === e && (s.set(
221
- d.propertyName,
222
- s.get(d.propertyName) - 1
223
- ), s.get(d.propertyName) || s.delete(d.propertyName), s.size === 0 && r());
224
- }, h = (d) => {
225
- d.target === e && (s.has(d.propertyName) || s.set(d.propertyName, 0), s.set(
226
- d.propertyName,
227
- s.get(d.propertyName) + 1
228
- ), cancelAnimationFrame(l), cancelAnimationFrame(n), cancelAnimationFrame(a));
229
- };
230
- e.addEventListener("transitionrun", h, {
231
- signal: i.signal
232
- }), e.addEventListener("transitionend", c, {
233
- signal: i.signal
234
- }), e.addEventListener("transitioncancel", c, {
235
- signal: i.signal
236
- }), t();
237
- };
238
- function k() {
239
- return new Promise((e) => requestAnimationFrame(() => e()));
240
- }
241
- class ht extends Ge {
242
- constructor() {
243
- super(...arguments), this.dispose = it, this.offset = 0, this.willPreventClose = !1;
244
- }
245
- async applyFocus(t, o) {
246
- }
247
- /* c8 ignore next 6 */
248
- get delayed() {
249
- return !1;
250
- }
251
- set delayed(t) {
252
- }
253
- /* c8 ignore next 6 */
254
- get disabled() {
255
- return !1;
256
- }
257
- set disabled(t) {
258
- }
259
- get elementResolver() {
260
- return this._elementResolver;
261
- }
262
- set elementResolver(t) {
263
- this._elementResolver = t;
264
- }
265
- /* c8 ignore next 3 */
266
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
267
- async ensureOnDOM(t) {
268
- }
269
- /* c8 ignore next 5 */
270
- async makeTransition(t) {
271
- return null;
272
- }
273
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
274
- async manageDelay(t) {
275
- }
276
- /* c8 ignore next 3 */
277
- async manageDialogOpen() {
278
- }
279
- /* c8 ignore next 3 */
280
- async managePopoverOpen() {
281
- }
282
- /* c8 ignore next 3 */
283
- managePosition() {
284
- }
285
- /* c8 ignore next 6 */
286
- get open() {
287
- return !1;
288
- }
289
- set open(t) {
290
- }
291
- get placementController() {
292
- return this._placementController;
293
- }
294
- set placementController(t) {
295
- this._placementController = t;
296
- }
297
- requestSlottable() {
298
- }
299
- returnFocus() {
300
- }
301
- /* c8 ignore next 6 */
302
- get state() {
303
- return "closed";
304
- }
305
- set state(t) {
306
- }
307
- /* c8 ignore next 3 */
308
- manuallyKeepOpen() {
309
- }
310
- static update() {
311
- const t = new CustomEvent("cx-update-overlays", {
312
- bubbles: !0,
313
- cancelable: !0,
314
- composed: !0
315
- });
316
- document.dispatchEvent(t);
317
- }
318
- static async open(t, o, i, s) {
319
- await Promise.resolve().then(() => Ne);
320
- const r = arguments.length === 2, n = i || t, a = new this();
321
- let l = !1;
322
- a.dispose = () => {
323
- a.addEventListener("cx-closed", () => {
324
- l || (c(), l = !0), requestAnimationFrame(() => {
325
- a.remove();
326
- });
327
- }), a.open = !1, a.dispose = it;
328
- };
329
- const c = ti([n], a, {
330
- position: "beforeend",
331
- prepareCallback: (u) => {
332
- const p = u.slot;
333
- return u.removeAttribute("slot"), () => {
334
- u.slot = p;
335
- };
336
- }
337
- });
338
- if (!r && n && s) {
339
- const u = t, p = o, f = s;
340
- return ht.applyOptions(a, {
341
- ...f,
342
- delayed: f.delayed || n.hasAttribute("delayed"),
343
- trigger: f.virtualTrigger || u,
344
- type: p === "modal" ? "modal" : p === "hover" ? "hint" : "auto"
345
- }), u.insertAdjacentElement("afterend", a), await a.updateComplete, a.open = !0, a.dispose;
346
- }
347
- const d = o;
348
- return a.append(n), ht.applyOptions(a, {
349
- ...d,
350
- delayed: d.delayed || n.hasAttribute("delayed")
351
- }), a.updateComplete.then(() => {
352
- a.open = !0;
353
- }), a;
354
- }
355
- static applyOptions(t, o) {
356
- t.delayed = !!o.delayed, t.receivesFocus = o.receivesFocus ?? "auto", t.triggerElement = o.trigger || null, t.type = o.type || "modal", t.offset = o.offset ?? 0, t.placement = o.placement, t.willPreventClose = !!o.notImmediatelyClosable;
357
- }
358
- }
359
- const ve = Symbol("element resolver updated");
360
- class di {
361
- constructor(t, { selector: o } = { selector: "" }) {
362
- this._element = null, this._selector = "", this.mutationCallback = (i) => {
363
- let s = !1;
364
- i.forEach((r) => {
365
- if (!s) {
366
- if (r.type === "childList") {
367
- const n = this.element && [...r.removedNodes].includes(this.element), a = !!this.selector && [...r.addedNodes].some(
368
- this.elementIsSelected
369
- );
370
- s = s || n || a;
371
- }
372
- if (r.type === "attributes") {
373
- const n = r.target === this.element, a = !!this.selector && this.elementIsSelected(r.target);
374
- s = s || n || a;
375
- }
376
- }
377
- }), s && this.resolveElement();
378
- }, this.elementIsSelected = (i) => this.selectorIsId ? i?.id === this.selectorAsId : i?.matches?.(this.selector), this.host = t, this.selector = o, this.observer = new MutationObserver(this.mutationCallback), this.host.addController(this);
379
- }
380
- get element() {
381
- return this._element;
382
- }
383
- set element(t) {
384
- if (t === this.element)
385
- return;
386
- const o = this.element;
387
- this._element = t, this.host.requestUpdate(ve, o);
388
- }
389
- get selector() {
390
- return this._selector;
391
- }
392
- set selector(t) {
393
- t !== this.selector && (this.releaseElement(), this._selector = t, this.resolveElement());
394
- }
395
- get selectorAsId() {
396
- return this.selector.slice(1);
397
- }
398
- get selectorIsId() {
399
- return !!this.selector && this.selector.startsWith("#");
400
- }
401
- hostConnected() {
402
- this.resolveElement(), this.observer.observe(this.host.getRootNode(), {
403
- attributes: !0,
404
- childList: !0,
405
- subtree: !0
406
- });
407
- }
408
- hostDisconnected() {
409
- this.releaseElement(), this.observer.disconnect();
410
- }
411
- resolveElement() {
412
- if (!this.selector) {
413
- this.releaseElement();
414
- return;
415
- }
416
- const t = this.host.getRootNode();
417
- this.element = this.selectorIsId ? t.getElementById(this.selectorAsId) : t.querySelector(this.selector);
418
- }
419
- releaseElement() {
420
- this.element = null;
421
- }
422
- }
423
- class Gt extends Event {
424
- constructor() {
425
- super("beforetoggle", {
426
- bubbles: !1,
427
- composed: !1
428
- }), this.currentState = "open", this.newState = "closed";
429
- }
430
- }
431
- class Qt extends Event {
432
- constructor() {
433
- super("beforetoggle", {
434
- bubbles: !1,
435
- composed: !1
436
- }), this.currentState = "closed", this.newState = "open";
437
- }
438
- }
439
- class _ extends Event {
440
- constructor(t, o, {
441
- interaction: i,
442
- publish: s,
443
- reason: r
444
- }) {
445
- super(t, {
446
- bubbles: s,
447
- composed: s
448
- }), this.overlay = o, this.detail = {
449
- interaction: i,
450
- reason: r
451
- };
452
- }
453
- }
454
- class Ct {
455
- constructor(t, o) {
456
- this.x = 0, this.y = 0, this.x = t, this.y = o;
457
- }
458
- updateBoundingClientRect(t, o) {
459
- this.x = t, this.y = o, ht.update();
460
- }
461
- getBoundingClientRect() {
462
- return {
463
- bottom: this.y,
464
- height: 0,
465
- left: this.x,
466
- right: this.x,
467
- /* c8 ignore next 3 */
468
- toJSON() {
469
- },
470
- top: this.y,
471
- width: 0,
472
- x: this.x,
473
- y: this.y
474
- };
475
- }
476
- }
477
- function pi(e) {
478
- class t extends e {
479
- async manageDialogOpen() {
480
- const i = this.open;
481
- if (await this.managePosition(), this.open !== i)
482
- return;
483
- const s = await this.dialogMakeTransition(i);
484
- this.open === i && await this.dialogApplyFocus(i, s);
485
- }
486
- async dialogMakeTransition(i) {
487
- let s = null;
488
- const r = (a, l) => async () => {
489
- if (a.open = i, !i) {
490
- const h = () => {
491
- a.removeEventListener("close", h);
492
- };
493
- a.addEventListener("close", h);
494
- }
495
- if (l > 0)
496
- return;
497
- const c = i ? Qt : Gt;
498
- this.dispatchEvent(new c()), i && (a.matches(ft) && (s = a), s = s || jt(a), s || a.querySelectorAll("slot").forEach((d) => {
499
- s || (s = Kt(d));
500
- }), !(!this.isConnected || this.dialogEl.open) && this.dialogEl.showModal());
501
- }, n = (a, l) => () => {
502
- if (this.open !== i)
503
- return;
504
- const c = i ? "cx-opened" : "cx-closed";
505
- if (l > 0) {
506
- a.dispatchEvent(
507
- new _(c, this, {
508
- interaction: this.type,
509
- publish: !1
510
- })
511
- );
512
- return;
513
- }
514
- if (!this.isConnected || i !== this.open)
515
- return;
516
- const h = async () => {
517
- const d = this.triggerElement instanceof Ct;
518
- this.dispatchEvent(
519
- new _(c, this, {
520
- interaction: this.type,
521
- publish: d
522
- })
523
- ), a.dispatchEvent(
524
- new _(c, this, {
525
- interaction: this.type,
526
- publish: !1
527
- })
528
- ), this.triggerElement && !d && this.triggerElement.dispatchEvent(
529
- new _(c, this, {
530
- interaction: this.type,
531
- publish: !0
532
- })
533
- ), this.state = i ? "opened" : "closed", this.returnFocus(), await k(), await k(), i === this.open && i === !1 && this.requestSlottable();
534
- };
535
- !i && this.dialogEl.open ? (this.dialogEl.addEventListener(
536
- "close",
537
- () => {
538
- h();
539
- },
540
- { once: !0 }
541
- ), this.dialogEl.close()) : h();
542
- };
543
- return this.elements.forEach((a, l) => {
544
- Xt(a, r(a, l), n(a, l));
545
- }), s;
546
- }
547
- async dialogApplyFocus(i, s) {
548
- this.applyFocus(i, s);
549
- }
550
- }
551
- return t;
552
- }
553
- function ui(e) {
554
- class t extends e {
555
- async managePopoverOpen() {
556
- await this.managePosition();
557
- }
558
- async manageDelay(i) {
559
- if (i === !1 || i !== this.open) {
560
- wt.close(this);
561
- return;
562
- }
563
- this.delayed && await wt.openTimer(this) && (this.open = !i);
564
- }
565
- async ensureOnDOM(i) {
566
- document.body.offsetHeight;
567
- }
568
- async makeTransition(i) {
569
- if (this.open !== i)
570
- return null;
571
- let s = null;
572
- const r = (a, l) => () => {
573
- if (i !== this.open)
574
- return;
575
- if (a.open = i, l === 0) {
576
- const h = i ? Qt : Gt;
577
- this.dispatchEvent(new h());
578
- }
579
- if (i !== !0 || (a.matches(ft) && (s = a), s = s || jt(a), s))
580
- return;
581
- a.querySelectorAll("slot").forEach((h) => {
582
- s || (s = Kt(h));
583
- });
584
- }, n = (a, l) => async () => {
585
- if (this.open !== i)
586
- return;
587
- const c = i ? "cx-opened" : "cx-closed";
588
- if (a.dispatchEvent(
589
- new _(c, this, {
590
- interaction: this.type
591
- })
592
- ), l > 0)
593
- return;
594
- const h = this.triggerElement instanceof Ct;
595
- this.dispatchEvent(
596
- new _(c, this, {
597
- interaction: this.type,
598
- publish: h
599
- })
600
- ), this.triggerElement && !h && this.triggerElement.dispatchEvent(
601
- new _(c, this, {
602
- interaction: this.type,
603
- publish: !0
604
- })
605
- ), this.state = i ? "opened" : "closed", this.returnFocus(), await k(), await k(), i === this.open && i === !1 && this.requestSlottable();
606
- };
607
- return this.elements.forEach((a, l) => {
608
- Xt(a, r(a, l), n(a, l));
609
- }), s;
610
- }
611
- }
612
- return t;
613
- }
614
- const fi = CSS.supports("(overlay: auto)");
615
- function kt(e) {
616
- let t = !1;
617
- try {
618
- t = e.matches(":popover-open");
619
- } catch {
620
- }
621
- let o = !1;
622
- try {
623
- o = e.matches(":open");
624
- } catch {
625
- }
626
- return t || o;
627
- }
628
- function gi(e) {
629
- class t extends e {
630
- constructor(...i) {
631
- super(...i), this.handleFullscreenChange = this.handleFullscreenChange.bind(this);
632
- }
633
- async manageDelay(i) {
634
- if (i === !1 || i !== this.open) {
635
- wt.close(this);
636
- return;
637
- }
638
- this.delayed && await wt.openTimer(this) && (this.open = !i);
639
- }
640
- /**
641
- * A popover should be hidden _after_ it is no longer on top-layer because
642
- * the position metrics will have changed from when it was originally positioned.
643
- */
644
- async shouldHidePopover(i) {
645
- if (i && this.open !== i)
646
- return;
647
- const s = async ({
648
- newState: r
649
- } = {}) => {
650
- r !== "open" && await this.placementController.resetOverlayPosition();
651
- };
652
- if (!kt(this.dialogEl)) {
653
- s();
654
- return;
655
- }
656
- this.dialogEl.addEventListener("toggle", s, {
657
- once: !0
658
- });
659
- }
660
- async shouldShowPopover(i) {
661
- let s = !1;
662
- try {
663
- s = this.dialogEl.matches(":popover-open");
664
- } catch {
665
- }
666
- let r = !1;
667
- try {
668
- r = this.dialogEl.matches(":open");
669
- } catch {
670
- }
671
- i && this.open === i && !s && !r && this.isConnected && (this.dialogEl.showPopover(), await this.managePosition());
672
- }
673
- handleFullscreenChange() {
674
- kt(this.dialogEl) && (this.dialogEl.hidePopover(), this.dialogEl.showPopover());
675
- }
676
- firstUpdated(i) {
677
- super.firstUpdated(i), mt() && k().then(() => {
678
- this.dialogEl.showPopover();
679
- });
680
- }
681
- runConnectedCallback() {
682
- mt() && document.addEventListener("fullscreenchange", this.handleFullscreenChange);
683
- }
684
- disconnectedCallback() {
685
- super.disconnectedCallback(), mt() && document.removeEventListener(
686
- "fullscreenchange",
687
- this.handleFullscreenChange
688
- );
689
- }
690
- async ensureOnDOM(i) {
691
- await k(), fi || await this.shouldHidePopover(i), await this.shouldShowPopover(i), await k();
692
- }
693
- async makeTransition(i) {
694
- if (this.open !== i)
695
- return null;
696
- let s = null;
697
- const r = (a, l) => () => {
698
- if (a.open = i, l === 0) {
699
- const h = i ? Qt : Gt;
700
- this.dispatchEvent(new h());
701
- }
702
- if (!i || (a.matches(ft) && (s = a), s = s || jt(a), s))
703
- return;
704
- a.querySelectorAll("slot").forEach((h) => {
705
- s || (s = Kt(h));
706
- });
707
- }, n = (a, l) => async () => {
708
- if (this.open !== i)
709
- return;
710
- const c = i ? "cx-opened" : "cx-closed";
711
- if (l > 0) {
712
- a.dispatchEvent(
713
- new _(c, this, {
714
- interaction: this.type,
715
- publish: !1
716
- })
717
- );
718
- return;
719
- }
720
- const h = async () => {
721
- if (this.open !== i)
722
- return;
723
- await k();
724
- const u = this.triggerElement instanceof Ct;
725
- this.dispatchEvent(
726
- new _(c, this, {
727
- interaction: this.type,
728
- publish: u
729
- })
730
- ), a.dispatchEvent(
731
- new _(c, this, {
732
- interaction: this.type,
733
- publish: !1
734
- })
735
- ), this.triggerElement && !u && this.triggerElement.dispatchEvent(
736
- new _(c, this, {
737
- interaction: this.type,
738
- publish: !0
739
- })
740
- ), this.state = i ? "opened" : "closed", this.returnFocus(), await k(), await k(), i === this.open && i === !1 && this.requestSlottable();
741
- };
742
- if (this.open !== i)
743
- return;
744
- const d = kt(this.dialogEl);
745
- i !== !0 && d && this.isConnected ? (this.dialogEl.addEventListener(
746
- "beforetoggle",
747
- () => {
748
- h();
749
- },
750
- { once: !0 }
751
- ), mt() || this.dialogEl.hidePopover()) : h();
752
- };
753
- return this.elements.forEach((a, l) => {
754
- Xt(a, r(a, l), n(a, l));
755
- }), s;
756
- }
757
- }
758
- return t;
759
- }
760
- const mi = "showPopover" in document.createElement("div");
761
- class yi {
762
- constructor() {
763
- this.root = document.body, this.stack = [], this.handlePointerdown = (t) => {
764
- this.pointerdownPath = t.composedPath(), this.lastOverlay = this.stack[this.stack.length - 1];
765
- }, this.handlePointerup = () => {
766
- const t = this.pointerdownPath;
767
- if (this.pointerdownPath = void 0, !this.stack.length || !t?.length)
768
- return;
769
- const o = this.stack.length - 1, i = this.stack.filter((s, r) => !t.find(
770
- (a) => (
771
- // The Overlay is in the stack
772
- a === s || // The Overlay trigger is in the stack and the Overlay is a "hint"
773
- a === s?.triggerElement && s?.type === "hint" || // The last Overlay in the stack is not the last Overlay at `pointerdown` time and has a
774
- // `triggerInteraction` of "longpress", meaning it was opened by this poitner interaction
775
- r === o && s !== this.lastOverlay && s.triggerInteraction === "longpress"
776
- )
777
- ) && !s.shouldPreventClose() && s.type !== "manual");
778
- i.reverse(), i.forEach((s) => {
779
- this.closeOverlay(s);
780
- let r = s.parentOverlayToForceClose;
781
- for (; r; )
782
- this.closeOverlay(r), r = r.parentOverlayToForceClose;
783
- });
784
- }, this.handleBeforetoggle = (t) => {
785
- const { newState: o, target: i } = t;
786
- o !== "open" && this.closeOverlay(i);
787
- }, this.handleKeydown = (t) => {
788
- if (t.code !== "Escape" || !this.stack.length)
789
- return;
790
- const o = this.stack[this.stack.length - 1];
791
- if (o?.type === "page") {
792
- t.preventDefault();
793
- return;
794
- }
795
- mi || o?.type !== "manual" && o && this.closeOverlay(o);
796
- }, this.bindEvents();
797
- }
798
- get document() {
799
- return this.root?.ownerDocument || document;
800
- }
801
- bindEvents() {
802
- this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown);
803
- }
804
- closeOverlay(t) {
805
- const o = this.stack.indexOf(t);
806
- o > -1 && this.stack.splice(o, 1), t.open = !1;
807
- }
808
- /**
809
- * Get an array of Overlays that all share the same trigger element.
810
- *
811
- * @param triggerElement {HTMLELement}
812
- * @returns {Overlay[]}
813
- */
814
- overlaysByTriggerElement(t) {
815
- return this.stack.filter(
816
- (o) => o.triggerElement === t
817
- );
818
- }
819
- /**
820
- * When overlays are added manage the open state of exisiting overlays appropriately:
821
- * - 'modal': should close other overlays
822
- * - 'page': should close other overlays
823
- * - 'auto': should close other 'auto' overlays and other 'hint' overlays, but not 'manual' overlays
824
- * - 'manual': shouldn't close other overlays
825
- * - 'hint': shouldn't close other overlays and give way to all other overlays on a trigger
826
- */
827
- add(t) {
828
- if (this.stack.includes(t)) {
829
- const o = this.stack.indexOf(t);
830
- o > -1 && (this.stack.splice(o, 1), this.stack.push(t));
831
- return;
832
- }
833
- if (t.type === "auto" || t.type === "modal" || t.type === "page") {
834
- const o = "cx-overlay-query-path", i = new Event(o, {
835
- bubbles: !0,
836
- composed: !0
837
- });
838
- t.addEventListener(
839
- o,
840
- (s) => {
841
- const r = s.composedPath();
842
- this.stack.forEach((n) => {
843
- !r.find((l) => l === n) && n.type !== "manual" && this.closeOverlay(n);
844
- });
845
- },
846
- { once: !0 }
847
- ), t.dispatchEvent(i);
848
- } else if (t.type === "hint") {
849
- if (this.stack.some((i) => i.type !== "manual" && i.triggerElement && i.triggerElement === t.triggerElement)) {
850
- t.open = !1;
851
- return;
852
- }
853
- this.stack.forEach((i) => {
854
- i.type === "hint" && this.closeOverlay(i);
855
- });
856
- }
857
- requestAnimationFrame(() => {
858
- this.stack.push(t), t.addEventListener("beforetoggle", this.handleBeforetoggle, {
859
- once: !0
860
- });
861
- });
862
- }
863
- remove(t) {
864
- this.closeOverlay(t);
865
- }
866
- }
867
- const le = new yi(), vi = ["top", "right", "bottom", "left"], J = Math.min, T = Math.max, xt = Math.round, yt = Math.floor, H = (e) => ({
868
- x: e,
869
- y: e
870
- }), bi = {
871
- left: "right",
872
- right: "left",
873
- bottom: "top",
874
- top: "bottom"
875
- }, wi = {
876
- start: "end",
877
- end: "start"
878
- };
879
- function _t(e, t, o) {
880
- return T(e, J(t, o));
881
- }
882
- function st(e, t) {
883
- return typeof e == "function" ? e(t) : e;
884
- }
885
- function Z(e) {
886
- return e.split("-")[0];
887
- }
888
- function at(e) {
889
- return e.split("-")[1];
890
- }
891
- function be(e) {
892
- return e === "x" ? "y" : "x";
893
- }
894
- function Jt(e) {
895
- return e === "y" ? "height" : "width";
896
- }
897
- const xi = /* @__PURE__ */ new Set(["top", "bottom"]);
898
- function K(e) {
899
- return xi.has(Z(e)) ? "y" : "x";
900
- }
901
- function Zt(e) {
902
- return be(K(e));
903
- }
904
- function Ei(e, t, o) {
905
- o === void 0 && (o = !1);
906
- const i = at(e), s = Zt(e), r = Jt(s);
907
- let n = s === "x" ? i === (o ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
908
- return t.reference[r] > t.floating[r] && (n = Et(n)), [n, Et(n)];
909
- }
910
- function Pi(e) {
911
- const t = Et(e);
912
- return [zt(e), t, zt(t)];
913
- }
914
- function zt(e) {
915
- return e.replace(/start|end/g, (t) => wi[t]);
916
- }
917
- const ce = ["left", "right"], he = ["right", "left"], Ci = ["top", "bottom"], Oi = ["bottom", "top"];
918
- function Ai(e, t, o) {
919
- switch (e) {
920
- case "top":
921
- case "bottom":
922
- return o ? t ? he : ce : t ? ce : he;
923
- case "left":
924
- case "right":
925
- return t ? Ci : Oi;
926
- default:
927
- return [];
928
- }
929
- }
930
- function Si(e, t, o, i) {
931
- const s = at(e);
932
- let r = Ai(Z(e), o === "start", i);
933
- return s && (r = r.map((n) => n + "-" + s), t && (r = r.concat(r.map(zt)))), r;
934
- }
935
- function Et(e) {
936
- return e.replace(/left|right|bottom|top/g, (t) => bi[t]);
937
- }
938
- function Ri(e) {
939
- return {
940
- top: 0,
941
- right: 0,
942
- bottom: 0,
943
- left: 0,
944
- ...e
945
- };
946
- }
947
- function we(e) {
948
- return typeof e != "number" ? Ri(e) : {
949
- top: e,
950
- right: e,
951
- bottom: e,
952
- left: e
953
- };
954
- }
955
- function Pt(e) {
956
- const {
957
- x: t,
958
- y: o,
959
- width: i,
960
- height: s
961
- } = e;
962
- return {
963
- width: i,
964
- height: s,
965
- top: o,
966
- left: t,
967
- right: t + i,
968
- bottom: o + s,
969
- x: t,
970
- y: o
971
- };
972
- }
973
- function de(e, t, o) {
974
- let {
975
- reference: i,
976
- floating: s
977
- } = e;
978
- const r = K(t), n = Zt(t), a = Jt(n), l = Z(t), c = r === "y", h = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, u = i[a] / 2 - s[a] / 2;
979
- let p;
980
- switch (l) {
981
- case "top":
982
- p = {
983
- x: h,
984
- y: i.y - s.height
985
- };
986
- break;
987
- case "bottom":
988
- p = {
989
- x: h,
990
- y: i.y + i.height
991
- };
992
- break;
993
- case "right":
994
- p = {
995
- x: i.x + i.width,
996
- y: d
997
- };
998
- break;
999
- case "left":
1000
- p = {
1001
- x: i.x - s.width,
1002
- y: d
1003
- };
1004
- break;
1005
- default:
1006
- p = {
1007
- x: i.x,
1008
- y: i.y
1009
- };
1010
- }
1011
- switch (at(t)) {
1012
- case "start":
1013
- p[n] -= u * (o && c ? -1 : 1);
1014
- break;
1015
- case "end":
1016
- p[n] += u * (o && c ? -1 : 1);
1017
- break;
1018
- }
1019
- return p;
1020
- }
1021
- const Ti = async (e, t, o) => {
1022
- const {
1023
- placement: i = "bottom",
1024
- strategy: s = "absolute",
1025
- middleware: r = [],
1026
- platform: n
1027
- } = o, a = r.filter(Boolean), l = await (n.isRTL == null ? void 0 : n.isRTL(t));
1028
- let c = await n.getElementRects({
1029
- reference: e,
1030
- floating: t,
1031
- strategy: s
1032
- }), {
1033
- x: h,
1034
- y: d
1035
- } = de(c, i, l), u = i, p = {}, f = 0;
1036
- for (let g = 0; g < a.length; g++) {
1037
- const {
1038
- name: m,
1039
- fn: y
1040
- } = a[g], {
1041
- x,
1042
- y: E,
1043
- data: C,
1044
- reset: P
1045
- } = await y({
1046
- x: h,
1047
- y: d,
1048
- initialPlacement: i,
1049
- placement: u,
1050
- strategy: s,
1051
- middlewareData: p,
1052
- rects: c,
1053
- platform: n,
1054
- elements: {
1055
- reference: e,
1056
- floating: t
1057
- }
1058
- });
1059
- h = x ?? h, d = E ?? d, p = {
1060
- ...p,
1061
- [m]: {
1062
- ...p[m],
1063
- ...C
1064
- }
1065
- }, P && f <= 50 && (f++, typeof P == "object" && (P.placement && (u = P.placement), P.rects && (c = P.rects === !0 ? await n.getElementRects({
1066
- reference: e,
1067
- floating: t,
1068
- strategy: s
1069
- }) : P.rects), {
1070
- x: h,
1071
- y: d
1072
- } = de(c, u, l)), g = -1);
1073
- }
1074
- return {
1075
- x: h,
1076
- y: d,
1077
- placement: u,
1078
- strategy: s,
1079
- middlewareData: p
1080
- };
1081
- };
1082
- async function dt(e, t) {
1083
- var o;
1084
- t === void 0 && (t = {});
1085
- const {
1086
- x: i,
1087
- y: s,
1088
- platform: r,
1089
- rects: n,
1090
- elements: a,
1091
- strategy: l
1092
- } = e, {
1093
- boundary: c = "clippingAncestors",
1094
- rootBoundary: h = "viewport",
1095
- elementContext: d = "floating",
1096
- altBoundary: u = !1,
1097
- padding: p = 0
1098
- } = st(t, e), f = we(p), m = a[u ? d === "floating" ? "reference" : "floating" : d], y = Pt(await r.getClippingRect({
1099
- element: (o = await (r.isElement == null ? void 0 : r.isElement(m))) == null || o ? m : m.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
1100
- boundary: c,
1101
- rootBoundary: h,
1102
- strategy: l
1103
- })), x = d === "floating" ? {
1104
- x: i,
1105
- y: s,
1106
- width: n.floating.width,
1107
- height: n.floating.height
1108
- } : n.reference, E = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), C = await (r.isElement == null ? void 0 : r.isElement(E)) ? await (r.getScale == null ? void 0 : r.getScale(E)) || {
1109
- x: 1,
1110
- y: 1
1111
- } : {
1112
- x: 1,
1113
- y: 1
1114
- }, P = Pt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1115
- elements: a,
1116
- rect: x,
1117
- offsetParent: E,
1118
- strategy: l
1119
- }) : x);
1120
- return {
1121
- top: (y.top - P.top + f.top) / C.y,
1122
- bottom: (P.bottom - y.bottom + f.bottom) / C.y,
1123
- left: (y.left - P.left + f.left) / C.x,
1124
- right: (P.right - y.right + f.right) / C.x
1125
- };
1126
- }
1127
- const Li = (e) => ({
1128
- name: "arrow",
1129
- options: e,
1130
- async fn(t) {
1131
- const {
1132
- x: o,
1133
- y: i,
1134
- placement: s,
1135
- rects: r,
1136
- platform: n,
1137
- elements: a,
1138
- middlewareData: l
1139
- } = t, {
1140
- element: c,
1141
- padding: h = 0
1142
- } = st(e, t) || {};
1143
- if (c == null)
1144
- return {};
1145
- const d = we(h), u = {
1146
- x: o,
1147
- y: i
1148
- }, p = Zt(s), f = Jt(p), g = await n.getDimensions(c), m = p === "y", y = m ? "top" : "left", x = m ? "bottom" : "right", E = m ? "clientHeight" : "clientWidth", C = r.reference[f] + r.reference[p] - u[p] - r.floating[f], P = u[p] - r.reference[p], F = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(c));
1149
- let O = F ? F[E] : 0;
1150
- (!O || !await (n.isElement == null ? void 0 : n.isElement(F))) && (O = a.floating[E] || r.floating[f]);
1151
- const V = C / 2 - P / 2, I = O / 2 - g[f] / 2 - 1, D = J(d[y], I), X = J(d[x], I), M = D, G = O - g[f] - X, S = O / 2 - g[f] / 2 + V, et = _t(M, S, G), U = !l.arrow && at(s) != null && S !== et && r.reference[f] / 2 - (S < M ? D : X) - g[f] / 2 < 0, N = U ? S < M ? S - M : S - G : 0;
1152
- return {
1153
- [p]: u[p] + N,
1154
- data: {
1155
- [p]: et,
1156
- centerOffset: S - et - N,
1157
- ...U && {
1158
- alignmentOffset: N
1159
- }
1160
- },
1161
- reset: U
1162
- };
1163
- }
1164
- }), Di = function(e) {
1165
- return e === void 0 && (e = {}), {
1166
- name: "flip",
1167
- options: e,
1168
- async fn(t) {
1169
- var o, i;
1170
- const {
1171
- placement: s,
1172
- middlewareData: r,
1173
- rects: n,
1174
- initialPlacement: a,
1175
- platform: l,
1176
- elements: c
1177
- } = t, {
1178
- mainAxis: h = !0,
1179
- crossAxis: d = !0,
1180
- fallbackPlacements: u,
1181
- fallbackStrategy: p = "bestFit",
1182
- fallbackAxisSideDirection: f = "none",
1183
- flipAlignment: g = !0,
1184
- ...m
1185
- } = st(e, t);
1186
- if ((o = r.arrow) != null && o.alignmentOffset)
1187
- return {};
1188
- const y = Z(s), x = K(a), E = Z(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), P = u || (E || !g ? [Et(a)] : Pi(a)), F = f !== "none";
1189
- !u && F && P.push(...Si(a, g, f, C));
1190
- const O = [a, ...P], V = await dt(t, m), I = [];
1191
- let D = ((i = r.flip) == null ? void 0 : i.overflows) || [];
1192
- if (h && I.push(V[y]), d) {
1193
- const S = Ei(s, n, C);
1194
- I.push(V[S[0]], V[S[1]]);
1195
- }
1196
- if (D = [...D, {
1197
- placement: s,
1198
- overflows: I
1199
- }], !I.every((S) => S <= 0)) {
1200
- var X, M;
1201
- const S = (((X = r.flip) == null ? void 0 : X.index) || 0) + 1, et = O[S];
1202
- if (et && (!(d === "alignment" ? x !== K(et) : !1) || // We leave the current main axis only if every placement on that axis
1203
- // overflows the main axis.
1204
- D.every(($) => K($.placement) === x ? $.overflows[0] > 0 : !0)))
1205
- return {
1206
- data: {
1207
- index: S,
1208
- overflows: D
1209
- },
1210
- reset: {
1211
- placement: et
1212
- }
1213
- };
1214
- let U = (M = D.filter((N) => N.overflows[0] <= 0).sort((N, $) => N.overflows[1] - $.overflows[1])[0]) == null ? void 0 : M.placement;
1215
- if (!U)
1216
- switch (p) {
1217
- case "bestFit": {
1218
- var G;
1219
- const N = (G = D.filter(($) => {
1220
- if (F) {
1221
- const Q = K($.placement);
1222
- return Q === x || // Create a bias to the `y` side axis due to horizontal
1223
- // reading directions favoring greater width.
1224
- Q === "y";
1225
- }
1226
- return !0;
1227
- }).map(($) => [$.placement, $.overflows.filter((Q) => Q > 0).reduce((Q, $e) => Q + $e, 0)]).sort(($, Q) => $[1] - Q[1])[0]) == null ? void 0 : G[0];
1228
- N && (U = N);
1229
- break;
1230
- }
1231
- case "initialPlacement":
1232
- U = a;
1233
- break;
1234
- }
1235
- if (s !== U)
1236
- return {
1237
- reset: {
1238
- placement: U
1239
- }
1240
- };
1241
- }
1242
- return {};
1243
- }
1244
- };
1245
- };
1246
- function pe(e, t) {
1247
- return {
1248
- top: e.top - t.height,
1249
- right: e.right - t.width,
1250
- bottom: e.bottom - t.height,
1251
- left: e.left - t.width
1252
- };
1253
- }
1254
- function ue(e) {
1255
- return vi.some((t) => e[t] >= 0);
1256
- }
1257
- const ki = function(e) {
1258
- return e === void 0 && (e = {}), {
1259
- name: "hide",
1260
- options: e,
1261
- async fn(t) {
1262
- const {
1263
- rects: o
1264
- } = t, {
1265
- strategy: i = "referenceHidden",
1266
- ...s
1267
- } = st(e, t);
1268
- switch (i) {
1269
- case "referenceHidden": {
1270
- const r = await dt(t, {
1271
- ...s,
1272
- elementContext: "reference"
1273
- }), n = pe(r, o.reference);
1274
- return {
1275
- data: {
1276
- referenceHiddenOffsets: n,
1277
- referenceHidden: ue(n)
1278
- }
1279
- };
1280
- }
1281
- case "escaped": {
1282
- const r = await dt(t, {
1283
- ...s,
1284
- altBoundary: !0
1285
- }), n = pe(r, o.floating);
1286
- return {
1287
- data: {
1288
- escapedOffsets: n,
1289
- escaped: ue(n)
1290
- }
1291
- };
1292
- }
1293
- default:
1294
- return {};
1295
- }
1296
- }
1297
- };
1298
- }, Fi = /* @__PURE__ */ new Set(["left", "top"]);
1299
- async function Ni(e, t) {
1300
- const {
1301
- placement: o,
1302
- platform: i,
1303
- elements: s
1304
- } = e, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), n = Z(o), a = at(o), l = K(o) === "y", c = Fi.has(n) ? -1 : 1, h = r && l ? -1 : 1, d = st(t, e);
1305
- let {
1306
- mainAxis: u,
1307
- crossAxis: p,
1308
- alignmentAxis: f
1309
- } = typeof d == "number" ? {
1310
- mainAxis: d,
1311
- crossAxis: 0,
1312
- alignmentAxis: null
1313
- } : {
1314
- mainAxis: d.mainAxis || 0,
1315
- crossAxis: d.crossAxis || 0,
1316
- alignmentAxis: d.alignmentAxis
1317
- };
1318
- return a && typeof f == "number" && (p = a === "end" ? f * -1 : f), l ? {
1319
- x: p * h,
1320
- y: u * c
1321
- } : {
1322
- x: u * c,
1323
- y: p * h
1324
- };
1325
- }
1326
- const $i = function(e) {
1327
- return e === void 0 && (e = 0), {
1328
- name: "offset",
1329
- options: e,
1330
- async fn(t) {
1331
- var o, i;
1332
- const {
1333
- x: s,
1334
- y: r,
1335
- placement: n,
1336
- middlewareData: a
1337
- } = t, l = await Ni(t, e);
1338
- return n === ((o = a.offset) == null ? void 0 : o.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
1339
- x: s + l.x,
1340
- y: r + l.y,
1341
- data: {
1342
- ...l,
1343
- placement: n
1344
- }
1345
- };
1346
- }
1347
- };
1348
- }, _i = function(e) {
1349
- return e === void 0 && (e = {}), {
1350
- name: "shift",
1351
- options: e,
1352
- async fn(t) {
1353
- const {
1354
- x: o,
1355
- y: i,
1356
- placement: s
1357
- } = t, {
1358
- mainAxis: r = !0,
1359
- crossAxis: n = !1,
1360
- limiter: a = {
1361
- fn: (m) => {
1362
- let {
1363
- x: y,
1364
- y: x
1365
- } = m;
1366
- return {
1367
- x: y,
1368
- y: x
1369
- };
1370
- }
1371
- },
1372
- ...l
1373
- } = st(e, t), c = {
1374
- x: o,
1375
- y: i
1376
- }, h = await dt(t, l), d = K(Z(s)), u = be(d);
1377
- let p = c[u], f = c[d];
1378
- if (r) {
1379
- const m = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", x = p + h[m], E = p - h[y];
1380
- p = _t(x, p, E);
1381
- }
1382
- if (n) {
1383
- const m = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", x = f + h[m], E = f - h[y];
1384
- f = _t(x, f, E);
1385
- }
1386
- const g = a.fn({
1387
- ...t,
1388
- [u]: p,
1389
- [d]: f
1390
- });
1391
- return {
1392
- ...g,
1393
- data: {
1394
- x: g.x - o,
1395
- y: g.y - i,
1396
- enabled: {
1397
- [u]: r,
1398
- [d]: n
1399
- }
1400
- }
1401
- };
1402
- }
1403
- };
1404
- }, zi = function(e) {
1405
- return e === void 0 && (e = {}), {
1406
- name: "size",
1407
- options: e,
1408
- async fn(t) {
1409
- var o, i;
1410
- const {
1411
- placement: s,
1412
- rects: r,
1413
- platform: n,
1414
- elements: a
1415
- } = t, {
1416
- apply: l = () => {
1417
- },
1418
- ...c
1419
- } = st(e, t), h = await dt(t, c), d = Z(s), u = at(s), p = K(s) === "y", {
1420
- width: f,
1421
- height: g
1422
- } = r.floating;
1423
- let m, y;
1424
- d === "top" || d === "bottom" ? (m = d, y = u === (await (n.isRTL == null ? void 0 : n.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = d, m = u === "end" ? "top" : "bottom");
1425
- const x = g - h.top - h.bottom, E = f - h.left - h.right, C = J(g - h[m], x), P = J(f - h[y], E), F = !t.middlewareData.shift;
1426
- let O = C, V = P;
1427
- if ((o = t.middlewareData.shift) != null && o.enabled.x && (V = E), (i = t.middlewareData.shift) != null && i.enabled.y && (O = x), F && !u) {
1428
- const D = T(h.left, 0), X = T(h.right, 0), M = T(h.top, 0), G = T(h.bottom, 0);
1429
- p ? V = f - 2 * (D !== 0 || X !== 0 ? D + X : T(h.left, h.right)) : O = g - 2 * (M !== 0 || G !== 0 ? M + G : T(h.top, h.bottom));
1430
- }
1431
- await l({
1432
- ...t,
1433
- availableWidth: V,
1434
- availableHeight: O
1435
- });
1436
- const I = await n.getDimensions(a.floating);
1437
- return f !== I.width || g !== I.height ? {
1438
- reset: {
1439
- rects: !0
1440
- }
1441
- } : {};
1442
- }
1443
- };
1444
- };
1445
- function Ot() {
1446
- return typeof window < "u";
1447
- }
1448
- function lt(e) {
1449
- return xe(e) ? (e.nodeName || "").toLowerCase() : "#document";
1450
- }
1451
- function L(e) {
1452
- var t;
1453
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1454
- }
1455
- function q(e) {
1456
- var t;
1457
- return (t = (xe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1458
- }
1459
- function xe(e) {
1460
- return Ot() ? e instanceof Node || e instanceof L(e).Node : !1;
1461
- }
1462
- function z(e) {
1463
- return Ot() ? e instanceof Element || e instanceof L(e).Element : !1;
1464
- }
1465
- function W(e) {
1466
- return Ot() ? e instanceof HTMLElement || e instanceof L(e).HTMLElement : !1;
1467
- }
1468
- function fe(e) {
1469
- return !Ot() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof L(e).ShadowRoot;
1470
- }
1471
- const Bi = /* @__PURE__ */ new Set(["inline", "contents"]);
1472
- function gt(e) {
1473
- const {
1474
- overflow: t,
1475
- overflowX: o,
1476
- overflowY: i,
1477
- display: s
1478
- } = B(e);
1479
- return /auto|scroll|overlay|hidden|clip/.test(t + i + o) && !Bi.has(s);
1480
- }
1481
- const Ii = /* @__PURE__ */ new Set(["table", "td", "th"]);
1482
- function Mi(e) {
1483
- return Ii.has(lt(e));
1484
- }
1485
- const Hi = [":popover-open", ":modal"];
1486
- function At(e) {
1487
- return Hi.some((t) => {
1488
- try {
1489
- return e.matches(t);
1490
- } catch {
1491
- return !1;
1492
- }
1493
- });
1494
- }
1495
- const Wi = ["transform", "translate", "scale", "rotate", "perspective"], qi = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Vi = ["paint", "layout", "strict", "content"];
1496
- function St(e) {
1497
- const t = te(), o = z(e) ? B(e) : e;
1498
- return Wi.some((i) => o[i] ? o[i] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || qi.some((i) => (o.willChange || "").includes(i)) || Vi.some((i) => (o.contain || "").includes(i));
1499
- }
1500
- function Ui(e) {
1501
- let t = tt(e);
1502
- for (; W(t) && !rt(t); ) {
1503
- if (St(t))
1504
- return t;
1505
- if (At(t))
1506
- return null;
1507
- t = tt(t);
1508
- }
1509
- return null;
1510
- }
1511
- function te() {
1512
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1513
- }
1514
- const ji = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1515
- function rt(e) {
1516
- return ji.has(lt(e));
1517
- }
1518
- function B(e) {
1519
- return L(e).getComputedStyle(e);
1520
- }
1521
- function Rt(e) {
1522
- return z(e) ? {
1523
- scrollLeft: e.scrollLeft,
1524
- scrollTop: e.scrollTop
1525
- } : {
1526
- scrollLeft: e.scrollX,
1527
- scrollTop: e.scrollY
1528
- };
1529
- }
1530
- function tt(e) {
1531
- if (lt(e) === "html")
1532
- return e;
1533
- const t = (
1534
- // Step into the shadow DOM of the parent of a slotted node.
1535
- e.assignedSlot || // DOM Element detected.
1536
- e.parentNode || // ShadowRoot detected.
1537
- fe(e) && e.host || // Fallback.
1538
- q(e)
1539
- );
1540
- return fe(t) ? t.host : t;
1541
- }
1542
- function Ee(e) {
1543
- const t = tt(e);
1544
- return rt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && gt(t) ? t : Ee(t);
1545
- }
1546
- function pt(e, t, o) {
1547
- var i;
1548
- t === void 0 && (t = []), o === void 0 && (o = !0);
1549
- const s = Ee(e), r = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = L(s);
1550
- if (r) {
1551
- const a = Bt(n);
1552
- return t.concat(n, n.visualViewport || [], gt(s) ? s : [], a && o ? pt(a) : []);
1553
- }
1554
- return t.concat(s, pt(s, [], o));
1555
- }
1556
- function Bt(e) {
1557
- return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1558
- }
1559
- function Pe(e) {
1560
- const t = B(e);
1561
- let o = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
1562
- const s = W(e), r = s ? e.offsetWidth : o, n = s ? e.offsetHeight : i, a = xt(o) !== r || xt(i) !== n;
1563
- return a && (o = r, i = n), {
1564
- width: o,
1565
- height: i,
1566
- $: a
1567
- };
1568
- }
1569
- function ee(e) {
1570
- return z(e) ? e : e.contextElement;
1571
- }
1572
- function nt(e) {
1573
- const t = ee(e);
1574
- if (!W(t))
1575
- return H(1);
1576
- const o = t.getBoundingClientRect(), {
1577
- width: i,
1578
- height: s,
1579
- $: r
1580
- } = Pe(t);
1581
- let n = (r ? xt(o.width) : o.width) / i, a = (r ? xt(o.height) : o.height) / s;
1582
- return (!n || !Number.isFinite(n)) && (n = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1583
- x: n,
1584
- y: a
1585
- };
1586
- }
1587
- const Ki = /* @__PURE__ */ H(0);
1588
- function Ce(e) {
1589
- const t = L(e);
1590
- return !te() || !t.visualViewport ? Ki : {
1591
- x: t.visualViewport.offsetLeft,
1592
- y: t.visualViewport.offsetTop
1593
- };
1594
- }
1595
- function Yi(e, t, o) {
1596
- return t === void 0 && (t = !1), !o || t && o !== L(e) ? !1 : t;
1597
- }
1598
- function ot(e, t, o, i) {
1599
- t === void 0 && (t = !1), o === void 0 && (o = !1);
1600
- const s = e.getBoundingClientRect(), r = ee(e);
1601
- let n = H(1);
1602
- t && (i ? z(i) && (n = nt(i)) : n = nt(e));
1603
- const a = Yi(r, o, i) ? Ce(r) : H(0);
1604
- let l = (s.left + a.x) / n.x, c = (s.top + a.y) / n.y, h = s.width / n.x, d = s.height / n.y;
1605
- if (r) {
1606
- const u = L(r), p = i && z(i) ? L(i) : i;
1607
- let f = u, g = Bt(f);
1608
- for (; g && i && p !== f; ) {
1609
- const m = nt(g), y = g.getBoundingClientRect(), x = B(g), E = y.left + (g.clientLeft + parseFloat(x.paddingLeft)) * m.x, C = y.top + (g.clientTop + parseFloat(x.paddingTop)) * m.y;
1610
- l *= m.x, c *= m.y, h *= m.x, d *= m.y, l += E, c += C, f = L(g), g = Bt(f);
1611
- }
1612
- }
1613
- return Pt({
1614
- width: h,
1615
- height: d,
1616
- x: l,
1617
- y: c
1618
- });
1619
- }
1620
- function ie(e, t) {
1621
- const o = Rt(e).scrollLeft;
1622
- return t ? t.left + o : ot(q(e)).left + o;
1623
- }
1624
- function Oe(e, t, o) {
1625
- o === void 0 && (o = !1);
1626
- const i = e.getBoundingClientRect(), s = i.left + t.scrollLeft - (o ? 0 : (
1627
- // RTL <body> scrollbar.
1628
- ie(e, i)
1629
- )), r = i.top + t.scrollTop;
1630
- return {
1631
- x: s,
1632
- y: r
1633
- };
1634
- }
1635
- function Xi(e) {
1636
- let {
1637
- elements: t,
1638
- rect: o,
1639
- offsetParent: i,
1640
- strategy: s
1641
- } = e;
1642
- const r = s === "fixed", n = q(i), a = t ? At(t.floating) : !1;
1643
- if (i === n || a && r)
1644
- return o;
1645
- let l = {
1646
- scrollLeft: 0,
1647
- scrollTop: 0
1648
- }, c = H(1);
1649
- const h = H(0), d = W(i);
1650
- if ((d || !d && !r) && ((lt(i) !== "body" || gt(n)) && (l = Rt(i)), W(i))) {
1651
- const p = ot(i);
1652
- c = nt(i), h.x = p.x + i.clientLeft, h.y = p.y + i.clientTop;
1653
- }
1654
- const u = n && !d && !r ? Oe(n, l, !0) : H(0);
1655
- return {
1656
- width: o.width * c.x,
1657
- height: o.height * c.y,
1658
- x: o.x * c.x - l.scrollLeft * c.x + h.x + u.x,
1659
- y: o.y * c.y - l.scrollTop * c.y + h.y + u.y
1660
- };
1661
- }
1662
- function Gi(e) {
1663
- return Array.from(e.getClientRects());
1664
- }
1665
- function Qi(e) {
1666
- const t = q(e), o = Rt(e), i = e.ownerDocument.body, s = T(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = T(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
1667
- let n = -o.scrollLeft + ie(e);
1668
- const a = -o.scrollTop;
1669
- return B(i).direction === "rtl" && (n += T(t.clientWidth, i.clientWidth) - s), {
1670
- width: s,
1671
- height: r,
1672
- x: n,
1673
- y: a
1674
- };
1675
- }
1676
- function Ji(e, t) {
1677
- const o = L(e), i = q(e), s = o.visualViewport;
1678
- let r = i.clientWidth, n = i.clientHeight, a = 0, l = 0;
1679
- if (s) {
1680
- r = s.width, n = s.height;
1681
- const c = te();
1682
- (!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
1683
- }
1684
- return {
1685
- width: r,
1686
- height: n,
1687
- x: a,
1688
- y: l
1689
- };
1690
- }
1691
- const Zi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1692
- function to(e, t) {
1693
- const o = ot(e, !0, t === "fixed"), i = o.top + e.clientTop, s = o.left + e.clientLeft, r = W(e) ? nt(e) : H(1), n = e.clientWidth * r.x, a = e.clientHeight * r.y, l = s * r.x, c = i * r.y;
1694
- return {
1695
- width: n,
1696
- height: a,
1697
- x: l,
1698
- y: c
1699
- };
1700
- }
1701
- function ge(e, t, o) {
1702
- let i;
1703
- if (t === "viewport")
1704
- i = Ji(e, o);
1705
- else if (t === "document")
1706
- i = Qi(q(e));
1707
- else if (z(t))
1708
- i = to(t, o);
1709
- else {
1710
- const s = Ce(e);
1711
- i = {
1712
- x: t.x - s.x,
1713
- y: t.y - s.y,
1714
- width: t.width,
1715
- height: t.height
1716
- };
1717
- }
1718
- return Pt(i);
1719
- }
1720
- function Ae(e, t) {
1721
- const o = tt(e);
1722
- return o === t || !z(o) || rt(o) ? !1 : B(o).position === "fixed" || Ae(o, t);
1723
- }
1724
- function eo(e, t) {
1725
- const o = t.get(e);
1726
- if (o)
1727
- return o;
1728
- let i = pt(e, [], !1).filter((a) => z(a) && lt(a) !== "body"), s = null;
1729
- const r = B(e).position === "fixed";
1730
- let n = r ? tt(e) : e;
1731
- for (; z(n) && !rt(n); ) {
1732
- const a = B(n), l = St(n);
1733
- !l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && Zi.has(s.position) || gt(n) && !l && Ae(e, n)) ? i = i.filter((h) => h !== n) : s = a, n = tt(n);
1734
- }
1735
- return t.set(e, i), i;
1736
- }
1737
- function io(e) {
1738
- let {
1739
- element: t,
1740
- boundary: o,
1741
- rootBoundary: i,
1742
- strategy: s
1743
- } = e;
1744
- const n = [...o === "clippingAncestors" ? At(t) ? [] : eo(t, this._c) : [].concat(o), i], a = n[0], l = n.reduce((c, h) => {
1745
- const d = ge(t, h, s);
1746
- return c.top = T(d.top, c.top), c.right = J(d.right, c.right), c.bottom = J(d.bottom, c.bottom), c.left = T(d.left, c.left), c;
1747
- }, ge(t, a, s));
1748
- return {
1749
- width: l.right - l.left,
1750
- height: l.bottom - l.top,
1751
- x: l.left,
1752
- y: l.top
1753
- };
1754
- }
1755
- function oo(e) {
1756
- const {
1757
- width: t,
1758
- height: o
1759
- } = Pe(e);
1760
- return {
1761
- width: t,
1762
- height: o
1763
- };
1764
- }
1765
- function so(e, t, o) {
1766
- const i = W(t), s = q(t), r = o === "fixed", n = ot(e, !0, r, t);
1767
- let a = {
1768
- scrollLeft: 0,
1769
- scrollTop: 0
1770
- };
1771
- const l = H(0);
1772
- function c() {
1773
- l.x = ie(s);
1774
- }
1775
- if (i || !i && !r)
1776
- if ((lt(t) !== "body" || gt(s)) && (a = Rt(t)), i) {
1777
- const p = ot(t, !0, r, t);
1778
- l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
1779
- } else s && c();
1780
- r && !i && s && c();
1781
- const h = s && !i && !r ? Oe(s, a) : H(0), d = n.left + a.scrollLeft - l.x - h.x, u = n.top + a.scrollTop - l.y - h.y;
1782
- return {
1783
- x: d,
1784
- y: u,
1785
- width: n.width,
1786
- height: n.height
1787
- };
1788
- }
1789
- function Ft(e) {
1790
- return B(e).position === "static";
1791
- }
1792
- function me(e, t) {
1793
- if (!W(e) || B(e).position === "fixed")
1794
- return null;
1795
- if (t)
1796
- return t(e);
1797
- let o = e.offsetParent;
1798
- return q(e) === o && (o = o.ownerDocument.body), o;
1799
- }
1800
- function Se(e, t) {
1801
- const o = L(e);
1802
- if (At(e))
1803
- return o;
1804
- if (!W(e)) {
1805
- let s = tt(e);
1806
- for (; s && !rt(s); ) {
1807
- if (z(s) && !Ft(s))
1808
- return s;
1809
- s = tt(s);
1810
- }
1811
- return o;
1812
- }
1813
- let i = me(e, t);
1814
- for (; i && Mi(i) && Ft(i); )
1815
- i = me(i, t);
1816
- return i && rt(i) && Ft(i) && !St(i) ? o : i || Ui(e) || o;
1817
- }
1818
- const no = async function(e) {
1819
- const t = this.getOffsetParent || Se, o = this.getDimensions, i = await o(e.floating);
1820
- return {
1821
- reference: so(e.reference, await t(e.floating), e.strategy),
1822
- floating: {
1823
- x: 0,
1824
- y: 0,
1825
- width: i.width,
1826
- height: i.height
1827
- }
1828
- };
1829
- };
1830
- function ro(e) {
1831
- return B(e).direction === "rtl";
1832
- }
1833
- const It = {
1834
- convertOffsetParentRelativeRectToViewportRelativeRect: Xi,
1835
- getDocumentElement: q,
1836
- getClippingRect: io,
1837
- getOffsetParent: Se,
1838
- getElementRects: no,
1839
- getClientRects: Gi,
1840
- getDimensions: oo,
1841
- getScale: nt,
1842
- isElement: z,
1843
- isRTL: ro
1844
- };
1845
- function Re(e, t) {
1846
- return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1847
- }
1848
- function ao(e, t) {
1849
- let o = null, i;
1850
- const s = q(e);
1851
- function r() {
1852
- var a;
1853
- clearTimeout(i), (a = o) == null || a.disconnect(), o = null;
1854
- }
1855
- function n(a, l) {
1856
- a === void 0 && (a = !1), l === void 0 && (l = 1), r();
1857
- const c = e.getBoundingClientRect(), {
1858
- left: h,
1859
- top: d,
1860
- width: u,
1861
- height: p
1862
- } = c;
1863
- if (a || t(), !u || !p)
1864
- return;
1865
- const f = yt(d), g = yt(s.clientWidth - (h + u)), m = yt(s.clientHeight - (d + p)), y = yt(h), E = {
1866
- rootMargin: -f + "px " + -g + "px " + -m + "px " + -y + "px",
1867
- threshold: T(0, J(1, l)) || 1
1868
- };
1869
- let C = !0;
1870
- function P(F) {
1871
- const O = F[0].intersectionRatio;
1872
- if (O !== l) {
1873
- if (!C)
1874
- return n();
1875
- O ? n(!1, O) : i = setTimeout(() => {
1876
- n(!1, 1e-7);
1877
- }, 1e3);
1878
- }
1879
- O === 1 && !Re(c, e.getBoundingClientRect()) && n(), C = !1;
1880
- }
1881
- try {
1882
- o = new IntersectionObserver(P, {
1883
- ...E,
1884
- // Handle <iframe>s
1885
- root: s.ownerDocument
1886
- });
1887
- } catch {
1888
- o = new IntersectionObserver(P, E);
1889
- }
1890
- o.observe(e);
1891
- }
1892
- return n(!0), r;
1893
- }
1894
- function Mt(e, t, o, i) {
1895
- i === void 0 && (i = {});
1896
- const {
1897
- ancestorScroll: s = !0,
1898
- ancestorResize: r = !0,
1899
- elementResize: n = typeof ResizeObserver == "function",
1900
- layoutShift: a = typeof IntersectionObserver == "function",
1901
- animationFrame: l = !1
1902
- } = i, c = ee(e), h = s || r ? [...c ? pt(c) : [], ...pt(t)] : [];
1903
- h.forEach((y) => {
1904
- s && y.addEventListener("scroll", o, {
1905
- passive: !0
1906
- }), r && y.addEventListener("resize", o);
1907
- });
1908
- const d = c && a ? ao(c, o) : null;
1909
- let u = -1, p = null;
1910
- n && (p = new ResizeObserver((y) => {
1911
- let [x] = y;
1912
- x && x.target === c && p && (p.unobserve(t), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1913
- var E;
1914
- (E = p) == null || E.observe(t);
1915
- })), o();
1916
- }), c && !l && p.observe(c), p.observe(t));
1917
- let f, g = l ? ot(e) : null;
1918
- l && m();
1919
- function m() {
1920
- const y = ot(e);
1921
- g && !Re(g, y) && o(), g = y, f = requestAnimationFrame(m);
1922
- }
1923
- return o(), () => {
1924
- var y;
1925
- h.forEach((x) => {
1926
- s && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
1927
- }), d?.(), (y = p) == null || y.disconnect(), p = null, l && cancelAnimationFrame(f);
1928
- };
1929
- }
1930
- const Ht = $i, Te = _i, Wt = Di, qt = zi, lo = ki, Le = Li, De = (e, t, o) => {
1931
- const i = /* @__PURE__ */ new Map(), s = {
1932
- platform: It,
1933
- ...o
1934
- }, r = {
1935
- ...s.platform,
1936
- _c: i
1937
- };
1938
- return Ti(e, t, {
1939
- ...s,
1940
- platform: r
1941
- });
1942
- };
1943
- function vt(e) {
1944
- if (typeof e > "u")
1945
- return 0;
1946
- const t = window.devicePixelRatio || 1;
1947
- return Math.round(e * t) / t || -1e4;
1948
- }
1949
- const bt = 8, co = 100, ho = (e) => ({
1950
- bottom: ["top", "left", "right"],
1951
- "bottom-end": ["top-end", "left", "right"],
1952
- "bottom-start": ["top-start", "left", "right"],
1953
- left: ["right", "bottom", "top"],
1954
- "left-end": ["right-end", "bottom", "top"],
1955
- "left-start": ["right-start", "bottom", "top"],
1956
- right: ["left", "bottom", "top"],
1957
- "right-end": ["left-end", "bottom", "top"],
1958
- "right-start": ["left-start", "bottom", "top"],
1959
- top: ["bottom", "left", "right"],
1960
- "top-end": ["bottom-end", "left", "right"],
1961
- "top-start": ["bottom-start", "left", "right"]
1962
- })[e] ?? [e];
1963
- class po {
1964
- constructor(t) {
1965
- this.originalPlacements = /* @__PURE__ */ new WeakMap(), this.allowPlacementUpdate = !1, this.closeForAncestorUpdate = () => {
1966
- !this.allowPlacementUpdate && this.options.type !== "modal" && this.cleanup && this.target.dispatchEvent(new Event("close", { bubbles: !0 })), this.allowPlacementUpdate = !1;
1967
- }, this.updatePlacement = () => {
1968
- this.computePlacement();
1969
- }, this.resetOverlayPosition = () => {
1970
- !this.target || !this.options || (this.clearOverlayPosition(), this.host.offsetHeight, this.computePlacement());
1971
- }, this.host = t, this.host.addController(this);
1972
- }
1973
- async placeOverlay(t = this.target, o = this.options) {
1974
- if (this.target = t, this.options = o, !t || !o)
1975
- return;
1976
- const i = Mt(
1977
- o.trigger,
1978
- t,
1979
- this.closeForAncestorUpdate,
1980
- {
1981
- ancestorResize: !1,
1982
- elementResize: !1,
1983
- layoutShift: !1
1984
- }
1985
- ), s = Mt(
1986
- o.trigger,
1987
- t,
1988
- this.updatePlacement,
1989
- {
1990
- ancestorScroll: !1
1991
- }
1992
- );
1993
- this.cleanup = () => {
1994
- this.host.elements?.forEach((r) => {
1995
- r.addEventListener(
1996
- "cx-closed",
1997
- () => {
1998
- const n = this.originalPlacements.get(r);
1999
- n && r.setAttribute("placement", n), this.originalPlacements.delete(r);
2000
- },
2001
- { once: !0 }
2002
- );
2003
- }), i(), s();
2004
- };
2005
- }
2006
- async computePlacement() {
2007
- const { options: t, target: o } = this;
2008
- await (document.fonts ? document.fonts.ready : Promise.resolve());
2009
- const i = t.trigger instanceof HTMLElement ? Wt() : Wt({
2010
- fallbackPlacements: ho(t.placement),
2011
- padding: bt
2012
- }), [s = 0, r = 0] = Array.isArray(t?.offset) ? t.offset : [t.offset, 0], n = this.host.elements.find(
2013
- (u) => u.tipElement
2014
- )?.tipElement, a = [
2015
- Ht({
2016
- crossAxis: r,
2017
- mainAxis: s
2018
- }),
2019
- Te({ padding: bt }),
2020
- i,
2021
- qt({
2022
- apply: ({ availableHeight: u, availableWidth: p, rects: { floating: f } }) => {
2023
- const g = Math.max(
2024
- co,
2025
- Math.floor(u)
2026
- ), m = f.height;
2027
- this.initialHeight = this.isConstrained && this.initialHeight || m, this.isConstrained = m < this.initialHeight || g <= m;
2028
- const y = this.isConstrained ? `${g}px` : "";
2029
- Object.assign(o.style, {
2030
- maxHeight: y,
2031
- maxWidth: `${Math.floor(p)}px`
2032
- });
2033
- },
2034
- padding: bt
2035
- }),
2036
- ...n ? [
2037
- Le({
2038
- element: n,
2039
- padding: t.tipPadding || bt
2040
- })
2041
- ] : []
2042
- ], { middlewareData: l, placement: c, x: h, y: d } = await De(
2043
- t.trigger,
2044
- o,
2045
- {
2046
- middleware: a,
2047
- placement: t.placement,
2048
- strategy: "fixed"
2049
- }
2050
- );
2051
- if (Object.assign(o.style, {
2052
- left: "0px",
2053
- top: "0px",
2054
- translate: `${vt(h)}px ${vt(d)}px`
2055
- }), o.setAttribute("actual-placement", c), this.host.elements?.forEach((u) => {
2056
- this.originalPlacements.has(u) || this.originalPlacements.set(
2057
- u,
2058
- u.getAttribute("placement")
2059
- ), u.setAttribute("placement", c);
2060
- }), n && l.arrow) {
2061
- const { x: u, y: p } = l.arrow;
2062
- Object.assign(n.style, {
2063
- left: c.startsWith("bottom") || c.startsWith("top") ? "0px" : "",
2064
- top: c.startsWith("right") || c.startsWith("left") ? "0px" : "",
2065
- translate: `${vt(u)}px ${vt(p)}px`
2066
- });
2067
- }
2068
- }
2069
- clearOverlayPosition() {
2070
- this.target && (this.target.style.removeProperty("max-height"), this.target.style.removeProperty("max-width"), this.initialHeight = void 0, this.isConstrained = !1);
2071
- }
2072
- hostConnected() {
2073
- document.addEventListener("cx-update-overlays", this.resetOverlayPosition);
2074
- }
2075
- hostUpdated() {
2076
- this.host.open || (this.cleanup?.(), this.cleanup = void 0);
2077
- }
2078
- hostDisconnected() {
2079
- this.cleanup?.(), this.cleanup = void 0, document.removeEventListener(
2080
- "cx-update-overlays",
2081
- this.resetOverlayPosition
2082
- );
2083
- }
2084
- }
2085
- var Tt = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.LongPress = "longpress", e))(Tt || {});
2086
- class oe {
2087
- constructor(t, { handleOverlayReady: o, isPersistent: i, overlay: s }) {
2088
- this.target = t, this.isLazilyOpen = !1, this.isPersistent = !1, this.isPersistent = !!i, this.handleOverlayReady = o, this.isPersistent && this.init(), this.overlay = s;
2089
- }
2090
- get activelyOpening() {
2091
- return !1;
2092
- }
2093
- get open() {
2094
- return this.overlay?.open ?? this.isLazilyOpen;
2095
- }
2096
- /**
2097
- * Set `open` against the associated Overlay lazily.
2098
- */
2099
- set open(t) {
2100
- if (t !== this.open) {
2101
- if (this.isLazilyOpen = t, this.overlay) {
2102
- this.overlay.open = t;
2103
- return;
2104
- }
2105
- t && (customElements.whenDefined("cx-overlay").then(async () => {
2106
- const { Overlay: o } = await Promise.resolve().then(() => Oo);
2107
- this.overlay = new o(), this.overlay.open = !0;
2108
- }), Promise.resolve().then(() => Ne));
2109
- }
2110
- }
2111
- get overlay() {
2112
- return this._overlay;
2113
- }
2114
- set overlay(t) {
2115
- t && this.overlay !== t && (this.overlay && this.overlay.removeController(this), this._overlay = t, this.overlay.addController(this), this.initOverlay(), this.prepareDescription(this.target), this.handleOverlayReady?.(this.overlay));
2116
- }
2117
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2118
- prepareDescription(t) {
2119
- }
2120
- releaseDescription() {
2121
- }
2122
- shouldCompleteOpen() {
2123
- }
2124
- /* c8 ignore next 3 */
2125
- init() {
2126
- }
2127
- /* c8 ignore next 3 */
2128
- initOverlay() {
2129
- }
2130
- abort() {
2131
- this.releaseDescription(), this.abortController?.abort();
2132
- }
2133
- hostConnected() {
2134
- this.init();
2135
- }
2136
- hostDisconnected() {
2137
- this.isPersistent || this.abort();
2138
- }
2139
- }
2140
- const uo = 300, ke = {
2141
- keyboard: "Press Space or Alt+Down Arrow for additional options",
2142
- mouse: "Click and hold for additional options",
2143
- touch: "Double tap and long press for additional options"
2144
- };
2145
- class fo extends oe {
2146
- constructor() {
2147
- super(...arguments), this.type = Tt.LongPress, this.longpressState = null, this.releaseDescription = it, this.handlePointerup = () => {
2148
- clearTimeout(this.timeout), this.target && (this.longpressState = this.overlay?.state === "opening" ? "pressed" : null, document.removeEventListener("pointerup", this.handlePointerup), document.removeEventListener("pointercancel", this.handlePointerup));
2149
- };
2150
- }
2151
- get activelyOpening() {
2152
- return this.longpressState === "opening" || this.longpressState === "pressed";
2153
- }
2154
- handleLongpress() {
2155
- this.open = !0, this.longpressState = this.longpressState === "potential" ? "opening" : "pressed";
2156
- }
2157
- handlePointerdown(t) {
2158
- !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(() => {
2159
- this.target && this.target.dispatchEvent(
2160
- new CustomEvent("longpress", {
2161
- bubbles: !0,
2162
- composed: !0,
2163
- detail: {
2164
- source: "pointer"
2165
- }
2166
- })
2167
- );
2168
- }, uo));
2169
- }
2170
- handleKeydown(t) {
2171
- const { altKey: o, code: i } = t;
2172
- o && i === "ArrowDown" && (t.stopPropagation(), t.stopImmediatePropagation());
2173
- }
2174
- handleKeyup(t) {
2175
- const { altKey: o, code: i } = t;
2176
- if (i === "Space" || o && i === "ArrowDown") {
2177
- if (!this.target)
2178
- return;
2179
- t.stopPropagation(), this.target.dispatchEvent(
2180
- new CustomEvent("longpress", {
2181
- bubbles: !0,
2182
- composed: !0,
2183
- detail: {
2184
- source: "keyboard"
2185
- }
2186
- })
2187
- ), setTimeout(() => {
2188
- this.longpressState = null;
2189
- });
2190
- }
2191
- }
2192
- prepareDescription(t) {
2193
- if (
2194
- // do not reapply until target is recycled
2195
- this.releaseDescription !== it || // require "longpress content" to apply relationship
2196
- !this.overlay.elements.length
2197
- )
2198
- return;
2199
- const o = document.createElement("div");
2200
- o.id = `longpress-describedby-descriptor-${Ut()}`;
2201
- const i = ri() || ai() ? "touch" : "keyboard";
2202
- o.textContent = ke[i], o.slot = "longpress-describedby-descriptor";
2203
- const s = t.getRootNode(), r = this.overlay.getRootNode();
2204
- s === r ? this.overlay.append(o) : (o.hidden = !("host" in s), t.insertAdjacentElement("afterend", o));
2205
- const n = $t(
2206
- t,
2207
- "aria-describedby",
2208
- [o.id]
2209
- );
2210
- this.releaseDescription = () => {
2211
- n(), o.remove(), this.releaseDescription = it;
2212
- };
2213
- }
2214
- shouldCompleteOpen() {
2215
- this.longpressState = this.longpressState === "pressed" ? null : this.longpressState;
2216
- }
2217
- init() {
2218
- this.abortController?.abort(), this.abortController = new AbortController();
2219
- const { signal: t } = this.abortController;
2220
- this.target.addEventListener("longpress", () => this.handleLongpress(), {
2221
- signal: t
2222
- }), this.target.addEventListener(
2223
- "pointerdown",
2224
- (o) => this.handlePointerdown(o),
2225
- { signal: t }
2226
- ), this.prepareDescription(this.target), !this.target.holdAffordance && (this.target.addEventListener(
2227
- "keydown",
2228
- (o) => this.handleKeydown(o),
2229
- { signal: t }
2230
- ), this.target.addEventListener(
2231
- "keyup",
2232
- (o) => this.handleKeyup(o),
2233
- { signal: t }
2234
- ));
2235
- }
2236
- }
2237
- const go = Vt`
2238
- /*
2239
- Copyright 2022 Adobe. All rights reserved.
2240
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
2241
- you may not use this file except in compliance with the License. You may obtain a copy
2242
- of the License at http://www.apache.org/licenses/LICENSE-2.0
2243
-
2244
- Unless required by applicable law or agreed to in writing, software distributed under
2245
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2246
- OF ANY KIND, either express or implied. See the License for the specific language
2247
- governing permissions and limitations under the License.
2248
- */
2249
-
2250
- :host {
2251
- display: contents;
2252
- pointer-events: none;
2253
-
2254
- /**
2255
- * Duplicate --spectrum-overlay-animation-distance, which is out of scope.
2256
- * Currently is is statically '--cx-spacing-medium' across a number of places
2257
- * so that is leveraged here as the default.
2258
- **/
2259
-
2260
- --swc-overlay-animation-distance: var(--cx-spacing-medium);
2261
- }
2262
-
2263
- .dialog {
2264
- margin: 0;
2265
- border: 0;
2266
- background: none;
2267
- padding: 0;
2268
- display: flex;
2269
- position: fixed;
2270
- overflow: visible;
2271
- opacity: 1 !important;
2272
- box-sizing: border-box;
2273
- max-height: calc(100vh - 16px);
2274
- max-height: calc(100dvh - 16px);
2275
- max-width: calc(100vw - 16px);
2276
- height: auto;
2277
- inset: auto;
2278
- top: 0;
2279
- left: 0;
2280
-
2281
- --cx-overlay-open: true;
2282
- }
2283
-
2284
- .dialog:focus {
2285
- outline: none;
2286
- }
2287
-
2288
- :host(:not([open])) .dialog {
2289
- --cx-overlay-open: false;
2290
- }
2291
-
2292
- .dialog::backdrop {
2293
- display: none;
2294
- }
2295
-
2296
- .dialog::before {
2297
- position: absolute;
2298
- inset: -999em;
2299
- content: '';
2300
- pointer-events: auto !important;
2301
- }
2302
-
2303
- .dialog:not(.not-immediately-closable)::before {
2304
- display: none;
2305
- }
2306
-
2307
- .dialog > div {
2308
- width: 100%;
2309
- }
2310
-
2311
- ::slotted(*) {
2312
- pointer-events: auto;
2313
- visibility: visible !important;
2314
- }
2315
-
2316
- /**
2317
- * Offset the transition displacement from the trigger edge by
2318
- * padding the equivelent distance off of the opposite edge.
2319
- *
2320
- * <HACK>
2321
- * Prepare for Context Menus with [popover] by adding margin/border
2322
- * that _should_ still be under the pointer when 'pointerup' is dispatched.
2323
- * </HACK>
2324
- **/
2325
- .dialog:not([actual-placement])[placement*='top'] {
2326
- padding-block: var(--swc-overlay-animation-distance);
2327
- margin-top: var(--swc-overlay-animation-distance);
2328
- }
2329
-
2330
- .dialog:not([actual-placement])[placement*='right'] {
2331
- padding-inline: var(--swc-overlay-animation-distance);
2332
- margin-left: calc(-1 * var(--swc-overlay-animation-distance));
2333
- }
2334
-
2335
- .dialog:not([actual-placement])[placement*='bottom'] {
2336
- padding-block: var(--swc-overlay-animation-distance);
2337
- margin-top: calc(-1 * var(--swc-overlay-animation-distance));
2338
- }
2339
-
2340
- .dialog:not([actual-placement])[placement*='left'] {
2341
- padding-inline: var(--swc-overlay-animation-distance);
2342
- margin-left: var(--swc-overlay-animation-distance);
2343
- }
2344
-
2345
- .dialog[actual-placement*='top'] {
2346
- padding-block: var(--swc-overlay-animation-distance);
2347
- margin-top: var(--swc-overlay-animation-distance);
2348
- }
2349
-
2350
- .dialog[actual-placement*='right'] {
2351
- padding-inline: var(--swc-overlay-animation-distance);
2352
- margin-left: calc(-1 * var(--swc-overlay-animation-distance));
2353
- }
2354
-
2355
- .dialog[actual-placement*='bottom'] {
2356
- padding-block: var(--swc-overlay-animation-distance);
2357
- margin-top: calc(-1 * var(--swc-overlay-animation-distance));
2358
- }
2359
-
2360
- .dialog[actual-placement*='left'] {
2361
- padding-inline: var(--swc-overlay-animation-distance);
2362
- margin-left: var(--swc-overlay-animation-distance);
2363
- }
2364
-
2365
- slot[name='longpress-describedby-descriptor'] {
2366
- display: none;
2367
- }
2368
-
2369
- /* stylelint-disable */
2370
- @supports selector(:open) {
2371
- .dialog {
2372
- opacity: 0;
2373
- }
2374
-
2375
- .dialog:open {
2376
- opacity: 1;
2377
- }
2378
- }
2379
-
2380
- @supports selector(:popover-open) {
2381
- .dialog {
2382
- opacity: 0;
2383
- }
2384
-
2385
- .dialog:popover-open {
2386
- opacity: 1;
2387
- }
2388
- }
2389
-
2390
- @supports (overlay: auto) {
2391
- .dialog {
2392
- transition:
2393
- all var(--cx-transition-fast, 0.13s),
2394
- translate 0s,
2395
- display var(--cx-transition-fast, 0.13s);
2396
- transition-behavior: allow-discrete;
2397
- }
2398
-
2399
- .dialog:popover-open,
2400
- .dialog:modal {
2401
- display: flex;
2402
- }
2403
- }
2404
- .dialog[actual-placement] {
2405
- z-index: calc(
2406
- var(--swc-overlay-z-index-base, 1000) + var(--swc-overlay-open-count)
2407
- );
2408
- }
2409
- @supports (not selector(:open)) and (not selector(:popover-open)) {
2410
- :host:not([open]) .dialog {
2411
- pointer-events: none;
2412
- }
2413
- }
2414
- `;
2415
- class mo extends Event {
2416
- constructor(t, o, i) {
2417
- super("slottable-request", {
2418
- bubbles: !1,
2419
- cancelable: !0,
2420
- composed: !1
2421
- }), this.name = t, this.data = o, this.slotName = i !== void 0 ? `${t}.${i}` : t;
2422
- }
2423
- }
2424
- const yo = Symbol("remove-slottable-request");
2425
- class vo extends oe {
2426
- constructor() {
2427
- super(...arguments), this.type = Tt.Click, this.preventNextToggle = !1;
2428
- }
2429
- handleClick() {
2430
- this.preventNextToggle || (this.open = !this.open), this.preventNextToggle = !1;
2431
- }
2432
- handlePointerdown() {
2433
- this.preventNextToggle = this.open;
2434
- }
2435
- init() {
2436
- this.abortController?.abort(), this.abortController = new AbortController();
2437
- const { signal: t } = this.abortController;
2438
- this.target.addEventListener("click", () => this.handleClick(), {
2439
- signal: t
2440
- }), this.target.addEventListener(
2441
- "pointerdown",
2442
- () => this.handlePointerdown(),
2443
- { signal: t }
2444
- );
2445
- }
2446
- }
2447
- const bo = 300;
2448
- class wo extends oe {
2449
- constructor() {
2450
- super(...arguments), this.type = Tt.Hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
2451
- }
2452
- handleTargetFocusin() {
2453
- this.target.matches(":focus-visible") && (this.open = !0, this.focusedin = !0);
2454
- }
2455
- handleTargetFocusout() {
2456
- this.focusedin = !1, !this.pointerentered && (this.open = !1);
2457
- }
2458
- handleTargetPointerenter() {
2459
- this.hoverTimeout && (clearTimeout(this.hoverTimeout), this.hoverTimeout = void 0), !this.overlay?.disabled && (this.open = !0, this.pointerentered = !0);
2460
- }
2461
- handleTargetPointerleave() {
2462
- this.doPointerleave();
2463
- }
2464
- // set a timeout once the pointer enters and the overlay is shown
2465
- // give the user time to enter the overlay
2466
- handleHostPointerenter() {
2467
- this.hoverTimeout && (clearTimeout(this.hoverTimeout), this.hoverTimeout = void 0);
2468
- }
2469
- handleHostPointerleave() {
2470
- this.doPointerleave();
2471
- }
2472
- prepareDescription() {
2473
- if (!this.overlay.elements.length)
2474
- return;
2475
- const t = this.target.getRootNode(), o = this.overlay.elements[0].getRootNode(), i = this.overlay.getRootNode();
2476
- t === i ? this.prepareOverlayRelativeDescription() : t === o && this.prepareContentRelativeDescription();
2477
- }
2478
- prepareOverlayRelativeDescription() {
2479
- const t = $t(
2480
- this.target,
2481
- "aria-describedby",
2482
- [this.overlay.id]
2483
- );
2484
- this.releaseDescription = () => {
2485
- t(), this.releaseDescription = it;
2486
- };
2487
- }
2488
- prepareContentRelativeDescription() {
2489
- const t = [], o = this.overlay.elements.map((s) => (t.push(s.id), s.id || (s.id = `${this.overlay.tagName.toLowerCase()}-helper-${Ut()}`), s.id));
2490
- this.elementIds = t;
2491
- const i = $t(
2492
- this.target,
2493
- "aria-describedby",
2494
- o
2495
- );
2496
- this.releaseDescription = () => {
2497
- i(), this.overlay.elements.map((s, r) => {
2498
- s.id = this.elementIds[r];
2499
- }), this.releaseDescription = it;
2500
- };
2501
- }
2502
- doPointerleave() {
2503
- this.pointerentered = !1;
2504
- const t = this.target;
2505
- this.focusedin && t.matches(":focus-visible") || (this.hoverTimeout = setTimeout(() => {
2506
- this.open = !1;
2507
- }, bo));
2508
- }
2509
- init() {
2510
- this.abortController?.abort(), this.abortController = new AbortController();
2511
- const { signal: t } = this.abortController;
2512
- this.target.addEventListener("focusin", () => this.handleTargetFocusin(), {
2513
- signal: t
2514
- }), this.target.addEventListener(
2515
- "focusout",
2516
- () => this.handleTargetFocusout(),
2517
- { signal: t }
2518
- ), this.target.addEventListener(
2519
- "pointerenter",
2520
- () => this.handleTargetPointerenter(),
2521
- { signal: t }
2522
- ), this.target.addEventListener(
2523
- "pointerleave",
2524
- () => this.handleTargetPointerleave(),
2525
- { signal: t }
2526
- ), this.overlay && this.initOverlay();
2527
- }
2528
- initOverlay() {
2529
- if (!this.abortController)
2530
- return;
2531
- const { signal: t } = this.abortController;
2532
- this.overlay.addEventListener(
2533
- "pointerenter",
2534
- () => this.handleHostPointerenter(),
2535
- { signal: t }
2536
- ), this.overlay.addEventListener(
2537
- "pointerleave",
2538
- () => this.handleHostPointerleave(),
2539
- { signal: t }
2540
- );
2541
- }
2542
- }
2543
- const xo = {
2544
- click: vo,
2545
- hover: wo,
2546
- longpress: fo
2547
- };
2548
- var Eo = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, R = (e, t, o, i) => {
2549
- for (var s = i > 1 ? void 0 : i ? Po(t, o) : t, r = e.length - 1, n; r >= 0; r--)
2550
- (n = e[r]) && (s = (i ? n(t, o, s) : n(s)) || s);
2551
- return i && s && Eo(t, o, s), s;
2552
- };
2553
- const Co = "showPopover" in document.createElement("div");
2554
- let ct = pi(ht);
2555
- Co ? ct = gi(ct) : ct = ui(ct);
2556
- var Y;
2557
- const A = (Y = class extends ct {
2558
- constructor() {
2559
- super(), 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) => {
2560
- if (!t.relatedTarget)
2561
- return;
2562
- const o = new Event("overlay-relation-query", {
2563
- bubbles: !0,
2564
- composed: !0
2565
- });
2566
- t.relatedTarget.addEventListener(o.type, (i) => {
2567
- i.composedPath().includes(this) || (this.open = !1);
2568
- }), t.relatedTarget.dispatchEvent(o);
2569
- }, this.handleClose = this.handleClose.bind(this);
2570
- }
2571
- get delayed() {
2572
- return this.elements.length ? this.elements[this.elements.length - 1].hasAttribute("delayed") || this._delayed : this._delayed;
2573
- }
2574
- set delayed(t) {
2575
- this._delayed = t;
2576
- }
2577
- get disabled() {
2578
- return this._disabled;
2579
- }
2580
- set disabled(t) {
2581
- this._disabled = t, t ? (this.strategy?.abort(), this.wasOpen = this.open, this.open = !1) : (this.bindEvents(), this.open = this.open || this.wasOpen, this.wasOpen = !1);
2582
- }
2583
- get hasNonVirtualTrigger() {
2584
- return !!this.triggerElement && !(this.triggerElement instanceof Ct);
2585
- }
2586
- get placementController() {
2587
- return this._placementController || (this._placementController = new po(this)), this._placementController;
2588
- }
2589
- get open() {
2590
- return this._open;
2591
- }
2592
- set open(t) {
2593
- t && this.disabled || t !== this.open && (this.strategy?.activelyOpening && !t || (this._open = t, this.open && (Y.openCount += 1), this.requestUpdate("open", !this.open), this.open && this.requestSlottable()));
2594
- }
2595
- get state() {
2596
- return this._state;
2597
- }
2598
- set state(t) {
2599
- if (t === this.state)
2600
- return;
2601
- const o = this.state;
2602
- this._state = t, (this.state === "opened" || this.state === "closed") && this.strategy?.shouldCompleteOpen(), this.requestUpdate("state", o);
2603
- }
2604
- get elementResolver() {
2605
- return this._elementResolver || (this._elementResolver = new di(this)), this._elementResolver;
2606
- }
2607
- get usesDialog() {
2608
- return this.type === "modal" || this.type === "page";
2609
- }
2610
- get popoverValue() {
2611
- if ("popover" in this)
2612
- switch (this.type) {
2613
- case "modal":
2614
- case "page":
2615
- return;
2616
- case "hint":
2617
- return "manual";
2618
- default:
2619
- return this.type;
2620
- }
2621
- }
2622
- get requiresPosition() {
2623
- return !(this.type === "page" || !this.open || !this.triggerElement || !this.placement && this.type !== "hint");
2624
- }
2625
- managePosition() {
2626
- if (!this.requiresPosition || !this.open)
2627
- return;
2628
- const t = this.offset || 0, o = this.triggerElement, i = this.placement || "right", s = this.tipPadding;
2629
- this.placementController.placeOverlay(this.dialogEl, {
2630
- offset: t,
2631
- placement: i,
2632
- tipPadding: s,
2633
- trigger: o,
2634
- type: this.type
2635
- });
2636
- }
2637
- async managePopoverOpen() {
2638
- super.managePopoverOpen();
2639
- const t = this.open;
2640
- if (this.open !== t || (await this.manageDelay(t), this.open !== t) || (await this.ensureOnDOM(t), this.open !== t))
2641
- return;
2642
- const o = await this.makeTransition(t);
2643
- this.open === t && await this.applyFocus(t, o);
2644
- }
2645
- async applyFocus(t, o) {
2646
- if (!(this.receivesFocus === "false" || this.type === "hint")) {
2647
- if (await k(), await k(), t === this.open && !this.open) {
2648
- this.hasNonVirtualTrigger && this.contains(this.getRootNode().activeElement) && this.triggerElement.focus();
2649
- return;
2650
- }
2651
- o?.focus();
2652
- }
2653
- }
2654
- returnFocus() {
2655
- if (this.open || this.type === "hint")
2656
- return;
2657
- const t = () => {
2658
- const o = [];
2659
- let i = document.activeElement;
2660
- for (; i?.shadowRoot?.activeElement; )
2661
- i = i.shadowRoot.activeElement;
2662
- for (; i; ) {
2663
- const s = i.assignedSlot || i.parentElement || i.getRootNode()?.host;
2664
- s && o.push(s), i = s;
2665
- }
2666
- return o;
2667
- };
2668
- this.receivesFocus !== "false" && this.triggerElement?.focus && (this.contains(this.getRootNode().activeElement) || t().includes(this) || document.activeElement === document.body) && this.triggerElement.focus();
2669
- }
2670
- async manageOpen(t) {
2671
- if (!(!this.isConnected && this.open) && (this.hasUpdated || await this.updateComplete, this.open ? (le.add(this), this.willPreventClose && (document.addEventListener(
2672
- "pointerup",
2673
- () => {
2674
- this.dialogEl.classList.toggle("not-immediately-closable", !1), this.willPreventClose = !1;
2675
- },
2676
- { once: !0 }
2677
- ), this.dialogEl.classList.toggle("not-immediately-closable", !0))) : (t && this.dispose(), le.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")) {
2678
- const o = this.getRootNode();
2679
- this.open ? o.addEventListener("focusout", this.closeOnFocusOut, {
2680
- capture: !0
2681
- }) : o.removeEventListener("focusout", this.closeOnFocusOut, {
2682
- capture: !0
2683
- });
2684
- }
2685
- }
2686
- bindEvents() {
2687
- this.strategy?.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new xo[this.triggerInteraction](
2688
- this.triggerElement,
2689
- {
2690
- overlay: this
2691
- }
2692
- ));
2693
- }
2694
- handleBeforetoggle(t) {
2695
- t.newState !== "open" && this.handleBrowserClose();
2696
- }
2697
- handleBrowserClose() {
2698
- if (!this.strategy?.activelyOpening) {
2699
- this.open = !1;
2700
- return;
2701
- }
2702
- this.manuallyKeepOpen();
2703
- }
2704
- manuallyKeepOpen() {
2705
- this.open = !0, this.placementController.allowPlacementUpdate = !0, this.manageOpen(!1);
2706
- }
2707
- handleSlotchange() {
2708
- this.elements.length ? this.hasNonVirtualTrigger && this.strategy?.prepareDescription(this.triggerElement) : this.strategy?.releaseDescription();
2709
- }
2710
- shouldPreventClose() {
2711
- const t = this.willPreventClose;
2712
- return this.willPreventClose = !1, t;
2713
- }
2714
- requestSlottable() {
2715
- this.lastRequestSlottableState !== this.open && (this.open || document.body.offsetHeight, this.dispatchEvent(
2716
- new mo(
2717
- "overlay-content",
2718
- this.open ? {} : yo
2719
- )
2720
- ), this.lastRequestSlottableState = this.open);
2721
- }
2722
- willUpdate(t) {
2723
- if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${Ut()}`), t.has("open") && (this.hasUpdated || this.open) && this.manageOpen(t.get("open")), t.has("trigger")) {
2724
- const [i, s] = this.trigger?.split("@") || [];
2725
- this.elementResolver.selector = i ? `#${i}` : "", this.triggerInteraction = s;
2726
- }
2727
- let o = !1;
2728
- t.has(ve) && (o = this.triggerElement, this.triggerElement = this.elementResolver.element), t.has("triggerElement") && (o = t.get("triggerElement")), o !== !1 && this.bindEvents();
2729
- }
2730
- updated(t) {
2731
- super.updated(t), t.has("placement") && (this.placement ? this.dialogEl.setAttribute("actual-placement", this.placement) : this.dialogEl.removeAttribute("actual-placement"), this.open && typeof t.get("placement") < "u" && this.placementController.resetOverlayPosition()), t.has("state") && this.state === "closed" && typeof t.get("state") < "u" && this.placementController.clearOverlayPosition();
2732
- }
2733
- renderContent() {
2734
- return j` <slot @slotchange=${this.handleSlotchange}></slot> `;
2735
- }
2736
- get dialogStyleMap() {
2737
- return {
2738
- "--swc-overlay-open-count": Y.openCount.toString()
2739
- };
2740
- }
2741
- handleClose() {
2742
- this.open = !1;
2743
- }
2744
- renderDialog() {
2745
- return j`
2746
- <dialog
2747
- class="dialog"
2748
- part="dialog"
2749
- placement=${Lt(
2750
- this.requiresPosition ? this.placement || "right" : void 0
2751
- )}
2752
- style=${se(this.dialogStyleMap)}
2753
- @close=${this.handleBrowserClose}
2754
- @cancel=${this.handleBrowserClose}
2755
- @beforetoggle=${this.handleBeforetoggle}
2756
- ?is-visible=${this.state !== "closed"}
2757
- >
2758
- ${this.renderContent()}
2759
- </dialog>
2760
- `;
2761
- }
2762
- renderPopover() {
2763
- return j`
2764
- <div
2765
- class="dialog"
2766
- part="dialog"
2767
- placement=${Lt(
2768
- this.requiresPosition ? this.placement || "right" : void 0
2769
- )}
2770
- popover=${Lt(this.popoverValue)}
2771
- style=${se(this.dialogStyleMap)}
2772
- @beforetoggle=${this.handleBeforetoggle}
2773
- @close=${this.handleBrowserClose}
2774
- ?is-visible=${this.state !== "closed"}
2775
- >
2776
- ${this.renderContent()}
2777
- </div>
2778
- `;
2779
- }
2780
- render() {
2781
- const t = this.type === "modal" || this.type === "page";
2782
- return j`
2783
- ${t ? this.renderDialog() : this.renderPopover()}
2784
- <slot name="longpress-describedby-descriptor"></slot>
2785
- `;
2786
- }
2787
- connectedCallback() {
2788
- super.connectedCallback(), this.addEventListener("close", this.handleClose), this.hasUpdated && this.bindEvents();
2789
- }
2790
- disconnectedCallback() {
2791
- super.disconnectedCallback(), this.removeEventListener("close", this.handleClose), this.strategy?.releaseDescription(), this.open = !1;
2792
- }
2793
- }, Y.styles = [
2794
- ye,
2795
- Vt`
2796
- ${ze(go)}
2797
- `
2798
- ], Y.openCount = 1, Y);
2799
- R([
2800
- v({ type: Boolean })
2801
- ], A.prototype, "delayed", 1);
2802
- R([
2803
- ut(".dialog")
2804
- ], A.prototype, "dialogEl", 2);
2805
- R([
2806
- v({ type: Boolean })
2807
- ], A.prototype, "disabled", 1);
2808
- R([
2809
- je({
2810
- flatten: !0,
2811
- selector: ':not([slot="longpress-describedby-descriptor"], slot)'
2812
- // gather only elements slotted into the default slot
2813
- })
2814
- ], A.prototype, "elements", 2);
2815
- R([
2816
- v({ type: Number })
2817
- ], A.prototype, "offset", 2);
2818
- R([
2819
- v({ reflect: !0, type: Boolean })
2820
- ], A.prototype, "open", 1);
2821
- R([
2822
- v()
2823
- ], A.prototype, "placement", 2);
2824
- R([
2825
- v({ attribute: "receives-focus" })
2826
- ], A.prototype, "receivesFocus", 2);
2827
- R([
2828
- ut("slot")
2829
- ], A.prototype, "slotEl", 2);
2830
- R([
2831
- Me()
2832
- ], A.prototype, "state", 1);
2833
- R([
2834
- v({ attribute: "tip-padding", type: Number })
2835
- ], A.prototype, "tipPadding", 2);
2836
- R([
2837
- v()
2838
- ], A.prototype, "trigger", 2);
2839
- R([
2840
- v({ attribute: "trigger-element" })
2841
- ], A.prototype, "triggerElement", 2);
2842
- R([
2843
- v({ attribute: "trigger-interaction" })
2844
- ], A.prototype, "triggerInteraction", 2);
2845
- R([
2846
- v()
2847
- ], A.prototype, "type", 2);
2848
- let Fe = A;
2849
- const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2850
- __proto__: null,
2851
- LONGPRESS_INSTRUCTIONS: ke,
2852
- Overlay: Fe
2853
- }, Symbol.toStringTag, { value: "Module" }));
2854
- Je("cx-overlay", Fe);
2855
- const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2856
- __proto__: null
2857
- }, Symbol.toStringTag, { value: "Module" }));
2858
- function Ao(e) {
2859
- return So(e);
2860
- }
2861
- function Nt(e) {
2862
- return e.assignedSlot ? e.assignedSlot : e.parentNode instanceof ShadowRoot ? e.parentNode.host : e.parentNode;
2863
- }
2864
- function So(e) {
2865
- for (let t = e; t; t = Nt(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
2866
- for (let t = Nt(e); t; t = Nt(t)) {
2867
- if (!(t instanceof Element)) continue;
2868
- const o = getComputedStyle(t);
2869
- if (o.display !== "contents" && (o.position !== "static" || St(o) || t.tagName === "BODY"))
2870
- return t;
2871
- }
2872
- return null;
2873
- }
2874
- const Ro = Vt`
2875
- :host {
2876
- --arrow-color: var(--cx-color-neutral-1000);
2877
- --arrow-size: 6px;
2878
-
2879
- /*
2880
- * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant
2881
- * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.
2882
- */
2883
- --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
2884
- --arrow-padding-offset: calc(
2885
- var(--arrow-size-diagonal) - var(--arrow-size)
2886
- );
2887
-
2888
- display: contents;
2889
- /**
2890
- * Reset -webkit-overflow-scrolling style to fix issue with popup being hidden on mobile devices.
2891
- * See https://link.orangelogic.com/Tasks/293FXQ
2892
- */
2893
- -webkit-overflow-scrolling: auto;
2894
- }
2895
-
2896
- .popup {
2897
- position: absolute;
2898
- isolation: isolate;
2899
- max-width: var(--auto-size-available-width, none);
2900
- max-height: var(--auto-size-available-height, none);
2901
- }
2902
-
2903
- .popup--use-size-middleware {
2904
- /*
2905
- * Prevent update loops when using the size middleware.
2906
- * https://github.com/floating-ui/floating-ui/issues/1740#issuecomment-1563544849
2907
- */
2908
- width: max-content;
2909
- }
2910
-
2911
- .popup--fixed, .popup--overlay {
2912
- position: fixed;
2913
- z-index: var(--cx-z-index-dialog);
2914
- }
2915
-
2916
- .popup:not(.popup--active) {
2917
- display: none;
2918
- }
2919
-
2920
- .popup__arrow {
2921
- position: absolute;
2922
- width: calc(var(--arrow-size-diagonal) * 2);
2923
- height: calc(var(--arrow-size-diagonal) * 2);
2924
- rotate: 45deg;
2925
- background: var(--arrow-color);
2926
- z-index: -1;
2927
- }
2928
-
2929
- /* Hover bridge */
2930
- .popup-hover-bridge:not(.popup-hover-bridge--visible) {
2931
- display: none;
2932
- }
2933
-
2934
- .popup-hover-bridge {
2935
- position: fixed;
2936
- z-index: calc(var(--cx-z-index-dropdown) - 1);
2937
- top: 0;
2938
- right: 0;
2939
- bottom: 0;
2940
- left: 0;
2941
- clip-path: polygon(
2942
- var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),
2943
- var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),
2944
- var(--hover-bridge-bottom-right-x, 0)
2945
- var(--hover-bridge-bottom-right-y, 0),
2946
- var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
2947
- );
2948
- }
2949
- `;
2950
- var To = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, w = (e, t, o, i) => {
2951
- for (var s = i > 1 ? void 0 : i ? Lo(t, o) : t, r = e.length - 1, n; r >= 0; r--)
2952
- (n = e[r]) && (s = (i ? n(t, o, s) : n(s)) || s);
2953
- return i && s && To(t, o, s), s;
2954
- };
2955
- function Do(e) {
2956
- if (e == null || typeof e != "object")
2957
- return !1;
2958
- const t = "contextElement" in e ? e.contextElement.ownerDocument.defaultView : null;
2959
- return "getBoundingClientRect" in e && ("contextElement" in e ? e.contextElement instanceof (t?.Element ?? Element) : !0);
2960
- }
2961
- let b = class extends Be {
2962
- constructor() {
2963
- super(...arguments), this.localize = new Ve(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.hide = !1, this.hideBoundaryStrategy = "escaped", this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.autoWidthFactor = 1, this.updateHoverBridge = () => {
2964
- if (this.hoverBridge && this.anchorEl) {
2965
- const e = this.anchorEl.getBoundingClientRect(), t = this.popup.getBoundingClientRect(), o = this.placement.includes("top") || this.placement.includes("bottom") || this.placement === "center";
2966
- let i = 0, s = 0, r = 0, n = 0, a = 0, l = 0, c = 0, h = 0;
2967
- o ? e.top < t.top ? (i = e.left, s = e.bottom, r = e.right, n = e.bottom, a = t.left, l = t.top, c = t.right, h = t.top) : (i = t.left, s = t.bottom, r = t.right, n = t.bottom, a = e.left, l = e.top, c = e.right, h = e.top) : e.left < t.left ? (i = e.right, s = e.top, r = t.left, n = t.top, a = e.right, l = e.bottom, c = t.left, h = t.bottom) : (i = t.right, s = t.top, r = e.left, n = e.top, a = t.right, l = t.bottom, c = e.left, h = e.bottom), this.style.setProperty("--hover-bridge-top-left-x", `${i}px`), this.style.setProperty("--hover-bridge-top-left-y", `${s}px`), this.style.setProperty("--hover-bridge-top-right-x", `${r}px`), this.style.setProperty("--hover-bridge-top-right-y", `${n}px`), this.style.setProperty(
2968
- "--hover-bridge-bottom-left-x",
2969
- `${a}px`
2970
- ), this.style.setProperty(
2971
- "--hover-bridge-bottom-left-y",
2972
- `${l}px`
2973
- ), this.style.setProperty(
2974
- "--hover-bridge-bottom-right-x",
2975
- `${c}px`
2976
- ), this.style.setProperty(
2977
- "--hover-bridge-bottom-right-y",
2978
- `${h}px`
2979
- );
2980
- }
2981
- };
2982
- }
2983
- /*
2984
- * Use to prevent update loops when using the size middleware.
2985
- * https://github.com/floating-ui/floating-ui/issues/1740#issuecomment-1563544849
2986
- */
2987
- get isSizeMiddleWareUsed() {
2988
- return this.sync || this.autoSize;
2989
- }
2990
- disconnectedCallback() {
2991
- super.disconnectedCallback(), this.stop();
2992
- }
2993
- connectedUpdatedCallback() {
2994
- if (this.strategy === "overlay" && (this.start(), !ne)) {
2995
- const e = We(this);
2996
- e && (this.autoSizeBoundary = e, this.flipBoundary = e, this.shiftBoundary = e);
2997
- }
2998
- }
2999
- async updated(e) {
3000
- super.updated(e), e.has("active") && (this.active ? (this.start(), this.emit("cx-opened")) : this.stop()), e.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
3001
- }
3002
- async handleAnchorChange() {
3003
- if (await this.stop(), this.anchor && typeof this.anchor == "string") {
3004
- const e = this.getRootNode();
3005
- this.anchorEl = e.getElementById(this.anchor);
3006
- } else this.anchor instanceof Element || Do(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector('[slot="anchor"]');
3007
- this.anchorEl instanceof HTMLSlotElement && (this.anchorEl = this.anchorEl.assignedElements({
3008
- flatten: !0
3009
- })[0]), this.anchorEl instanceof Element && this.anchorEl.tagName.toLowerCase() === "cx-dialog" && (this.anchorEl = this.anchorEl?.shadowRoot?.querySelector(
3010
- '[part="panel"]'
3011
- )), this.anchorEl && this.start();
3012
- }
3013
- start() {
3014
- !this.anchorEl || !this.isConnected || (this.cleanup = Mt(this.anchorEl, this.popup, () => {
3015
- this.reposition();
3016
- }));
3017
- }
3018
- async stop() {
3019
- return new Promise((e) => {
3020
- this.cleanup ? (this.cleanup(), this.cleanup = void 0, this.removeAttribute("data-current-placement"), this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height"), requestAnimationFrame(() => e())) : e();
3021
- });
3022
- }
3023
- /** Forces the popup to recalculate and reposition itself. */
3024
- reposition() {
3025
- if (!this.active || !this.anchorEl)
3026
- return;
3027
- const e = [
3028
- // The offset middleware goes first
3029
- this.placement === "center" ? Ht(
3030
- ({ rects: t }) => -t.reference.height / 2 - t.floating.height / 2
3031
- ) : Ht({ crossAxis: this.skidding, mainAxis: this.distance })
3032
- ];
3033
- if (this.sync ? e.push(
3034
- qt({
3035
- apply: ({ rects: t }) => {
3036
- const o = this.sync === "width" || this.sync === "both", i = this.sync === "height" || this.sync === "both", s = this.syncElement ? this.syncElement.getBoundingClientRect() : t.reference;
3037
- this.popup.style.width = o ? `${s.width}px` : "", this.popup.style.height = i ? `${s.height}px` : "";
3038
- }
3039
- })
3040
- ) : (this.popup.style.width = "", this.popup.style.height = ""), this.flip) {
3041
- let t = this.flipBoundary;
3042
- !t && ["fixed", "overlay"].includes(this.strategy) && (t = document.body), e.push(
3043
- Wt({
3044
- boundary: t,
3045
- // @ts-expect-error - We're converting a string attribute to an array here
3046
- fallbackPlacements: this.flipFallbackPlacements,
3047
- fallbackStrategy: this.flipFallbackStrategy === "best-fit" ? "bestFit" : "initialPlacement",
3048
- padding: this.flipPadding
3049
- })
3050
- );
3051
- }
3052
- if (this.shift) {
3053
- let t = this.shiftBoundary;
3054
- !t && ["fixed", "overlay"].includes(this.strategy) && (t = document.body), e.push(
3055
- Te({
3056
- boundary: t,
3057
- padding: this.shiftPadding
3058
- })
3059
- );
3060
- }
3061
- if (this.autoSize) {
3062
- let t = this.autoSizeBoundary;
3063
- !t && ["fixed", "overlay"].includes(this.strategy) && (t = document.body), e.push(
3064
- qt({
3065
- apply: ({ availableHeight: o, availableWidth: i }) => {
3066
- this.autoSize === "vertical" || this.autoSize === "both" ? this.style.setProperty(
3067
- "--auto-size-available-height",
3068
- `${o}px`
3069
- ) : this.style.removeProperty("--auto-size-available-height"), this.autoSize === "horizontal" || this.autoSize === "both" ? this.style.setProperty(
3070
- "--auto-size-available-width",
3071
- `${i * this.autoWidthFactor}px`
3072
- ) : this.style.removeProperty("--auto-size-available-width");
3073
- },
3074
- boundary: t,
3075
- padding: this.autoSizePadding
3076
- })
3077
- );
3078
- } else
3079
- this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height");
3080
- this.arrow && e.push(
3081
- Le({
3082
- element: this.arrowEl,
3083
- padding: this.arrowPadding
3084
- })
3085
- ), this.hide && e.push(
3086
- lo({
3087
- boundary: this.hideBoundary,
3088
- strategy: this.hideBoundaryStrategy
3089
- })
3090
- ), De(this.anchorEl, this.popup, {
3091
- middleware: e,
3092
- placement: this.placement === "center" ? "bottom" : this.placement,
3093
- platform: {
3094
- ...It,
3095
- getOffsetParent: (t) => this.strategy === "absolute" ? It.getOffsetParent(t, Ao) : this.strategy === "overlay" && ne ? window : qe(t) || window
3096
- },
3097
- strategy: ["overlay", "fixed"].includes(this.strategy) ? "fixed" : "absolute"
3098
- }).then(({ middlewareData: t, placement: o, x: i, y: s }) => {
3099
- const r = this.localize.dir() === "rtl", n = {
3100
- bottom: "top",
3101
- left: "right",
3102
- right: "left",
3103
- top: "bottom"
3104
- }[o.split("-")[0]];
3105
- if (this.setAttribute("data-current-placement", o), this.anchorEl === document.body && this.placement === "center") {
3106
- const a = window.innerWidth, l = window.innerHeight, c = this.popup.offsetWidth, h = this.popup.offsetHeight, d = (a - c) / 2, u = (l - h) / 2;
3107
- Object.assign(this.popup.style, { left: `${d}px`, top: `${u}px` });
3108
- } else
3109
- Object.assign(this.popup.style, {
3110
- left: `${i}px`,
3111
- top: `${s}px`
3112
- });
3113
- if (this.arrow) {
3114
- const a = t.arrow.x, l = t.arrow.y;
3115
- let c = "", h = "", d = "", u = "";
3116
- if (this.arrowPlacement === "start") {
3117
- const p = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
3118
- c = typeof l == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "", h = r ? p : "", u = r ? "" : p;
3119
- } else if (this.arrowPlacement === "end") {
3120
- const p = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
3121
- h = r ? "" : p, u = r ? p : "", d = typeof l == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
3122
- } else this.arrowPlacement === "center" ? (u = typeof a == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", c = typeof l == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (u = typeof a == "number" ? `${a}px` : "", c = typeof l == "number" ? `${l}px` : "");
3123
- Object.assign(this.arrowEl.style, {
3124
- bottom: d,
3125
- left: u,
3126
- right: h,
3127
- top: c
3128
- }), this.arrowEl.style.setProperty(
3129
- n,
3130
- "calc(var(--arrow-size-diagonal) * -1)"
3131
- );
3132
- }
3133
- t.hide && Object.assign(this.popup.style, {
3134
- opacity: t.hide.escaped ? 0 : 1,
3135
- visibility: t.hide.escaped ? "hidden" : "visible"
3136
- });
3137
- }).catch(() => {
3138
- }), requestAnimationFrame(() => {
3139
- this.updateHoverBridge(), this.emit("cx-reposition");
3140
- });
3141
- }
3142
- render() {
3143
- const e = j`<cx-overlay
3144
- ?open=${this.active}
3145
- placement="bottom"
3146
- type="manual"
3147
- >
3148
- <div
3149
- part="popup"
3150
- class=${Dt({
3151
- popup: !0,
3152
- "popup--active": this.active,
3153
- "popup--has-arrow": this.arrow,
3154
- "popup--overlay": !0,
3155
- "popup--use-size-middleware": this.isSizeMiddleWareUsed
3156
- })}
3157
- >
3158
- <slot></slot>
3159
- ${this.arrow ? j`<div
3160
- part="arrow"
3161
- class="popup__arrow"
3162
- role="presentation"
3163
- ></div>` : ""}
3164
- </div>
3165
- </cx-overlay>`;
3166
- return j`
3167
- <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
3168
-
3169
- <span
3170
- part="hover-bridge"
3171
- class=${Dt({
3172
- "popup-hover-bridge": !0,
3173
- "popup-hover-bridge--visible": this.hoverBridge && this.active
3174
- })}
3175
- ></span>
3176
-
3177
- ${Ue(
3178
- this.strategy === "overlay",
3179
- () => e,
3180
- () => j`<div
3181
- part="popup"
3182
- class=${Dt({
3183
- popup: !0,
3184
- "popup--active": this.active,
3185
- "popup--fixed": this.strategy === "fixed",
3186
- "popup--has-arrow": this.arrow,
3187
- "popup--use-size-middleware": this.isSizeMiddleWareUsed
3188
- })}
3189
- >
3190
- <slot></slot>
3191
- ${this.arrow ? j`<div
3192
- part="arrow"
3193
- class="popup__arrow"
3194
- role="presentation"
3195
- ></div>` : ""}
3196
- </div>`
3197
- )}
3198
- `;
3199
- }
3200
- };
3201
- b.styles = [ye, Ro];
3202
- w([
3203
- ut(".popup")
3204
- ], b.prototype, "popup", 2);
3205
- w([
3206
- ut(".popup__arrow")
3207
- ], b.prototype, "arrowEl", 2);
3208
- w([
3209
- ut("cx-overlay")
3210
- ], b.prototype, "overlay", 2);
3211
- w([
3212
- v()
3213
- ], b.prototype, "anchor", 2);
3214
- w([
3215
- v({ reflect: !0, type: Boolean })
3216
- ], b.prototype, "active", 2);
3217
- w([
3218
- v({ reflect: !0 })
3219
- ], b.prototype, "placement", 2);
3220
- w([
3221
- v({ reflect: !0 })
3222
- ], b.prototype, "strategy", 2);
3223
- w([
3224
- v({ type: Number })
3225
- ], b.prototype, "distance", 2);
3226
- w([
3227
- v({ type: Number })
3228
- ], b.prototype, "skidding", 2);
3229
- w([
3230
- v({ type: Boolean })
3231
- ], b.prototype, "arrow", 2);
3232
- w([
3233
- v({ attribute: "arrow-placement" })
3234
- ], b.prototype, "arrowPlacement", 2);
3235
- w([
3236
- v({ attribute: "arrow-padding", type: Number })
3237
- ], b.prototype, "arrowPadding", 2);
3238
- w([
3239
- v({ type: Boolean })
3240
- ], b.prototype, "flip", 2);
3241
- w([
3242
- v({ type: Boolean })
3243
- ], b.prototype, "hide", 2);
3244
- w([
3245
- v({ attribute: "hide-boundary", type: Object })
3246
- ], b.prototype, "hideBoundary", 2);
3247
- w([
3248
- v({ attribute: "hide-boundary-strategy" })
3249
- ], b.prototype, "hideBoundaryStrategy", 2);
3250
- w([
3251
- v({
3252
- attribute: "flip-fallback-placements",
3253
- converter: {
3254
- fromAttribute: (e) => e.split(" ").map((t) => t.trim()).filter((t) => t !== ""),
3255
- toAttribute: (e) => e.join(" ")
3256
- }
3257
- })
3258
- ], b.prototype, "flipFallbackPlacements", 2);
3259
- w([
3260
- v({ attribute: "flip-fallback-strategy" })
3261
- ], b.prototype, "flipFallbackStrategy", 2);
3262
- w([
3263
- v({ attribute: "flip-boundary", type: Object })
3264
- ], b.prototype, "flipBoundary", 2);
3265
- w([
3266
- v({ attribute: "flip-padding", type: Number })
3267
- ], b.prototype, "flipPadding", 2);
3268
- w([
3269
- v({ type: Boolean })
3270
- ], b.prototype, "shift", 2);
3271
- w([
3272
- v({ attribute: "shift-boundary", type: Object })
3273
- ], b.prototype, "shiftBoundary", 2);
3274
- w([
3275
- v({ attribute: "shift-padding", type: Number })
3276
- ], b.prototype, "shiftPadding", 2);
3277
- w([
3278
- v({ attribute: "auto-size" })
3279
- ], b.prototype, "autoSize", 2);
3280
- w([
3281
- v()
3282
- ], b.prototype, "sync", 2);
3283
- w([
3284
- v({ attribute: "sync-element" })
3285
- ], b.prototype, "syncElement", 2);
3286
- w([
3287
- v({ attribute: "auto-size-boundary", type: Object })
3288
- ], b.prototype, "autoSizeBoundary", 2);
3289
- w([
3290
- v({ attribute: "auto-size-padding", type: Number })
3291
- ], b.prototype, "autoSizePadding", 2);
3292
- w([
3293
- v({ attribute: "hover-bridge", type: Boolean })
3294
- ], b.prototype, "hoverBridge", 2);
3295
- w([
3296
- v({ attribute: "auto-width-factor" })
3297
- ], b.prototype, "autoWidthFactor", 2);
3298
- w([
3299
- Ke(200)
3300
- ], b.prototype, "start", 1);
3301
- b = w([
3302
- Ie("cx-popup")
3303
- ], b);
3304
- export {
3305
- b as C,
3306
- Ke as d
3307
- };