@poveste/vendors 0.1.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 (269) hide show
  1. package/LICENSE +22 -0
  2. package/dist/client/b-floating-vue.d.ts +3 -0
  3. package/dist/client/b-floating-vue.js +3377 -0
  4. package/dist/client/b-iconify.d.ts +1 -0
  5. package/dist/client/b-iconify.js +1883 -0
  6. package/dist/client/b-pinia.d.ts +1 -0
  7. package/dist/client/b-pinia.js +2069 -0
  8. package/dist/client/b-scroll.d.ts +2 -0
  9. package/dist/client/b-scroll.js +7 -0
  10. package/dist/client/b-vue-router.d.ts +1 -0
  11. package/dist/client/b-vue-router.js +2773 -0
  12. package/dist/client/b-vue-use.d.ts +1 -0
  13. package/dist/client/b-vue-use.js +9626 -0
  14. package/dist/client/b-vue.d.ts +1 -0
  15. package/dist/client/b-vue.js +1 -0
  16. package/dist/client/index.js +169 -0
  17. package/dist/client/node_modules/@babel/helper-string-parser/package.json +31 -0
  18. package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +31 -0
  19. package/dist/client/node_modules/@babel/parser/package.json +50 -0
  20. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +262 -0
  21. package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +2796 -0
  22. package/dist/client/node_modules/@babel/types/lib/index.d.ts +3616 -0
  23. package/dist/client/node_modules/@babel/types/package.json +39 -0
  24. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +535 -0
  25. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +535 -0
  26. package/dist/client/node_modules/@floating-ui/core/package.json +63 -0
  27. package/dist/client/node_modules/@floating-ui/dom/index.d.ts +1 -0
  28. package/dist/client/node_modules/@floating-ui/dom/package.json +74 -0
  29. package/dist/client/node_modules/@floating-ui/dom/src/autoUpdate.d.ts +31 -0
  30. package/dist/client/node_modules/@floating-ui/dom/src/index.d.ts +11 -0
  31. package/dist/client/node_modules/@floating-ui/dom/src/platform.d.ts +2 -0
  32. package/dist/client/node_modules/@floating-ui/dom/src/types.d.ts +128 -0
  33. package/dist/client/node_modules/@floating-ui/dom/src/utils/convertOffsetParentRelativeRectToViewportRelativeRect.d.ts +6 -0
  34. package/dist/client/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts +2 -0
  35. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingRect.d.ts +12 -0
  36. package/dist/client/node_modules/@floating-ui/dom/src/utils/getComputedStyle.d.ts +1 -0
  37. package/dist/client/node_modules/@floating-ui/dom/src/utils/getCssDimensions.d.ts +4 -0
  38. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDimensions.d.ts +2 -0
  39. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentElement.d.ts +1 -0
  40. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentRect.d.ts +2 -0
  41. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNearestOverflowAncestor.d.ts +1 -0
  42. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeName.d.ts +1 -0
  43. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeScroll.d.ts +2 -0
  44. package/dist/client/node_modules/@floating-ui/dom/src/utils/getOffsetParent.d.ts +1 -0
  45. package/dist/client/node_modules/@floating-ui/dom/src/utils/getOverflowAncestors.d.ts +3 -0
  46. package/dist/client/node_modules/@floating-ui/dom/src/utils/getParentNode.d.ts +1 -0
  47. package/dist/client/node_modules/@floating-ui/dom/src/utils/getRectRelativeToOffsetParent.d.ts +2 -0
  48. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScale.d.ts +7 -0
  49. package/dist/client/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts +2 -0
  50. package/dist/client/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts +1 -0
  51. package/dist/client/node_modules/@floating-ui/dom/src/utils/is.d.ts +17 -0
  52. package/dist/client/node_modules/@floating-ui/dom/src/utils/math.d.ts +3 -0
  53. package/dist/client/node_modules/@floating-ui/dom/src/utils/unwrapElement.d.ts +2 -0
  54. package/dist/client/node_modules/@floating-ui/dom/src/utils/userAgent.d.ts +1 -0
  55. package/dist/client/node_modules/@floating-ui/dom/src/utils/window.d.ts +1 -0
  56. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +105 -0
  57. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +105 -0
  58. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
  59. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
  60. package/dist/client/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
  61. package/dist/client/node_modules/@floating-ui/utils/dom/package.json +6 -0
  62. package/dist/client/node_modules/@floating-ui/utils/package.json +70 -0
  63. package/dist/client/node_modules/@iconify/types/package.json +23 -0
  64. package/dist/client/node_modules/@iconify/types/provider.d.ts +44 -0
  65. package/dist/client/node_modules/@iconify/types/types.d.ts +272 -0
  66. package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +475 -0
  67. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +114 -0
  68. package/dist/client/node_modules/@iconify/vue/offline/package.json +14 -0
  69. package/dist/client/node_modules/@iconify/vue/package.json +65 -0
  70. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +63 -0
  71. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
  72. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
  73. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
  74. package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
  75. package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +265 -0
  76. package/dist/client/node_modules/@types/web-bluetooth/package.json +46 -0
  77. package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1100 -0
  78. package/dist/client/node_modules/@vue/compiler-core/package.json +58 -0
  79. package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +45 -0
  80. package/dist/client/node_modules/@vue/compiler-dom/package.json +57 -0
  81. package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +485 -0
  82. package/dist/client/node_modules/@vue/compiler-sfc/package.json +67 -0
  83. package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -0
  84. package/dist/client/node_modules/@vue/compiler-ssr/package.json +34 -0
  85. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +108 -0
  86. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +1 -0
  87. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +78 -0
  88. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +5 -0
  89. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +180 -0
  90. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +6 -0
  91. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +4 -0
  92. package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +2 -0
  93. package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +15 -0
  94. package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +18 -0
  95. package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +47 -0
  96. package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +20 -0
  97. package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +2 -0
  98. package/dist/client/node_modules/@vue/devtools-api/package.json +37 -0
  99. package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +753 -0
  100. package/dist/client/node_modules/@vue/reactivity/package.json +55 -0
  101. package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1839 -0
  102. package/dist/client/node_modules/@vue/runtime-core/package.json +52 -0
  103. package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1430 -0
  104. package/dist/client/node_modules/@vue/runtime-dom/package.json +60 -0
  105. package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +65 -0
  106. package/dist/client/node_modules/@vue/server-renderer/package.json +55 -0
  107. package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +334 -0
  108. package/dist/client/node_modules/@vue/shared/package.json +47 -0
  109. package/dist/client/node_modules/@vueuse/core/index.d.mts +6221 -0
  110. package/dist/client/node_modules/@vueuse/core/index.d.ts +6221 -0
  111. package/dist/client/node_modules/@vueuse/core/metadata.d.mts +1 -0
  112. package/dist/client/node_modules/@vueuse/core/metadata.d.ts +1 -0
  113. package/dist/client/node_modules/@vueuse/core/package.json +57 -0
  114. package/dist/client/node_modules/@vueuse/metadata/index.d.mts +78 -0
  115. package/dist/client/node_modules/@vueuse/metadata/index.d.ts +78 -0
  116. package/dist/client/node_modules/@vueuse/metadata/package.json +46 -0
  117. package/dist/client/node_modules/@vueuse/shared/index.d.mts +1260 -0
  118. package/dist/client/node_modules/@vueuse/shared/index.d.ts +1260 -0
  119. package/dist/client/node_modules/@vueuse/shared/package.json +49 -0
  120. package/dist/client/node_modules/compute-scroll-into-view/dist/index.d.ts +75 -0
  121. package/dist/client/node_modules/compute-scroll-into-view/package.json +82 -0
  122. package/dist/client/node_modules/csstype/index.d.ts +22569 -0
  123. package/dist/client/node_modules/csstype/package.json +70 -0
  124. package/dist/client/node_modules/entities/decode.d.ts +3 -0
  125. package/dist/client/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +19 -0
  126. package/dist/client/node_modules/entities/dist/commonjs/decode.d.ts +205 -0
  127. package/dist/client/node_modules/entities/dist/commonjs/encode.d.ts +22 -0
  128. package/dist/client/node_modules/entities/dist/commonjs/escape.d.ts +46 -0
  129. package/dist/client/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
  130. package/dist/client/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
  131. package/dist/client/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +3 -0
  132. package/dist/client/node_modules/entities/dist/commonjs/index.d.ts +96 -0
  133. package/dist/client/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +17 -0
  134. package/dist/client/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +2 -0
  135. package/dist/client/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +32 -0
  136. package/dist/client/node_modules/entities/dist/commonjs/package.json +3 -0
  137. package/dist/client/node_modules/entities/dist/esm/decode-codepoint.d.ts +19 -0
  138. package/dist/client/node_modules/entities/dist/esm/decode.d.ts +205 -0
  139. package/dist/client/node_modules/entities/dist/esm/encode.d.ts +22 -0
  140. package/dist/client/node_modules/entities/dist/esm/escape.d.ts +46 -0
  141. package/dist/client/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
  142. package/dist/client/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
  143. package/dist/client/node_modules/entities/dist/esm/generated/encode-html.d.ts +3 -0
  144. package/dist/client/node_modules/entities/dist/esm/index.d.ts +96 -0
  145. package/dist/client/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +17 -0
  146. package/dist/client/node_modules/entities/dist/esm/internal/decode-shared.d.ts +2 -0
  147. package/dist/client/node_modules/entities/dist/esm/internal/encode-shared.d.ts +32 -0
  148. package/dist/client/node_modules/entities/dist/esm/package.json +3 -0
  149. package/dist/client/node_modules/entities/escape.d.ts +3 -0
  150. package/dist/client/node_modules/entities/package.json +120 -0
  151. package/dist/client/node_modules/estree-walker/dist/esm/package.json +1 -0
  152. package/dist/client/node_modules/estree-walker/package.json +37 -0
  153. package/dist/client/node_modules/estree-walker/src/package.json +1 -0
  154. package/dist/client/node_modules/estree-walker/types/async.d.ts +53 -0
  155. package/dist/client/node_modules/estree-walker/types/index.d.ts +56 -0
  156. package/dist/client/node_modules/estree-walker/types/sync.d.ts +53 -0
  157. package/dist/client/node_modules/estree-walker/types/walker.d.ts +37 -0
  158. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.d.ts +398 -0
  159. package/dist/client/node_modules/floating-vue/dist/components/Menu.d.ts +398 -0
  160. package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +495 -0
  161. package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +474 -0
  162. package/dist/client/node_modules/floating-vue/dist/components/PopperContent.vue.d.ts +37 -0
  163. package/dist/client/node_modules/floating-vue/dist/components/PopperMethods.d.ts +9 -0
  164. package/dist/client/node_modules/floating-vue/dist/components/PopperWrapper.vue.d.ts +414 -0
  165. package/dist/client/node_modules/floating-vue/dist/components/ThemeClass.d.ts +6 -0
  166. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.d.ts +398 -0
  167. package/dist/client/node_modules/floating-vue/dist/components/TooltipDirective.vue.d.ts +67 -0
  168. package/dist/client/node_modules/floating-vue/dist/config.d.ts +11 -0
  169. package/dist/client/node_modules/floating-vue/dist/directives/v-close-popper.d.ts +13 -0
  170. package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.d.ts +27 -0
  171. package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.spec.d.ts +1 -0
  172. package/dist/client/node_modules/floating-vue/dist/index.d.ts +2239 -0
  173. package/dist/client/node_modules/floating-vue/dist/util/assign-deep.d.ts +1 -0
  174. package/dist/client/node_modules/floating-vue/dist/util/env.d.ts +2 -0
  175. package/dist/client/node_modules/floating-vue/dist/util/events.d.ts +14 -0
  176. package/dist/client/node_modules/floating-vue/dist/util/frame.d.ts +1 -0
  177. package/dist/client/node_modules/floating-vue/dist/util/lang.d.ts +1 -0
  178. package/dist/client/node_modules/floating-vue/dist/util/popper.d.ts +3 -0
  179. package/dist/client/node_modules/floating-vue/package.json +80 -0
  180. package/dist/client/node_modules/magic-string/dist/magic-string.cjs.d.ts +289 -0
  181. package/dist/client/node_modules/magic-string/dist/magic-string.es.d.mts +289 -0
  182. package/dist/client/node_modules/magic-string/package.json +67 -0
  183. package/dist/client/node_modules/nanoid/async/index.d.ts +56 -0
  184. package/dist/client/node_modules/nanoid/async/package.json +12 -0
  185. package/dist/client/node_modules/nanoid/index.d.ts +91 -0
  186. package/dist/client/node_modules/nanoid/non-secure/index.d.ts +33 -0
  187. package/dist/client/node_modules/nanoid/non-secure/package.json +6 -0
  188. package/dist/client/node_modules/nanoid/package.json +89 -0
  189. package/dist/client/node_modules/nanoid/url-alphabet/package.json +6 -0
  190. package/dist/client/node_modules/picocolors/package.json +25 -0
  191. package/dist/client/node_modules/picocolors/picocolors.d.ts +5 -0
  192. package/dist/client/node_modules/picocolors/types.d.ts +51 -0
  193. package/dist/client/node_modules/pinia/dist/pinia.d.ts +1074 -0
  194. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +22 -0
  195. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +33 -0
  196. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +38 -0
  197. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +22 -0
  198. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +47 -0
  199. package/dist/client/node_modules/pinia/package.json +96 -0
  200. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +139 -0
  201. package/dist/client/node_modules/postcss/lib/comment.d.ts +67 -0
  202. package/dist/client/node_modules/postcss/lib/container.d.ts +478 -0
  203. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
  204. package/dist/client/node_modules/postcss/lib/declaration.d.ts +150 -0
  205. package/dist/client/node_modules/postcss/lib/document.d.ts +68 -0
  206. package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +9 -0
  207. package/dist/client/node_modules/postcss/lib/input.d.ts +226 -0
  208. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +189 -0
  209. package/dist/client/node_modules/postcss/lib/list.d.ts +60 -0
  210. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +45 -0
  211. package/dist/client/node_modules/postcss/lib/node.d.ts +555 -0
  212. package/dist/client/node_modules/postcss/lib/parse.d.ts +9 -0
  213. package/dist/client/node_modules/postcss/lib/postcss.d.mts +66 -0
  214. package/dist/client/node_modules/postcss/lib/postcss.d.ts +464 -0
  215. package/dist/client/node_modules/postcss/lib/previous-map.d.ts +80 -0
  216. package/dist/client/node_modules/postcss/lib/processor.d.ts +114 -0
  217. package/dist/client/node_modules/postcss/lib/result.d.ts +204 -0
  218. package/dist/client/node_modules/postcss/lib/root.d.ts +86 -0
  219. package/dist/client/node_modules/postcss/lib/rule.d.ts +126 -0
  220. package/dist/client/node_modules/postcss/lib/stringifier.d.ts +45 -0
  221. package/dist/client/node_modules/postcss/lib/stringify.d.ts +9 -0
  222. package/dist/client/node_modules/postcss/lib/warning.d.ts +146 -0
  223. package/dist/client/node_modules/postcss/package.json +88 -0
  224. package/dist/client/node_modules/scroll-into-view-if-needed/dist/index.d.ts +79 -0
  225. package/dist/client/node_modules/scroll-into-view-if-needed/package.json +80 -0
  226. package/dist/client/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  227. package/dist/client/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  228. package/dist/client/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  229. package/dist/client/node_modules/source-map-js/package.json +71 -0
  230. package/dist/client/node_modules/source-map-js/source-map.d.ts +104 -0
  231. package/dist/client/node_modules/vue/compiler-sfc/index.d.mts +1 -0
  232. package/dist/client/node_modules/vue/compiler-sfc/index.d.ts +1 -0
  233. package/dist/client/node_modules/vue/compiler-sfc/package.json +4 -0
  234. package/dist/client/node_modules/vue/dist/vue.d.mts +7 -0
  235. package/dist/client/node_modules/vue/dist/vue.d.ts +7 -0
  236. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +25 -0
  237. package/dist/client/node_modules/vue/jsx-runtime/package.json +5 -0
  238. package/dist/client/node_modules/vue/jsx.d.ts +22 -0
  239. package/dist/client/node_modules/vue/package.json +112 -0
  240. package/dist/client/node_modules/vue/server-renderer/index.d.mts +1 -0
  241. package/dist/client/node_modules/vue/server-renderer/index.d.ts +1 -0
  242. package/dist/client/node_modules/vue/server-renderer/package.json +4 -0
  243. package/dist/client/node_modules/vue-resize/package.json +77 -0
  244. package/dist/client/node_modules/vue-router/dist/experimental/index.d.mts +38 -0
  245. package/dist/client/node_modules/vue-router/dist/router-CWoNjPRp.d.mts +1973 -0
  246. package/dist/client/node_modules/vue-router/dist/vue-router.d.mts +361 -0
  247. package/dist/client/node_modules/vue-router/package.json +153 -0
  248. package/dist/client/node_modules/vue-router/vue-router-auto-resolver.d.mts +22 -0
  249. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +4 -0
  250. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +1 -0
  251. package/dist/client/vue.runtime.esm-bundler.js +13167 -0
  252. package/entries.js +9 -0
  253. package/floating-vue.d.ts +4 -0
  254. package/iconify.d.ts +4 -0
  255. package/package.json +50 -0
  256. package/pinia.d.ts +4 -0
  257. package/rollup.config.mjs +119 -0
  258. package/scroll.d.ts +4 -0
  259. package/src/client/b-floating-vue.ts +5 -0
  260. package/src/client/b-iconify.ts +1 -0
  261. package/src/client/b-pinia.ts +1 -0
  262. package/src/client/b-scroll.ts +4 -0
  263. package/src/client/b-vue-router.ts +1 -0
  264. package/src/client/b-vue-use.ts +1 -0
  265. package/src/client/b-vue.ts +1 -0
  266. package/tsconfig.json +34 -0
  267. package/vue-router.d.ts +4 -0
  268. package/vue-use.d.ts +4 -0
  269. package/vue.d.ts +4 -0
@@ -0,0 +1,3377 @@
1
+ import { d as defineComponent, c as createElementBlock, o as openBlock, n as normalizeClass, r as renderSlot, a as normalizeProps, g as guardReactiveProps, b as nextTick, w as withScopeId, p as pushScopeId, e as popScopeId, f as createBlock, h as createBaseVNode, i as resolveComponent, j as withKeys, k as normalizeStyle, l as createCommentVNode, F as Fragment, m as mergeProps, q as withCtx, s as createVNode, t as toDisplayString, u as ref, v as createApp, x as h$1 } from './vue.runtime.esm-bundler.js';
2
+
3
+ /**
4
+ * Custom positioning reference element.
5
+ * @see https://floating-ui.com/docs/virtual-elements
6
+ */
7
+
8
+ const sides = ['top', 'right', 'bottom', 'left'];
9
+ const alignments = ['start', 'end'];
10
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
11
+ const min$1 = Math.min;
12
+ const max$1 = Math.max;
13
+ const round$1 = Math.round;
14
+ const floor = Math.floor;
15
+ const createCoords = v => ({
16
+ x: v,
17
+ y: v
18
+ });
19
+ const oppositeSideMap = {
20
+ left: 'right',
21
+ right: 'left',
22
+ bottom: 'top',
23
+ top: 'bottom'
24
+ };
25
+ const oppositeAlignmentMap = {
26
+ start: 'end',
27
+ end: 'start'
28
+ };
29
+ function clamp(start, value, end) {
30
+ return max$1(start, min$1(value, end));
31
+ }
32
+ function evaluate(value, param) {
33
+ return typeof value === 'function' ? value(param) : value;
34
+ }
35
+ function getSide(placement) {
36
+ return placement.split('-')[0];
37
+ }
38
+ function getAlignment(placement) {
39
+ return placement.split('-')[1];
40
+ }
41
+ function getOppositeAxis(axis) {
42
+ return axis === 'x' ? 'y' : 'x';
43
+ }
44
+ function getAxisLength(axis) {
45
+ return axis === 'y' ? 'height' : 'width';
46
+ }
47
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
48
+ function getSideAxis(placement) {
49
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
50
+ }
51
+ function getAlignmentAxis(placement) {
52
+ return getOppositeAxis(getSideAxis(placement));
53
+ }
54
+ function getAlignmentSides(placement, rects, rtl) {
55
+ if (rtl === void 0) {
56
+ rtl = false;
57
+ }
58
+ const alignment = getAlignment(placement);
59
+ const alignmentAxis = getAlignmentAxis(placement);
60
+ const length = getAxisLength(alignmentAxis);
61
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
62
+ if (rects.reference[length] > rects.floating[length]) {
63
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
64
+ }
65
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
66
+ }
67
+ function getExpandedPlacements(placement) {
68
+ const oppositePlacement = getOppositePlacement(placement);
69
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
70
+ }
71
+ function getOppositeAlignmentPlacement(placement) {
72
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
73
+ }
74
+ const lrPlacement = ['left', 'right'];
75
+ const rlPlacement = ['right', 'left'];
76
+ const tbPlacement = ['top', 'bottom'];
77
+ const btPlacement = ['bottom', 'top'];
78
+ function getSideList(side, isStart, rtl) {
79
+ switch (side) {
80
+ case 'top':
81
+ case 'bottom':
82
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
83
+ return isStart ? lrPlacement : rlPlacement;
84
+ case 'left':
85
+ case 'right':
86
+ return isStart ? tbPlacement : btPlacement;
87
+ default:
88
+ return [];
89
+ }
90
+ }
91
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
92
+ const alignment = getAlignment(placement);
93
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
94
+ if (alignment) {
95
+ list = list.map(side => side + "-" + alignment);
96
+ if (flipAlignment) {
97
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
98
+ }
99
+ }
100
+ return list;
101
+ }
102
+ function getOppositePlacement(placement) {
103
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
104
+ }
105
+ function expandPaddingObject(padding) {
106
+ return {
107
+ top: 0,
108
+ right: 0,
109
+ bottom: 0,
110
+ left: 0,
111
+ ...padding
112
+ };
113
+ }
114
+ function getPaddingObject(padding) {
115
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
116
+ top: padding,
117
+ right: padding,
118
+ bottom: padding,
119
+ left: padding
120
+ };
121
+ }
122
+ function rectToClientRect(rect) {
123
+ const {
124
+ x,
125
+ y,
126
+ width,
127
+ height
128
+ } = rect;
129
+ return {
130
+ width,
131
+ height,
132
+ top: y,
133
+ left: x,
134
+ right: x + width,
135
+ bottom: y + height,
136
+ x,
137
+ y
138
+ };
139
+ }
140
+
141
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
142
+ let {
143
+ reference,
144
+ floating
145
+ } = _ref;
146
+ const sideAxis = getSideAxis(placement);
147
+ const alignmentAxis = getAlignmentAxis(placement);
148
+ const alignLength = getAxisLength(alignmentAxis);
149
+ const side = getSide(placement);
150
+ const isVertical = sideAxis === 'y';
151
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
152
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
153
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
154
+ let coords;
155
+ switch (side) {
156
+ case 'top':
157
+ coords = {
158
+ x: commonX,
159
+ y: reference.y - floating.height
160
+ };
161
+ break;
162
+ case 'bottom':
163
+ coords = {
164
+ x: commonX,
165
+ y: reference.y + reference.height
166
+ };
167
+ break;
168
+ case 'right':
169
+ coords = {
170
+ x: reference.x + reference.width,
171
+ y: commonY
172
+ };
173
+ break;
174
+ case 'left':
175
+ coords = {
176
+ x: reference.x - floating.width,
177
+ y: commonY
178
+ };
179
+ break;
180
+ default:
181
+ coords = {
182
+ x: reference.x,
183
+ y: reference.y
184
+ };
185
+ }
186
+ switch (getAlignment(placement)) {
187
+ case 'start':
188
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
189
+ break;
190
+ case 'end':
191
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
192
+ break;
193
+ }
194
+ return coords;
195
+ }
196
+
197
+ /**
198
+ * Computes the `x` and `y` coordinates that will place the floating element
199
+ * next to a given reference element.
200
+ *
201
+ * This export does not have any `platform` interface logic. You will need to
202
+ * write one for the platform you are using Floating UI with.
203
+ */
204
+ const computePosition$1 = async (reference, floating, config) => {
205
+ const {
206
+ placement = 'bottom',
207
+ strategy = 'absolute',
208
+ middleware = [],
209
+ platform
210
+ } = config;
211
+ const validMiddleware = middleware.filter(Boolean);
212
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
213
+ let rects = await platform.getElementRects({
214
+ reference,
215
+ floating,
216
+ strategy
217
+ });
218
+ let {
219
+ x,
220
+ y
221
+ } = computeCoordsFromPlacement(rects, placement, rtl);
222
+ let statefulPlacement = placement;
223
+ let middlewareData = {};
224
+ let resetCount = 0;
225
+ for (let i = 0; i < validMiddleware.length; i++) {
226
+ const {
227
+ name,
228
+ fn
229
+ } = validMiddleware[i];
230
+ const {
231
+ x: nextX,
232
+ y: nextY,
233
+ data,
234
+ reset
235
+ } = await fn({
236
+ x,
237
+ y,
238
+ initialPlacement: placement,
239
+ placement: statefulPlacement,
240
+ strategy,
241
+ middlewareData,
242
+ rects,
243
+ platform,
244
+ elements: {
245
+ reference,
246
+ floating
247
+ }
248
+ });
249
+ x = nextX != null ? nextX : x;
250
+ y = nextY != null ? nextY : y;
251
+ middlewareData = {
252
+ ...middlewareData,
253
+ [name]: {
254
+ ...middlewareData[name],
255
+ ...data
256
+ }
257
+ };
258
+ if (reset && resetCount <= 50) {
259
+ resetCount++;
260
+ if (typeof reset === 'object') {
261
+ if (reset.placement) {
262
+ statefulPlacement = reset.placement;
263
+ }
264
+ if (reset.rects) {
265
+ rects = reset.rects === true ? await platform.getElementRects({
266
+ reference,
267
+ floating,
268
+ strategy
269
+ }) : reset.rects;
270
+ }
271
+ ({
272
+ x,
273
+ y
274
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
275
+ }
276
+ i = -1;
277
+ }
278
+ }
279
+ return {
280
+ x,
281
+ y,
282
+ placement: statefulPlacement,
283
+ strategy,
284
+ middlewareData
285
+ };
286
+ };
287
+
288
+ /**
289
+ * Resolves with an object of overflow side offsets that determine how much the
290
+ * element is overflowing a given clipping boundary on each side.
291
+ * - positive = overflowing the boundary by that number of pixels
292
+ * - negative = how many pixels left before it will overflow
293
+ * - 0 = lies flush with the boundary
294
+ * @see https://floating-ui.com/docs/detectOverflow
295
+ */
296
+ async function detectOverflow(state, options) {
297
+ var _await$platform$isEle;
298
+ if (options === void 0) {
299
+ options = {};
300
+ }
301
+ const {
302
+ x,
303
+ y,
304
+ platform,
305
+ rects,
306
+ elements,
307
+ strategy
308
+ } = state;
309
+ const {
310
+ boundary = 'clippingAncestors',
311
+ rootBoundary = 'viewport',
312
+ elementContext = 'floating',
313
+ altBoundary = false,
314
+ padding = 0
315
+ } = evaluate(options, state);
316
+ const paddingObject = getPaddingObject(padding);
317
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
318
+ const element = elements[altBoundary ? altContext : elementContext];
319
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
320
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
321
+ boundary,
322
+ rootBoundary,
323
+ strategy
324
+ }));
325
+ const rect = elementContext === 'floating' ? {
326
+ x,
327
+ y,
328
+ width: rects.floating.width,
329
+ height: rects.floating.height
330
+ } : rects.reference;
331
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
332
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
333
+ x: 1,
334
+ y: 1
335
+ } : {
336
+ x: 1,
337
+ y: 1
338
+ };
339
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
340
+ elements,
341
+ rect,
342
+ offsetParent,
343
+ strategy
344
+ }) : rect);
345
+ return {
346
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
347
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
348
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
349
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
350
+ };
351
+ }
352
+
353
+ /**
354
+ * Provides data to position an inner element of the floating element so that it
355
+ * appears centered to the reference element.
356
+ * @see https://floating-ui.com/docs/arrow
357
+ */
358
+ const arrow = options => ({
359
+ name: 'arrow',
360
+ options,
361
+ async fn(state) {
362
+ const {
363
+ x,
364
+ y,
365
+ placement,
366
+ rects,
367
+ platform,
368
+ elements,
369
+ middlewareData
370
+ } = state;
371
+ // Since `element` is required, we don't Partial<> the type.
372
+ const {
373
+ element,
374
+ padding = 0
375
+ } = evaluate(options, state) || {};
376
+ if (element == null) {
377
+ return {};
378
+ }
379
+ const paddingObject = getPaddingObject(padding);
380
+ const coords = {
381
+ x,
382
+ y
383
+ };
384
+ const axis = getAlignmentAxis(placement);
385
+ const length = getAxisLength(axis);
386
+ const arrowDimensions = await platform.getDimensions(element);
387
+ const isYAxis = axis === 'y';
388
+ const minProp = isYAxis ? 'top' : 'left';
389
+ const maxProp = isYAxis ? 'bottom' : 'right';
390
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
391
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
392
+ const startDiff = coords[axis] - rects.reference[axis];
393
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
394
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
395
+
396
+ // DOM platform can return `window` as the `offsetParent`.
397
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
398
+ clientSize = elements.floating[clientProp] || rects.floating[length];
399
+ }
400
+ const centerToReference = endDiff / 2 - startDiff / 2;
401
+
402
+ // If the padding is large enough that it causes the arrow to no longer be
403
+ // centered, modify the padding so that it is centered.
404
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
405
+ const minPadding = min$1(paddingObject[minProp], largestPossiblePadding);
406
+ const maxPadding = min$1(paddingObject[maxProp], largestPossiblePadding);
407
+
408
+ // Make sure the arrow doesn't overflow the floating element if the center
409
+ // point is outside the floating element's bounds.
410
+ const min$1$1 = minPadding;
411
+ const max = clientSize - arrowDimensions[length] - maxPadding;
412
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
413
+ const offset = clamp(min$1$1, center, max);
414
+
415
+ // If the reference is small enough that the arrow's padding causes it to
416
+ // to point to nothing for an aligned placement, adjust the offset of the
417
+ // floating element itself. To ensure `shift()` continues to take action,
418
+ // a single reset is performed when this is true.
419
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
420
+ const alignmentOffset = shouldAddOffset ? center < min$1$1 ? center - min$1$1 : center - max : 0;
421
+ return {
422
+ [axis]: coords[axis] + alignmentOffset,
423
+ data: {
424
+ [axis]: offset,
425
+ centerOffset: center - offset - alignmentOffset,
426
+ ...(shouldAddOffset && {
427
+ alignmentOffset
428
+ })
429
+ },
430
+ reset: shouldAddOffset
431
+ };
432
+ }
433
+ });
434
+
435
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
436
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
437
+ return allowedPlacementsSortedByAlignment.filter(placement => {
438
+ if (alignment) {
439
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
440
+ }
441
+ return true;
442
+ });
443
+ }
444
+ /**
445
+ * Optimizes the visibility of the floating element by choosing the placement
446
+ * that has the most space available automatically, without needing to specify a
447
+ * preferred placement. Alternative to `flip`.
448
+ * @see https://floating-ui.com/docs/autoPlacement
449
+ */
450
+ const autoPlacement = function (options) {
451
+ if (options === void 0) {
452
+ options = {};
453
+ }
454
+ return {
455
+ name: 'autoPlacement',
456
+ options,
457
+ async fn(state) {
458
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
459
+ const {
460
+ rects,
461
+ middlewareData,
462
+ placement,
463
+ platform,
464
+ elements
465
+ } = state;
466
+ const {
467
+ crossAxis = false,
468
+ alignment,
469
+ allowedPlacements = placements,
470
+ autoAlignment = true,
471
+ ...detectOverflowOptions
472
+ } = evaluate(options, state);
473
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
474
+ const overflow = await detectOverflow(state, detectOverflowOptions);
475
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
476
+ const currentPlacement = placements$1[currentIndex];
477
+ if (currentPlacement == null) {
478
+ return {};
479
+ }
480
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
481
+
482
+ // Make `computeCoords` start from the right place.
483
+ if (placement !== currentPlacement) {
484
+ return {
485
+ reset: {
486
+ placement: placements$1[0]
487
+ }
488
+ };
489
+ }
490
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
491
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
492
+ placement: currentPlacement,
493
+ overflows: currentOverflows
494
+ }];
495
+ const nextPlacement = placements$1[currentIndex + 1];
496
+
497
+ // There are more placements to check.
498
+ if (nextPlacement) {
499
+ return {
500
+ data: {
501
+ index: currentIndex + 1,
502
+ overflows: allOverflows
503
+ },
504
+ reset: {
505
+ placement: nextPlacement
506
+ }
507
+ };
508
+ }
509
+ const placementsSortedByMostSpace = allOverflows.map(d => {
510
+ const alignment = getAlignment(d.placement);
511
+ return [d.placement, alignment && crossAxis ?
512
+ // Check along the mainAxis and main crossAxis side.
513
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
514
+ // Check only the mainAxis.
515
+ d.overflows[0], d.overflows];
516
+ }).sort((a, b) => a[1] - b[1]);
517
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
518
+ // Aligned placements should not check their opposite crossAxis
519
+ // side.
520
+ getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
521
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
522
+ if (resetPlacement !== placement) {
523
+ return {
524
+ data: {
525
+ index: currentIndex + 1,
526
+ overflows: allOverflows
527
+ },
528
+ reset: {
529
+ placement: resetPlacement
530
+ }
531
+ };
532
+ }
533
+ return {};
534
+ }
535
+ };
536
+ };
537
+
538
+ /**
539
+ * Optimizes the visibility of the floating element by flipping the `placement`
540
+ * in order to keep it in view when the preferred placement(s) will overflow the
541
+ * clipping boundary. Alternative to `autoPlacement`.
542
+ * @see https://floating-ui.com/docs/flip
543
+ */
544
+ const flip = function (options) {
545
+ if (options === void 0) {
546
+ options = {};
547
+ }
548
+ return {
549
+ name: 'flip',
550
+ options,
551
+ async fn(state) {
552
+ var _middlewareData$arrow, _middlewareData$flip;
553
+ const {
554
+ placement,
555
+ middlewareData,
556
+ rects,
557
+ initialPlacement,
558
+ platform,
559
+ elements
560
+ } = state;
561
+ const {
562
+ mainAxis: checkMainAxis = true,
563
+ crossAxis: checkCrossAxis = true,
564
+ fallbackPlacements: specifiedFallbackPlacements,
565
+ fallbackStrategy = 'bestFit',
566
+ fallbackAxisSideDirection = 'none',
567
+ flipAlignment = true,
568
+ ...detectOverflowOptions
569
+ } = evaluate(options, state);
570
+
571
+ // If a reset by the arrow was caused due to an alignment offset being
572
+ // added, we should skip any logic now since `flip()` has already done its
573
+ // work.
574
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
575
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
576
+ return {};
577
+ }
578
+ const side = getSide(placement);
579
+ const initialSideAxis = getSideAxis(initialPlacement);
580
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
581
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
582
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
583
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
584
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
585
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
586
+ }
587
+ const placements = [initialPlacement, ...fallbackPlacements];
588
+ const overflow = await detectOverflow(state, detectOverflowOptions);
589
+ const overflows = [];
590
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
591
+ if (checkMainAxis) {
592
+ overflows.push(overflow[side]);
593
+ }
594
+ if (checkCrossAxis) {
595
+ const sides = getAlignmentSides(placement, rects, rtl);
596
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
597
+ }
598
+ overflowsData = [...overflowsData, {
599
+ placement,
600
+ overflows
601
+ }];
602
+
603
+ // One or more sides is overflowing.
604
+ if (!overflows.every(side => side <= 0)) {
605
+ var _middlewareData$flip2, _overflowsData$filter;
606
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
607
+ const nextPlacement = placements[nextIndex];
608
+ if (nextPlacement) {
609
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
610
+ if (!ignoreCrossAxisOverflow ||
611
+ // We leave the current main axis only if every placement on that axis
612
+ // overflows the main axis.
613
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
614
+ // Try next placement and re-run the lifecycle.
615
+ return {
616
+ data: {
617
+ index: nextIndex,
618
+ overflows: overflowsData
619
+ },
620
+ reset: {
621
+ placement: nextPlacement
622
+ }
623
+ };
624
+ }
625
+ }
626
+
627
+ // First, find the candidates that fit on the mainAxis side of overflow,
628
+ // then find the placement that fits the best on the main crossAxis side.
629
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
630
+
631
+ // Otherwise fallback.
632
+ if (!resetPlacement) {
633
+ switch (fallbackStrategy) {
634
+ case 'bestFit':
635
+ {
636
+ var _overflowsData$filter2;
637
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
638
+ if (hasFallbackAxisSideDirection) {
639
+ const currentSideAxis = getSideAxis(d.placement);
640
+ return currentSideAxis === initialSideAxis ||
641
+ // Create a bias to the `y` side axis due to horizontal
642
+ // reading directions favoring greater width.
643
+ currentSideAxis === 'y';
644
+ }
645
+ return true;
646
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
647
+ if (placement) {
648
+ resetPlacement = placement;
649
+ }
650
+ break;
651
+ }
652
+ case 'initialPlacement':
653
+ resetPlacement = initialPlacement;
654
+ break;
655
+ }
656
+ }
657
+ if (placement !== resetPlacement) {
658
+ return {
659
+ reset: {
660
+ placement: resetPlacement
661
+ }
662
+ };
663
+ }
664
+ }
665
+ return {};
666
+ }
667
+ };
668
+ };
669
+
670
+ function getSideOffsets(overflow, rect) {
671
+ return {
672
+ top: overflow.top - rect.height,
673
+ right: overflow.right - rect.width,
674
+ bottom: overflow.bottom - rect.height,
675
+ left: overflow.left - rect.width
676
+ };
677
+ }
678
+ function isAnySideFullyClipped(overflow) {
679
+ return sides.some(side => overflow[side] >= 0);
680
+ }
681
+ /**
682
+ * Provides data to hide the floating element in applicable situations, such as
683
+ * when it is not in the same clipping context as the reference element.
684
+ * @see https://floating-ui.com/docs/hide
685
+ */
686
+ const hide = function (options) {
687
+ if (options === void 0) {
688
+ options = {};
689
+ }
690
+ return {
691
+ name: 'hide',
692
+ options,
693
+ async fn(state) {
694
+ const {
695
+ rects
696
+ } = state;
697
+ const {
698
+ strategy = 'referenceHidden',
699
+ ...detectOverflowOptions
700
+ } = evaluate(options, state);
701
+ switch (strategy) {
702
+ case 'referenceHidden':
703
+ {
704
+ const overflow = await detectOverflow(state, {
705
+ ...detectOverflowOptions,
706
+ elementContext: 'reference'
707
+ });
708
+ const offsets = getSideOffsets(overflow, rects.reference);
709
+ return {
710
+ data: {
711
+ referenceHiddenOffsets: offsets,
712
+ referenceHidden: isAnySideFullyClipped(offsets)
713
+ }
714
+ };
715
+ }
716
+ case 'escaped':
717
+ {
718
+ const overflow = await detectOverflow(state, {
719
+ ...detectOverflowOptions,
720
+ altBoundary: true
721
+ });
722
+ const offsets = getSideOffsets(overflow, rects.floating);
723
+ return {
724
+ data: {
725
+ escapedOffsets: offsets,
726
+ escaped: isAnySideFullyClipped(offsets)
727
+ }
728
+ };
729
+ }
730
+ default:
731
+ {
732
+ return {};
733
+ }
734
+ }
735
+ }
736
+ };
737
+ };
738
+
739
+ function getBoundingRect(rects) {
740
+ const minX = min$1(...rects.map(rect => rect.left));
741
+ const minY = min$1(...rects.map(rect => rect.top));
742
+ const maxX = max$1(...rects.map(rect => rect.right));
743
+ const maxY = max$1(...rects.map(rect => rect.bottom));
744
+ return {
745
+ x: minX,
746
+ y: minY,
747
+ width: maxX - minX,
748
+ height: maxY - minY
749
+ };
750
+ }
751
+ function getRectsByLine(rects) {
752
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
753
+ const groups = [];
754
+ let prevRect = null;
755
+ for (let i = 0; i < sortedRects.length; i++) {
756
+ const rect = sortedRects[i];
757
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
758
+ groups.push([rect]);
759
+ } else {
760
+ groups[groups.length - 1].push(rect);
761
+ }
762
+ prevRect = rect;
763
+ }
764
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
765
+ }
766
+ /**
767
+ * Provides improved positioning for inline reference elements that can span
768
+ * over multiple lines, such as hyperlinks or range selections.
769
+ * @see https://floating-ui.com/docs/inline
770
+ */
771
+ const inline = function (options) {
772
+ if (options === void 0) {
773
+ options = {};
774
+ }
775
+ return {
776
+ name: 'inline',
777
+ options,
778
+ async fn(state) {
779
+ const {
780
+ placement,
781
+ elements,
782
+ rects,
783
+ platform,
784
+ strategy
785
+ } = state;
786
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
787
+ // ClientRect's bounds, despite the event listener being triggered. A
788
+ // padding of 2 seems to handle this issue.
789
+ const {
790
+ padding = 2,
791
+ x,
792
+ y
793
+ } = evaluate(options, state);
794
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
795
+ const clientRects = getRectsByLine(nativeClientRects);
796
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
797
+ const paddingObject = getPaddingObject(padding);
798
+ function getBoundingClientRect() {
799
+ // There are two rects and they are disjoined.
800
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
801
+ // Find the first rect in which the point is fully inside.
802
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
803
+ }
804
+
805
+ // There are 2 or more connected rects.
806
+ if (clientRects.length >= 2) {
807
+ if (getSideAxis(placement) === 'y') {
808
+ const firstRect = clientRects[0];
809
+ const lastRect = clientRects[clientRects.length - 1];
810
+ const isTop = getSide(placement) === 'top';
811
+ const top = firstRect.top;
812
+ const bottom = lastRect.bottom;
813
+ const left = isTop ? firstRect.left : lastRect.left;
814
+ const right = isTop ? firstRect.right : lastRect.right;
815
+ const width = right - left;
816
+ const height = bottom - top;
817
+ return {
818
+ top,
819
+ bottom,
820
+ left,
821
+ right,
822
+ width,
823
+ height,
824
+ x: left,
825
+ y: top
826
+ };
827
+ }
828
+ const isLeftSide = getSide(placement) === 'left';
829
+ const maxRight = max$1(...clientRects.map(rect => rect.right));
830
+ const minLeft = min$1(...clientRects.map(rect => rect.left));
831
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
832
+ const top = measureRects[0].top;
833
+ const bottom = measureRects[measureRects.length - 1].bottom;
834
+ const left = minLeft;
835
+ const right = maxRight;
836
+ const width = right - left;
837
+ const height = bottom - top;
838
+ return {
839
+ top,
840
+ bottom,
841
+ left,
842
+ right,
843
+ width,
844
+ height,
845
+ x: left,
846
+ y: top
847
+ };
848
+ }
849
+ return fallback;
850
+ }
851
+ const resetRects = await platform.getElementRects({
852
+ reference: {
853
+ getBoundingClientRect
854
+ },
855
+ floating: elements.floating,
856
+ strategy
857
+ });
858
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
859
+ return {
860
+ reset: {
861
+ rects: resetRects
862
+ }
863
+ };
864
+ }
865
+ return {};
866
+ }
867
+ };
868
+ };
869
+
870
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
871
+
872
+ // For type backwards-compatibility, the `OffsetOptions` type was also
873
+ // Derivable.
874
+
875
+ async function convertValueToCoords(state, options) {
876
+ const {
877
+ placement,
878
+ platform,
879
+ elements
880
+ } = state;
881
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
882
+ const side = getSide(placement);
883
+ const alignment = getAlignment(placement);
884
+ const isVertical = getSideAxis(placement) === 'y';
885
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
886
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
887
+ const rawValue = evaluate(options, state);
888
+
889
+ // eslint-disable-next-line prefer-const
890
+ let {
891
+ mainAxis,
892
+ crossAxis,
893
+ alignmentAxis
894
+ } = typeof rawValue === 'number' ? {
895
+ mainAxis: rawValue,
896
+ crossAxis: 0,
897
+ alignmentAxis: null
898
+ } : {
899
+ mainAxis: rawValue.mainAxis || 0,
900
+ crossAxis: rawValue.crossAxis || 0,
901
+ alignmentAxis: rawValue.alignmentAxis
902
+ };
903
+ if (alignment && typeof alignmentAxis === 'number') {
904
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
905
+ }
906
+ return isVertical ? {
907
+ x: crossAxis * crossAxisMulti,
908
+ y: mainAxis * mainAxisMulti
909
+ } : {
910
+ x: mainAxis * mainAxisMulti,
911
+ y: crossAxis * crossAxisMulti
912
+ };
913
+ }
914
+
915
+ /**
916
+ * Modifies the placement by translating the floating element along the
917
+ * specified axes.
918
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
919
+ * object may be passed.
920
+ * @see https://floating-ui.com/docs/offset
921
+ */
922
+ const offset = function (options) {
923
+ if (options === void 0) {
924
+ options = 0;
925
+ }
926
+ return {
927
+ name: 'offset',
928
+ options,
929
+ async fn(state) {
930
+ var _middlewareData$offse, _middlewareData$arrow;
931
+ const {
932
+ x,
933
+ y,
934
+ placement,
935
+ middlewareData
936
+ } = state;
937
+ const diffCoords = await convertValueToCoords(state, options);
938
+
939
+ // If the placement is the same and the arrow caused an alignment offset
940
+ // then we don't need to change the positioning coordinates.
941
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
942
+ return {};
943
+ }
944
+ return {
945
+ x: x + diffCoords.x,
946
+ y: y + diffCoords.y,
947
+ data: {
948
+ ...diffCoords,
949
+ placement
950
+ }
951
+ };
952
+ }
953
+ };
954
+ };
955
+
956
+ /**
957
+ * Optimizes the visibility of the floating element by shifting it in order to
958
+ * keep it in view when it will overflow the clipping boundary.
959
+ * @see https://floating-ui.com/docs/shift
960
+ */
961
+ const shift = function (options) {
962
+ if (options === void 0) {
963
+ options = {};
964
+ }
965
+ return {
966
+ name: 'shift',
967
+ options,
968
+ async fn(state) {
969
+ const {
970
+ x,
971
+ y,
972
+ placement
973
+ } = state;
974
+ const {
975
+ mainAxis: checkMainAxis = true,
976
+ crossAxis: checkCrossAxis = false,
977
+ limiter = {
978
+ fn: _ref => {
979
+ let {
980
+ x,
981
+ y
982
+ } = _ref;
983
+ return {
984
+ x,
985
+ y
986
+ };
987
+ }
988
+ },
989
+ ...detectOverflowOptions
990
+ } = evaluate(options, state);
991
+ const coords = {
992
+ x,
993
+ y
994
+ };
995
+ const overflow = await detectOverflow(state, detectOverflowOptions);
996
+ const crossAxis = getSideAxis(getSide(placement));
997
+ const mainAxis = getOppositeAxis(crossAxis);
998
+ let mainAxisCoord = coords[mainAxis];
999
+ let crossAxisCoord = coords[crossAxis];
1000
+ if (checkMainAxis) {
1001
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
1002
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
1003
+ const min = mainAxisCoord + overflow[minSide];
1004
+ const max = mainAxisCoord - overflow[maxSide];
1005
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
1006
+ }
1007
+ if (checkCrossAxis) {
1008
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
1009
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
1010
+ const min = crossAxisCoord + overflow[minSide];
1011
+ const max = crossAxisCoord - overflow[maxSide];
1012
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
1013
+ }
1014
+ const limitedCoords = limiter.fn({
1015
+ ...state,
1016
+ [mainAxis]: mainAxisCoord,
1017
+ [crossAxis]: crossAxisCoord
1018
+ });
1019
+ return {
1020
+ ...limitedCoords,
1021
+ data: {
1022
+ x: limitedCoords.x - x,
1023
+ y: limitedCoords.y - y,
1024
+ enabled: {
1025
+ [mainAxis]: checkMainAxis,
1026
+ [crossAxis]: checkCrossAxis
1027
+ }
1028
+ }
1029
+ };
1030
+ }
1031
+ };
1032
+ };
1033
+ /**
1034
+ * Built-in `limiter` that will stop `shift()` at a certain point.
1035
+ */
1036
+ const limitShift = function (options) {
1037
+ if (options === void 0) {
1038
+ options = {};
1039
+ }
1040
+ return {
1041
+ options,
1042
+ fn(state) {
1043
+ const {
1044
+ x,
1045
+ y,
1046
+ placement,
1047
+ rects,
1048
+ middlewareData
1049
+ } = state;
1050
+ const {
1051
+ offset = 0,
1052
+ mainAxis: checkMainAxis = true,
1053
+ crossAxis: checkCrossAxis = true
1054
+ } = evaluate(options, state);
1055
+ const coords = {
1056
+ x,
1057
+ y
1058
+ };
1059
+ const crossAxis = getSideAxis(placement);
1060
+ const mainAxis = getOppositeAxis(crossAxis);
1061
+ let mainAxisCoord = coords[mainAxis];
1062
+ let crossAxisCoord = coords[crossAxis];
1063
+ const rawOffset = evaluate(offset, state);
1064
+ const computedOffset = typeof rawOffset === 'number' ? {
1065
+ mainAxis: rawOffset,
1066
+ crossAxis: 0
1067
+ } : {
1068
+ mainAxis: 0,
1069
+ crossAxis: 0,
1070
+ ...rawOffset
1071
+ };
1072
+ if (checkMainAxis) {
1073
+ const len = mainAxis === 'y' ? 'height' : 'width';
1074
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
1075
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
1076
+ if (mainAxisCoord < limitMin) {
1077
+ mainAxisCoord = limitMin;
1078
+ } else if (mainAxisCoord > limitMax) {
1079
+ mainAxisCoord = limitMax;
1080
+ }
1081
+ }
1082
+ if (checkCrossAxis) {
1083
+ var _middlewareData$offse, _middlewareData$offse2;
1084
+ const len = mainAxis === 'y' ? 'width' : 'height';
1085
+ const isOriginSide = originSides.has(getSide(placement));
1086
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
1087
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
1088
+ if (crossAxisCoord < limitMin) {
1089
+ crossAxisCoord = limitMin;
1090
+ } else if (crossAxisCoord > limitMax) {
1091
+ crossAxisCoord = limitMax;
1092
+ }
1093
+ }
1094
+ return {
1095
+ [mainAxis]: mainAxisCoord,
1096
+ [crossAxis]: crossAxisCoord
1097
+ };
1098
+ }
1099
+ };
1100
+ };
1101
+
1102
+ /**
1103
+ * Provides data that allows you to change the size of the floating element —
1104
+ * for instance, prevent it from overflowing the clipping boundary or match the
1105
+ * width of the reference element.
1106
+ * @see https://floating-ui.com/docs/size
1107
+ */
1108
+ const size = function (options) {
1109
+ if (options === void 0) {
1110
+ options = {};
1111
+ }
1112
+ return {
1113
+ name: 'size',
1114
+ options,
1115
+ async fn(state) {
1116
+ var _state$middlewareData, _state$middlewareData2;
1117
+ const {
1118
+ placement,
1119
+ rects,
1120
+ platform,
1121
+ elements
1122
+ } = state;
1123
+ const {
1124
+ apply = () => {},
1125
+ ...detectOverflowOptions
1126
+ } = evaluate(options, state);
1127
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1128
+ const side = getSide(placement);
1129
+ const alignment = getAlignment(placement);
1130
+ const isYAxis = getSideAxis(placement) === 'y';
1131
+ const {
1132
+ width,
1133
+ height
1134
+ } = rects.floating;
1135
+ let heightSide;
1136
+ let widthSide;
1137
+ if (side === 'top' || side === 'bottom') {
1138
+ heightSide = side;
1139
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
1140
+ } else {
1141
+ widthSide = side;
1142
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
1143
+ }
1144
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
1145
+ const maximumClippingWidth = width - overflow.left - overflow.right;
1146
+ const overflowAvailableHeight = min$1(height - overflow[heightSide], maximumClippingHeight);
1147
+ const overflowAvailableWidth = min$1(width - overflow[widthSide], maximumClippingWidth);
1148
+ const noShift = !state.middlewareData.shift;
1149
+ let availableHeight = overflowAvailableHeight;
1150
+ let availableWidth = overflowAvailableWidth;
1151
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
1152
+ availableWidth = maximumClippingWidth;
1153
+ }
1154
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
1155
+ availableHeight = maximumClippingHeight;
1156
+ }
1157
+ if (noShift && !alignment) {
1158
+ const xMin = max$1(overflow.left, 0);
1159
+ const xMax = max$1(overflow.right, 0);
1160
+ const yMin = max$1(overflow.top, 0);
1161
+ const yMax = max$1(overflow.bottom, 0);
1162
+ if (isYAxis) {
1163
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$1(overflow.left, overflow.right));
1164
+ } else {
1165
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$1(overflow.top, overflow.bottom));
1166
+ }
1167
+ }
1168
+ await apply({
1169
+ ...state,
1170
+ availableWidth,
1171
+ availableHeight
1172
+ });
1173
+ const nextDimensions = await platform.getDimensions(elements.floating);
1174
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
1175
+ return {
1176
+ reset: {
1177
+ rects: true
1178
+ }
1179
+ };
1180
+ }
1181
+ return {};
1182
+ }
1183
+ };
1184
+ };
1185
+
1186
+ function getWindow(node) {
1187
+ var _node$ownerDocument;
1188
+ return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1189
+ }
1190
+
1191
+ function getComputedStyle$1(element) {
1192
+ return getWindow(element).getComputedStyle(element);
1193
+ }
1194
+
1195
+ const min = Math.min;
1196
+ const max = Math.max;
1197
+ const round = Math.round;
1198
+
1199
+ function getCssDimensions(element) {
1200
+ const css = getComputedStyle$1(element);
1201
+ let width = parseFloat(css.width);
1202
+ let height = parseFloat(css.height);
1203
+ const offsetWidth = element.offsetWidth;
1204
+ const offsetHeight = element.offsetHeight;
1205
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1206
+ if (shouldFallback) {
1207
+ width = offsetWidth;
1208
+ height = offsetHeight;
1209
+ }
1210
+ return {
1211
+ width,
1212
+ height,
1213
+ fallback: shouldFallback
1214
+ };
1215
+ }
1216
+
1217
+ function getNodeName(node) {
1218
+ return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
1219
+ }
1220
+
1221
+ let uaString;
1222
+ function getUAString() {
1223
+ if (uaString) {
1224
+ return uaString;
1225
+ }
1226
+ const uaData = navigator.userAgentData;
1227
+ if (uaData && Array.isArray(uaData.brands)) {
1228
+ uaString = uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
1229
+ return uaString;
1230
+ }
1231
+ return navigator.userAgent;
1232
+ }
1233
+
1234
+ function isHTMLElement(value) {
1235
+ return value instanceof getWindow(value).HTMLElement;
1236
+ }
1237
+ function isElement(value) {
1238
+ return value instanceof getWindow(value).Element;
1239
+ }
1240
+ function isNode(value) {
1241
+ return value instanceof getWindow(value).Node;
1242
+ }
1243
+ function isShadowRoot(node) {
1244
+ // Browsers without `ShadowRoot` support.
1245
+ if (typeof ShadowRoot === 'undefined') {
1246
+ return false;
1247
+ }
1248
+ const OwnElement = getWindow(node).ShadowRoot;
1249
+ return node instanceof OwnElement || node instanceof ShadowRoot;
1250
+ }
1251
+ function isOverflowElement(element) {
1252
+ const {
1253
+ overflow,
1254
+ overflowX,
1255
+ overflowY,
1256
+ display
1257
+ } = getComputedStyle$1(element);
1258
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
1259
+ }
1260
+ function isTableElement(element) {
1261
+ return ['table', 'td', 'th'].includes(getNodeName(element));
1262
+ }
1263
+ function isContainingBlock(element) {
1264
+ // TODO: Try to use feature detection here instead.
1265
+ const isFirefox = /firefox/i.test(getUAString());
1266
+ const css = getComputedStyle$1(element);
1267
+ const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
1268
+
1269
+ // This is non-exhaustive but covers the most common CSS properties that
1270
+ // create a containing block.
1271
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1272
+ return css.transform !== 'none' || css.perspective !== 'none' || (backdropFilter ? backdropFilter !== 'none' : false) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => {
1273
+ // Add type check for old browsers.
1274
+ const contain = css.contain;
1275
+ return contain != null ? contain.includes(value) : false;
1276
+ });
1277
+ }
1278
+ function isLayoutViewport() {
1279
+ // TODO: Try to use feature detection here instead. Feature detection for
1280
+ // this can fail in various ways, making the userAgent check the most:
1281
+ // reliable:
1282
+ // • Always-visible scrollbar or not
1283
+ // • Width of <html>
1284
+
1285
+ // Not Safari.
1286
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
1287
+ }
1288
+ function isLastTraversableNode(node) {
1289
+ return ['html', 'body', '#document'].includes(getNodeName(node));
1290
+ }
1291
+
1292
+ function unwrapElement(element) {
1293
+ return !isElement(element) ? element.contextElement : element;
1294
+ }
1295
+
1296
+ const FALLBACK_SCALE = {
1297
+ x: 1,
1298
+ y: 1
1299
+ };
1300
+ function getScale(element) {
1301
+ const domElement = unwrapElement(element);
1302
+ if (!isHTMLElement(domElement)) {
1303
+ return FALLBACK_SCALE;
1304
+ }
1305
+ const rect = domElement.getBoundingClientRect();
1306
+ const {
1307
+ width,
1308
+ height,
1309
+ fallback
1310
+ } = getCssDimensions(domElement);
1311
+ let x = (fallback ? round(rect.width) : rect.width) / width;
1312
+ let y = (fallback ? round(rect.height) : rect.height) / height;
1313
+
1314
+ // 0, NaN, or Infinity should always fallback to 1.
1315
+
1316
+ if (!x || !Number.isFinite(x)) {
1317
+ x = 1;
1318
+ }
1319
+ if (!y || !Number.isFinite(y)) {
1320
+ y = 1;
1321
+ }
1322
+ return {
1323
+ x,
1324
+ y
1325
+ };
1326
+ }
1327
+
1328
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1329
+ var _win$visualViewport, _win$visualViewport2;
1330
+ if (includeScale === void 0) {
1331
+ includeScale = false;
1332
+ }
1333
+ if (isFixedStrategy === void 0) {
1334
+ isFixedStrategy = false;
1335
+ }
1336
+ const clientRect = element.getBoundingClientRect();
1337
+ const domElement = unwrapElement(element);
1338
+ let scale = FALLBACK_SCALE;
1339
+ if (includeScale) {
1340
+ if (offsetParent) {
1341
+ if (isElement(offsetParent)) {
1342
+ scale = getScale(offsetParent);
1343
+ }
1344
+ } else {
1345
+ scale = getScale(element);
1346
+ }
1347
+ }
1348
+ const win = domElement ? getWindow(domElement) : window;
1349
+ const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
1350
+ let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale.x;
1351
+ let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale.y;
1352
+ let width = clientRect.width / scale.x;
1353
+ let height = clientRect.height / scale.y;
1354
+ if (domElement) {
1355
+ const win = getWindow(domElement);
1356
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1357
+ let currentIFrame = win.frameElement;
1358
+ while (currentIFrame && offsetParent && offsetWin !== win) {
1359
+ const iframeScale = getScale(currentIFrame);
1360
+ const iframeRect = currentIFrame.getBoundingClientRect();
1361
+ const css = getComputedStyle(currentIFrame);
1362
+ iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1363
+ iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1364
+ x *= iframeScale.x;
1365
+ y *= iframeScale.y;
1366
+ width *= iframeScale.x;
1367
+ height *= iframeScale.y;
1368
+ x += iframeRect.x;
1369
+ y += iframeRect.y;
1370
+ currentIFrame = getWindow(currentIFrame).frameElement;
1371
+ }
1372
+ }
1373
+ return {
1374
+ width,
1375
+ height,
1376
+ top: y,
1377
+ right: x + width,
1378
+ bottom: y + height,
1379
+ left: x,
1380
+ x,
1381
+ y
1382
+ };
1383
+ }
1384
+
1385
+ function getDocumentElement(node) {
1386
+ return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
1387
+ }
1388
+
1389
+ function getNodeScroll(element) {
1390
+ if (isElement(element)) {
1391
+ return {
1392
+ scrollLeft: element.scrollLeft,
1393
+ scrollTop: element.scrollTop
1394
+ };
1395
+ }
1396
+ return {
1397
+ scrollLeft: element.pageXOffset,
1398
+ scrollTop: element.pageYOffset
1399
+ };
1400
+ }
1401
+
1402
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1403
+ let {
1404
+ rect,
1405
+ offsetParent,
1406
+ strategy
1407
+ } = _ref;
1408
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1409
+ const documentElement = getDocumentElement(offsetParent);
1410
+ if (offsetParent === documentElement) {
1411
+ return rect;
1412
+ }
1413
+ let scroll = {
1414
+ scrollLeft: 0,
1415
+ scrollTop: 0
1416
+ };
1417
+ let scale = {
1418
+ x: 1,
1419
+ y: 1
1420
+ };
1421
+ const offsets = {
1422
+ x: 0,
1423
+ y: 0
1424
+ };
1425
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
1426
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1427
+ scroll = getNodeScroll(offsetParent);
1428
+ }
1429
+ if (isHTMLElement(offsetParent)) {
1430
+ const offsetRect = getBoundingClientRect(offsetParent);
1431
+ scale = getScale(offsetParent);
1432
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1433
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1434
+ }
1435
+ }
1436
+ return {
1437
+ width: rect.width * scale.x,
1438
+ height: rect.height * scale.y,
1439
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
1440
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
1441
+ };
1442
+ }
1443
+
1444
+ function getWindowScrollBarX(element) {
1445
+ // If <html> has a CSS width greater than the viewport, then this will be
1446
+ // incorrect for RTL.
1447
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
1448
+ }
1449
+
1450
+ // Gets the entire size of the scrollable document area, even extending outside
1451
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1452
+ function getDocumentRect(element) {
1453
+ const html = getDocumentElement(element);
1454
+ const scroll = getNodeScroll(element);
1455
+ const body = element.ownerDocument.body;
1456
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1457
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1458
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1459
+ const y = -scroll.scrollTop;
1460
+ if (getComputedStyle$1(body).direction === 'rtl') {
1461
+ x += max(html.clientWidth, body.clientWidth) - width;
1462
+ }
1463
+ return {
1464
+ width,
1465
+ height,
1466
+ x,
1467
+ y
1468
+ };
1469
+ }
1470
+
1471
+ function getParentNode(node) {
1472
+ if (getNodeName(node) === 'html') {
1473
+ return node;
1474
+ }
1475
+ const result =
1476
+ // Step into the shadow DOM of the parent of a slotted node.
1477
+ node.assignedSlot ||
1478
+ // DOM Element detected.
1479
+ node.parentNode ||
1480
+ // ShadowRoot detected.
1481
+ isShadowRoot(node) && node.host ||
1482
+ // Fallback.
1483
+ getDocumentElement(node);
1484
+ return isShadowRoot(result) ? result.host : result;
1485
+ }
1486
+
1487
+ function getNearestOverflowAncestor(node) {
1488
+ const parentNode = getParentNode(node);
1489
+ if (isLastTraversableNode(parentNode)) {
1490
+ // `getParentNode` will never return a `Document` due to the fallback
1491
+ // check, so it's either the <html> or <body> element.
1492
+ return parentNode.ownerDocument.body;
1493
+ }
1494
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1495
+ return parentNode;
1496
+ }
1497
+ return getNearestOverflowAncestor(parentNode);
1498
+ }
1499
+
1500
+ function getOverflowAncestors(node, list) {
1501
+ var _node$ownerDocument;
1502
+ if (list === void 0) {
1503
+ list = [];
1504
+ }
1505
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1506
+ const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
1507
+ const win = getWindow(scrollableAncestor);
1508
+ if (isBody) {
1509
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
1510
+ }
1511
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
1512
+ }
1513
+
1514
+ function getViewportRect(element, strategy) {
1515
+ const win = getWindow(element);
1516
+ const html = getDocumentElement(element);
1517
+ const visualViewport = win.visualViewport;
1518
+ let width = html.clientWidth;
1519
+ let height = html.clientHeight;
1520
+ let x = 0;
1521
+ let y = 0;
1522
+ if (visualViewport) {
1523
+ width = visualViewport.width;
1524
+ height = visualViewport.height;
1525
+ const layoutViewport = isLayoutViewport();
1526
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
1527
+ x = visualViewport.offsetLeft;
1528
+ y = visualViewport.offsetTop;
1529
+ }
1530
+ }
1531
+ return {
1532
+ width,
1533
+ height,
1534
+ x,
1535
+ y
1536
+ };
1537
+ }
1538
+
1539
+ // Returns the inner client rect, subtracting scrollbars if present.
1540
+ function getInnerBoundingClientRect(element, strategy) {
1541
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1542
+ const top = clientRect.top + element.clientTop;
1543
+ const left = clientRect.left + element.clientLeft;
1544
+ const scale = isHTMLElement(element) ? getScale(element) : {
1545
+ x: 1,
1546
+ y: 1
1547
+ };
1548
+ const width = element.clientWidth * scale.x;
1549
+ const height = element.clientHeight * scale.y;
1550
+ const x = left * scale.x;
1551
+ const y = top * scale.y;
1552
+ return {
1553
+ width,
1554
+ height,
1555
+ x,
1556
+ y
1557
+ };
1558
+ }
1559
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1560
+ if (clippingAncestor === 'viewport') {
1561
+ return rectToClientRect(getViewportRect(element, strategy));
1562
+ }
1563
+ if (isElement(clippingAncestor)) {
1564
+ return rectToClientRect(getInnerBoundingClientRect(clippingAncestor, strategy));
1565
+ }
1566
+ return rectToClientRect(getDocumentRect(getDocumentElement(element)));
1567
+ }
1568
+
1569
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1570
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1571
+ // of the given element up the tree.
1572
+ function getClippingElementAncestors(element, cache) {
1573
+ const cachedResult = cache.get(element);
1574
+ if (cachedResult) {
1575
+ return cachedResult;
1576
+ }
1577
+ let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
1578
+ let currentContainingBlockComputedStyle = null;
1579
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1580
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1581
+
1582
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1583
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1584
+ const computedStyle = getComputedStyle$1(currentNode);
1585
+ const containingBlock = isContainingBlock(currentNode);
1586
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
1587
+ if (shouldDropCurrentNode) {
1588
+ // Drop non-containing blocks.
1589
+ result = result.filter(ancestor => ancestor !== currentNode);
1590
+ } else {
1591
+ // Record last containing block for next iteration.
1592
+ currentContainingBlockComputedStyle = computedStyle;
1593
+ }
1594
+ currentNode = getParentNode(currentNode);
1595
+ }
1596
+ cache.set(element, result);
1597
+ return result;
1598
+ }
1599
+
1600
+ // Gets the maximum area that the element is visible in due to any number of
1601
+ // clipping ancestors.
1602
+ function getClippingRect(_ref) {
1603
+ let {
1604
+ element,
1605
+ boundary,
1606
+ rootBoundary,
1607
+ strategy
1608
+ } = _ref;
1609
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
1610
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1611
+ const firstClippingAncestor = clippingAncestors[0];
1612
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1613
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1614
+ accRect.top = max(rect.top, accRect.top);
1615
+ accRect.right = min(rect.right, accRect.right);
1616
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1617
+ accRect.left = max(rect.left, accRect.left);
1618
+ return accRect;
1619
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1620
+ return {
1621
+ width: clippingRect.right - clippingRect.left,
1622
+ height: clippingRect.bottom - clippingRect.top,
1623
+ x: clippingRect.left,
1624
+ y: clippingRect.top
1625
+ };
1626
+ }
1627
+
1628
+ function getDimensions(element) {
1629
+ if (isHTMLElement(element)) {
1630
+ return getCssDimensions(element);
1631
+ }
1632
+ return element.getBoundingClientRect();
1633
+ }
1634
+
1635
+ function getTrueOffsetParent(element) {
1636
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1637
+ return null;
1638
+ }
1639
+ return element.offsetParent;
1640
+ }
1641
+ function getContainingBlock(element) {
1642
+ let currentNode = getParentNode(element);
1643
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1644
+ if (isContainingBlock(currentNode)) {
1645
+ return currentNode;
1646
+ } else {
1647
+ currentNode = getParentNode(currentNode);
1648
+ }
1649
+ }
1650
+ return null;
1651
+ }
1652
+
1653
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1654
+ // such as table ancestors and cross browser bugs.
1655
+ function getOffsetParent(element) {
1656
+ const window = getWindow(element);
1657
+ let offsetParent = getTrueOffsetParent(element);
1658
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
1659
+ offsetParent = getTrueOffsetParent(offsetParent);
1660
+ }
1661
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
1662
+ return window;
1663
+ }
1664
+ return offsetParent || getContainingBlock(element) || window;
1665
+ }
1666
+
1667
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1668
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1669
+ const documentElement = getDocumentElement(offsetParent);
1670
+ const rect = getBoundingClientRect(element, true, strategy === 'fixed', offsetParent);
1671
+ let scroll = {
1672
+ scrollLeft: 0,
1673
+ scrollTop: 0
1674
+ };
1675
+ const offsets = {
1676
+ x: 0,
1677
+ y: 0
1678
+ };
1679
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
1680
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1681
+ scroll = getNodeScroll(offsetParent);
1682
+ }
1683
+ if (isHTMLElement(offsetParent)) {
1684
+ const offsetRect = getBoundingClientRect(offsetParent, true);
1685
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1686
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1687
+ } else if (documentElement) {
1688
+ offsets.x = getWindowScrollBarX(documentElement);
1689
+ }
1690
+ }
1691
+ return {
1692
+ x: rect.left + scroll.scrollLeft - offsets.x,
1693
+ y: rect.top + scroll.scrollTop - offsets.y,
1694
+ width: rect.width,
1695
+ height: rect.height
1696
+ };
1697
+ }
1698
+
1699
+ const platform = {
1700
+ getClippingRect,
1701
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1702
+ isElement,
1703
+ getDimensions,
1704
+ getOffsetParent,
1705
+ getDocumentElement,
1706
+ getScale,
1707
+ async getElementRects(_ref) {
1708
+ let {
1709
+ reference,
1710
+ floating,
1711
+ strategy
1712
+ } = _ref;
1713
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1714
+ const getDimensionsFn = this.getDimensions;
1715
+ return {
1716
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
1717
+ floating: {
1718
+ x: 0,
1719
+ y: 0,
1720
+ ...(await getDimensionsFn(floating))
1721
+ }
1722
+ };
1723
+ },
1724
+ getClientRects: element => Array.from(element.getClientRects()),
1725
+ isRTL: element => getComputedStyle$1(element).direction === 'rtl'
1726
+ };
1727
+
1728
+ /**
1729
+ * Automatically updates the position of the floating element when necessary.
1730
+ * @see https://floating-ui.com/docs/autoUpdate
1731
+ */
1732
+ function autoUpdate(reference, floating, update, options) {
1733
+ if (options === void 0) {
1734
+ options = {};
1735
+ }
1736
+ const {
1737
+ ancestorScroll: _ancestorScroll = true,
1738
+ ancestorResize = true,
1739
+ elementResize = true,
1740
+ animationFrame = false
1741
+ } = options;
1742
+ const ancestorScroll = _ancestorScroll && !animationFrame;
1743
+ const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
1744
+ ancestors.forEach(ancestor => {
1745
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1746
+ passive: true
1747
+ });
1748
+ ancestorResize && ancestor.addEventListener('resize', update);
1749
+ });
1750
+ let observer = null;
1751
+ if (elementResize) {
1752
+ let initialUpdate = true;
1753
+ observer = new ResizeObserver(() => {
1754
+ if (!initialUpdate) {
1755
+ update();
1756
+ }
1757
+ initialUpdate = false;
1758
+ });
1759
+ isElement(reference) && !animationFrame && observer.observe(reference);
1760
+ if (!isElement(reference) && reference.contextElement && !animationFrame) {
1761
+ observer.observe(reference.contextElement);
1762
+ }
1763
+ observer.observe(floating);
1764
+ }
1765
+ let frameId;
1766
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1767
+ if (animationFrame) {
1768
+ frameLoop();
1769
+ }
1770
+ function frameLoop() {
1771
+ const nextRefRect = getBoundingClientRect(reference);
1772
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1773
+ update();
1774
+ }
1775
+ prevRefRect = nextRefRect;
1776
+ frameId = requestAnimationFrame(frameLoop);
1777
+ }
1778
+ update();
1779
+ return () => {
1780
+ var _observer;
1781
+ ancestors.forEach(ancestor => {
1782
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1783
+ ancestorResize && ancestor.removeEventListener('resize', update);
1784
+ });
1785
+ (_observer = observer) == null ? void 0 : _observer.disconnect();
1786
+ observer = null;
1787
+ if (animationFrame) {
1788
+ cancelAnimationFrame(frameId);
1789
+ }
1790
+ };
1791
+ }
1792
+
1793
+ /**
1794
+ * Computes the `x` and `y` coordinates that will place the floating element
1795
+ * next to a reference element when it is given a certain CSS positioning
1796
+ * strategy.
1797
+ */
1798
+ const computePosition = (reference, floating, options) => {
1799
+ // This caches the expensive `getClippingElementAncestors` function so that
1800
+ // multiple lifecycle resets re-use the same result. It only lives for a
1801
+ // single call. If other functions become expensive, we can add them as well.
1802
+ const cache = new Map();
1803
+ const mergedOptions = {
1804
+ platform,
1805
+ ...options
1806
+ };
1807
+ const platformWithCache = {
1808
+ ...mergedOptions.platform,
1809
+ _c: cache
1810
+ };
1811
+ return computePosition$1(reference, floating, {
1812
+ ...mergedOptions,
1813
+ platform: platformWithCache
1814
+ });
1815
+ };
1816
+
1817
+ function ye(e, t) {
1818
+ for (const o in t)
1819
+ Object.prototype.hasOwnProperty.call(t, o) && (typeof t[o] == "object" && e[o] ? ye(e[o], t[o]) : e[o] = t[o]);
1820
+ }
1821
+ const h = {
1822
+ // Disable popper components
1823
+ disabled: !1,
1824
+ // Default position offset along main axis (px)
1825
+ distance: 5,
1826
+ // Default position offset along cross axis (px)
1827
+ skidding: 0,
1828
+ // Default container where the tooltip will be appended
1829
+ container: "body",
1830
+ // Element used to compute position and size boundaries
1831
+ boundary: void 0,
1832
+ // Skip delay & CSS transitions when another popper is shown, so that the popper appear to instanly move to the new position.
1833
+ instantMove: !1,
1834
+ // Auto destroy tooltip DOM nodes (ms)
1835
+ disposeTimeout: 150,
1836
+ // Triggers on the popper itself
1837
+ popperTriggers: [],
1838
+ // Positioning strategy
1839
+ strategy: "absolute",
1840
+ // Prevent overflow
1841
+ preventOverflow: !0,
1842
+ // Flip to the opposite placement if needed
1843
+ flip: !0,
1844
+ // Shift on the cross axis to prevent the popper from overflowing
1845
+ shift: !0,
1846
+ // Overflow padding (px)
1847
+ overflowPadding: 0,
1848
+ // Arrow padding (px)
1849
+ arrowPadding: 0,
1850
+ // Compute arrow overflow (useful to hide it)
1851
+ arrowOverflow: !0,
1852
+ /**
1853
+ * By default, compute autohide on 'click'.
1854
+ */
1855
+ autoHideOnMousedown: !1,
1856
+ // Themes
1857
+ themes: {
1858
+ tooltip: {
1859
+ // Default tooltip placement relative to target element
1860
+ placement: "top",
1861
+ // Default events that trigger the tooltip
1862
+ triggers: ["hover", "focus", "touch"],
1863
+ // Close tooltip on click on tooltip target
1864
+ hideTriggers: (e) => [...e, "click"],
1865
+ // Delay (ms)
1866
+ delay: {
1867
+ show: 200,
1868
+ hide: 0
1869
+ },
1870
+ // Update popper on content resize
1871
+ handleResize: !1,
1872
+ // Enable HTML content in directive
1873
+ html: !1,
1874
+ // Displayed when tooltip content is loading
1875
+ loadingContent: "..."
1876
+ },
1877
+ dropdown: {
1878
+ // Default dropdown placement relative to target element
1879
+ placement: "bottom",
1880
+ // Default events that trigger the dropdown
1881
+ triggers: ["click"],
1882
+ // Delay (ms)
1883
+ delay: 0,
1884
+ // Update popper on content resize
1885
+ handleResize: !0,
1886
+ // Hide on clock outside
1887
+ autoHide: !0
1888
+ },
1889
+ menu: {
1890
+ $extend: "dropdown",
1891
+ triggers: ["hover", "focus"],
1892
+ popperTriggers: ["hover"],
1893
+ delay: {
1894
+ show: 0,
1895
+ hide: 400
1896
+ }
1897
+ }
1898
+ }
1899
+ };
1900
+ function S(e, t) {
1901
+ let o = h.themes[e] || {}, i;
1902
+ do
1903
+ i = o[t], typeof i > "u" ? o.$extend ? o = h.themes[o.$extend] || {} : (o = null, i = h[t]) : o = null;
1904
+ while (o);
1905
+ return i;
1906
+ }
1907
+ function Ze(e) {
1908
+ const t = [e];
1909
+ let o = h.themes[e] || {};
1910
+ do
1911
+ o.$extend && !o.$resetCss ? (t.push(o.$extend), o = h.themes[o.$extend] || {}) : o = null;
1912
+ while (o);
1913
+ return t.map((i) => `v-popper--theme-${i}`);
1914
+ }
1915
+ function re(e) {
1916
+ const t = [e];
1917
+ let o = h.themes[e] || {};
1918
+ do
1919
+ o.$extend ? (t.push(o.$extend), o = h.themes[o.$extend] || {}) : o = null;
1920
+ while (o);
1921
+ return t;
1922
+ }
1923
+ let $ = !1;
1924
+ if (typeof window < "u") {
1925
+ $ = !1;
1926
+ try {
1927
+ const e = Object.defineProperty({}, "passive", {
1928
+ get() {
1929
+ $ = !0;
1930
+ }
1931
+ });
1932
+ window.addEventListener("test", null, e);
1933
+ } catch {
1934
+ }
1935
+ }
1936
+ let _e = !1;
1937
+ typeof window < "u" && typeof navigator < "u" && (_e = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);
1938
+ const Te = ["auto", "top", "bottom", "left", "right"].reduce((e, t) => e.concat([
1939
+ t,
1940
+ `${t}-start`,
1941
+ `${t}-end`
1942
+ ]), []), pe = {
1943
+ hover: "mouseenter",
1944
+ focus: "focus",
1945
+ click: "click",
1946
+ touch: "touchstart",
1947
+ pointer: "pointerdown"
1948
+ }, ae = {
1949
+ hover: "mouseleave",
1950
+ focus: "blur",
1951
+ click: "click",
1952
+ touch: "touchend",
1953
+ pointer: "pointerup"
1954
+ };
1955
+ function de(e, t) {
1956
+ const o = e.indexOf(t);
1957
+ o !== -1 && e.splice(o, 1);
1958
+ }
1959
+ function G() {
1960
+ return new Promise((e) => requestAnimationFrame(() => {
1961
+ requestAnimationFrame(e);
1962
+ }));
1963
+ }
1964
+ const d = [];
1965
+ let g = null;
1966
+ const le = {};
1967
+ function he(e) {
1968
+ let t = le[e];
1969
+ return t || (t = le[e] = []), t;
1970
+ }
1971
+ let Y = function() {
1972
+ };
1973
+ typeof window < "u" && (Y = window.Element);
1974
+ function n(e) {
1975
+ return function(t) {
1976
+ return S(t.theme, e);
1977
+ };
1978
+ }
1979
+ const q = "__floating-vue__popper", Q = () => defineComponent({
1980
+ name: "VPopper",
1981
+ provide() {
1982
+ return {
1983
+ [q]: {
1984
+ parentPopper: this
1985
+ }
1986
+ };
1987
+ },
1988
+ inject: {
1989
+ [q]: { default: null }
1990
+ },
1991
+ props: {
1992
+ theme: {
1993
+ type: String,
1994
+ required: !0
1995
+ },
1996
+ targetNodes: {
1997
+ type: Function,
1998
+ required: !0
1999
+ },
2000
+ referenceNode: {
2001
+ type: Function,
2002
+ default: null
2003
+ },
2004
+ popperNode: {
2005
+ type: Function,
2006
+ required: !0
2007
+ },
2008
+ shown: {
2009
+ type: Boolean,
2010
+ default: !1
2011
+ },
2012
+ showGroup: {
2013
+ type: String,
2014
+ default: null
2015
+ },
2016
+ // eslint-disable-next-line vue/require-prop-types
2017
+ ariaId: {
2018
+ default: null
2019
+ },
2020
+ disabled: {
2021
+ type: Boolean,
2022
+ default: n("disabled")
2023
+ },
2024
+ positioningDisabled: {
2025
+ type: Boolean,
2026
+ default: n("positioningDisabled")
2027
+ },
2028
+ placement: {
2029
+ type: String,
2030
+ default: n("placement"),
2031
+ validator: (e) => Te.includes(e)
2032
+ },
2033
+ delay: {
2034
+ type: [String, Number, Object],
2035
+ default: n("delay")
2036
+ },
2037
+ distance: {
2038
+ type: [Number, String],
2039
+ default: n("distance")
2040
+ },
2041
+ skidding: {
2042
+ type: [Number, String],
2043
+ default: n("skidding")
2044
+ },
2045
+ triggers: {
2046
+ type: Array,
2047
+ default: n("triggers")
2048
+ },
2049
+ showTriggers: {
2050
+ type: [Array, Function],
2051
+ default: n("showTriggers")
2052
+ },
2053
+ hideTriggers: {
2054
+ type: [Array, Function],
2055
+ default: n("hideTriggers")
2056
+ },
2057
+ popperTriggers: {
2058
+ type: Array,
2059
+ default: n("popperTriggers")
2060
+ },
2061
+ popperShowTriggers: {
2062
+ type: [Array, Function],
2063
+ default: n("popperShowTriggers")
2064
+ },
2065
+ popperHideTriggers: {
2066
+ type: [Array, Function],
2067
+ default: n("popperHideTriggers")
2068
+ },
2069
+ container: {
2070
+ type: [String, Object, Y, Boolean],
2071
+ default: n("container")
2072
+ },
2073
+ boundary: {
2074
+ type: [String, Y],
2075
+ default: n("boundary")
2076
+ },
2077
+ strategy: {
2078
+ type: String,
2079
+ validator: (e) => ["absolute", "fixed"].includes(e),
2080
+ default: n("strategy")
2081
+ },
2082
+ autoHide: {
2083
+ type: [Boolean, Function],
2084
+ default: n("autoHide")
2085
+ },
2086
+ handleResize: {
2087
+ type: Boolean,
2088
+ default: n("handleResize")
2089
+ },
2090
+ instantMove: {
2091
+ type: Boolean,
2092
+ default: n("instantMove")
2093
+ },
2094
+ eagerMount: {
2095
+ type: Boolean,
2096
+ default: n("eagerMount")
2097
+ },
2098
+ popperClass: {
2099
+ type: [String, Array, Object],
2100
+ default: n("popperClass")
2101
+ },
2102
+ computeTransformOrigin: {
2103
+ type: Boolean,
2104
+ default: n("computeTransformOrigin")
2105
+ },
2106
+ /**
2107
+ * @deprecated
2108
+ */
2109
+ autoMinSize: {
2110
+ type: Boolean,
2111
+ default: n("autoMinSize")
2112
+ },
2113
+ autoSize: {
2114
+ type: [Boolean, String],
2115
+ default: n("autoSize")
2116
+ },
2117
+ /**
2118
+ * @deprecated
2119
+ */
2120
+ autoMaxSize: {
2121
+ type: Boolean,
2122
+ default: n("autoMaxSize")
2123
+ },
2124
+ autoBoundaryMaxSize: {
2125
+ type: Boolean,
2126
+ default: n("autoBoundaryMaxSize")
2127
+ },
2128
+ preventOverflow: {
2129
+ type: Boolean,
2130
+ default: n("preventOverflow")
2131
+ },
2132
+ overflowPadding: {
2133
+ type: [Number, String],
2134
+ default: n("overflowPadding")
2135
+ },
2136
+ arrowPadding: {
2137
+ type: [Number, String],
2138
+ default: n("arrowPadding")
2139
+ },
2140
+ arrowOverflow: {
2141
+ type: Boolean,
2142
+ default: n("arrowOverflow")
2143
+ },
2144
+ flip: {
2145
+ type: Boolean,
2146
+ default: n("flip")
2147
+ },
2148
+ shift: {
2149
+ type: Boolean,
2150
+ default: n("shift")
2151
+ },
2152
+ shiftCrossAxis: {
2153
+ type: Boolean,
2154
+ default: n("shiftCrossAxis")
2155
+ },
2156
+ noAutoFocus: {
2157
+ type: Boolean,
2158
+ default: n("noAutoFocus")
2159
+ },
2160
+ disposeTimeout: {
2161
+ type: Number,
2162
+ default: n("disposeTimeout")
2163
+ }
2164
+ },
2165
+ emits: {
2166
+ show: () => !0,
2167
+ hide: () => !0,
2168
+ "update:shown": (e) => !0,
2169
+ "apply-show": () => !0,
2170
+ "apply-hide": () => !0,
2171
+ "close-group": () => !0,
2172
+ "close-directive": () => !0,
2173
+ "auto-hide": () => !0,
2174
+ resize: () => !0
2175
+ },
2176
+ data() {
2177
+ return {
2178
+ isShown: !1,
2179
+ isMounted: !1,
2180
+ skipTransition: !1,
2181
+ classes: {
2182
+ showFrom: !1,
2183
+ showTo: !1,
2184
+ hideFrom: !1,
2185
+ hideTo: !0
2186
+ },
2187
+ result: {
2188
+ x: 0,
2189
+ y: 0,
2190
+ placement: "",
2191
+ strategy: this.strategy,
2192
+ arrow: {
2193
+ x: 0,
2194
+ y: 0,
2195
+ centerOffset: 0
2196
+ },
2197
+ transformOrigin: null
2198
+ },
2199
+ randomId: `popper_${[Math.random(), Date.now()].map((e) => e.toString(36).substring(2, 10)).join("_")}`,
2200
+ shownChildren: /* @__PURE__ */ new Set(),
2201
+ lastAutoHide: !0,
2202
+ pendingHide: !1,
2203
+ containsGlobalTarget: !1,
2204
+ isDisposed: !0,
2205
+ mouseDownContains: !1
2206
+ };
2207
+ },
2208
+ computed: {
2209
+ popperId() {
2210
+ return this.ariaId != null ? this.ariaId : this.randomId;
2211
+ },
2212
+ shouldMountContent() {
2213
+ return this.eagerMount || this.isMounted;
2214
+ },
2215
+ slotData() {
2216
+ return {
2217
+ popperId: this.popperId,
2218
+ isShown: this.isShown,
2219
+ shouldMountContent: this.shouldMountContent,
2220
+ skipTransition: this.skipTransition,
2221
+ autoHide: typeof this.autoHide == "function" ? this.lastAutoHide : this.autoHide,
2222
+ show: this.show,
2223
+ hide: this.hide,
2224
+ handleResize: this.handleResize,
2225
+ onResize: this.onResize,
2226
+ classes: {
2227
+ ...this.classes,
2228
+ popperClass: this.popperClass
2229
+ },
2230
+ result: this.positioningDisabled ? null : this.result,
2231
+ attrs: this.$attrs
2232
+ };
2233
+ },
2234
+ parentPopper() {
2235
+ var e;
2236
+ return (e = this[q]) == null ? void 0 : e.parentPopper;
2237
+ },
2238
+ hasPopperShowTriggerHover() {
2239
+ var e, t;
2240
+ return ((e = this.popperTriggers) == null ? void 0 : e.includes("hover")) || ((t = this.popperShowTriggers) == null ? void 0 : t.includes("hover"));
2241
+ }
2242
+ },
2243
+ watch: {
2244
+ shown: "$_autoShowHide",
2245
+ disabled(e) {
2246
+ e ? this.dispose() : this.init();
2247
+ },
2248
+ async container() {
2249
+ this.isShown && (this.$_ensureTeleport(), await this.$_computePosition());
2250
+ },
2251
+ triggers: {
2252
+ handler: "$_refreshListeners",
2253
+ deep: !0
2254
+ },
2255
+ positioningDisabled: "$_refreshListeners",
2256
+ ...[
2257
+ "placement",
2258
+ "distance",
2259
+ "skidding",
2260
+ "boundary",
2261
+ "strategy",
2262
+ "overflowPadding",
2263
+ "arrowPadding",
2264
+ "preventOverflow",
2265
+ "shift",
2266
+ "shiftCrossAxis",
2267
+ "flip"
2268
+ ].reduce((e, t) => (e[t] = "$_computePosition", e), {})
2269
+ },
2270
+ created() {
2271
+ this.autoMinSize && console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'), this.autoMaxSize && console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.");
2272
+ },
2273
+ mounted() {
2274
+ this.init(), this.$_detachPopperNode();
2275
+ },
2276
+ activated() {
2277
+ this.$_autoShowHide();
2278
+ },
2279
+ deactivated() {
2280
+ this.hide();
2281
+ },
2282
+ beforeUnmount() {
2283
+ this.dispose();
2284
+ },
2285
+ methods: {
2286
+ show({ event: e = null, skipDelay: t = !1, force: o = !1 } = {}) {
2287
+ var i, s;
2288
+ (i = this.parentPopper) != null && i.lockedChild && this.parentPopper.lockedChild !== this || (this.pendingHide = !1, (o || !this.disabled) && (((s = this.parentPopper) == null ? void 0 : s.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = !0, requestAnimationFrame(() => {
2289
+ this.$_showFrameLocked = !1;
2290
+ })), this.$emit("update:shown", !0));
2291
+ },
2292
+ hide({ event: e = null, skipDelay: t = !1 } = {}) {
2293
+ var o;
2294
+ if (!this.$_hideInProgress) {
2295
+ if (this.shownChildren.size > 0) {
2296
+ this.pendingHide = !0;
2297
+ return;
2298
+ }
2299
+ if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) {
2300
+ this.parentPopper && (this.parentPopper.lockedChild = this, clearTimeout(this.parentPopper.lockedChildTimer), this.parentPopper.lockedChildTimer = setTimeout(() => {
2301
+ this.parentPopper.lockedChild === this && (this.parentPopper.lockedChild.hide({ skipDelay: t }), this.parentPopper.lockedChild = null);
2302
+ }, 1e3));
2303
+ return;
2304
+ }
2305
+ ((o = this.parentPopper) == null ? void 0 : o.lockedChild) === this && (this.parentPopper.lockedChild = null), this.pendingHide = !1, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", !1);
2306
+ }
2307
+ },
2308
+ init() {
2309
+ var e;
2310
+ this.isDisposed && (this.isDisposed = !1, this.isMounted = !1, this.$_events = [], this.$_preventShow = !1, this.$_referenceNode = ((e = this.referenceNode) == null ? void 0 : e.call(this)) ?? this.$el, this.$_targetNodes = this.targetNodes().filter((t) => t.nodeType === t.ELEMENT_NODE), this.$_popperNode = this.popperNode(), this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner"), this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container"), this.$_swapTargetAttrs("title", "data-original-title"), this.$_detachPopperNode(), this.triggers.length && this.$_addEventListeners(), this.shown && this.show());
2311
+ },
2312
+ dispose() {
2313
+ this.isDisposed || (this.isDisposed = !0, this.$_removeEventListeners(), this.hide({ skipDelay: !0 }), this.$_detachPopperNode(), this.isMounted = !1, this.isShown = !1, this.$_updateParentShownChildren(!1), this.$_swapTargetAttrs("data-original-title", "title"));
2314
+ },
2315
+ async onResize() {
2316
+ this.isShown && (await this.$_computePosition(), this.$emit("resize"));
2317
+ },
2318
+ async $_computePosition() {
2319
+ if (this.isDisposed || this.positioningDisabled)
2320
+ return;
2321
+ const e = {
2322
+ strategy: this.strategy,
2323
+ middleware: []
2324
+ };
2325
+ (this.distance || this.skidding) && e.middleware.push(offset({
2326
+ mainAxis: this.distance,
2327
+ crossAxis: this.skidding
2328
+ }));
2329
+ const t = this.placement.startsWith("auto");
2330
+ if (t ? e.middleware.push(autoPlacement({
2331
+ alignment: this.placement.split("-")[1] ?? ""
2332
+ })) : e.placement = this.placement, this.preventOverflow && (this.shift && e.middleware.push(shift({
2333
+ padding: this.overflowPadding,
2334
+ boundary: this.boundary,
2335
+ crossAxis: this.shiftCrossAxis
2336
+ })), !t && this.flip && e.middleware.push(flip({
2337
+ padding: this.overflowPadding,
2338
+ boundary: this.boundary
2339
+ }))), e.middleware.push(arrow({
2340
+ element: this.$_arrowNode,
2341
+ padding: this.arrowPadding
2342
+ })), this.arrowOverflow && e.middleware.push({
2343
+ name: "arrowOverflow",
2344
+ fn: ({ placement: i, rects: s, middlewareData: r }) => {
2345
+ let p;
2346
+ const { centerOffset: a } = r.arrow;
2347
+ return i.startsWith("top") || i.startsWith("bottom") ? p = Math.abs(a) > s.reference.width / 2 : p = Math.abs(a) > s.reference.height / 2, {
2348
+ data: {
2349
+ overflow: p
2350
+ }
2351
+ };
2352
+ }
2353
+ }), this.autoMinSize || this.autoSize) {
2354
+ const i = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null;
2355
+ e.middleware.push({
2356
+ name: "autoSize",
2357
+ fn: ({ rects: s, placement: r, middlewareData: p }) => {
2358
+ var u;
2359
+ if ((u = p.autoSize) != null && u.skip)
2360
+ return {};
2361
+ let a, l;
2362
+ return r.startsWith("top") || r.startsWith("bottom") ? a = s.reference.width : l = s.reference.height, this.$_innerNode.style[i === "min" ? "minWidth" : i === "max" ? "maxWidth" : "width"] = a != null ? `${a}px` : null, this.$_innerNode.style[i === "min" ? "minHeight" : i === "max" ? "maxHeight" : "height"] = l != null ? `${l}px` : null, {
2363
+ data: {
2364
+ skip: !0
2365
+ },
2366
+ reset: {
2367
+ rects: !0
2368
+ }
2369
+ };
2370
+ }
2371
+ });
2372
+ }
2373
+ (this.autoMaxSize || this.autoBoundaryMaxSize) && (this.$_innerNode.style.maxWidth = null, this.$_innerNode.style.maxHeight = null, e.middleware.push(size({
2374
+ boundary: this.boundary,
2375
+ padding: this.overflowPadding,
2376
+ apply: ({ availableWidth: i, availableHeight: s }) => {
2377
+ this.$_innerNode.style.maxWidth = i != null ? `${i}px` : null, this.$_innerNode.style.maxHeight = s != null ? `${s}px` : null;
2378
+ }
2379
+ })));
2380
+ const o = await computePosition(this.$_referenceNode, this.$_popperNode, e);
2381
+ Object.assign(this.result, {
2382
+ x: o.x,
2383
+ y: o.y,
2384
+ placement: o.placement,
2385
+ strategy: o.strategy,
2386
+ arrow: {
2387
+ ...o.middlewareData.arrow,
2388
+ ...o.middlewareData.arrowOverflow
2389
+ }
2390
+ });
2391
+ },
2392
+ $_scheduleShow(e, t = !1) {
2393
+ if (this.$_updateParentShownChildren(!0), this.$_hideInProgress = !1, clearTimeout(this.$_scheduleTimer), g && this.instantMove && g.instantMove && g !== this.parentPopper) {
2394
+ g.$_applyHide(!0), this.$_applyShow(!0);
2395
+ return;
2396
+ }
2397
+ t ? this.$_applyShow() : this.$_scheduleTimer = setTimeout(this.$_applyShow.bind(this), this.$_computeDelay("show"));
2398
+ },
2399
+ $_scheduleHide(e, t = !1) {
2400
+ if (this.shownChildren.size > 0) {
2401
+ this.pendingHide = !0;
2402
+ return;
2403
+ }
2404
+ this.$_updateParentShownChildren(!1), this.$_hideInProgress = !0, clearTimeout(this.$_scheduleTimer), this.isShown && (g = this), t ? this.$_applyHide() : this.$_scheduleTimer = setTimeout(this.$_applyHide.bind(this), this.$_computeDelay("hide"));
2405
+ },
2406
+ $_computeDelay(e) {
2407
+ const t = this.delay;
2408
+ return parseInt(t && t[e] || t || 0);
2409
+ },
2410
+ async $_applyShow(e = !1) {
2411
+ clearTimeout(this.$_disposeTimer), clearTimeout(this.$_scheduleTimer), this.skipTransition = e, !this.isShown && (this.$_ensureTeleport(), await G(), await this.$_computePosition(), await this.$_applyShowEffect(), this.positioningDisabled || this.$_registerEventListeners([
2412
+ ...getOverflowAncestors(this.$_referenceNode),
2413
+ ...getOverflowAncestors(this.$_popperNode)
2414
+ ], "scroll", () => {
2415
+ this.$_computePosition();
2416
+ }));
2417
+ },
2418
+ async $_applyShowEffect() {
2419
+ if (this.$_hideInProgress)
2420
+ return;
2421
+ if (this.computeTransformOrigin) {
2422
+ const t = this.$_referenceNode.getBoundingClientRect(), o = this.$_popperNode.querySelector(".v-popper__wrapper"), i = o.parentNode.getBoundingClientRect(), s = t.x + t.width / 2 - (i.left + o.offsetLeft), r = t.y + t.height / 2 - (i.top + o.offsetTop);
2423
+ this.result.transformOrigin = `${s}px ${r}px`;
2424
+ }
2425
+ this.isShown = !0, this.$_applyAttrsToTarget({
2426
+ "aria-describedby": this.popperId,
2427
+ "data-popper-shown": ""
2428
+ });
2429
+ const e = this.showGroup;
2430
+ if (e) {
2431
+ let t;
2432
+ for (let o = 0; o < d.length; o++)
2433
+ t = d[o], t.showGroup !== e && (t.hide(), t.$emit("close-group"));
2434
+ }
2435
+ d.push(this), document.body.classList.add("v-popper--some-open");
2436
+ for (const t of re(this.theme))
2437
+ he(t).push(this), document.body.classList.add(`v-popper--some-open--${t}`);
2438
+ this.$emit("apply-show"), this.classes.showFrom = !0, this.classes.showTo = !1, this.classes.hideFrom = !1, this.classes.hideTo = !1, await G(), this.classes.showFrom = !1, this.classes.showTo = !0, this.noAutoFocus || this.$_popperNode.focus();
2439
+ },
2440
+ async $_applyHide(e = !1) {
2441
+ if (this.shownChildren.size > 0) {
2442
+ this.pendingHide = !0, this.$_hideInProgress = !1;
2443
+ return;
2444
+ }
2445
+ if (clearTimeout(this.$_scheduleTimer), !this.isShown)
2446
+ return;
2447
+ this.skipTransition = e, de(d, this), d.length === 0 && document.body.classList.remove("v-popper--some-open");
2448
+ for (const o of re(this.theme)) {
2449
+ const i = he(o);
2450
+ de(i, this), i.length === 0 && document.body.classList.remove(`v-popper--some-open--${o}`);
2451
+ }
2452
+ g === this && (g = null), this.isShown = !1, this.$_applyAttrsToTarget({
2453
+ "aria-describedby": void 0,
2454
+ "data-popper-shown": void 0
2455
+ }), clearTimeout(this.$_disposeTimer);
2456
+ const t = this.disposeTimeout;
2457
+ t !== null && (this.$_disposeTimer = setTimeout(() => {
2458
+ this.$_popperNode && (this.$_detachPopperNode(), this.isMounted = !1);
2459
+ }, t)), this.$_removeEventListeners("scroll"), this.$emit("apply-hide"), this.classes.showFrom = !1, this.classes.showTo = !1, this.classes.hideFrom = !0, this.classes.hideTo = !1, await G(), this.classes.hideFrom = !1, this.classes.hideTo = !0;
2460
+ },
2461
+ $_autoShowHide() {
2462
+ this.shown ? this.show() : this.hide();
2463
+ },
2464
+ $_ensureTeleport() {
2465
+ if (this.isDisposed)
2466
+ return;
2467
+ let e = this.container;
2468
+ if (typeof e == "string" ? e = window.document.querySelector(e) : e === !1 && (e = this.$_targetNodes[0].parentNode), !e)
2469
+ throw new Error("No container for popover: " + this.container);
2470
+ e.appendChild(this.$_popperNode), this.isMounted = !0;
2471
+ },
2472
+ $_addEventListeners() {
2473
+ const e = (o) => {
2474
+ this.isShown && !this.$_hideInProgress || (o.usedByTooltip = !0, !this.$_preventShow && this.show({ event: o }));
2475
+ };
2476
+ this.$_registerTriggerListeners(this.$_targetNodes, pe, this.triggers, this.showTriggers, e), this.$_registerTriggerListeners([this.$_popperNode], pe, this.popperTriggers, this.popperShowTriggers, e);
2477
+ const t = (o) => {
2478
+ o.usedByTooltip || this.hide({ event: o });
2479
+ };
2480
+ this.$_registerTriggerListeners(this.$_targetNodes, ae, this.triggers, this.hideTriggers, t), this.$_registerTriggerListeners([this.$_popperNode], ae, this.popperTriggers, this.popperHideTriggers, t);
2481
+ },
2482
+ $_registerEventListeners(e, t, o) {
2483
+ this.$_events.push({ targetNodes: e, eventType: t, handler: o }), e.forEach((i) => i.addEventListener(t, o, $ ? {
2484
+ passive: !0
2485
+ } : void 0));
2486
+ },
2487
+ $_registerTriggerListeners(e, t, o, i, s) {
2488
+ let r = o;
2489
+ i != null && (r = typeof i == "function" ? i(r) : i), r.forEach((p) => {
2490
+ const a = t[p];
2491
+ a && this.$_registerEventListeners(e, a, s);
2492
+ });
2493
+ },
2494
+ $_removeEventListeners(e) {
2495
+ const t = [];
2496
+ this.$_events.forEach((o) => {
2497
+ const { targetNodes: i, eventType: s, handler: r } = o;
2498
+ !e || e === s ? i.forEach((p) => p.removeEventListener(s, r)) : t.push(o);
2499
+ }), this.$_events = t;
2500
+ },
2501
+ $_refreshListeners() {
2502
+ this.isDisposed || (this.$_removeEventListeners(), this.$_addEventListeners());
2503
+ },
2504
+ $_handleGlobalClose(e, t = !1) {
2505
+ this.$_showFrameLocked || (this.hide({ event: e }), e.closePopover ? this.$emit("close-directive") : this.$emit("auto-hide"), t && (this.$_preventShow = !0, setTimeout(() => {
2506
+ this.$_preventShow = !1;
2507
+ }, 300)));
2508
+ },
2509
+ $_detachPopperNode() {
2510
+ this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode);
2511
+ },
2512
+ $_swapTargetAttrs(e, t) {
2513
+ for (const o of this.$_targetNodes) {
2514
+ const i = o.getAttribute(e);
2515
+ i && (o.removeAttribute(e), o.setAttribute(t, i));
2516
+ }
2517
+ },
2518
+ $_applyAttrsToTarget(e) {
2519
+ for (const t of this.$_targetNodes)
2520
+ for (const o in e) {
2521
+ const i = e[o];
2522
+ i == null ? t.removeAttribute(o) : t.setAttribute(o, i);
2523
+ }
2524
+ },
2525
+ $_updateParentShownChildren(e) {
2526
+ let t = this.parentPopper;
2527
+ for (; t; )
2528
+ e ? t.shownChildren.add(this.randomId) : (t.shownChildren.delete(this.randomId), t.pendingHide && t.hide()), t = t.parentPopper;
2529
+ },
2530
+ $_isAimingPopper() {
2531
+ const e = this.$_referenceNode.getBoundingClientRect();
2532
+ if (y >= e.left && y <= e.right && _ >= e.top && _ <= e.bottom) {
2533
+ const t = this.$_popperNode.getBoundingClientRect(), o = y - c, i = _ - m, r = t.left + t.width / 2 - c + (t.top + t.height / 2) - m + t.width + t.height, p = c + o * r, a = m + i * r;
2534
+ return C(c, m, p, a, t.left, t.top, t.left, t.bottom) || // Left edge
2535
+ C(c, m, p, a, t.left, t.top, t.right, t.top) || // Top edge
2536
+ C(c, m, p, a, t.right, t.top, t.right, t.bottom) || // Right edge
2537
+ C(c, m, p, a, t.left, t.bottom, t.right, t.bottom);
2538
+ }
2539
+ return !1;
2540
+ }
2541
+ },
2542
+ render() {
2543
+ return this.$slots.default(this.slotData);
2544
+ }
2545
+ });
2546
+ if (typeof document < "u" && typeof window < "u") {
2547
+ if (_e) {
2548
+ const e = $ ? {
2549
+ passive: !0,
2550
+ capture: !0
2551
+ } : !0;
2552
+ document.addEventListener("touchstart", (t) => ue(t, !0), e), document.addEventListener("touchend", (t) => fe(t, !0), e);
2553
+ } else
2554
+ window.addEventListener("mousedown", (e) => ue(e, !1), !0), window.addEventListener("click", (e) => fe(e, !1), !0);
2555
+ window.addEventListener("resize", tt);
2556
+ }
2557
+ function ue(e, t) {
2558
+ if (h.autoHideOnMousedown)
2559
+ Pe(e, t);
2560
+ else
2561
+ for (let o = 0; o < d.length; o++) {
2562
+ const i = d[o];
2563
+ try {
2564
+ i.mouseDownContains = i.popperNode().contains(e.target);
2565
+ } catch {
2566
+ }
2567
+ }
2568
+ }
2569
+ function fe(e, t) {
2570
+ h.autoHideOnMousedown || Pe(e, t);
2571
+ }
2572
+ function Pe(e, t) {
2573
+ const o = {};
2574
+ for (let i = d.length - 1; i >= 0; i--) {
2575
+ const s = d[i];
2576
+ try {
2577
+ const r = s.containsGlobalTarget = s.mouseDownContains || s.popperNode().contains(e.target);
2578
+ s.pendingHide = !1, requestAnimationFrame(() => {
2579
+ if (s.pendingHide = !1, !o[s.randomId] && ce(s, r, e)) {
2580
+ if (s.$_handleGlobalClose(e, t), !e.closeAllPopover && e.closePopover && r) {
2581
+ let a = s.parentPopper;
2582
+ for (; a; )
2583
+ o[a.randomId] = !0, a = a.parentPopper;
2584
+ return;
2585
+ }
2586
+ let p = s.parentPopper;
2587
+ for (; p && ce(p, p.containsGlobalTarget, e); ) {
2588
+ p.$_handleGlobalClose(e, t);
2589
+ p = p.parentPopper;
2590
+ }
2591
+ }
2592
+ });
2593
+ } catch {
2594
+ }
2595
+ }
2596
+ }
2597
+ function ce(e, t, o) {
2598
+ return o.closeAllPopover || o.closePopover && t || et(e, o) && !t;
2599
+ }
2600
+ function et(e, t) {
2601
+ if (typeof e.autoHide == "function") {
2602
+ const o = e.autoHide(t);
2603
+ return e.lastAutoHide = o, o;
2604
+ }
2605
+ return e.autoHide;
2606
+ }
2607
+ function tt() {
2608
+ for (let e = 0; e < d.length; e++)
2609
+ d[e].$_computePosition();
2610
+ }
2611
+ function Nt() {
2612
+ for (let e = 0; e < d.length; e++)
2613
+ d[e].hide();
2614
+ }
2615
+ let c = 0, m = 0, y = 0, _ = 0;
2616
+ typeof window < "u" && window.addEventListener("mousemove", (e) => {
2617
+ c = y, m = _, y = e.clientX, _ = e.clientY;
2618
+ }, $ ? {
2619
+ passive: !0
2620
+ } : void 0);
2621
+ function C(e, t, o, i, s, r, p, a) {
2622
+ const l = ((p - s) * (t - r) - (a - r) * (e - s)) / ((a - r) * (o - e) - (p - s) * (i - t)), u = ((o - e) * (t - r) - (i - t) * (e - s)) / ((a - r) * (o - e) - (p - s) * (i - t));
2623
+ return l >= 0 && l <= 1 && u >= 0 && u <= 1;
2624
+ }
2625
+ const ot = {
2626
+ extends: Q()
2627
+ }, B = (e, t) => {
2628
+ const o = e.__vccOpts || e;
2629
+ for (const [i, s] of t)
2630
+ o[i] = s;
2631
+ return o;
2632
+ };
2633
+ function it(e, t, o, i, s, r) {
2634
+ return openBlock(), createElementBlock("div", {
2635
+ ref: "reference",
2636
+ class: normalizeClass(["v-popper", {
2637
+ "v-popper--shown": e.slotData.isShown
2638
+ }])
2639
+ }, [
2640
+ renderSlot(e.$slots, "default", normalizeProps(guardReactiveProps(e.slotData)))
2641
+ ], 2);
2642
+ }
2643
+ const st = /* @__PURE__ */ B(ot, [["render", it]]);
2644
+ function nt() {
2645
+ var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
2646
+ if (t > 0)
2647
+ return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
2648
+ var o = e.indexOf("Trident/");
2649
+ if (o > 0) {
2650
+ var i = e.indexOf("rv:");
2651
+ return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10);
2652
+ }
2653
+ var s = e.indexOf("Edge/");
2654
+ return s > 0 ? parseInt(e.substring(s + 5, e.indexOf(".", s)), 10) : -1;
2655
+ }
2656
+ let z;
2657
+ function X() {
2658
+ X.init || (X.init = !0, z = nt() !== -1);
2659
+ }
2660
+ var E = {
2661
+ name: "ResizeObserver",
2662
+ props: {
2663
+ emitOnMount: {
2664
+ type: Boolean,
2665
+ default: !1
2666
+ },
2667
+ ignoreWidth: {
2668
+ type: Boolean,
2669
+ default: !1
2670
+ },
2671
+ ignoreHeight: {
2672
+ type: Boolean,
2673
+ default: !1
2674
+ }
2675
+ },
2676
+ emits: [
2677
+ "notify"
2678
+ ],
2679
+ mounted() {
2680
+ X(), nextTick(() => {
2681
+ this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitOnMount && this.emitSize();
2682
+ });
2683
+ const e = document.createElement("object");
2684
+ this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", z && this.$el.appendChild(e), e.data = "about:blank", z || this.$el.appendChild(e);
2685
+ },
2686
+ beforeUnmount() {
2687
+ this.removeResizeHandlers();
2688
+ },
2689
+ methods: {
2690
+ compareAndNotify() {
2691
+ (!this.ignoreWidth && this._w !== this.$el.offsetWidth || !this.ignoreHeight && this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitSize());
2692
+ },
2693
+ emitSize() {
2694
+ this.$emit("notify", {
2695
+ width: this._w,
2696
+ height: this._h
2697
+ });
2698
+ },
2699
+ addResizeHandlers() {
2700
+ this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
2701
+ },
2702
+ removeResizeHandlers() {
2703
+ this._resizeObject && this._resizeObject.onload && (!z && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
2704
+ }
2705
+ }
2706
+ };
2707
+ const rt = /* @__PURE__ */ withScopeId("data-v-b329ee4c");
2708
+ pushScopeId("data-v-b329ee4c");
2709
+ const pt = {
2710
+ class: "resize-observer",
2711
+ tabindex: "-1"
2712
+ };
2713
+ popScopeId();
2714
+ const at = /* @__PURE__ */ rt((e, t, o, i, s, r) => (openBlock(), createBlock("div", pt)));
2715
+ E.render = at;
2716
+ E.__scopeId = "data-v-b329ee4c";
2717
+ E.__file = "src/components/ResizeObserver.vue";
2718
+ const Z = (e = "theme") => ({
2719
+ computed: {
2720
+ themeClass() {
2721
+ return Ze(this[e]);
2722
+ }
2723
+ }
2724
+ }), dt = defineComponent({
2725
+ name: "VPopperContent",
2726
+ components: {
2727
+ ResizeObserver: E
2728
+ },
2729
+ mixins: [
2730
+ Z()
2731
+ ],
2732
+ props: {
2733
+ popperId: String,
2734
+ theme: String,
2735
+ shown: Boolean,
2736
+ mounted: Boolean,
2737
+ skipTransition: Boolean,
2738
+ autoHide: Boolean,
2739
+ handleResize: Boolean,
2740
+ classes: Object,
2741
+ result: Object
2742
+ },
2743
+ emits: [
2744
+ "hide",
2745
+ "resize"
2746
+ ],
2747
+ methods: {
2748
+ toPx(e) {
2749
+ return e != null && !isNaN(e) ? `${e}px` : null;
2750
+ }
2751
+ }
2752
+ }), lt = ["id", "aria-hidden", "tabindex", "data-popper-placement"], ht = {
2753
+ ref: "inner",
2754
+ class: "v-popper__inner"
2755
+ }, ut = /* @__PURE__ */ createBaseVNode("div", { class: "v-popper__arrow-outer" }, null, -1), ft = /* @__PURE__ */ createBaseVNode("div", { class: "v-popper__arrow-inner" }, null, -1), ct = [
2756
+ ut,
2757
+ ft
2758
+ ];
2759
+ function mt(e, t, o, i, s, r) {
2760
+ const p = resolveComponent("ResizeObserver");
2761
+ return openBlock(), createElementBlock("div", {
2762
+ id: e.popperId,
2763
+ ref: "popover",
2764
+ class: normalizeClass(["v-popper__popper", [
2765
+ e.themeClass,
2766
+ e.classes.popperClass,
2767
+ {
2768
+ "v-popper__popper--shown": e.shown,
2769
+ "v-popper__popper--hidden": !e.shown,
2770
+ "v-popper__popper--show-from": e.classes.showFrom,
2771
+ "v-popper__popper--show-to": e.classes.showTo,
2772
+ "v-popper__popper--hide-from": e.classes.hideFrom,
2773
+ "v-popper__popper--hide-to": e.classes.hideTo,
2774
+ "v-popper__popper--skip-transition": e.skipTransition,
2775
+ "v-popper__popper--arrow-overflow": e.result && e.result.arrow.overflow,
2776
+ "v-popper__popper--no-positioning": !e.result
2777
+ }
2778
+ ]]),
2779
+ style: normalizeStyle(e.result ? {
2780
+ position: e.result.strategy,
2781
+ transform: `translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`
2782
+ } : void 0),
2783
+ "aria-hidden": e.shown ? "false" : "true",
2784
+ tabindex: e.autoHide ? 0 : void 0,
2785
+ "data-popper-placement": e.result ? e.result.placement : void 0,
2786
+ onKeyup: t[2] || (t[2] = withKeys((a) => e.autoHide && e.$emit("hide"), ["esc"]))
2787
+ }, [
2788
+ createBaseVNode("div", {
2789
+ class: "v-popper__backdrop",
2790
+ onClick: t[0] || (t[0] = (a) => e.autoHide && e.$emit("hide"))
2791
+ }),
2792
+ createBaseVNode("div", {
2793
+ class: "v-popper__wrapper",
2794
+ style: normalizeStyle(e.result ? {
2795
+ transformOrigin: e.result.transformOrigin
2796
+ } : void 0)
2797
+ }, [
2798
+ createBaseVNode("div", ht, [
2799
+ e.mounted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2800
+ createBaseVNode("div", null, [
2801
+ renderSlot(e.$slots, "default")
2802
+ ]),
2803
+ e.handleResize ? (openBlock(), createBlock(p, {
2804
+ key: 0,
2805
+ onNotify: t[1] || (t[1] = (a) => e.$emit("resize", a))
2806
+ })) : createCommentVNode("", !0)
2807
+ ], 64)) : createCommentVNode("", !0)
2808
+ ], 512),
2809
+ createBaseVNode("div", {
2810
+ ref: "arrow",
2811
+ class: "v-popper__arrow-container",
2812
+ style: normalizeStyle(e.result ? {
2813
+ left: e.toPx(e.result.arrow.x),
2814
+ top: e.toPx(e.result.arrow.y)
2815
+ } : void 0)
2816
+ }, ct, 4)
2817
+ ], 4)
2818
+ ], 46, lt);
2819
+ }
2820
+ const ee = /* @__PURE__ */ B(dt, [["render", mt]]), te = {
2821
+ methods: {
2822
+ show(...e) {
2823
+ return this.$refs.popper.show(...e);
2824
+ },
2825
+ hide(...e) {
2826
+ return this.$refs.popper.hide(...e);
2827
+ },
2828
+ dispose(...e) {
2829
+ return this.$refs.popper.dispose(...e);
2830
+ },
2831
+ onResize(...e) {
2832
+ return this.$refs.popper.onResize(...e);
2833
+ }
2834
+ }
2835
+ };
2836
+ let K = function() {
2837
+ };
2838
+ typeof window < "u" && (K = window.Element);
2839
+ const gt = defineComponent({
2840
+ name: "VPopperWrapper",
2841
+ components: {
2842
+ Popper: st,
2843
+ PopperContent: ee
2844
+ },
2845
+ mixins: [
2846
+ te,
2847
+ Z("finalTheme")
2848
+ ],
2849
+ props: {
2850
+ theme: {
2851
+ type: String,
2852
+ default: null
2853
+ },
2854
+ referenceNode: {
2855
+ type: Function,
2856
+ default: null
2857
+ },
2858
+ shown: {
2859
+ type: Boolean,
2860
+ default: !1
2861
+ },
2862
+ showGroup: {
2863
+ type: String,
2864
+ default: null
2865
+ },
2866
+ // eslint-disable-next-line vue/require-prop-types
2867
+ ariaId: {
2868
+ default: null
2869
+ },
2870
+ disabled: {
2871
+ type: Boolean,
2872
+ default: void 0
2873
+ },
2874
+ positioningDisabled: {
2875
+ type: Boolean,
2876
+ default: void 0
2877
+ },
2878
+ placement: {
2879
+ type: String,
2880
+ default: void 0
2881
+ },
2882
+ delay: {
2883
+ type: [String, Number, Object],
2884
+ default: void 0
2885
+ },
2886
+ distance: {
2887
+ type: [Number, String],
2888
+ default: void 0
2889
+ },
2890
+ skidding: {
2891
+ type: [Number, String],
2892
+ default: void 0
2893
+ },
2894
+ triggers: {
2895
+ type: Array,
2896
+ default: void 0
2897
+ },
2898
+ showTriggers: {
2899
+ type: [Array, Function],
2900
+ default: void 0
2901
+ },
2902
+ hideTriggers: {
2903
+ type: [Array, Function],
2904
+ default: void 0
2905
+ },
2906
+ popperTriggers: {
2907
+ type: Array,
2908
+ default: void 0
2909
+ },
2910
+ popperShowTriggers: {
2911
+ type: [Array, Function],
2912
+ default: void 0
2913
+ },
2914
+ popperHideTriggers: {
2915
+ type: [Array, Function],
2916
+ default: void 0
2917
+ },
2918
+ container: {
2919
+ type: [String, Object, K, Boolean],
2920
+ default: void 0
2921
+ },
2922
+ boundary: {
2923
+ type: [String, K],
2924
+ default: void 0
2925
+ },
2926
+ strategy: {
2927
+ type: String,
2928
+ default: void 0
2929
+ },
2930
+ autoHide: {
2931
+ type: [Boolean, Function],
2932
+ default: void 0
2933
+ },
2934
+ handleResize: {
2935
+ type: Boolean,
2936
+ default: void 0
2937
+ },
2938
+ instantMove: {
2939
+ type: Boolean,
2940
+ default: void 0
2941
+ },
2942
+ eagerMount: {
2943
+ type: Boolean,
2944
+ default: void 0
2945
+ },
2946
+ popperClass: {
2947
+ type: [String, Array, Object],
2948
+ default: void 0
2949
+ },
2950
+ computeTransformOrigin: {
2951
+ type: Boolean,
2952
+ default: void 0
2953
+ },
2954
+ /**
2955
+ * @deprecated
2956
+ */
2957
+ autoMinSize: {
2958
+ type: Boolean,
2959
+ default: void 0
2960
+ },
2961
+ autoSize: {
2962
+ type: [Boolean, String],
2963
+ default: void 0
2964
+ },
2965
+ /**
2966
+ * @deprecated
2967
+ */
2968
+ autoMaxSize: {
2969
+ type: Boolean,
2970
+ default: void 0
2971
+ },
2972
+ autoBoundaryMaxSize: {
2973
+ type: Boolean,
2974
+ default: void 0
2975
+ },
2976
+ preventOverflow: {
2977
+ type: Boolean,
2978
+ default: void 0
2979
+ },
2980
+ overflowPadding: {
2981
+ type: [Number, String],
2982
+ default: void 0
2983
+ },
2984
+ arrowPadding: {
2985
+ type: [Number, String],
2986
+ default: void 0
2987
+ },
2988
+ arrowOverflow: {
2989
+ type: Boolean,
2990
+ default: void 0
2991
+ },
2992
+ flip: {
2993
+ type: Boolean,
2994
+ default: void 0
2995
+ },
2996
+ shift: {
2997
+ type: Boolean,
2998
+ default: void 0
2999
+ },
3000
+ shiftCrossAxis: {
3001
+ type: Boolean,
3002
+ default: void 0
3003
+ },
3004
+ noAutoFocus: {
3005
+ type: Boolean,
3006
+ default: void 0
3007
+ },
3008
+ disposeTimeout: {
3009
+ type: Number,
3010
+ default: void 0
3011
+ }
3012
+ },
3013
+ emits: {
3014
+ show: () => !0,
3015
+ hide: () => !0,
3016
+ "update:shown": (e) => !0,
3017
+ "apply-show": () => !0,
3018
+ "apply-hide": () => !0,
3019
+ "close-group": () => !0,
3020
+ "close-directive": () => !0,
3021
+ "auto-hide": () => !0,
3022
+ resize: () => !0
3023
+ },
3024
+ computed: {
3025
+ finalTheme() {
3026
+ return this.theme ?? this.$options.vPopperTheme;
3027
+ }
3028
+ },
3029
+ methods: {
3030
+ getTargetNodes() {
3031
+ return Array.from(this.$el.children).filter((e) => e !== this.$refs.popperContent.$el);
3032
+ }
3033
+ }
3034
+ });
3035
+ function wt(e, t, o, i, s, r) {
3036
+ const p = resolveComponent("PopperContent"), a = resolveComponent("Popper");
3037
+ return openBlock(), createBlock(a, mergeProps({ ref: "popper" }, e.$props, {
3038
+ theme: e.finalTheme,
3039
+ "target-nodes": e.getTargetNodes,
3040
+ "popper-node": () => e.$refs.popperContent.$el,
3041
+ class: [
3042
+ e.themeClass
3043
+ ],
3044
+ onShow: t[0] || (t[0] = () => e.$emit("show")),
3045
+ onHide: t[1] || (t[1] = () => e.$emit("hide")),
3046
+ "onUpdate:shown": t[2] || (t[2] = (l) => e.$emit("update:shown", l)),
3047
+ onApplyShow: t[3] || (t[3] = () => e.$emit("apply-show")),
3048
+ onApplyHide: t[4] || (t[4] = () => e.$emit("apply-hide")),
3049
+ onCloseGroup: t[5] || (t[5] = () => e.$emit("close-group")),
3050
+ onCloseDirective: t[6] || (t[6] = () => e.$emit("close-directive")),
3051
+ onAutoHide: t[7] || (t[7] = () => e.$emit("auto-hide")),
3052
+ onResize: t[8] || (t[8] = () => e.$emit("resize"))
3053
+ }), {
3054
+ default: withCtx(({
3055
+ popperId: l,
3056
+ isShown: u,
3057
+ shouldMountContent: L,
3058
+ skipTransition: D,
3059
+ autoHide: I,
3060
+ show: F,
3061
+ hide: v,
3062
+ handleResize: R,
3063
+ onResize: j,
3064
+ classes: V,
3065
+ result: Ee
3066
+ }) => [
3067
+ renderSlot(e.$slots, "default", {
3068
+ shown: u,
3069
+ show: F,
3070
+ hide: v
3071
+ }),
3072
+ createVNode(p, {
3073
+ ref: "popperContent",
3074
+ "popper-id": l,
3075
+ theme: e.finalTheme,
3076
+ shown: u,
3077
+ mounted: L,
3078
+ "skip-transition": D,
3079
+ "auto-hide": I,
3080
+ "handle-resize": R,
3081
+ classes: V,
3082
+ result: Ee,
3083
+ onHide: v,
3084
+ onResize: j
3085
+ }, {
3086
+ default: withCtx(() => [
3087
+ renderSlot(e.$slots, "popper", {
3088
+ shown: u,
3089
+ hide: v
3090
+ })
3091
+ ]),
3092
+ _: 2
3093
+ }, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
3094
+ ]),
3095
+ _: 3
3096
+ }, 16, ["theme", "target-nodes", "popper-node", "class"]);
3097
+ }
3098
+ const k = /* @__PURE__ */ B(gt, [["render", wt]]), Se = {
3099
+ ...k,
3100
+ name: "VDropdown",
3101
+ vPopperTheme: "dropdown"
3102
+ }, be = {
3103
+ ...k,
3104
+ name: "VMenu",
3105
+ vPopperTheme: "menu"
3106
+ }, Ce = {
3107
+ ...k,
3108
+ name: "VTooltip",
3109
+ vPopperTheme: "tooltip"
3110
+ }, $t = defineComponent({
3111
+ name: "VTooltipDirective",
3112
+ components: {
3113
+ Popper: Q(),
3114
+ PopperContent: ee
3115
+ },
3116
+ mixins: [
3117
+ te
3118
+ ],
3119
+ inheritAttrs: !1,
3120
+ props: {
3121
+ theme: {
3122
+ type: String,
3123
+ default: "tooltip"
3124
+ },
3125
+ html: {
3126
+ type: Boolean,
3127
+ default: (e) => S(e.theme, "html")
3128
+ },
3129
+ content: {
3130
+ type: [String, Number, Function],
3131
+ default: null
3132
+ },
3133
+ loadingContent: {
3134
+ type: String,
3135
+ default: (e) => S(e.theme, "loadingContent")
3136
+ },
3137
+ targetNodes: {
3138
+ type: Function,
3139
+ required: !0
3140
+ }
3141
+ },
3142
+ data() {
3143
+ return {
3144
+ asyncContent: null
3145
+ };
3146
+ },
3147
+ computed: {
3148
+ isContentAsync() {
3149
+ return typeof this.content == "function";
3150
+ },
3151
+ loading() {
3152
+ return this.isContentAsync && this.asyncContent == null;
3153
+ },
3154
+ finalContent() {
3155
+ return this.isContentAsync ? this.loading ? this.loadingContent : this.asyncContent : this.content;
3156
+ }
3157
+ },
3158
+ watch: {
3159
+ content: {
3160
+ handler() {
3161
+ this.fetchContent(!0);
3162
+ },
3163
+ immediate: !0
3164
+ },
3165
+ async finalContent() {
3166
+ await this.$nextTick(), this.$refs.popper.onResize();
3167
+ }
3168
+ },
3169
+ created() {
3170
+ this.$_fetchId = 0;
3171
+ },
3172
+ methods: {
3173
+ fetchContent(e) {
3174
+ if (typeof this.content == "function" && this.$_isShown && (e || !this.$_loading && this.asyncContent == null)) {
3175
+ this.asyncContent = null, this.$_loading = !0;
3176
+ const t = ++this.$_fetchId, o = this.content(this);
3177
+ o.then ? o.then((i) => this.onResult(t, i)) : this.onResult(t, o);
3178
+ }
3179
+ },
3180
+ onResult(e, t) {
3181
+ e === this.$_fetchId && (this.$_loading = !1, this.asyncContent = t);
3182
+ },
3183
+ onShow() {
3184
+ this.$_isShown = !0, this.fetchContent();
3185
+ },
3186
+ onHide() {
3187
+ this.$_isShown = !1;
3188
+ }
3189
+ }
3190
+ }), vt = ["innerHTML"], yt = ["textContent"];
3191
+ function _t(e, t, o, i, s, r) {
3192
+ const p = resolveComponent("PopperContent"), a = resolveComponent("Popper");
3193
+ return openBlock(), createBlock(a, mergeProps({ ref: "popper" }, e.$attrs, {
3194
+ theme: e.theme,
3195
+ "target-nodes": e.targetNodes,
3196
+ "popper-node": () => e.$refs.popperContent.$el,
3197
+ onApplyShow: e.onShow,
3198
+ onApplyHide: e.onHide
3199
+ }), {
3200
+ default: withCtx(({
3201
+ popperId: l,
3202
+ isShown: u,
3203
+ shouldMountContent: L,
3204
+ skipTransition: D,
3205
+ autoHide: I,
3206
+ hide: F,
3207
+ handleResize: v,
3208
+ onResize: R,
3209
+ classes: j,
3210
+ result: V
3211
+ }) => [
3212
+ createVNode(p, {
3213
+ ref: "popperContent",
3214
+ class: normalizeClass({
3215
+ "v-popper--tooltip-loading": e.loading
3216
+ }),
3217
+ "popper-id": l,
3218
+ theme: e.theme,
3219
+ shown: u,
3220
+ mounted: L,
3221
+ "skip-transition": D,
3222
+ "auto-hide": I,
3223
+ "handle-resize": v,
3224
+ classes: j,
3225
+ result: V,
3226
+ onHide: F,
3227
+ onResize: R
3228
+ }, {
3229
+ default: withCtx(() => [
3230
+ e.html ? (openBlock(), createElementBlock("div", {
3231
+ key: 0,
3232
+ innerHTML: e.finalContent
3233
+ }, null, 8, vt)) : (openBlock(), createElementBlock("div", {
3234
+ key: 1,
3235
+ textContent: toDisplayString(e.finalContent)
3236
+ }, null, 8, yt))
3237
+ ]),
3238
+ _: 2
3239
+ }, 1032, ["class", "popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
3240
+ ]),
3241
+ _: 1
3242
+ }, 16, ["theme", "target-nodes", "popper-node", "onApplyShow", "onApplyHide"]);
3243
+ }
3244
+ const ze = /* @__PURE__ */ B($t, [["render", _t]]), Ae = "v-popper--has-tooltip";
3245
+ function Tt(e, t) {
3246
+ let o = e.placement;
3247
+ if (!o && t)
3248
+ for (const i of Te)
3249
+ t[i] && (o = i);
3250
+ return o || (o = S(e.theme || "tooltip", "placement")), o;
3251
+ }
3252
+ function Ne(e, t, o) {
3253
+ let i;
3254
+ const s = typeof t;
3255
+ return s === "string" ? i = { content: t } : t && s === "object" ? i = t : i = { content: !1 }, i.placement = Tt(i, o), i.targetNodes = () => [e], i.referenceNode = () => e, i;
3256
+ }
3257
+ let x, b, Pt = 0;
3258
+ function St() {
3259
+ if (x)
3260
+ return;
3261
+ b = ref([]), x = createApp({
3262
+ name: "VTooltipDirectiveApp",
3263
+ setup() {
3264
+ return {
3265
+ directives: b
3266
+ };
3267
+ },
3268
+ render() {
3269
+ return this.directives.map((t) => h$1(ze, {
3270
+ ...t.options,
3271
+ shown: t.shown || t.options.shown,
3272
+ key: t.id
3273
+ }));
3274
+ },
3275
+ devtools: {
3276
+ hide: !0
3277
+ }
3278
+ });
3279
+ const e = document.createElement("div");
3280
+ document.body.appendChild(e), x.mount(e);
3281
+ }
3282
+ function bt(e, t, o) {
3283
+ St();
3284
+ const i = ref(Ne(e, t, o)), s = ref(!1), r = {
3285
+ id: Pt++,
3286
+ options: i,
3287
+ shown: s
3288
+ };
3289
+ return b.value.push(r), e.classList && e.classList.add(Ae), e.$_popper = {
3290
+ options: i,
3291
+ item: r,
3292
+ show() {
3293
+ s.value = !0;
3294
+ },
3295
+ hide() {
3296
+ s.value = !1;
3297
+ }
3298
+ };
3299
+ }
3300
+ function He(e) {
3301
+ if (e.$_popper) {
3302
+ const t = b.value.indexOf(e.$_popper.item);
3303
+ t !== -1 && b.value.splice(t, 1), delete e.$_popper, delete e.$_popperOldShown, delete e.$_popperMountTarget;
3304
+ }
3305
+ e.classList && e.classList.remove(Ae);
3306
+ }
3307
+ function me(e, { value: t, modifiers: o }) {
3308
+ const i = Ne(e, t, o);
3309
+ if (!i.content || S(i.theme || "tooltip", "disabled"))
3310
+ He(e);
3311
+ else {
3312
+ let s;
3313
+ e.$_popper ? (s = e.$_popper, s.options.value = i) : s = bt(e, t, o), typeof t.shown < "u" && t.shown !== e.$_popperOldShown && (e.$_popperOldShown = t.shown, t.shown ? s.show() : s.hide());
3314
+ }
3315
+ }
3316
+ const oe = {
3317
+ beforeMount: me,
3318
+ updated: me,
3319
+ beforeUnmount(e) {
3320
+ He(e);
3321
+ }
3322
+ };
3323
+ function ge(e) {
3324
+ e.addEventListener("mousedown", H), e.addEventListener("click", H), e.addEventListener("touchstart", Oe, $ ? {
3325
+ passive: !0
3326
+ } : !1);
3327
+ }
3328
+ function we(e) {
3329
+ e.removeEventListener("mousedown", H), e.removeEventListener("click", H), e.removeEventListener("touchstart", Oe), e.removeEventListener("touchend", Me), e.removeEventListener("touchcancel", Be);
3330
+ }
3331
+ function H(e) {
3332
+ const t = e.currentTarget;
3333
+ e.closePopover = !t.$_vclosepopover_touch, e.closeAllPopover = t.$_closePopoverModifiers && !!t.$_closePopoverModifiers.all;
3334
+ }
3335
+ function Oe(e) {
3336
+ if (e.changedTouches.length === 1) {
3337
+ const t = e.currentTarget;
3338
+ t.$_vclosepopover_touch = !0;
3339
+ const o = e.changedTouches[0];
3340
+ t.$_vclosepopover_touchPoint = o, t.addEventListener("touchend", Me), t.addEventListener("touchcancel", Be);
3341
+ }
3342
+ }
3343
+ function Me(e) {
3344
+ const t = e.currentTarget;
3345
+ if (t.$_vclosepopover_touch = !1, e.changedTouches.length === 1) {
3346
+ const o = e.changedTouches[0], i = t.$_vclosepopover_touchPoint;
3347
+ e.closePopover = Math.abs(o.screenY - i.screenY) < 20 && Math.abs(o.screenX - i.screenX) < 20, e.closeAllPopover = t.$_closePopoverModifiers && !!t.$_closePopoverModifiers.all;
3348
+ }
3349
+ }
3350
+ function Be(e) {
3351
+ const t = e.currentTarget;
3352
+ t.$_vclosepopover_touch = !1;
3353
+ }
3354
+ const ie = {
3355
+ beforeMount(e, { value: t, modifiers: o }) {
3356
+ e.$_closePopoverModifiers = o, (typeof t > "u" || t) && ge(e);
3357
+ },
3358
+ updated(e, { value: t, oldValue: o, modifiers: i }) {
3359
+ e.$_closePopoverModifiers = i, t !== o && (typeof t > "u" || t ? ge(e) : we(e));
3360
+ },
3361
+ beforeUnmount(e) {
3362
+ we(e);
3363
+ }
3364
+ }, Ht = h, Ot = oe, Mt = oe, Bt = ie, Et = ie, kt = Se, Lt = be, Dt = Q, It = ee, Ft = te, Rt = k, jt = Z, Vt = Ce, Wt = ze;
3365
+ function Ct(e, t = {}) {
3366
+ e.$_vTooltipInstalled || (e.$_vTooltipInstalled = !0, ye(h, t), e.directive("tooltip", oe), e.directive("close-popper", ie), e.component("VTooltip", Ce), e.component("VDropdown", Se), e.component("VMenu", be));
3367
+ }
3368
+ const Gt = {
3369
+ // eslint-disable-next-line no-undef
3370
+ version: "5.2.2",
3371
+ install: Ct,
3372
+ options: h
3373
+ };
3374
+
3375
+ // eslint-disable-next-line import/no-named-default
3376
+
3377
+ export { kt as Dropdown, ae as HIDE_EVENT_MAP, Lt as Menu, Dt as Popper, It as PopperContent, Ft as PopperMethods, Rt as PopperWrapper, pe as SHOW_EVENT_MAP, jt as ThemeClass, Vt as Tooltip, Wt as TooltipDirective, Bt as VClosePopper, Ot as VTooltip, bt as createTooltip, Gt as default, He as destroyTooltip, Nt as hideAllPoppers, Ct as install, Ht as options, Te as placements, tt as recomputeAllPoppers, Et as vClosePopper, Mt as vTooltip };