bkui-vue 0.0.1-beta.466 → 0.0.1-beta.468

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 (260) hide show
  1. package/dist/index.cjs.js +20 -20
  2. package/dist/index.esm.js +3255 -3254
  3. package/dist/index.umd.js +20 -20
  4. package/lib/affix/index.js +335 -1
  5. package/lib/alert/alert.d.ts +5 -5
  6. package/lib/alert/index.d.ts +9 -9
  7. package/lib/alert/index.js +276 -1
  8. package/lib/animate-number/index.js +219 -1
  9. package/lib/backtop/index.js +252 -1
  10. package/lib/badge/index.js +293 -1
  11. package/lib/breadcrumb/index.js +311 -1
  12. package/lib/button/index.js +388 -1
  13. package/lib/card/index.js +356 -1
  14. package/lib/cascader/cascader.d.ts +4 -4
  15. package/lib/cascader/index.d.ts +12 -12
  16. package/lib/cascader/index.js +2075 -2
  17. package/lib/checkbox/index.js +536 -1
  18. package/lib/code-diff/code-diff.d.ts +7 -7
  19. package/lib/code-diff/index.d.ts +9 -9
  20. package/lib/code-diff/index.js +5535 -1
  21. package/lib/collapse/collapse-panel.d.ts +5 -5
  22. package/lib/collapse/index.d.ts +5 -5
  23. package/lib/collapse/index.js +589 -1
  24. package/lib/collapse/props.d.ts +2 -2
  25. package/lib/collapse-transition/index.js +234 -1
  26. package/lib/color-picker/index.js +2701 -1
  27. package/lib/components.js +781 -1
  28. package/lib/config-provider/index.js +377 -1
  29. package/lib/container/index.js +390 -1
  30. package/lib/date-picker/base/month-table.d.ts +1 -1
  31. package/lib/date-picker/base/year-table.d.ts +1 -1
  32. package/lib/date-picker/date-picker.d.ts +4 -4
  33. package/lib/date-picker/index.d.ts +9 -9
  34. package/lib/date-picker/index.js +5537 -1
  35. package/lib/date-picker/panel/date.d.ts +1 -1
  36. package/lib/date-picker/panel/time-range.d.ts +4 -4
  37. package/lib/date-picker/panel/time.d.ts +5 -5
  38. package/lib/date-picker/props.d.ts +1 -1
  39. package/lib/date-picker/time-picker.d.ts +4 -4
  40. package/lib/dialog/dialog.d.ts +16 -16
  41. package/lib/dialog/index.d.ts +31 -31
  42. package/lib/dialog/index.js +1322 -2
  43. package/lib/dialog/props.d.ts +6 -6
  44. package/lib/directives/index.js +1357 -2
  45. package/lib/dist.index.js +179 -1
  46. package/lib/divider/divider.d.ts +6 -6
  47. package/lib/divider/index.d.ts +12 -12
  48. package/lib/divider/index.js +226 -1
  49. package/lib/divider/props.d.ts +2 -2
  50. package/lib/dropdown/dropdown.d.ts +5 -5
  51. package/lib/dropdown/index.d.ts +9 -9
  52. package/lib/dropdown/index.js +392 -1
  53. package/lib/exception/index.js +423 -1
  54. package/lib/fixed-navbar/index.js +210 -1
  55. package/lib/form/index.js +995 -1
  56. package/lib/hooks.js +133 -1
  57. package/lib/icon/angle-double-down-line.js +541 -1
  58. package/lib/icon/angle-double-left-line.js +541 -1
  59. package/lib/icon/angle-double-left.js +541 -1
  60. package/lib/icon/angle-double-right-line.js +541 -1
  61. package/lib/icon/angle-double-right.js +541 -1
  62. package/lib/icon/angle-double-up-line.js +541 -1
  63. package/lib/icon/angle-down-fill.js +541 -1
  64. package/lib/icon/angle-down-line.js +541 -1
  65. package/lib/icon/angle-down.js +541 -1
  66. package/lib/icon/angle-left.js +541 -1
  67. package/lib/icon/angle-right.js +541 -1
  68. package/lib/icon/angle-up-fill.js +541 -1
  69. package/lib/icon/angle-up.js +541 -1
  70. package/lib/icon/archive-fill.js +541 -1
  71. package/lib/icon/arrows-left.js +541 -1
  72. package/lib/icon/arrows-right.js +541 -1
  73. package/lib/icon/audio-fill.js +541 -1
  74. package/lib/icon/bk.js +541 -1
  75. package/lib/icon/circle.js +541 -1
  76. package/lib/icon/close-line.js +541 -1
  77. package/lib/icon/close.js +541 -1
  78. package/lib/icon/code.js +541 -1
  79. package/lib/icon/cog-shape.js +541 -1
  80. package/lib/icon/collapse-left.js +541 -1
  81. package/lib/icon/copy-shape.js +541 -1
  82. package/lib/icon/copy.js +541 -1
  83. package/lib/icon/data-shape.js +541 -1
  84. package/lib/icon/del.js +541 -1
  85. package/lib/icon/doc-fill.js +541 -1
  86. package/lib/icon/done.js +541 -1
  87. package/lib/icon/down-shape.js +541 -1
  88. package/lib/icon/down-small.js +541 -1
  89. package/lib/icon/edit-line.js +541 -1
  90. package/lib/icon/ellipsis.js +541 -1
  91. package/lib/icon/enlarge-line.js +541 -1
  92. package/lib/icon/error.js +541 -1
  93. package/lib/icon/excel-fill.js +541 -1
  94. package/lib/icon/exclamation-circle-shape.js +541 -1
  95. package/lib/icon/eye.js +541 -1
  96. package/lib/icon/filliscreen-line.js +541 -1
  97. package/lib/icon/fix-line.js +541 -1
  98. package/lib/icon/fix-shape.js +541 -1
  99. package/lib/icon/folder-open.js +541 -1
  100. package/lib/icon/folder-shape-open.js +541 -1
  101. package/lib/icon/folder-shape.js +541 -1
  102. package/lib/icon/folder.js +541 -1
  103. package/lib/icon/funnel.js +541 -1
  104. package/lib/icon/help-document-fill.js +541 -1
  105. package/lib/icon/help-fill.js +541 -1
  106. package/lib/icon/help.js +541 -1
  107. package/lib/icon/image-fill.js +563 -1
  108. package/lib/icon/img-error.js +563 -1
  109. package/lib/icon/img-placehoulder.js +563 -1
  110. package/lib/icon/index.js +2337 -1
  111. package/lib/icon/info-line.js +563 -1
  112. package/lib/icon/info.js +563 -1
  113. package/lib/icon/left-shape.js +563 -1
  114. package/lib/icon/left-turn-line.js +563 -1
  115. package/lib/icon/narrow-line.js +563 -1
  116. package/lib/icon/original.js +563 -1
  117. package/lib/icon/pdf-fill.js +563 -1
  118. package/lib/icon/play-shape.js +563 -1
  119. package/lib/icon/plus.js +563 -1
  120. package/lib/icon/ppt-fill.js +563 -1
  121. package/lib/icon/qq.js +563 -1
  122. package/lib/icon/right-shape.js +563 -1
  123. package/lib/icon/right-turn-line.js +563 -1
  124. package/lib/icon/search.js +563 -1
  125. package/lib/icon/share.js +563 -1
  126. package/lib/icon/spinner.js +563 -1
  127. package/lib/icon/success.js +563 -1
  128. package/lib/icon/switcher-loading.js +563 -1
  129. package/lib/icon/text-file.js +563 -1
  130. package/lib/icon/text-fill.js +563 -1
  131. package/lib/icon/transfer.js +563 -1
  132. package/lib/icon/tree-application-shape.js +563 -1
  133. package/lib/icon/unfull-screen.js +563 -1
  134. package/lib/icon/unvisible.js +563 -1
  135. package/lib/icon/up-shape.js +563 -1
  136. package/lib/icon/upload.js +563 -1
  137. package/lib/icon/video-fill.js +563 -1
  138. package/lib/icon/warn.js +563 -1
  139. package/lib/icon/weixin-pro.js +563 -1
  140. package/lib/icon/weixin.js +563 -1
  141. package/lib/image/image-viewer.d.ts +1 -1
  142. package/lib/image/image.d.ts +1 -1
  143. package/lib/image/index.d.ts +3 -3
  144. package/lib/image/index.js +944 -1
  145. package/lib/index.js +195 -1
  146. package/lib/info-box/index.js +1508 -2
  147. package/lib/input/index.d.ts +9 -9
  148. package/lib/input/index.js +963 -1
  149. package/lib/input/input.d.ts +7 -7
  150. package/lib/link/index.js +219 -1
  151. package/lib/loading/index.d.ts +4 -4
  152. package/lib/loading/index.js +434 -1
  153. package/lib/loading/loading.d.ts +3 -3
  154. package/lib/locale/index.js +489 -1
  155. package/lib/menu/index.js +776 -1
  156. package/lib/message/index.js +1744 -2
  157. package/lib/message/messageConstructor.d.ts +1 -1
  158. package/lib/modal/index.d.ts +15 -15
  159. package/lib/modal/index.js +397 -1
  160. package/lib/modal/modal.d.ts +6 -6
  161. package/lib/modal/props.mixin.d.ts +2 -2
  162. package/lib/navigation/index.d.ts +3 -3
  163. package/lib/navigation/index.js +423 -1
  164. package/lib/navigation/navigation.d.ts +1 -1
  165. package/lib/notify/index.js +437 -1
  166. package/lib/notify/notifyConstructor.d.ts +2 -2
  167. package/lib/overflow-title/components/overflow-title.d.ts +5 -5
  168. package/lib/overflow-title/index.d.ts +9 -9
  169. package/lib/overflow-title/index.js +547 -1
  170. package/lib/overflow-title/props.d.ts +4 -4
  171. package/lib/pagination/index.js +987 -1
  172. package/lib/plugin-popover/index.js +4022 -1
  173. package/lib/plugins/index.js +130 -1
  174. package/lib/pop-confirm/index.js +365 -1
  175. package/lib/popover/index.d.ts +9 -9
  176. package/lib/popover/index.js +4028 -1
  177. package/lib/popover/popover.d.ts +5 -5
  178. package/lib/popover/props.d.ts +2 -2
  179. package/lib/popover2/index.js +171 -1
  180. package/lib/preset.js +164 -1
  181. package/lib/process/index.js +1143 -2
  182. package/lib/progress/index.d.ts +3 -3
  183. package/lib/progress/index.js +476 -1
  184. package/lib/progress/progress.d.ts +1 -1
  185. package/lib/radio/index.js +611 -1
  186. package/lib/rate/index.js +348 -1
  187. package/lib/rate/star.d.ts +1 -1
  188. package/lib/resize-layout/index.d.ts +15 -15
  189. package/lib/resize-layout/index.js +482 -1
  190. package/lib/resize-layout/resize-layout.d.ts +7 -7
  191. package/lib/search-select/index.d.ts +15 -15
  192. package/lib/search-select/index.js +2999 -2
  193. package/lib/search-select/input.d.ts +1 -1
  194. package/lib/search-select/search-select.d.ts +5 -5
  195. package/lib/search-select/selected.d.ts +1 -1
  196. package/lib/select/index.d.ts +61 -61
  197. package/lib/select/index.js +2531 -2
  198. package/lib/select/select.d.ts +26 -26
  199. package/lib/select/selectTagInput.d.ts +5 -5
  200. package/lib/shared/index.js +2713 -1
  201. package/lib/shared/vue-types.d.ts +11 -11
  202. package/lib/sideslider/index.d.ts +13 -13
  203. package/lib/sideslider/index.js +1043 -2
  204. package/lib/sideslider/sideslider.d.ts +6 -6
  205. package/lib/slider/index.js +1667 -2
  206. package/lib/steps/index.d.ts +6 -6
  207. package/lib/steps/index.js +1212 -2
  208. package/lib/steps/steps.d.ts +2 -2
  209. package/lib/swiper/index.js +350 -1
  210. package/lib/switcher/index.js +323 -1
  211. package/lib/tab/index.d.ts +19 -19
  212. package/lib/tab/index.js +918 -1
  213. package/lib/tab/props.d.ts +8 -8
  214. package/lib/tab/tab-nav.d.ts +5 -5
  215. package/lib/tab/tab-panel.d.ts +6 -6
  216. package/lib/tab/tab.d.ts +6 -6
  217. package/lib/table/components/table-column.d.ts +7 -7
  218. package/lib/table/index.d.ts +36 -36
  219. package/lib/table/index.js +6388 -1
  220. package/lib/table/plugins/body-empty.d.ts +1 -1
  221. package/lib/table/props.d.ts +9 -9
  222. package/lib/table/table.d.ts +11 -11
  223. package/lib/table-column/index.d.ts +13 -13
  224. package/lib/table-column/index.js +801 -1
  225. package/lib/tag/index.d.ts +9 -9
  226. package/lib/tag/index.js +300 -1
  227. package/lib/tag/tag.d.ts +5 -5
  228. package/lib/tag-input/index.d.ts +9 -9
  229. package/lib/tag-input/index.js +1757 -1
  230. package/lib/tag-input/tag-input.d.ts +5 -5
  231. package/lib/tag-input/tag-props.d.ts +2 -2
  232. package/lib/time-picker/index.d.ts +9 -9
  233. package/lib/time-picker/index.js +142 -1
  234. package/lib/timeline/index.js +297 -1
  235. package/lib/transfer/index.d.ts +3 -3
  236. package/lib/transfer/index.js +764 -1
  237. package/lib/transfer/transfer.d.ts +1 -1
  238. package/lib/tree/constant.d.ts +2 -1
  239. package/lib/tree/index.d.ts +6 -6
  240. package/lib/tree/index.js +2608 -1
  241. package/lib/tree/tree.d.ts +2 -2
  242. package/lib/upload/index.d.ts +4 -4
  243. package/lib/upload/index.js +3257 -2
  244. package/lib/upload/upload.d.ts +1 -1
  245. package/lib/virtual-render/index.d.ts +3 -3
  246. package/lib/virtual-render/index.js +790 -1
  247. package/lib/virtual-render/virtual-render.d.ts +1 -1
  248. package/package.json +1 -1
  249. package/lib/cascader/index.js.LICENSE.txt +0 -1
  250. package/lib/dialog/index.js.LICENSE.txt +0 -1
  251. package/lib/directives/index.js.LICENSE.txt +0 -14
  252. package/lib/info-box/index.js.LICENSE.txt +0 -1
  253. package/lib/message/index.js.LICENSE.txt +0 -6
  254. package/lib/process/index.js.LICENSE.txt +0 -1
  255. package/lib/search-select/index.js.LICENSE.txt +0 -1
  256. package/lib/select/index.js.LICENSE.txt +0 -1
  257. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  258. package/lib/slider/index.js.LICENSE.txt +0 -1
  259. package/lib/steps/index.js.LICENSE.txt +0 -1
  260. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,4028 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types")):t(e["../shared"],e.vue,e["vue-types"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n)=>(()=>{var o={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,y=v-a+(m-c)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,c=m,r=d;var h=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[u++]=h>>>24&255,s[u++]=h>>>16&255,s[u++]=h>>>8&255,s[u++]=255&h;var g=v/4294967296*1e4&268435455;s[u++]=g>>>8&255,s[u++]=255&g,s[u++]=g>>>24&15|16,s[u++]=g>>>16&255,s[u++]=d>>>8|128,s[u++]=255&d;for(var b=0;b<6;++b)s[u+b]=f[b];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";i.r(l),i.d(l,{$bkPopover:()=>tt,PopoverProps:()=>M,default:()=>nt});var e=i(4212),t=i(748);function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var r,a=new Map;function c(e,t){var n,o=[];return Array.isArray(t.arg)?o=t.arg:(n=t.arg,"undefined"!=typeof Element&&n instanceof Element&&o.push(t.arg)),function(n,r){var i=t.instance.popperRef,l=n.target,a=null==r?void 0:r.target,c=!t||!t.instance,u=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=o.length&&o.some((function(e){return null==e?void 0:e.contains(l)}))||o.length&&o.includes(a),p=i&&(i.contains(l)||i.contains(a));c||u||s||f||d||p||t.value(n,r)}}document.addEventListener("mousedown",(function(e){return r=e})),document.addEventListener("mouseup",(function(e){var t,o=n(a.values());try{for(o.s();!(t=o.n()).done;){var i,l=n(t.value);try{for(l.s();!(i=l.n()).done;)(0,i.value.documentHandler)(e,r)}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}}));var u={beforeMount:function(e,t){a.has(e)||a.set(e,[]),a.get(e).push({documentHandler:c(e,t),bindingFn:t.value})},updated:function(e,t){a.has(e)||a.set(e,[]);var n=a.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:c(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){a.delete(e)},install:function(e){e.directive("bkTooltips",u)}};const s=u,f=(0,t.defineComponent)({name:"PopArrow",render:function(){var n=(0,e.resolveClassName)("pop2-arrow");return(0,t.createVNode)("div",{class:n},null)}});function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v,m,y=function(){return!0};!function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"}(m||(m={}));var h=(p(v={},m.SHOW,y),p(v,m.HIDE,y),p(v,m.CLICK_OUTSIDE,y),p(v,m.CONTENT_MOUSEENTER,y),p(v,m.CONTENT_MOUSELEAVE,y),p(v,m.STOP_HIDE,y),v);const g=(0,t.defineComponent)({name:"PopContent",props:{width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),extCls:e.PropTypes.string.def("")},setup:function(e){var n=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e};return{style:(0,t.computed)((function(){return{width:n(e.width),height:n(e.height),maxHeight:n(e.maxHeight)}}))}},render:function(){var n,o,r,i,l,a,c=[(0,e.resolveClassName)("popover"),(0,e.resolveClassName)("pop2-content"),this.extCls];return(0,t.createVNode)("div",{class:c,tabindex:"-1",style:this.style},[null!==(r=null===(o=(n=this.$slots).arrow)||void 0===o?void 0:o.call(n))&&void 0!==r?r:"",null!==(a=null===(l=(i=this.$slots).default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:""])}});var b,w,T,x,E,P,R,O,A,C,S,N,L,I,H=i(210);(0,H.createTypes)({}),function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(b||(b={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(w||(w={})),function(e){e.IF="if",e.SHOW="show"}(T||(T={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(x||(x={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(E||(E={})),function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(P||(P={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(R||(R={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(O||(O={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(A||(A={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(C||(C={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(S||(S={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(N||(N={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(L||(L={})),function(e){e.CHECKBOX="checkbox",e.CHECK="check"}(I||(I={}));var D={onAfterHidden:Function,onAfterShow:Function},M=Object.assign({isShow:e.PropTypes.bool.def(!1),always:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),allowHtml:e.PropTypes.bool.def(!1),placement:(0,e.placementType)().def(P.TOP_START),theme:e.PropTypes.string.def("dark"),trigger:(0,H.string)().def(R.HOVER),renderType:(0,H.toType)("popRenderType",{}).def(O.SHOWN),arrow:e.PropTypes.bool.def(!0),padding:e.PropTypes.number.def(5),offset:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.shape({})]).def(6),boundary:e.PropTypes.oneOfType([e.PropTypes.string.def("parent"),e.PropTypes.instanceOf(HTMLElement)]),zIndex:e.PropTypes.number.def(void 0),disableTeleport:e.PropTypes.bool.def(!1),autoPlacement:e.PropTypes.bool.def(!1),autoVisibility:e.PropTypes.bool.def(!0),disableOutsideClick:e.PropTypes.bool.def(!1),disableTransform:e.PropTypes.bool.def(!1),reference:e.PropTypes.any.def(null),modifiers:e.PropTypes.array.def([]),popoverDelay:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.arrayOf(e.PropTypes.number)]).def(100),extCls:e.PropTypes.string.def("")},D);const F=(0,t.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),j=(0,t.defineComponent)({props:{class:e.PropTypes.string.def(""),mode:e.PropTypes.string.def("")},render:function(){var e,n;return(0,t.createVNode)(t.Fragment,null,[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])}});function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const _=["top","right","bottom","left"],$=["start","end"],B=_.reduce(((e,t)=>e.concat(t,t+"-"+$[0],t+"-"+$[1])),[]),U=Math.min,W=Math.max,q=Math.round,z=Math.floor,G=e=>({x:e,y:e}),K={left:"right",right:"left",bottom:"top",top:"bottom"},Y={start:"end",end:"start"};function X(e,t,n){return W(e,U(t,n))}function Z(e,t){return"function"==typeof e?e(t):e}function J(e){return e.split("-")[0]}function Q(e){return e.split("-")[1]}function ee(e){return"x"===e?"y":"x"}function te(e){return"y"===e?"height":"width"}function ne(e){return["top","bottom"].includes(J(e))?"y":"x"}function oe(e){return ee(ne(e))}function re(e,t,n){void 0===n&&(n=!1);const o=Q(e),r=oe(e),i=te(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=le(l)),[l,le(l)]}function ie(e){return e.replace(/start|end/g,(e=>Y[e]))}function le(e){return e.replace(/left|right|bottom|top/g,(e=>K[e]))}function ae(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ce(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ue(e,t,n){let{reference:o,floating:r}=e;const i=ne(t),l=oe(t),a=te(l),c=J(t),u="y"===i,s=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let p;switch(c){case"top":p={x:s,y:o.y-r.height};break;case"bottom":p={x:s,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(Q(t)){case"start":p[l]-=d*(n&&u?-1:1);break;case"end":p[l]+=d*(n&&u?-1:1)}return p}async function se(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Z(t,e),v=ae(p),m=a[d?"floating"===f?"reference":"floating":f],y=ce(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:s,strategy:c})),h="floating"===f?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=ce(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:g,strategy:c}):h);return{top:(y.top-w.top+v.top)/b.y,bottom:(w.bottom-y.bottom+v.bottom)/b.y,left:(y.left-w.left+v.left)/b.x,right:(w.right-y.right+v.right)/b.x}}function fe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function de(e){return _.some((t=>e[t]>=0))}function pe(e){const t=U(...e.map((e=>e.left))),n=U(...e.map((e=>e.top)));return{x:t,y:n,width:W(...e.map((e=>e.right)))-t,height:W(...e.map((e=>e.bottom)))-n}}const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=J(n),a=Q(n),c="y"===ne(n),u=["left","top"].includes(l)?-1:1,s=i&&c?-1:1,f=Z(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),c?{x:p*s,y:d*u}:{x:d*u,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},me=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Z(e,t),u={x:n,y:o},s=await se(t,c),f=ne(J(r)),d=ee(f);let p=u[d],v=u[f];if(i){const e="y"===d?"bottom":"right";p=X(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";v=X(v+s["y"===f?"top":"left"],v,v-s[e])}const m=a.fn({...t,[d]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function ye(e){return be(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ge(e){var t;return null==(t=(be(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function be(e){return e instanceof Node||e instanceof he(e).Node}function we(e){return e instanceof Element||e instanceof he(e).Element}function Te(e){return e instanceof HTMLElement||e instanceof he(e).HTMLElement}function xe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof he(e).ShadowRoot)}function Ee(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Pe(e){return["table","td","th"].includes(ye(e))}function Re(e){const t=Oe(),n=Ce(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Oe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(ye(e))}function Ce(e){return he(e).getComputedStyle(e)}function Se(e){return we(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ne(e){if("html"===ye(e))return e;const t=e.assignedSlot||e.parentNode||xe(e)&&e.host||ge(e);return xe(t)?t.host:t}function Le(e){const t=Ne(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Ee(t)?t:Le(t)}function Ie(e,t){var n;void 0===t&&(t=[]);const o=Le(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=he(o);return r?t.concat(i,i.visualViewport||[],Ee(o)?o:[]):t.concat(o,Ie(o))}function He(e){const t=Ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Te(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=q(n)!==i||q(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function De(e){return we(e)?e:e.contextElement}function Me(e){const t=De(e);if(!Te(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=He(t);let l=(i?q(n.width):n.width)/o,a=(i?q(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Fe=G(0);function je(e){const t=he(e);return Oe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fe}function ke(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=De(e);let l=G(1);t&&(o?we(o)&&(l=Me(o)):l=Me(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==he(e))&&t}(i,n,o)?je(i):G(0);let c=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,s=r.width/l.x,f=r.height/l.y;if(i){const e=he(i),t=o&&we(o)?he(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Me(n),t=n.getBoundingClientRect(),o=Ce(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,s*=e.x,f*=e.y,c+=r,u+=i,n=he(n).frameElement}}return ce({width:s,height:f,x:c,y:u})}function Ve(e){return ke(ge(e)).left+Se(e).scrollLeft}function _e(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=he(e),o=ge(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const e=Oe();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n);else if("document"===t)o=function(e){const t=ge(e),n=Se(e),o=e.ownerDocument.body,r=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Ve(e);const a=-n.scrollTop;return"rtl"===Ce(o).direction&&(l+=W(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(ge(e));else if(we(t))o=function(e,t){const n=ke(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e)?Me(e):G(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=je(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return ce(o)}function $e(e,t){const n=Ne(e);return!(n===t||!we(n)||Ae(n))&&("fixed"===Ce(n).position||$e(n,t))}function Be(e,t,n){const o=Te(t),r=ge(t),i="fixed"===n,l=ke(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!i)if(("body"!==ye(t)||Ee(r))&&(a=Se(t)),o){const e=ke(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Ve(r));return{x:l.left+a.scrollLeft-c.x,y:l.top+a.scrollTop-c.y,width:l.width,height:l.height}}function Ue(e,t){return Te(e)&&"fixed"!==Ce(e).position?t?t(e):e.offsetParent:null}function We(e,t){const n=he(e);if(!Te(e))return n;let o=Ue(e,t);for(;o&&Pe(o)&&"static"===Ce(o).position;)o=Ue(o,t);return o&&("html"===ye(o)||"body"===ye(o)&&"static"===Ce(o).position&&!Re(o))?n:o||function(e){let t=Ne(e);for(;Te(t)&&!Ae(t);){if(Re(t))return t;t=Ne(t)}return null}(e)||n}const qe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Te(n),i=ge(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=G(1);const c=G(0);if((r||!r&&"fixed"!==o)&&(("body"!==ye(n)||Ee(i))&&(l=Se(n)),Te(n))){const e=ke(n);a=Me(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},getDocumentElement:ge,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Ie(e).filter((e=>we(e)&&"body"!==ye(e))),r=null;const i="fixed"===Ce(e).position;let l=i?Ne(e):e;for(;we(l)&&!Ae(l);){const t=Ce(l),n=Re(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Ee(l)&&!n&&$e(e,l))?o=o.filter((e=>e!==l)):r=t,l=Ne(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=_e(t,n,r);return e.top=W(o.top,e.top),e.right=U(o.right,e.right),e.bottom=U(o.bottom,e.bottom),e.left=W(o.left,e.left),e}),_e(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:We,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||We,i=this.getDimensions;return{reference:Be(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return He(e)},getScale:Me,isElement:we,isRTL:function(e){return"rtl"===Ce(e).direction}};var ze=i(8022),Ge={},Ke=function(e){return document.querySelector(e)instanceof HTMLElement},Ye=function(e){return e instanceof Element||e instanceof HTMLDocument},Xe=function(e){if(Ye(e))return{isElement:!0,content:e,vNode:void 0};if(/^(#|\.)/.test(e)){var t=document.querySelector(e),n=Ye(t);return{isElement:n,content:n?t:e,vNode:n?void 0:e}}return{isElement:!1,content:e,vNode:e}};const Ze=function(n,o,r){var i=r.refReference,l=r.refContent,a=r.refArrow,c=r.refRoot,u=(0,t.ref)(!1),s=(0,t.ref)(),f=function(){var e,t,n,o=T(null===(e=i.value)||void 0===e?void 0:e.$el);return(null===(t=document.fullscreenElement)||void 0===t?void 0:t.shadowRoot)?document.fullscreenElement.shadowRoot.contains(o):null===(n=document.fullscreenElement)||void 0===n?void 0:n.contains(o)},d=["dark","light"],v=(0,t.computed)((function(){var e,t,o=null!==(t=null===(e=n.theme)||void 0===e?void 0:e.split(/\s+/))&&void 0!==t?t:[];return o.sort((function(e,t){return Number(d.includes(t))-Number(d.includes(e))})),{systemThemes:o,customThemes:o.filter((function(e){return!d.includes(e)}))}})),y=function(){return n.autoVisibility},h=function(){return n.autoPlacement},g=function(){var e,t,o,r,u=T(null===(e=i.value)||void 0===e?void 0:e.$el),s=T(null===(t=l.value)||void 0===t?void 0:t.$el),f=n.arrow?T(null===(o=a.value)||void 0===o?void 0:o.$el):null,d=T(null===(r=c.value)||void 0===r?void 0:r.$el),p=Xe(n.content),v=p.isElement,m=p.content;return s&&v&&!(null==s?void 0:s.contains(m))&&s.append(m),{elReference:u,elContent:s,elArrow:f,root:d}},b=function(){var e={};return Array.isArray(n.modifiers)&&n.modifiers.forEach((function(t){var n,o,r,i,l;if("offset"===t.name){if("number"==typeof(null===(n=t.options)||void 0===n?void 0:n.offset)&&(l=null===(o=t.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=t.options)||void 0===r?void 0:r.offset)){var a=V(null===(i=t.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(e,{offset:l})}})),e},w=function(e,t){var n,o,r=b(),i=[ve(r.offset||t.offset),me({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a}=t,{element:c,padding:u=0}=Z(e,t)||{};if(null==c)return{};const s=ae(u),f={x:n,y:o},d=oe(r),p=te(d),v=await l.getDimensions(c),m="y"===d,y=m?"top":"left",h=m?"bottom":"right",g=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-f[d]-i.floating[p],w=f[d]-i.reference[d],T=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let x=T?T[g]:0;x&&await(null==l.isElement?void 0:l.isElement(T))||(x=a.floating[g]||i.floating[p]);const E=b/2-w/2,P=x/2-v[p]/2-1,R=U(s[y],P),O=U(s[h],P),A=R,C=x-v[p]-O,S=x/2-v[p]/2+E,N=X(A,S,C),L=null!=Q(r)&&S!=N&&i.reference[p]/2-(S<A?R:O)-v[p]/2<0?S<A?A-S:C-S:0;return{[d]:f[d]-L,data:{[d]:N,centerOffset:S-N+L}}}}))({element:e})),h()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:c,elements:u}=t,{crossAxis:s=!1,alignment:f,allowedPlacements:d=B,autoAlignment:p=!0,...v}=Z(e,t),m=void 0!==f||d===B?function(e,t,n){return(e?[...n.filter((t=>Q(t)===e)),...n.filter((t=>Q(t)!==e))]:n.filter((e=>J(e)===e))).filter((n=>!e||Q(n)===e||!!t&&ie(n)!==n))}(f||null,p,d):d,y=await se(t,v),h=(null==(n=l.autoPlacement)?void 0:n.index)||0,g=m[h];if(null==g)return{};const b=re(g,i,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(a!==g)return{reset:{placement:m[0]}};const w=[y[J(g)],y[b[0]],y[b[1]]],T=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:g,overflows:w}],x=m[h+1];if(x)return{data:{index:h+1,overflows:T},reset:{placement:x}};const E=T.map((e=>{const t=Q(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),P=(null==(r=E.filter((e=>e[2].slice(0,Q(e[0])?2:3).every((e=>e<=0))))[0])?void 0:r[0])||E[0][0];return P!==a?{data:{index:h+1,overflows:T},reset:{placement:P}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=t,{padding:a=2,x:c,y:u}=Z(e,t),s=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>ce(pe(e))))}(s),d=ce(pe(s)),p=ae(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=c&&null!=u)return f.find((e=>c>e.left-p.left&&c<e.right+p.right&&u>e.top-p.top&&u<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===ne(n)){const e=f[0],t=f[f.length-1],o="top"===J(n),r=e.top,i=t.bottom,l=o?e.left:t.left,a=o?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===J(n),t=W(...f.map((e=>e.right))),o=U(...f.map((e=>e.left))),r=f.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:t,width:t-o,height:l-i,x:o,y:i}}return d}},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=Z(e,t),y=J(o),h=J(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=f||(h||!v?[le(l)]:function(e){const t=le(e);return[ie(e),t,ie(t)]}(l));f||"none"===p||b.push(...function(e,t,n,o){const r=Q(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(J(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(ie)))),i}(l,v,p,g));const w=[l,...b],T=await se(t,m),x=[];let E=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&x.push(T[y]),s){const e=re(o,i,g);x.push(T[e[0]],T[e[1]])}if(E=[...E,{placement:o,overflows:x}],!x.every((e=>e<=0))){var P,R;const e=((null==(P=r.flip)?void 0:P.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(d){case"bestFit":{var O;const e=null==(O=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),y()&&l.middleware.push(function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Z(e,t);switch(o){case"referenceHidden":{const e=fe(await se(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:de(e)}}}case"escaped":{const e=fe(await se(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:de(e)}}}default:return{}}}}}()),f()||t.isVirtualEl){var a=(o=s.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),c=a.getElementRects,u=a.getDimensions,d=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:c,getDimensions:u,getClippingRect:d})})}return l},T=function e(t){return t instanceof HTMLElement?t:t instanceof Text?e(t.nextElementSibling):"function"==typeof(null==t?void 0:t.getBoundingClientRect)?t:null},x=v.value.customThemes.join(" "),E=v.value.customThemes.reduce((function(e,t){return Object.assign(p({},"data-".concat(t,"-theme"),!0),e)}),{}),P="".concat(x),R=null,O=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},A=function(e,t,o,r){var i;n.disableTransform?Object.assign(e.style,{left:"".concat(O(t),"px"),top:"".concat(O(o),"px")}):Object.assign(e.style,{left:"0",top:"0",transform:"translate3d(".concat(O(t),"px,").concat(O(o),"px,0)")});var l=!!y()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(e.style,{visibility:l?"hidden":"visible"})},C=function(e,t,o){var r;if(n.arrow){var i=null!==(r=o.arrow)&&void 0!==r?r:{},l=i.x,a=i.y;e.setAttribute("data-arrow",t),Object.assign(e.style,{left:"",top:"",bottom:"",right:""});var c={top:"bottom",right:"left",bottom:"top",left:"right"}[t];Object.assign(e.style,p({left:null!==l?"".concat(l,"px"):"",top:null!==a?"".concat(a,"px"):""},c,"-4px"))}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=g(),o=n.elReference,r=n.elContent,i=n.elArrow,l=e||o;if(l&&r){var a=w(i,t);((e,t,n)=>{const o=new Map,r={platform:qe,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:f}=ue(u,o,c),d=o,p={},v=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:y,y:h,data:g,reset:b}=await m({x:s,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});s=null!=y?y:s,f=null!=h?h:f,p={...p,[i]:{...p[i],...g}},b&&v<=50&&(v++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:s,y:f}=ue(u,d,c))),n=-1)}return{x:s,y:f,placement:d,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})})(l,r,a).then((function(e){var t=e.x,n=e.y,o=e.placement,l=e.middlewareData,a=r.className;r.className="".concat(a.replace(P,"")," ").concat(P).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(E).forEach((function(e){r.setAttribute(e,E[e])}));var c=o.split("-")[0],u=c;["left","right","top","bottom"].includes(c)||(u="top"),A(r,t,n,l),C(i,u,l)}))}},N=void 0,L=void 0,I=!1,H=function(){return Array.isArray(n.popoverDelay)?[n.popoverDelay[0],n.popoverDelay.slice(-1)[0]]:[n.popoverDelay,n.popoverDelay]},D=function(){var e=H()[0];L=setTimeout((function(){N&&clearTimeout(N),n.disabled||(u.value=!0)}),e)},M=function(){var e=H()[1];N=setTimeout((function(){L&&clearTimeout(L),u.value=!1}),e)},F=function(){u.value?M():D()},j=function(){F()},k=function(){"hover"===n.trigger&&(N&&(I=!0,clearTimeout(N),N=void 0),$())},_=function(){I&&(M(),I=!1,q())},$=function(){o.emit(m.CONTENT_MOUSEENTER)},q=function(){o.emit(m.CONTENT_MOUSELEAVE)};return(0,t.watch)((function(){return n.isShow}),(function(e){u.value=e})),(0,t.watch)(u,(function(t){var r,i;t?((i=T(null===(r=l.value)||void 0===r?void 0:r.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(n.zIndex?n.zIndex:e.bkZIndexManager.getPopperIndex())),S(),o.emit("afterShow",{isShow:!0})):function(){var e;T(null===(e=l.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),o.emit("afterHidden",{isShow:!1})}()})),{showPopover:D,hidePopover:M,resolveTriggerEvents:function(){var e;return null!==(e={hover:{content:[["mouseenter",k],["mouseleave",_]],reference:[["mouseenter",D],["mouseleave",M],["focus",D],["blur",M]]},click:[["click",j]],manual:{content:[["mouseenter",$],["mouseleave",q]],reference:[[]]}}[n.trigger])&&void 0!==e?e:[]},updatePopover:S,triggerPopover:F,resolvePopElements:g,isElementFullScreen:f,resolveTargetElement:T,createPopInstance:function(){var e=g(),t=e.elReference,o=e.elContent;R=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,u=De(e),s=r||i?[...u?Ie(u):[],...Ie(t)]:[];s.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=u&&a?function(e,t){let n,o=null;const r=ge(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const{left:u,top:s,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const p={rootMargin:-z(s)+"px "+-z(r.clientWidth-(u+f))+"px "+-z(r.clientHeight-(s+d))+"px "+-z(u)+"px",threshold:W(0,U(1,c))||1};let v=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(m,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,p)}o.observe(e)}(!0),i}(u,n):null;let d,p=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),u&&!c&&v.observe(u),v.observe(t));let m=c?ke(e):null;return c&&function t(){const o=ke(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,d=requestAnimationFrame(t)}(),n(),()=>{s.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(d)}}(t,o,(function(){u.value&&S(null,n)}))},updateFullscreenTarget:function(e){s.value=e},getFullscreenRoot:function(e){return f()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){N&&(I=!0,clearTimeout(N),N=void 0)},localIsShow:u,cleanup:R}};var Je=null,Qe=null;const et=(0,t.defineComponent)({name:"Popover",components:{Content:g,Arrow:f,Root:j},directives:{clickoutside:s},props:M,emits:h,setup:function(n,o){var r=n.content,i=n.theme,l=n.disableTeleport,a=(0,t.toRefs)(n).reference,c=(0,t.ref)(),u=(0,t.ref)(),s=(0,t.ref)(),f=(0,t.ref)(),d=(0,t.computed)((function(){return a.value||c.value})),p=function(e,n,o){var r=o.refReference,i=o.refContent,l=o.refArrow,a=o.refRoot,c=null,u=(0,t.ref)(!1),s=(Ge.fullscreenReferId||(Ge.fullscreenReferId="id_".concat((0,ze.v4)())),Ge.fullscreenReferId),f=(0,t.ref)(),d=Ze(e,n,{refReference:r,refContent:i,refArrow:l,refRoot:a}),p=d.localIsShow,v=d.showPopover,y=d.hidePopover,h=d.updatePopover,g=d.resolveTriggerEvents,b=d.resolvePopElements,w=d.isElementFullScreen,T=d.updateFullscreenTarget,x=d.createPopInstance,E=d.getFullscreenRoot,P=d.stopHide,R=function(){y()},O=function(){x(),e.always?v():A()},A=function(){var e=b(),t=e.elReference,n=e.elContent;if(c=g(),Array.isArray(c))C(t,c);else{var o=c,r=o.content,i=o.reference;C(t,i),C(n,r)}},C=function(e,t){t.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},S=function(){var e=b(),t=e.elReference,n=e.root;u.value?I.value=null==f?void 0:f.value:I.value=L(n||t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat(Je);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",Qe),o="[data-pnode-id=".concat(Qe,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)){if("string"==typeof e.boundary)return Ke(e.boundary)?void(o=e.boundary):(console.error("props.boundary is not available selector"),void(o="body"));if(Ye(e.boundary))return void(o=e.boundary)}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat(Je)})),o};if(null===Je||!Ke("#".concat(Je))){Je="id_".concat((0,ze.v4)());var o=document.createElement("div");o.setAttribute("id",Je),o.setAttribute("data-popper-id",Je),document.body.append(o)}return null===Qe&&(Qe="id_".concat((0,ze.v4)())),{popContainerId:Je,prefixId:n(),getPrefixId:n}}(e,"#"),L=N.getPrefixId,I=(0,t.ref)(),H=function(){!function(){if(null==c?void 0:c.length){var e=b().elReference;e&&c.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),c=null}}()},D=function(e){var t;f.value=e,T(e),u.value=w(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},M=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),D(t.target),S(),h(null,e)};return{onMountedFn:function(){if(!e.disabled){if(O(),w()){var t="[data-fllsrn-id=".concat(s,"]"),n=E(t);D(n)}S(),document.body.addEventListener("fullscreenchange",M)}},onUnmountedFn:function(){H(),document.body.removeEventListener("fullscreenchange",M)},handleClickOutside:function(t){n.emit(m.CLICK_OUTSIDE,{isShow:p.value,event:t}),e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger||p.value&&R()},beforeInstanceUnmount:H,updateBoundary:S,initPopInstance:O,updatePopover:h,showPopover:v,hidePopover:y,showFn:function(){v()},hideFn:R,stopHide:P,isFullscreen:u,boundary:I,localIsShow:p}}(n,o,{refReference:d,refContent:u,refArrow:s,refRoot:f}),v=p.onMountedFn,y=p.onUnmountedFn,h=p.handleClickOutside,g=p.beforeInstanceUnmount,b=p.updateBoundary,w=p.initPopInstance,T=p.showFn,x=p.hideFn,E=p.showPopover,P=p.hidePopover,R=p.updatePopover,O=p.stopHide,A=p.localIsShow,C=p.boundary;n.always||n.disabled||(0,t.watch)((function(){return n.isShow}),(function(){n.isShow?E():P()}),{immediate:!0}),(0,t.watch)((function(){return[n.disabled]}),(function(e){e[0]?g():w()})),b(),(0,t.onMounted)(v),(0,t.onBeforeUnmount)(y);var S=(0,t.computed)((function(){return!l})),N=(0,t.computed)((function(){return n.renderType===e.RenderType.AUTO||A.value}));return{boundary:C,arrow:n.arrow,refDefaultReference:c,refContent:u,refArrow:s,content:r,theme:i,transBoundary:S,handleClickOutside:h,updatePopover:R,hide:function(){x()},show:function(){T()},stopHide:O,contentIsShow:N,renderContent:function(){return n.allowHtml?Xe(n.content).vNode:r}}},render:function(){var e,n,o,r,i,l,a=this;return(0,t.createVNode)(j,{ref:"refRoot"},{default:function(){return[(0,t.createVNode)(F,{ref:"refDefaultReference"},{default:function(){return[null!==(o=null===(n=(e=a.$slots).default)||void 0===n?void 0:n.call(e))&&void 0!==o?o:(0,t.createVNode)("span",null,null)]}}),(0,t.createVNode)(t.Teleport,{to:a.boundary,disabled:!a.transBoundary},{default:function(){return[(0,t.withDirectives)((0,t.createVNode)(g,{ref:"refContent","data-theme":a.theme,extCls:a.extCls,width:a.width,height:a.height,maxHeight:a.maxHeight},{default:function(){return[a.contentIsShow?null!==(l=null===(i=(r=a.$slots).content)||void 0===i?void 0:i.call(r))&&void 0!==l?l:a.renderContent():""]},arrow:function(){var e,n;return a.arrow?(0,t.createVNode)(f,{ref:"refArrow"},{default:function(){return[null===(n=(e=a.$slots).arrow)||void 0===n?void 0:n.call(e)]}}):""}}),[[(0,t.resolveDirective)("clickoutside"),a.handleClickOutside]])]}})]}})}});function tt(e){var n,o=null,r=null,i=null,l=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),a={name:"$popover",setup:function(e,n){var o=n.expose,r=(0,t.ref)(l),i=(0,t.ref)(),a=(0,t.ref)({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),c=function(e){if(Ye(e)){var t=e.getBoundingClientRect(),n=t.x,o=t.y,r=t.width,i=t.height;Object.assign(a.value,{width:"".concat(r,"px"),height:"".concat(i,"px"),transform:"translate3d(".concat(n,"px,").concat(o,"px,0)")})}else{var l=e.clientX,c=e.clientY;Object.assign(a.value,{transform:"translate3d(".concat(l,"px,").concat(c,"px,0)"),width:"10px",height:"10px"})}};c(r.value.target);var u=(0,t.computed)((function(){var e=["target"];return Object.keys(r.value).filter((function(t){return!e.includes(t)})).reduce((function(e,t){return Object.assign(Object.assign({},e),p({},t,r.value[t]))}),{})})),s=function(){var e;null===(e=l.onContentMouseenter)||void 0===e||e.call(l)},f=function(){var e;null===(e=l.onContentMouseleave)||void 0===e||e.call(l)};return o({show:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)},hide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var n,o;r.value.target=e,c(e),null===(o=null===(n=i.value)||void 0===n?void 0:n.updatePopover)||void 0===o||o.call(n),(0,t.nextTick)((function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.updatePopover)||void 0===t||t.call(e)}))},stopHide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,t.createVNode)(et,(0,t.mergeProps)(u.value,{ref:i,onContentMouseenter:s,onContentMouseleave:f}),{default:function(){return[(0,t.createVNode)("span",{style:a.value},null)]}})}}};return null===o&&(i=document.createElement("div"),(n=l.boundary,/^body$/i.test(n)?document.body:/^parent$/i.test(n)?Ye(l.target)?l.target.parentNode:l.target.target.parentNode:"string"==typeof n&&Ke(n)?document.querySelector(n):document.body).append(i),o=(0,t.createApp)(a),r=o.mount(i)),{close:function(){o&&(o.unmount(),r=null,o=null,i.remove())},show:function(){null==r||r.show()},hide:function(){null==r||r.hide()},update:function(e){null==r||r.updateTarget(e)},get vm(){return r},get $el(){return r.$el}}}const nt=(0,e.withInstall)(et)})(),l})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue")) : factory(root["../shared"], root["vue"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 8022:
15
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
+
17
+ var v1 = __webpack_require__(4481);
18
+ var v4 = __webpack_require__(6426);
19
+
20
+ var uuid = v4;
21
+ uuid.v1 = v1;
22
+ uuid.v4 = v4;
23
+
24
+ module.exports = uuid;
25
+
26
+
27
+ /***/ }),
28
+
29
+ /***/ 8725:
30
+ /***/ ((module) => {
31
+
32
+ /**
33
+ * Convert array of 16 byte values to UUID string format of the form:
34
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
35
+ */
36
+ var byteToHex = [];
37
+ for (var i = 0; i < 256; ++i) {
38
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
39
+ }
40
+
41
+ function bytesToUuid(buf, offset) {
42
+ var i = offset || 0;
43
+ var bth = byteToHex;
44
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
45
+ return ([
46
+ bth[buf[i++]], bth[buf[i++]],
47
+ bth[buf[i++]], bth[buf[i++]], '-',
48
+ bth[buf[i++]], bth[buf[i++]], '-',
49
+ bth[buf[i++]], bth[buf[i++]], '-',
50
+ bth[buf[i++]], bth[buf[i++]], '-',
51
+ bth[buf[i++]], bth[buf[i++]],
52
+ bth[buf[i++]], bth[buf[i++]],
53
+ bth[buf[i++]], bth[buf[i++]]
54
+ ]).join('');
55
+ }
56
+
57
+ module.exports = bytesToUuid;
58
+
59
+
60
+ /***/ }),
61
+
62
+ /***/ 9157:
63
+ /***/ ((module) => {
64
+
65
+ // Unique ID creation requires a high quality random # generator. In the
66
+ // browser this is a little complicated due to unknown quality of Math.random()
67
+ // and inconsistent support for the `crypto` API. We do the best we can via
68
+ // feature-detection
69
+
70
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto
71
+ // implementation. Also, find the complete implementation of crypto on IE11.
72
+ var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
73
+ (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
74
+
75
+ if (getRandomValues) {
76
+ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
77
+ var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
78
+
79
+ module.exports = function whatwgRNG() {
80
+ getRandomValues(rnds8);
81
+ return rnds8;
82
+ };
83
+ } else {
84
+ // Math.random()-based (RNG)
85
+ //
86
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
87
+ // quality.
88
+ var rnds = new Array(16);
89
+
90
+ module.exports = function mathRNG() {
91
+ for (var i = 0, r; i < 16; i++) {
92
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
93
+ rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
94
+ }
95
+
96
+ return rnds;
97
+ };
98
+ }
99
+
100
+
101
+ /***/ }),
102
+
103
+ /***/ 4481:
104
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
105
+
106
+ var rng = __webpack_require__(9157);
107
+ var bytesToUuid = __webpack_require__(8725);
108
+
109
+ // **`v1()` - Generate time-based UUID**
110
+ //
111
+ // Inspired by https://github.com/LiosK/UUID.js
112
+ // and http://docs.python.org/library/uuid.html
113
+
114
+ var _nodeId;
115
+ var _clockseq;
116
+
117
+ // Previous uuid creation time
118
+ var _lastMSecs = 0;
119
+ var _lastNSecs = 0;
120
+
121
+ // See https://github.com/uuidjs/uuid for API details
122
+ function v1(options, buf, offset) {
123
+ var i = buf && offset || 0;
124
+ var b = buf || [];
125
+
126
+ options = options || {};
127
+ var node = options.node || _nodeId;
128
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
129
+
130
+ // node and clockseq need to be initialized to random values if they're not
131
+ // specified. We do this lazily to minimize issues related to insufficient
132
+ // system entropy. See #189
133
+ if (node == null || clockseq == null) {
134
+ var seedBytes = rng();
135
+ if (node == null) {
136
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
137
+ node = _nodeId = [
138
+ seedBytes[0] | 0x01,
139
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
140
+ ];
141
+ }
142
+ if (clockseq == null) {
143
+ // Per 4.2.2, randomize (14 bit) clockseq
144
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
145
+ }
146
+ }
147
+
148
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
149
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
150
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
151
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
152
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
153
+
154
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
155
+ // cycle to simulate higher resolution clock
156
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
157
+
158
+ // Time since last uuid creation (in msecs)
159
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
160
+
161
+ // Per 4.2.1.2, Bump clockseq on clock regression
162
+ if (dt < 0 && options.clockseq === undefined) {
163
+ clockseq = clockseq + 1 & 0x3fff;
164
+ }
165
+
166
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
167
+ // time interval
168
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
169
+ nsecs = 0;
170
+ }
171
+
172
+ // Per 4.2.1.2 Throw error if too many uuids are requested
173
+ if (nsecs >= 10000) {
174
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
175
+ }
176
+
177
+ _lastMSecs = msecs;
178
+ _lastNSecs = nsecs;
179
+ _clockseq = clockseq;
180
+
181
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
182
+ msecs += 12219292800000;
183
+
184
+ // `time_low`
185
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
186
+ b[i++] = tl >>> 24 & 0xff;
187
+ b[i++] = tl >>> 16 & 0xff;
188
+ b[i++] = tl >>> 8 & 0xff;
189
+ b[i++] = tl & 0xff;
190
+
191
+ // `time_mid`
192
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
193
+ b[i++] = tmh >>> 8 & 0xff;
194
+ b[i++] = tmh & 0xff;
195
+
196
+ // `time_high_and_version`
197
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
198
+ b[i++] = tmh >>> 16 & 0xff;
199
+
200
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
201
+ b[i++] = clockseq >>> 8 | 0x80;
202
+
203
+ // `clock_seq_low`
204
+ b[i++] = clockseq & 0xff;
205
+
206
+ // `node`
207
+ for (var n = 0; n < 6; ++n) {
208
+ b[i + n] = node[n];
209
+ }
210
+
211
+ return buf ? buf : bytesToUuid(b);
212
+ }
213
+
214
+ module.exports = v1;
215
+
216
+
217
+ /***/ }),
218
+
219
+ /***/ 6426:
220
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
221
+
222
+ var rng = __webpack_require__(9157);
223
+ var bytesToUuid = __webpack_require__(8725);
224
+
225
+ function v4(options, buf, offset) {
226
+ var i = buf && offset || 0;
227
+
228
+ if (typeof(options) == 'string') {
229
+ buf = options === 'binary' ? new Array(16) : null;
230
+ options = null;
231
+ }
232
+ options = options || {};
233
+
234
+ var rnds = options.random || (options.rng || rng)();
235
+
236
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
237
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
238
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
239
+
240
+ // Copy bytes to buffer, if provided
241
+ if (buf) {
242
+ for (var ii = 0; ii < 16; ++ii) {
243
+ buf[i + ii] = rnds[ii];
244
+ }
245
+ }
246
+
247
+ return buf || bytesToUuid(rnds);
248
+ }
249
+
250
+ module.exports = v4;
251
+
252
+
253
+ /***/ }),
254
+
255
+ /***/ 4212:
256
+ /***/ ((module) => {
257
+
258
+ "use strict";
259
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
260
+
261
+ /***/ }),
262
+
263
+ /***/ 748:
264
+ /***/ ((module) => {
265
+
266
+ "use strict";
267
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
268
+
269
+ /***/ })
270
+
271
+ /******/ });
272
+ /************************************************************************/
273
+ /******/ // The module cache
274
+ /******/ var __webpack_module_cache__ = {};
275
+ /******/
276
+ /******/ // The require function
277
+ /******/ function __webpack_require__(moduleId) {
278
+ /******/ // Check if module is in cache
279
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
280
+ /******/ if (cachedModule !== undefined) {
281
+ /******/ return cachedModule.exports;
282
+ /******/ }
283
+ /******/ // Create a new module (and put it into the cache)
284
+ /******/ var module = __webpack_module_cache__[moduleId] = {
285
+ /******/ // no module.id needed
286
+ /******/ // no module.loaded needed
287
+ /******/ exports: {}
288
+ /******/ };
289
+ /******/
290
+ /******/ // Execute the module function
291
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
292
+ /******/
293
+ /******/ // Return the exports of the module
294
+ /******/ return module.exports;
295
+ /******/ }
296
+ /******/
297
+ /************************************************************************/
298
+ /******/ /* webpack/runtime/define property getters */
299
+ /******/ (() => {
300
+ /******/ // define getter functions for harmony exports
301
+ /******/ __webpack_require__.d = (exports, definition) => {
302
+ /******/ for(var key in definition) {
303
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
304
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
305
+ /******/ }
306
+ /******/ }
307
+ /******/ };
308
+ /******/ })();
309
+ /******/
310
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
311
+ /******/ (() => {
312
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
313
+ /******/ })();
314
+ /******/
315
+ /******/ /* webpack/runtime/make namespace object */
316
+ /******/ (() => {
317
+ /******/ // define __esModule on exports
318
+ /******/ __webpack_require__.r = (exports) => {
319
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
320
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
321
+ /******/ }
322
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
323
+ /******/ };
324
+ /******/ })();
325
+ /******/
326
+ /************************************************************************/
327
+ var __webpack_exports__ = {};
328
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
329
+ (() => {
330
+ "use strict";
331
+ // ESM COMPAT FLAG
332
+ __webpack_require__.r(__webpack_exports__);
333
+
334
+ // EXPORTS
335
+ __webpack_require__.d(__webpack_exports__, {
336
+ $bkPopover: () => (/* reexport */ createPopoverComponent),
337
+ PopoverProps: () => (/* reexport */ PopoverProps),
338
+ "default": () => (/* binding */ src)
339
+ });
340
+
341
+ // EXTERNAL MODULE: external "../shared"
342
+ var external_shared_ = __webpack_require__(4212);
343
+ // EXTERNAL MODULE: external "vue"
344
+ var external_vue_ = __webpack_require__(748);
345
+ ;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
346
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
347
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
348
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
349
+ /*
350
+ * Tencent is pleased to support the open source community by making
351
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
352
+ *
353
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
354
+ *
355
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
356
+ *
357
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
358
+ *
359
+ * ---------------------------------------------------
360
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
361
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
362
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
363
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
364
+ *
365
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
366
+ * the Software.
367
+ *
368
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
369
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
370
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
371
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
372
+ * IN THE SOFTWARE.
373
+ */
374
+ var isElement = function isElement(e) {
375
+ if (typeof Element === 'undefined') return false;
376
+ return e instanceof Element;
377
+ };
378
+ var nodeList = new Map();
379
+ var startClick;
380
+ document.addEventListener('mousedown', function (e) {
381
+ return startClick = e;
382
+ });
383
+ document.addEventListener('mouseup', function (e) {
384
+ var _iterator = _createForOfIteratorHelper(nodeList.values()),
385
+ _step;
386
+ try {
387
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
388
+ var handlers = _step.value;
389
+ var _iterator2 = _createForOfIteratorHelper(handlers),
390
+ _step2;
391
+ try {
392
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
393
+ var documentHandler = _step2.value.documentHandler;
394
+ documentHandler(e, startClick);
395
+ }
396
+ } catch (err) {
397
+ _iterator2.e(err);
398
+ } finally {
399
+ _iterator2.f();
400
+ }
401
+ }
402
+ } catch (err) {
403
+ _iterator.e(err);
404
+ } finally {
405
+ _iterator.f();
406
+ }
407
+ });
408
+ function createDocumentHandler(el, binding) {
409
+ var excludes = [];
410
+ if (Array.isArray(binding.arg)) {
411
+ excludes = binding.arg;
412
+ } else if (isElement(binding.arg)) {
413
+ excludes.push(binding.arg);
414
+ }
415
+ return function (mouseup, mousedown) {
416
+ var popperRef = binding.instance.popperRef;
417
+ var mouseUpTarget = mouseup.target;
418
+ var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
419
+ var isBound = !binding || !binding.instance;
420
+ var isTargetExists = !mouseUpTarget || !mouseDownTarget;
421
+ var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
422
+ var isSelf = el === mouseUpTarget;
423
+ var isTargetExcluded = excludes.length && excludes.some(function (item) {
424
+ return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
425
+ }) || excludes.length && excludes.includes(mouseDownTarget);
426
+ var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
427
+ if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
428
+ return;
429
+ }
430
+ binding.value(mouseup, mousedown);
431
+ };
432
+ }
433
+ var ClickOutside = {
434
+ beforeMount: function beforeMount(el, binding) {
435
+ if (!nodeList.has(el)) {
436
+ nodeList.set(el, []);
437
+ }
438
+ nodeList.get(el).push({
439
+ documentHandler: createDocumentHandler(el, binding),
440
+ bindingFn: binding.value
441
+ });
442
+ },
443
+ updated: function updated(el, binding) {
444
+ if (!nodeList.has(el)) {
445
+ nodeList.set(el, []);
446
+ }
447
+ var handlers = nodeList.get(el);
448
+ var oldHandlerIndex = handlers.findIndex(function (item) {
449
+ return item.bindingFn === binding.oldValue;
450
+ });
451
+ var newHandler = {
452
+ documentHandler: createDocumentHandler(el, binding),
453
+ bindingFn: binding.value
454
+ };
455
+ if (oldHandlerIndex >= 0) {
456
+ // replace the old handler to the new handler
457
+ handlers.splice(oldHandlerIndex, 1, newHandler);
458
+ } else {
459
+ handlers.push(newHandler);
460
+ }
461
+ },
462
+ unmounted: function unmounted(el) {
463
+ // remove all listeners when a component unmounted
464
+ nodeList["delete"](el);
465
+ }
466
+ };
467
+ ClickOutside.install = function (app) {
468
+ app.directive('bkTooltips', ClickOutside);
469
+ };
470
+ /* harmony default export */ const clickoutside = (ClickOutside);
471
+ ;// CONCATENATED MODULE: ../../packages/popover/src/arrow.tsx
472
+
473
+ /*
474
+ * Tencent is pleased to support the open source community by making
475
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
476
+ *
477
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
478
+ *
479
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
480
+ *
481
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
482
+ *
483
+ * ---------------------------------------------------
484
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
485
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
486
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
487
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
488
+ *
489
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
490
+ * the Software.
491
+ *
492
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
493
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
494
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
495
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
496
+ * IN THE SOFTWARE.
497
+ */
498
+
499
+
500
+ /* harmony default export */ const src_arrow = ((0,external_vue_.defineComponent)({
501
+ name: 'PopArrow',
502
+ render: function render() {
503
+ var arrowClassName = (0,external_shared_.resolveClassName)('pop2-arrow');
504
+ return (0,external_vue_.createVNode)("div", {
505
+ "class": arrowClassName
506
+ }, null);
507
+ }
508
+ }));
509
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
510
+ function _typeof(obj) {
511
+ "@babel/helpers - typeof";
512
+
513
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
514
+ return typeof obj;
515
+ } : function (obj) {
516
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
517
+ }, _typeof(obj);
518
+ }
519
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
520
+
521
+ function _toPrimitive(input, hint) {
522
+ if (_typeof(input) !== "object" || input === null) return input;
523
+ var prim = input[Symbol.toPrimitive];
524
+ if (prim !== undefined) {
525
+ var res = prim.call(input, hint || "default");
526
+ if (_typeof(res) !== "object") return res;
527
+ throw new TypeError("@@toPrimitive must return a primitive value.");
528
+ }
529
+ return (hint === "string" ? String : Number)(input);
530
+ }
531
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
532
+
533
+
534
+ function _toPropertyKey(arg) {
535
+ var key = _toPrimitive(arg, "string");
536
+ return _typeof(key) === "symbol" ? key : String(key);
537
+ }
538
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
539
+
540
+ function _defineProperty(obj, key, value) {
541
+ key = _toPropertyKey(key);
542
+ if (key in obj) {
543
+ Object.defineProperty(obj, key, {
544
+ value: value,
545
+ enumerable: true,
546
+ configurable: true,
547
+ writable: true
548
+ });
549
+ } else {
550
+ obj[key] = value;
551
+ }
552
+ return obj;
553
+ }
554
+ ;// CONCATENATED MODULE: ../../packages/popover/src/const.tsx
555
+
556
+ var _EMIT_EVENT_TYPES;
557
+ /*
558
+ * Tencent is pleased to support the open source community by making
559
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
560
+ *
561
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
562
+ *
563
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
564
+ *
565
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
566
+ *
567
+ * ---------------------------------------------------
568
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
569
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
570
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
571
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
572
+ *
573
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
574
+ * the Software.
575
+ *
576
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
577
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
578
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
579
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
580
+ * IN THE SOFTWARE.
581
+ */
582
+ var EMPTY = function EMPTY() {
583
+ return true;
584
+ };
585
+ // eslint-disable-next-line @typescript-eslint/naming-convention
586
+ var EMIT_EVENTS;
587
+ (function (EMIT_EVENTS) {
588
+ EMIT_EVENTS["SHOW"] = "show";
589
+ EMIT_EVENTS["HIDE"] = "hide";
590
+ EMIT_EVENTS["CLICK_OUTSIDE"] = "clickoutside";
591
+ EMIT_EVENTS["CONTENT_MOUSEENTER"] = "contentMouseenter";
592
+ EMIT_EVENTS["CONTENT_MOUSELEAVE"] = "contentMouseleave";
593
+ EMIT_EVENTS["STOP_HIDE"] = "stopHide";
594
+ })(EMIT_EVENTS || (EMIT_EVENTS = {}));
595
+ var EMIT_EVENT_TYPES = (_EMIT_EVENT_TYPES = {}, _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.SHOW, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.HIDE, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CLICK_OUTSIDE, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSEENTER, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.CONTENT_MOUSELEAVE, EMPTY), _defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.STOP_HIDE, EMPTY), _EMIT_EVENT_TYPES);
596
+ ;// CONCATENATED MODULE: ../../packages/popover/src/content.tsx
597
+
598
+ /*
599
+ * Tencent is pleased to support the open source community by making
600
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
601
+ *
602
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
603
+ *
604
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
605
+ *
606
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
607
+ *
608
+ * ---------------------------------------------------
609
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
610
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
611
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
612
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
613
+ *
614
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
615
+ * the Software.
616
+ *
617
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
618
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
619
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
620
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
621
+ * IN THE SOFTWARE.
622
+ */
623
+
624
+
625
+ /* harmony default export */ const content = ((0,external_vue_.defineComponent)({
626
+ name: 'PopContent',
627
+ props: {
628
+ width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
629
+ height: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
630
+ maxHeight: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
631
+ extCls: external_shared_.PropTypes.string.def('')
632
+ },
633
+ setup: function setup(props) {
634
+ var resolveValToPix = function resolveValToPix(val) {
635
+ if (/^\d+\.?\d*$/.test("".concat(val))) {
636
+ return "".concat(val, "px");
637
+ }
638
+ return val;
639
+ };
640
+ var style = (0,external_vue_.computed)(function () {
641
+ return {
642
+ width: resolveValToPix(props.width),
643
+ height: resolveValToPix(props.height),
644
+ maxHeight: resolveValToPix(props.maxHeight)
645
+ };
646
+ });
647
+ return {
648
+ style: style
649
+ };
650
+ },
651
+ render: function render() {
652
+ var _a, _b, _c, _d, _e, _f;
653
+ var className = [(0,external_shared_.resolveClassName)('popover'), (0,external_shared_.resolveClassName)('pop2-content'), this.extCls];
654
+ return (0,external_vue_.createVNode)("div", {
655
+ "class": className,
656
+ "tabindex": "-1",
657
+ "style": this.style
658
+ }, [(_c = (_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '', (_f = (_e = (_d = this.$slots)["default"]) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : '']);
659
+ }
660
+ }));
661
+ ;// CONCATENATED MODULE: ../../packages/popover/src/props.ts
662
+
663
+ var EventProps = {
664
+ onAfterHidden: Function,
665
+ onAfterShow: Function
666
+ };
667
+ var PopoverProps = Object.assign({
668
+ isShow: external_shared_.PropTypes.bool.def(false),
669
+ always: external_shared_.PropTypes.bool.def(false),
670
+ disabled: external_shared_.PropTypes.bool.def(false),
671
+ width: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
672
+ height: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
673
+ maxHeight: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def('auto'),
674
+ content: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]).def(''),
675
+ allowHtml: external_shared_.PropTypes.bool.def(false),
676
+ /**
677
+ * 组件显示位置
678
+ */
679
+ // placement: placementType().def(PlacementEnum.TOP),
680
+ placement: (0,external_shared_.placementType)().def(external_shared_.PlacementEnum.TOP_START),
681
+ // 'dark', 'light'
682
+ theme: external_shared_.PropTypes.string.def('dark'),
683
+ /**
684
+ * 触发方式
685
+ * 支持 click hover manual
686
+ * manual: 通过isShow控制显示、隐藏
687
+ */
688
+ // trigger: triggerType(),
689
+ trigger: (0,external_shared_.triggerType)(),
690
+ /**
691
+ * content 渲染方式
692
+ */
693
+ renderType: (0,external_shared_.renderType)(),
694
+ // 是否显示箭头
695
+ arrow: external_shared_.PropTypes.bool.def(true),
696
+ padding: external_shared_.PropTypes.number.def(5),
697
+ offset: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.shape({})]).def(6),
698
+ /**
699
+ * 弹出内容绑定元素
700
+ */
701
+ boundary: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string.def('parent'), external_shared_.PropTypes.instanceOf(HTMLElement)]),
702
+ zIndex: external_shared_.PropTypes.number.def(undefined),
703
+ disableTeleport: external_shared_.PropTypes.bool.def(false),
704
+ /**
705
+ * chooses the placement that has the most space available automatically
706
+ */
707
+ autoPlacement: external_shared_.PropTypes.bool.def(false),
708
+ /**
709
+ * 当有滚动条,滚动出可是范围时自动隐藏pop
710
+ */
711
+ autoVisibility: external_shared_.PropTypes.bool.def(true),
712
+ /**
713
+ * 是否禁用clickoutside
714
+ */
715
+ disableOutsideClick: external_shared_.PropTypes.bool.def(false),
716
+ /**
717
+ * 是否禁用样式的transform更新位移
718
+ */
719
+ disableTransform: external_shared_.PropTypes.bool.def(false),
720
+ /**
721
+ * 自定义 reference
722
+ */
723
+ reference: external_shared_.PropTypes.any.def(null),
724
+ /**
725
+ * 兼容v1版本遗留配置
726
+ * 不建议使用
727
+ */
728
+ modifiers: external_shared_.PropTypes.array.def([]),
729
+ /**
730
+ * popover显示和隐藏的延时时间
731
+ */
732
+ popoverDelay: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.number)]).def(100),
733
+ /**
734
+ * 配置自定义样式类名,传入的类会被加在组件最外层的 DOM
735
+ */
736
+ extCls: external_shared_.PropTypes.string.def('')
737
+ }, EventProps);
738
+ ;// CONCATENATED MODULE: ../../packages/popover/src/reference.tsx
739
+ /*
740
+ * Tencent is pleased to support the open source community by making
741
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
742
+ *
743
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
744
+ *
745
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
746
+ *
747
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
748
+ *
749
+ * ---------------------------------------------------
750
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
751
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
752
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
753
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
754
+ *
755
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
756
+ * the Software.
757
+ *
758
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
759
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
760
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
761
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
762
+ * IN THE SOFTWARE.
763
+ */
764
+
765
+ /* harmony default export */ const reference = ((0,external_vue_.defineComponent)({
766
+ name: 'PopReference',
767
+ render: function render() {
768
+ var _a, _b, _c;
769
+ return (_c = (_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '';
770
+ }
771
+ }));
772
+ ;// CONCATENATED MODULE: ../../packages/popover/src/root.tsx
773
+
774
+ /*
775
+ * Tencent is pleased to support the open source community by making
776
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
777
+ *
778
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
779
+ *
780
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
781
+ *
782
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
783
+ *
784
+ * ---------------------------------------------------
785
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
786
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
787
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
788
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
789
+ *
790
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
791
+ * the Software.
792
+ *
793
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
794
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
795
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
796
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
797
+ * IN THE SOFTWARE.
798
+ */
799
+
800
+
801
+ /* harmony default export */ const root = ((0,external_vue_.defineComponent)({
802
+ props: {
803
+ "class": external_shared_.PropTypes.string.def(''),
804
+ mode: external_shared_.PropTypes.string.def('')
805
+ },
806
+ render: function render() {
807
+ var _a, _b;
808
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)]);
809
+ }
810
+ }));
811
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
812
+ function _arrayWithHoles(arr) {
813
+ if (Array.isArray(arr)) return arr;
814
+ }
815
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
816
+ function _iterableToArrayLimit(arr, i) {
817
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
818
+ if (null != _i) {
819
+ var _s,
820
+ _e,
821
+ _x,
822
+ _r,
823
+ _arr = [],
824
+ _n = !0,
825
+ _d = !1;
826
+ try {
827
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
828
+ if (Object(_i) !== _i) return;
829
+ _n = !1;
830
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
831
+ } catch (err) {
832
+ _d = !0, _e = err;
833
+ } finally {
834
+ try {
835
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
836
+ } finally {
837
+ if (_d) throw _e;
838
+ }
839
+ }
840
+ return _arr;
841
+ }
842
+ }
843
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
844
+ function arrayLikeToArray_arrayLikeToArray(arr, len) {
845
+ if (len == null || len > arr.length) len = arr.length;
846
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
847
+ return arr2;
848
+ }
849
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
850
+
851
+ function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
852
+ if (!o) return;
853
+ if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
854
+ var n = Object.prototype.toString.call(o).slice(8, -1);
855
+ if (n === "Object" && o.constructor) n = o.constructor.name;
856
+ if (n === "Map" || n === "Set") return Array.from(o);
857
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
858
+ }
859
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
860
+ function _nonIterableRest() {
861
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
862
+ }
863
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
864
+
865
+
866
+
867
+
868
+ function _slicedToArray(arr, i) {
869
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || _nonIterableRest();
870
+ }
871
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
872
+ const sides = ['top', 'right', 'bottom', 'left'];
873
+ const alignments = ['start', 'end'];
874
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
875
+ const floating_ui_utils_min = Math.min;
876
+ const floating_ui_utils_max = Math.max;
877
+ const round = Math.round;
878
+ const floor = Math.floor;
879
+ const createCoords = v => ({
880
+ x: v,
881
+ y: v
882
+ });
883
+ const oppositeSideMap = {
884
+ left: 'right',
885
+ right: 'left',
886
+ bottom: 'top',
887
+ top: 'bottom'
888
+ };
889
+ const oppositeAlignmentMap = {
890
+ start: 'end',
891
+ end: 'start'
892
+ };
893
+ function clamp(start, value, end) {
894
+ return floating_ui_utils_max(start, floating_ui_utils_min(value, end));
895
+ }
896
+ function floating_ui_utils_evaluate(value, param) {
897
+ return typeof value === 'function' ? value(param) : value;
898
+ }
899
+ function floating_ui_utils_getSide(placement) {
900
+ return placement.split('-')[0];
901
+ }
902
+ function floating_ui_utils_getAlignment(placement) {
903
+ return placement.split('-')[1];
904
+ }
905
+ function floating_ui_utils_getOppositeAxis(axis) {
906
+ return axis === 'x' ? 'y' : 'x';
907
+ }
908
+ function getAxisLength(axis) {
909
+ return axis === 'y' ? 'height' : 'width';
910
+ }
911
+ function floating_ui_utils_getSideAxis(placement) {
912
+ return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x';
913
+ }
914
+ function getAlignmentAxis(placement) {
915
+ return floating_ui_utils_getOppositeAxis(floating_ui_utils_getSideAxis(placement));
916
+ }
917
+ function getAlignmentSides(placement, rects, rtl) {
918
+ if (rtl === void 0) {
919
+ rtl = false;
920
+ }
921
+ const alignment = floating_ui_utils_getAlignment(placement);
922
+ const alignmentAxis = getAlignmentAxis(placement);
923
+ const length = getAxisLength(alignmentAxis);
924
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
925
+ if (rects.reference[length] > rects.floating[length]) {
926
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
927
+ }
928
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
929
+ }
930
+ function getExpandedPlacements(placement) {
931
+ const oppositePlacement = getOppositePlacement(placement);
932
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
933
+ }
934
+ function getOppositeAlignmentPlacement(placement) {
935
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
936
+ }
937
+ function getSideList(side, isStart, rtl) {
938
+ const lr = ['left', 'right'];
939
+ const rl = ['right', 'left'];
940
+ const tb = ['top', 'bottom'];
941
+ const bt = ['bottom', 'top'];
942
+ switch (side) {
943
+ case 'top':
944
+ case 'bottom':
945
+ if (rtl) return isStart ? rl : lr;
946
+ return isStart ? lr : rl;
947
+ case 'left':
948
+ case 'right':
949
+ return isStart ? tb : bt;
950
+ default:
951
+ return [];
952
+ }
953
+ }
954
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
955
+ const alignment = floating_ui_utils_getAlignment(placement);
956
+ let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl);
957
+ if (alignment) {
958
+ list = list.map(side => side + "-" + alignment);
959
+ if (flipAlignment) {
960
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
961
+ }
962
+ }
963
+ return list;
964
+ }
965
+ function getOppositePlacement(placement) {
966
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
967
+ }
968
+ function expandPaddingObject(padding) {
969
+ return {
970
+ top: 0,
971
+ right: 0,
972
+ bottom: 0,
973
+ left: 0,
974
+ ...padding
975
+ };
976
+ }
977
+ function getPaddingObject(padding) {
978
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
979
+ top: padding,
980
+ right: padding,
981
+ bottom: padding,
982
+ left: padding
983
+ };
984
+ }
985
+ function rectToClientRect(rect) {
986
+ return {
987
+ ...rect,
988
+ top: rect.y,
989
+ left: rect.x,
990
+ right: rect.x + rect.width,
991
+ bottom: rect.y + rect.height
992
+ };
993
+ }
994
+
995
+
996
+
997
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
998
+
999
+
1000
+
1001
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
1002
+ let {
1003
+ reference,
1004
+ floating
1005
+ } = _ref;
1006
+ const sideAxis = floating_ui_utils_getSideAxis(placement);
1007
+ const alignmentAxis = getAlignmentAxis(placement);
1008
+ const alignLength = getAxisLength(alignmentAxis);
1009
+ const side = floating_ui_utils_getSide(placement);
1010
+ const isVertical = sideAxis === 'y';
1011
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
1012
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
1013
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
1014
+ let coords;
1015
+ switch (side) {
1016
+ case 'top':
1017
+ coords = {
1018
+ x: commonX,
1019
+ y: reference.y - floating.height
1020
+ };
1021
+ break;
1022
+ case 'bottom':
1023
+ coords = {
1024
+ x: commonX,
1025
+ y: reference.y + reference.height
1026
+ };
1027
+ break;
1028
+ case 'right':
1029
+ coords = {
1030
+ x: reference.x + reference.width,
1031
+ y: commonY
1032
+ };
1033
+ break;
1034
+ case 'left':
1035
+ coords = {
1036
+ x: reference.x - floating.width,
1037
+ y: commonY
1038
+ };
1039
+ break;
1040
+ default:
1041
+ coords = {
1042
+ x: reference.x,
1043
+ y: reference.y
1044
+ };
1045
+ }
1046
+ switch (floating_ui_utils_getAlignment(placement)) {
1047
+ case 'start':
1048
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
1049
+ break;
1050
+ case 'end':
1051
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
1052
+ break;
1053
+ }
1054
+ return coords;
1055
+ }
1056
+
1057
+ /**
1058
+ * Computes the `x` and `y` coordinates that will place the floating element
1059
+ * next to a reference element when it is given a certain positioning strategy.
1060
+ *
1061
+ * This export does not have any `platform` interface logic. You will need to
1062
+ * write one for the platform you are using Floating UI with.
1063
+ */
1064
+ const computePosition = async (reference, floating, config) => {
1065
+ const {
1066
+ placement = 'bottom',
1067
+ strategy = 'absolute',
1068
+ middleware = [],
1069
+ platform
1070
+ } = config;
1071
+ const validMiddleware = middleware.filter(Boolean);
1072
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
1073
+ let rects = await platform.getElementRects({
1074
+ reference,
1075
+ floating,
1076
+ strategy
1077
+ });
1078
+ let {
1079
+ x,
1080
+ y
1081
+ } = computeCoordsFromPlacement(rects, placement, rtl);
1082
+ let statefulPlacement = placement;
1083
+ let middlewareData = {};
1084
+ let resetCount = 0;
1085
+ for (let i = 0; i < validMiddleware.length; i++) {
1086
+ const {
1087
+ name,
1088
+ fn
1089
+ } = validMiddleware[i];
1090
+ const {
1091
+ x: nextX,
1092
+ y: nextY,
1093
+ data,
1094
+ reset
1095
+ } = await fn({
1096
+ x,
1097
+ y,
1098
+ initialPlacement: placement,
1099
+ placement: statefulPlacement,
1100
+ strategy,
1101
+ middlewareData,
1102
+ rects,
1103
+ platform,
1104
+ elements: {
1105
+ reference,
1106
+ floating
1107
+ }
1108
+ });
1109
+ x = nextX != null ? nextX : x;
1110
+ y = nextY != null ? nextY : y;
1111
+ middlewareData = {
1112
+ ...middlewareData,
1113
+ [name]: {
1114
+ ...middlewareData[name],
1115
+ ...data
1116
+ }
1117
+ };
1118
+ if (reset && resetCount <= 50) {
1119
+ resetCount++;
1120
+ if (typeof reset === 'object') {
1121
+ if (reset.placement) {
1122
+ statefulPlacement = reset.placement;
1123
+ }
1124
+ if (reset.rects) {
1125
+ rects = reset.rects === true ? await platform.getElementRects({
1126
+ reference,
1127
+ floating,
1128
+ strategy
1129
+ }) : reset.rects;
1130
+ }
1131
+ ({
1132
+ x,
1133
+ y
1134
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
1135
+ }
1136
+ i = -1;
1137
+ continue;
1138
+ }
1139
+ }
1140
+ return {
1141
+ x,
1142
+ y,
1143
+ placement: statefulPlacement,
1144
+ strategy,
1145
+ middlewareData
1146
+ };
1147
+ };
1148
+
1149
+ /**
1150
+ * Resolves with an object of overflow side offsets that determine how much the
1151
+ * element is overflowing a given clipping boundary on each side.
1152
+ * - positive = overflowing the boundary by that number of pixels
1153
+ * - negative = how many pixels left before it will overflow
1154
+ * - 0 = lies flush with the boundary
1155
+ * @see https://floating-ui.com/docs/detectOverflow
1156
+ */
1157
+ async function detectOverflow(state, options) {
1158
+ var _await$platform$isEle;
1159
+ if (options === void 0) {
1160
+ options = {};
1161
+ }
1162
+ const {
1163
+ x,
1164
+ y,
1165
+ platform,
1166
+ rects,
1167
+ elements,
1168
+ strategy
1169
+ } = state;
1170
+ const {
1171
+ boundary = 'clippingAncestors',
1172
+ rootBoundary = 'viewport',
1173
+ elementContext = 'floating',
1174
+ altBoundary = false,
1175
+ padding = 0
1176
+ } = floating_ui_utils_evaluate(options, state);
1177
+ const paddingObject = getPaddingObject(padding);
1178
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
1179
+ const element = elements[altBoundary ? altContext : elementContext];
1180
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
1181
+ 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))),
1182
+ boundary,
1183
+ rootBoundary,
1184
+ strategy
1185
+ }));
1186
+ const rect = elementContext === 'floating' ? {
1187
+ ...rects.floating,
1188
+ x,
1189
+ y
1190
+ } : rects.reference;
1191
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
1192
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
1193
+ x: 1,
1194
+ y: 1
1195
+ } : {
1196
+ x: 1,
1197
+ y: 1
1198
+ };
1199
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
1200
+ rect,
1201
+ offsetParent,
1202
+ strategy
1203
+ }) : rect);
1204
+ return {
1205
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
1206
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
1207
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
1208
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
1209
+ };
1210
+ }
1211
+
1212
+ /**
1213
+ * Provides data to position an inner element of the floating element so that it
1214
+ * appears centered to the reference element.
1215
+ * @see https://floating-ui.com/docs/arrow
1216
+ */
1217
+ const arrow = options => ({
1218
+ name: 'arrow',
1219
+ options,
1220
+ async fn(state) {
1221
+ const {
1222
+ x,
1223
+ y,
1224
+ placement,
1225
+ rects,
1226
+ platform,
1227
+ elements
1228
+ } = state;
1229
+ // Since `element` is required, we don't Partial<> the type.
1230
+ const {
1231
+ element,
1232
+ padding = 0
1233
+ } = floating_ui_utils_evaluate(options, state) || {};
1234
+ if (element == null) {
1235
+ return {};
1236
+ }
1237
+ const paddingObject = getPaddingObject(padding);
1238
+ const coords = {
1239
+ x,
1240
+ y
1241
+ };
1242
+ const axis = getAlignmentAxis(placement);
1243
+ const length = getAxisLength(axis);
1244
+ const arrowDimensions = await platform.getDimensions(element);
1245
+ const isYAxis = axis === 'y';
1246
+ const minProp = isYAxis ? 'top' : 'left';
1247
+ const maxProp = isYAxis ? 'bottom' : 'right';
1248
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
1249
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
1250
+ const startDiff = coords[axis] - rects.reference[axis];
1251
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
1252
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
1253
+
1254
+ // DOM platform can return `window` as the `offsetParent`.
1255
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
1256
+ clientSize = elements.floating[clientProp] || rects.floating[length];
1257
+ }
1258
+ const centerToReference = endDiff / 2 - startDiff / 2;
1259
+
1260
+ // If the padding is large enough that it causes the arrow to no longer be
1261
+ // centered, modify the padding so that it is centered.
1262
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
1263
+ const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding);
1264
+ const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding);
1265
+
1266
+ // Make sure the arrow doesn't overflow the floating element if the center
1267
+ // point is outside the floating element's bounds.
1268
+ const min$1 = minPadding;
1269
+ const max = clientSize - arrowDimensions[length] - maxPadding;
1270
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
1271
+ const offset = clamp(min$1, center, max);
1272
+
1273
+ // If the reference is small enough that the arrow's padding causes it to
1274
+ // to point to nothing for an aligned placement, adjust the offset of the
1275
+ // floating element itself. This stops `shift()` from taking action, but can
1276
+ // be worked around by calling it again after the `arrow()` if desired.
1277
+ const shouldAddOffset = floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
1278
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
1279
+ return {
1280
+ [axis]: coords[axis] - alignmentOffset,
1281
+ data: {
1282
+ [axis]: offset,
1283
+ centerOffset: center - offset + alignmentOffset
1284
+ }
1285
+ };
1286
+ }
1287
+ });
1288
+
1289
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
1290
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => floating_ui_utils_getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => floating_ui_utils_getSide(placement) === placement);
1291
+ return allowedPlacementsSortedByAlignment.filter(placement => {
1292
+ if (alignment) {
1293
+ return floating_ui_utils_getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
1294
+ }
1295
+ return true;
1296
+ });
1297
+ }
1298
+ /**
1299
+ * Optimizes the visibility of the floating element by choosing the placement
1300
+ * that has the most space available automatically, without needing to specify a
1301
+ * preferred placement. Alternative to `flip`.
1302
+ * @see https://floating-ui.com/docs/autoPlacement
1303
+ */
1304
+ const autoPlacement = function (options) {
1305
+ if (options === void 0) {
1306
+ options = {};
1307
+ }
1308
+ return {
1309
+ name: 'autoPlacement',
1310
+ options,
1311
+ async fn(state) {
1312
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
1313
+ const {
1314
+ rects,
1315
+ middlewareData,
1316
+ placement,
1317
+ platform,
1318
+ elements
1319
+ } = state;
1320
+ const {
1321
+ crossAxis = false,
1322
+ alignment,
1323
+ allowedPlacements = placements,
1324
+ autoAlignment = true,
1325
+ ...detectOverflowOptions
1326
+ } = floating_ui_utils_evaluate(options, state);
1327
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
1328
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1329
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
1330
+ const currentPlacement = placements$1[currentIndex];
1331
+ if (currentPlacement == null) {
1332
+ return {};
1333
+ }
1334
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
1335
+
1336
+ // Make `computeCoords` start from the right place.
1337
+ if (placement !== currentPlacement) {
1338
+ return {
1339
+ reset: {
1340
+ placement: placements$1[0]
1341
+ }
1342
+ };
1343
+ }
1344
+ const currentOverflows = [overflow[floating_ui_utils_getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
1345
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
1346
+ placement: currentPlacement,
1347
+ overflows: currentOverflows
1348
+ }];
1349
+ const nextPlacement = placements$1[currentIndex + 1];
1350
+
1351
+ // There are more placements to check.
1352
+ if (nextPlacement) {
1353
+ return {
1354
+ data: {
1355
+ index: currentIndex + 1,
1356
+ overflows: allOverflows
1357
+ },
1358
+ reset: {
1359
+ placement: nextPlacement
1360
+ }
1361
+ };
1362
+ }
1363
+ const placementsSortedByMostSpace = allOverflows.map(d => {
1364
+ const alignment = floating_ui_utils_getAlignment(d.placement);
1365
+ return [d.placement, alignment && crossAxis ?
1366
+ // Check along the mainAxis and main crossAxis side.
1367
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
1368
+ // Check only the mainAxis.
1369
+ d.overflows[0], d.overflows];
1370
+ }).sort((a, b) => a[1] - b[1]);
1371
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
1372
+ // Aligned placements should not check their opposite crossAxis
1373
+ // side.
1374
+ floating_ui_utils_getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
1375
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
1376
+ if (resetPlacement !== placement) {
1377
+ return {
1378
+ data: {
1379
+ index: currentIndex + 1,
1380
+ overflows: allOverflows
1381
+ },
1382
+ reset: {
1383
+ placement: resetPlacement
1384
+ }
1385
+ };
1386
+ }
1387
+ return {};
1388
+ }
1389
+ };
1390
+ };
1391
+
1392
+ /**
1393
+ * Optimizes the visibility of the floating element by flipping the `placement`
1394
+ * in order to keep it in view when the preferred placement(s) will overflow the
1395
+ * clipping boundary. Alternative to `autoPlacement`.
1396
+ * @see https://floating-ui.com/docs/flip
1397
+ */
1398
+ const flip = function (options) {
1399
+ if (options === void 0) {
1400
+ options = {};
1401
+ }
1402
+ return {
1403
+ name: 'flip',
1404
+ options,
1405
+ async fn(state) {
1406
+ var _middlewareData$flip;
1407
+ const {
1408
+ placement,
1409
+ middlewareData,
1410
+ rects,
1411
+ initialPlacement,
1412
+ platform,
1413
+ elements
1414
+ } = state;
1415
+ const {
1416
+ mainAxis: checkMainAxis = true,
1417
+ crossAxis: checkCrossAxis = true,
1418
+ fallbackPlacements: specifiedFallbackPlacements,
1419
+ fallbackStrategy = 'bestFit',
1420
+ fallbackAxisSideDirection = 'none',
1421
+ flipAlignment = true,
1422
+ ...detectOverflowOptions
1423
+ } = floating_ui_utils_evaluate(options, state);
1424
+ const side = floating_ui_utils_getSide(placement);
1425
+ const isBasePlacement = floating_ui_utils_getSide(initialPlacement) === initialPlacement;
1426
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1427
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1428
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
1429
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1430
+ }
1431
+ const placements = [initialPlacement, ...fallbackPlacements];
1432
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1433
+ const overflows = [];
1434
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1435
+ if (checkMainAxis) {
1436
+ overflows.push(overflow[side]);
1437
+ }
1438
+ if (checkCrossAxis) {
1439
+ const sides = getAlignmentSides(placement, rects, rtl);
1440
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1441
+ }
1442
+ overflowsData = [...overflowsData, {
1443
+ placement,
1444
+ overflows
1445
+ }];
1446
+
1447
+ // One or more sides is overflowing.
1448
+ if (!overflows.every(side => side <= 0)) {
1449
+ var _middlewareData$flip2, _overflowsData$filter;
1450
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1451
+ const nextPlacement = placements[nextIndex];
1452
+ if (nextPlacement) {
1453
+ // Try next placement and re-run the lifecycle.
1454
+ return {
1455
+ data: {
1456
+ index: nextIndex,
1457
+ overflows: overflowsData
1458
+ },
1459
+ reset: {
1460
+ placement: nextPlacement
1461
+ }
1462
+ };
1463
+ }
1464
+
1465
+ // First, find the candidates that fit on the mainAxis side of overflow,
1466
+ // then find the placement that fits the best on the main crossAxis side.
1467
+ 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;
1468
+
1469
+ // Otherwise fallback.
1470
+ if (!resetPlacement) {
1471
+ switch (fallbackStrategy) {
1472
+ case 'bestFit':
1473
+ {
1474
+ var _overflowsData$map$so;
1475
+ const placement = (_overflowsData$map$so = overflowsData.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$map$so[0];
1476
+ if (placement) {
1477
+ resetPlacement = placement;
1478
+ }
1479
+ break;
1480
+ }
1481
+ case 'initialPlacement':
1482
+ resetPlacement = initialPlacement;
1483
+ break;
1484
+ }
1485
+ }
1486
+ if (placement !== resetPlacement) {
1487
+ return {
1488
+ reset: {
1489
+ placement: resetPlacement
1490
+ }
1491
+ };
1492
+ }
1493
+ }
1494
+ return {};
1495
+ }
1496
+ };
1497
+ };
1498
+
1499
+ function getSideOffsets(overflow, rect) {
1500
+ return {
1501
+ top: overflow.top - rect.height,
1502
+ right: overflow.right - rect.width,
1503
+ bottom: overflow.bottom - rect.height,
1504
+ left: overflow.left - rect.width
1505
+ };
1506
+ }
1507
+ function isAnySideFullyClipped(overflow) {
1508
+ return sides.some(side => overflow[side] >= 0);
1509
+ }
1510
+ /**
1511
+ * Provides data to hide the floating element in applicable situations, such as
1512
+ * when it is not in the same clipping context as the reference element.
1513
+ * @see https://floating-ui.com/docs/hide
1514
+ */
1515
+ const hide = function (options) {
1516
+ if (options === void 0) {
1517
+ options = {};
1518
+ }
1519
+ return {
1520
+ name: 'hide',
1521
+ options,
1522
+ async fn(state) {
1523
+ const {
1524
+ rects
1525
+ } = state;
1526
+ const {
1527
+ strategy = 'referenceHidden',
1528
+ ...detectOverflowOptions
1529
+ } = floating_ui_utils_evaluate(options, state);
1530
+ switch (strategy) {
1531
+ case 'referenceHidden':
1532
+ {
1533
+ const overflow = await detectOverflow(state, {
1534
+ ...detectOverflowOptions,
1535
+ elementContext: 'reference'
1536
+ });
1537
+ const offsets = getSideOffsets(overflow, rects.reference);
1538
+ return {
1539
+ data: {
1540
+ referenceHiddenOffsets: offsets,
1541
+ referenceHidden: isAnySideFullyClipped(offsets)
1542
+ }
1543
+ };
1544
+ }
1545
+ case 'escaped':
1546
+ {
1547
+ const overflow = await detectOverflow(state, {
1548
+ ...detectOverflowOptions,
1549
+ altBoundary: true
1550
+ });
1551
+ const offsets = getSideOffsets(overflow, rects.floating);
1552
+ return {
1553
+ data: {
1554
+ escapedOffsets: offsets,
1555
+ escaped: isAnySideFullyClipped(offsets)
1556
+ }
1557
+ };
1558
+ }
1559
+ default:
1560
+ {
1561
+ return {};
1562
+ }
1563
+ }
1564
+ }
1565
+ };
1566
+ };
1567
+
1568
+ function getBoundingRect(rects) {
1569
+ const minX = floating_ui_utils_min(...rects.map(rect => rect.left));
1570
+ const minY = floating_ui_utils_min(...rects.map(rect => rect.top));
1571
+ const maxX = floating_ui_utils_max(...rects.map(rect => rect.right));
1572
+ const maxY = floating_ui_utils_max(...rects.map(rect => rect.bottom));
1573
+ return {
1574
+ x: minX,
1575
+ y: minY,
1576
+ width: maxX - minX,
1577
+ height: maxY - minY
1578
+ };
1579
+ }
1580
+ function getRectsByLine(rects) {
1581
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
1582
+ const groups = [];
1583
+ let prevRect = null;
1584
+ for (let i = 0; i < sortedRects.length; i++) {
1585
+ const rect = sortedRects[i];
1586
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
1587
+ groups.push([rect]);
1588
+ } else {
1589
+ groups[groups.length - 1].push(rect);
1590
+ }
1591
+ prevRect = rect;
1592
+ }
1593
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
1594
+ }
1595
+ /**
1596
+ * Provides improved positioning for inline reference elements that can span
1597
+ * over multiple lines, such as hyperlinks or range selections.
1598
+ * @see https://floating-ui.com/docs/inline
1599
+ */
1600
+ const inline = function (options) {
1601
+ if (options === void 0) {
1602
+ options = {};
1603
+ }
1604
+ return {
1605
+ name: 'inline',
1606
+ options,
1607
+ async fn(state) {
1608
+ const {
1609
+ placement,
1610
+ elements,
1611
+ rects,
1612
+ platform,
1613
+ strategy
1614
+ } = state;
1615
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
1616
+ // ClientRect's bounds, despite the event listener being triggered. A
1617
+ // padding of 2 seems to handle this issue.
1618
+ const {
1619
+ padding = 2,
1620
+ x,
1621
+ y
1622
+ } = floating_ui_utils_evaluate(options, state);
1623
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
1624
+ const clientRects = getRectsByLine(nativeClientRects);
1625
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
1626
+ const paddingObject = getPaddingObject(padding);
1627
+ function getBoundingClientRect() {
1628
+ // There are two rects and they are disjoined.
1629
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
1630
+ // Find the first rect in which the point is fully inside.
1631
+ 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;
1632
+ }
1633
+
1634
+ // There are 2 or more connected rects.
1635
+ if (clientRects.length >= 2) {
1636
+ if (floating_ui_utils_getSideAxis(placement) === 'y') {
1637
+ const firstRect = clientRects[0];
1638
+ const lastRect = clientRects[clientRects.length - 1];
1639
+ const isTop = floating_ui_utils_getSide(placement) === 'top';
1640
+ const top = firstRect.top;
1641
+ const bottom = lastRect.bottom;
1642
+ const left = isTop ? firstRect.left : lastRect.left;
1643
+ const right = isTop ? firstRect.right : lastRect.right;
1644
+ const width = right - left;
1645
+ const height = bottom - top;
1646
+ return {
1647
+ top,
1648
+ bottom,
1649
+ left,
1650
+ right,
1651
+ width,
1652
+ height,
1653
+ x: left,
1654
+ y: top
1655
+ };
1656
+ }
1657
+ const isLeftSide = floating_ui_utils_getSide(placement) === 'left';
1658
+ const maxRight = floating_ui_utils_max(...clientRects.map(rect => rect.right));
1659
+ const minLeft = floating_ui_utils_min(...clientRects.map(rect => rect.left));
1660
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
1661
+ const top = measureRects[0].top;
1662
+ const bottom = measureRects[measureRects.length - 1].bottom;
1663
+ const left = minLeft;
1664
+ const right = maxRight;
1665
+ const width = right - left;
1666
+ const height = bottom - top;
1667
+ return {
1668
+ top,
1669
+ bottom,
1670
+ left,
1671
+ right,
1672
+ width,
1673
+ height,
1674
+ x: left,
1675
+ y: top
1676
+ };
1677
+ }
1678
+ return fallback;
1679
+ }
1680
+ const resetRects = await platform.getElementRects({
1681
+ reference: {
1682
+ getBoundingClientRect
1683
+ },
1684
+ floating: elements.floating,
1685
+ strategy
1686
+ });
1687
+ 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) {
1688
+ return {
1689
+ reset: {
1690
+ rects: resetRects
1691
+ }
1692
+ };
1693
+ }
1694
+ return {};
1695
+ }
1696
+ };
1697
+ };
1698
+
1699
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1700
+ // Derivable.
1701
+ async function convertValueToCoords(state, options) {
1702
+ const {
1703
+ placement,
1704
+ platform,
1705
+ elements
1706
+ } = state;
1707
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1708
+ const side = floating_ui_utils_getSide(placement);
1709
+ const alignment = floating_ui_utils_getAlignment(placement);
1710
+ const isVertical = floating_ui_utils_getSideAxis(placement) === 'y';
1711
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
1712
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1713
+ const rawValue = floating_ui_utils_evaluate(options, state);
1714
+
1715
+ // eslint-disable-next-line prefer-const
1716
+ let {
1717
+ mainAxis,
1718
+ crossAxis,
1719
+ alignmentAxis
1720
+ } = typeof rawValue === 'number' ? {
1721
+ mainAxis: rawValue,
1722
+ crossAxis: 0,
1723
+ alignmentAxis: null
1724
+ } : {
1725
+ mainAxis: 0,
1726
+ crossAxis: 0,
1727
+ alignmentAxis: null,
1728
+ ...rawValue
1729
+ };
1730
+ if (alignment && typeof alignmentAxis === 'number') {
1731
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1732
+ }
1733
+ return isVertical ? {
1734
+ x: crossAxis * crossAxisMulti,
1735
+ y: mainAxis * mainAxisMulti
1736
+ } : {
1737
+ x: mainAxis * mainAxisMulti,
1738
+ y: crossAxis * crossAxisMulti
1739
+ };
1740
+ }
1741
+
1742
+ /**
1743
+ * Modifies the placement by translating the floating element along the
1744
+ * specified axes.
1745
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1746
+ * object may be passed.
1747
+ * @see https://floating-ui.com/docs/offset
1748
+ */
1749
+ const offset = function (options) {
1750
+ if (options === void 0) {
1751
+ options = 0;
1752
+ }
1753
+ return {
1754
+ name: 'offset',
1755
+ options,
1756
+ async fn(state) {
1757
+ const {
1758
+ x,
1759
+ y
1760
+ } = state;
1761
+ const diffCoords = await convertValueToCoords(state, options);
1762
+ return {
1763
+ x: x + diffCoords.x,
1764
+ y: y + diffCoords.y,
1765
+ data: diffCoords
1766
+ };
1767
+ }
1768
+ };
1769
+ };
1770
+
1771
+ /**
1772
+ * Optimizes the visibility of the floating element by shifting it in order to
1773
+ * keep it in view when it will overflow the clipping boundary.
1774
+ * @see https://floating-ui.com/docs/shift
1775
+ */
1776
+ const shift = function (options) {
1777
+ if (options === void 0) {
1778
+ options = {};
1779
+ }
1780
+ return {
1781
+ name: 'shift',
1782
+ options,
1783
+ async fn(state) {
1784
+ const {
1785
+ x,
1786
+ y,
1787
+ placement
1788
+ } = state;
1789
+ const {
1790
+ mainAxis: checkMainAxis = true,
1791
+ crossAxis: checkCrossAxis = false,
1792
+ limiter = {
1793
+ fn: _ref => {
1794
+ let {
1795
+ x,
1796
+ y
1797
+ } = _ref;
1798
+ return {
1799
+ x,
1800
+ y
1801
+ };
1802
+ }
1803
+ },
1804
+ ...detectOverflowOptions
1805
+ } = floating_ui_utils_evaluate(options, state);
1806
+ const coords = {
1807
+ x,
1808
+ y
1809
+ };
1810
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1811
+ const crossAxis = floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement));
1812
+ const mainAxis = floating_ui_utils_getOppositeAxis(crossAxis);
1813
+ let mainAxisCoord = coords[mainAxis];
1814
+ let crossAxisCoord = coords[crossAxis];
1815
+ if (checkMainAxis) {
1816
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
1817
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
1818
+ const min = mainAxisCoord + overflow[minSide];
1819
+ const max = mainAxisCoord - overflow[maxSide];
1820
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
1821
+ }
1822
+ if (checkCrossAxis) {
1823
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
1824
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
1825
+ const min = crossAxisCoord + overflow[minSide];
1826
+ const max = crossAxisCoord - overflow[maxSide];
1827
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
1828
+ }
1829
+ const limitedCoords = limiter.fn({
1830
+ ...state,
1831
+ [mainAxis]: mainAxisCoord,
1832
+ [crossAxis]: crossAxisCoord
1833
+ });
1834
+ return {
1835
+ ...limitedCoords,
1836
+ data: {
1837
+ x: limitedCoords.x - x,
1838
+ y: limitedCoords.y - y
1839
+ }
1840
+ };
1841
+ }
1842
+ };
1843
+ };
1844
+ /**
1845
+ * Built-in `limiter` that will stop `shift()` at a certain point.
1846
+ */
1847
+ const limitShift = function (options) {
1848
+ if (options === void 0) {
1849
+ options = {};
1850
+ }
1851
+ return {
1852
+ options,
1853
+ fn(state) {
1854
+ const {
1855
+ x,
1856
+ y,
1857
+ placement,
1858
+ rects,
1859
+ middlewareData
1860
+ } = state;
1861
+ const {
1862
+ offset = 0,
1863
+ mainAxis: checkMainAxis = true,
1864
+ crossAxis: checkCrossAxis = true
1865
+ } = evaluate(options, state);
1866
+ const coords = {
1867
+ x,
1868
+ y
1869
+ };
1870
+ const crossAxis = getSideAxis(placement);
1871
+ const mainAxis = getOppositeAxis(crossAxis);
1872
+ let mainAxisCoord = coords[mainAxis];
1873
+ let crossAxisCoord = coords[crossAxis];
1874
+ const rawOffset = evaluate(offset, state);
1875
+ const computedOffset = typeof rawOffset === 'number' ? {
1876
+ mainAxis: rawOffset,
1877
+ crossAxis: 0
1878
+ } : {
1879
+ mainAxis: 0,
1880
+ crossAxis: 0,
1881
+ ...rawOffset
1882
+ };
1883
+ if (checkMainAxis) {
1884
+ const len = mainAxis === 'y' ? 'height' : 'width';
1885
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
1886
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
1887
+ if (mainAxisCoord < limitMin) {
1888
+ mainAxisCoord = limitMin;
1889
+ } else if (mainAxisCoord > limitMax) {
1890
+ mainAxisCoord = limitMax;
1891
+ }
1892
+ }
1893
+ if (checkCrossAxis) {
1894
+ var _middlewareData$offse, _middlewareData$offse2;
1895
+ const len = mainAxis === 'y' ? 'width' : 'height';
1896
+ const isOriginSide = ['top', 'left'].includes(getSide(placement));
1897
+ 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);
1898
+ 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);
1899
+ if (crossAxisCoord < limitMin) {
1900
+ crossAxisCoord = limitMin;
1901
+ } else if (crossAxisCoord > limitMax) {
1902
+ crossAxisCoord = limitMax;
1903
+ }
1904
+ }
1905
+ return {
1906
+ [mainAxis]: mainAxisCoord,
1907
+ [crossAxis]: crossAxisCoord
1908
+ };
1909
+ }
1910
+ };
1911
+ };
1912
+
1913
+ /**
1914
+ * Provides data that allows you to change the size of the floating element —
1915
+ * for instance, prevent it from overflowing the clipping boundary or match the
1916
+ * width of the reference element.
1917
+ * @see https://floating-ui.com/docs/size
1918
+ */
1919
+ const size = function (options) {
1920
+ if (options === void 0) {
1921
+ options = {};
1922
+ }
1923
+ return {
1924
+ name: 'size',
1925
+ options,
1926
+ async fn(state) {
1927
+ const {
1928
+ placement,
1929
+ rects,
1930
+ platform,
1931
+ elements
1932
+ } = state;
1933
+ const {
1934
+ apply = () => {},
1935
+ ...detectOverflowOptions
1936
+ } = evaluate(options, state);
1937
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1938
+ const side = getSide(placement);
1939
+ const alignment = getAlignment(placement);
1940
+ const isYAxis = getSideAxis(placement) === 'y';
1941
+ const {
1942
+ width,
1943
+ height
1944
+ } = rects.floating;
1945
+ let heightSide;
1946
+ let widthSide;
1947
+ if (side === 'top' || side === 'bottom') {
1948
+ heightSide = side;
1949
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
1950
+ } else {
1951
+ widthSide = side;
1952
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
1953
+ }
1954
+ const overflowAvailableHeight = height - overflow[heightSide];
1955
+ const overflowAvailableWidth = width - overflow[widthSide];
1956
+ const noShift = !state.middlewareData.shift;
1957
+ let availableHeight = overflowAvailableHeight;
1958
+ let availableWidth = overflowAvailableWidth;
1959
+ if (isYAxis) {
1960
+ const maximumClippingWidth = width - overflow.left - overflow.right;
1961
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
1962
+ } else {
1963
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
1964
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
1965
+ }
1966
+ if (noShift && !alignment) {
1967
+ const xMin = max(overflow.left, 0);
1968
+ const xMax = max(overflow.right, 0);
1969
+ const yMin = max(overflow.top, 0);
1970
+ const yMax = max(overflow.bottom, 0);
1971
+ if (isYAxis) {
1972
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
1973
+ } else {
1974
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
1975
+ }
1976
+ }
1977
+ await apply({
1978
+ ...state,
1979
+ availableWidth,
1980
+ availableHeight
1981
+ });
1982
+ const nextDimensions = await platform.getDimensions(elements.floating);
1983
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
1984
+ return {
1985
+ reset: {
1986
+ rects: true
1987
+ }
1988
+ };
1989
+ }
1990
+ return {};
1991
+ }
1992
+ };
1993
+ };
1994
+
1995
+
1996
+
1997
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs
1998
+ function getNodeName(node) {
1999
+ if (isNode(node)) {
2000
+ return (node.nodeName || '').toLowerCase();
2001
+ }
2002
+ // Mocked nodes in testing environments may not be instances of Node. By
2003
+ // returning `#document` an infinite loop won't occur.
2004
+ // https://github.com/floating-ui/floating-ui/issues/2317
2005
+ return '#document';
2006
+ }
2007
+ function getWindow(node) {
2008
+ var _node$ownerDocument;
2009
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
2010
+ }
2011
+ function getDocumentElement(node) {
2012
+ var _ref;
2013
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
2014
+ }
2015
+ function isNode(value) {
2016
+ return value instanceof Node || value instanceof getWindow(value).Node;
2017
+ }
2018
+ function floating_ui_utils_dom_isElement(value) {
2019
+ return value instanceof Element || value instanceof getWindow(value).Element;
2020
+ }
2021
+ function isHTMLElement(value) {
2022
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
2023
+ }
2024
+ function isShadowRoot(value) {
2025
+ // Browsers without `ShadowRoot` support.
2026
+ if (typeof ShadowRoot === 'undefined') {
2027
+ return false;
2028
+ }
2029
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2030
+ }
2031
+ function isOverflowElement(element) {
2032
+ const {
2033
+ overflow,
2034
+ overflowX,
2035
+ overflowY,
2036
+ display
2037
+ } = getComputedStyle(element);
2038
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
2039
+ }
2040
+ function isTableElement(element) {
2041
+ return ['table', 'td', 'th'].includes(getNodeName(element));
2042
+ }
2043
+ function isContainingBlock(element) {
2044
+ const webkit = isWebKit();
2045
+ const css = getComputedStyle(element);
2046
+
2047
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
2048
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
2049
+ }
2050
+ function isWebKit() {
2051
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
2052
+ return CSS.supports('-webkit-backdrop-filter', 'none');
2053
+ }
2054
+ function isLastTraversableNode(node) {
2055
+ return ['html', 'body', '#document'].includes(getNodeName(node));
2056
+ }
2057
+ function getComputedStyle(element) {
2058
+ return getWindow(element).getComputedStyle(element);
2059
+ }
2060
+ function getNodeScroll(element) {
2061
+ if (floating_ui_utils_dom_isElement(element)) {
2062
+ return {
2063
+ scrollLeft: element.scrollLeft,
2064
+ scrollTop: element.scrollTop
2065
+ };
2066
+ }
2067
+ return {
2068
+ scrollLeft: element.pageXOffset,
2069
+ scrollTop: element.pageYOffset
2070
+ };
2071
+ }
2072
+ function getParentNode(node) {
2073
+ if (getNodeName(node) === 'html') {
2074
+ return node;
2075
+ }
2076
+ const result =
2077
+ // Step into the shadow DOM of the parent of a slotted node.
2078
+ node.assignedSlot ||
2079
+ // DOM Element detected.
2080
+ node.parentNode ||
2081
+ // ShadowRoot detected.
2082
+ isShadowRoot(node) && node.host ||
2083
+ // Fallback.
2084
+ getDocumentElement(node);
2085
+ return isShadowRoot(result) ? result.host : result;
2086
+ }
2087
+ function getNearestOverflowAncestor(node) {
2088
+ const parentNode = getParentNode(node);
2089
+ if (isLastTraversableNode(parentNode)) {
2090
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
2091
+ }
2092
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
2093
+ return parentNode;
2094
+ }
2095
+ return getNearestOverflowAncestor(parentNode);
2096
+ }
2097
+ function getOverflowAncestors(node, list) {
2098
+ var _node$ownerDocument2;
2099
+ if (list === void 0) {
2100
+ list = [];
2101
+ }
2102
+ const scrollableAncestor = getNearestOverflowAncestor(node);
2103
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
2104
+ const win = getWindow(scrollableAncestor);
2105
+ if (isBody) {
2106
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
2107
+ }
2108
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
2109
+ }
2110
+
2111
+
2112
+
2113
+ ;// CONCATENATED MODULE: ../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+
2120
+ function getCssDimensions(element) {
2121
+ const css = getComputedStyle(element);
2122
+ // In testing environments, the `width` and `height` properties are empty
2123
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
2124
+ let width = parseFloat(css.width) || 0;
2125
+ let height = parseFloat(css.height) || 0;
2126
+ const hasOffset = isHTMLElement(element);
2127
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
2128
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
2129
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
2130
+ if (shouldFallback) {
2131
+ width = offsetWidth;
2132
+ height = offsetHeight;
2133
+ }
2134
+ return {
2135
+ width,
2136
+ height,
2137
+ $: shouldFallback
2138
+ };
2139
+ }
2140
+
2141
+ function unwrapElement(element) {
2142
+ return !floating_ui_utils_dom_isElement(element) ? element.contextElement : element;
2143
+ }
2144
+
2145
+ function getScale(element) {
2146
+ const domElement = unwrapElement(element);
2147
+ if (!isHTMLElement(domElement)) {
2148
+ return createCoords(1);
2149
+ }
2150
+ const rect = domElement.getBoundingClientRect();
2151
+ const {
2152
+ width,
2153
+ height,
2154
+ $
2155
+ } = getCssDimensions(domElement);
2156
+ let x = ($ ? round(rect.width) : rect.width) / width;
2157
+ let y = ($ ? round(rect.height) : rect.height) / height;
2158
+
2159
+ // 0, NaN, or Infinity should always fallback to 1.
2160
+
2161
+ if (!x || !Number.isFinite(x)) {
2162
+ x = 1;
2163
+ }
2164
+ if (!y || !Number.isFinite(y)) {
2165
+ y = 1;
2166
+ }
2167
+ return {
2168
+ x,
2169
+ y
2170
+ };
2171
+ }
2172
+
2173
+ const noOffsets = /*#__PURE__*/createCoords(0);
2174
+ function getVisualOffsets(element) {
2175
+ const win = getWindow(element);
2176
+ if (!isWebKit() || !win.visualViewport) {
2177
+ return noOffsets;
2178
+ }
2179
+ return {
2180
+ x: win.visualViewport.offsetLeft,
2181
+ y: win.visualViewport.offsetTop
2182
+ };
2183
+ }
2184
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
2185
+ if (isFixed === void 0) {
2186
+ isFixed = false;
2187
+ }
2188
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
2189
+ return false;
2190
+ }
2191
+ return isFixed;
2192
+ }
2193
+
2194
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
2195
+ if (includeScale === void 0) {
2196
+ includeScale = false;
2197
+ }
2198
+ if (isFixedStrategy === void 0) {
2199
+ isFixedStrategy = false;
2200
+ }
2201
+ const clientRect = element.getBoundingClientRect();
2202
+ const domElement = unwrapElement(element);
2203
+ let scale = createCoords(1);
2204
+ if (includeScale) {
2205
+ if (offsetParent) {
2206
+ if (floating_ui_utils_dom_isElement(offsetParent)) {
2207
+ scale = getScale(offsetParent);
2208
+ }
2209
+ } else {
2210
+ scale = getScale(element);
2211
+ }
2212
+ }
2213
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
2214
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
2215
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
2216
+ let width = clientRect.width / scale.x;
2217
+ let height = clientRect.height / scale.y;
2218
+ if (domElement) {
2219
+ const win = getWindow(domElement);
2220
+ const offsetWin = offsetParent && floating_ui_utils_dom_isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
2221
+ let currentIFrame = win.frameElement;
2222
+ while (currentIFrame && offsetParent && offsetWin !== win) {
2223
+ const iframeScale = getScale(currentIFrame);
2224
+ const iframeRect = currentIFrame.getBoundingClientRect();
2225
+ const css = getComputedStyle(currentIFrame);
2226
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
2227
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
2228
+ x *= iframeScale.x;
2229
+ y *= iframeScale.y;
2230
+ width *= iframeScale.x;
2231
+ height *= iframeScale.y;
2232
+ x += left;
2233
+ y += top;
2234
+ currentIFrame = getWindow(currentIFrame).frameElement;
2235
+ }
2236
+ }
2237
+ return rectToClientRect({
2238
+ width,
2239
+ height,
2240
+ x,
2241
+ y
2242
+ });
2243
+ }
2244
+
2245
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
2246
+ let {
2247
+ rect,
2248
+ offsetParent,
2249
+ strategy
2250
+ } = _ref;
2251
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2252
+ const documentElement = getDocumentElement(offsetParent);
2253
+ if (offsetParent === documentElement) {
2254
+ return rect;
2255
+ }
2256
+ let scroll = {
2257
+ scrollLeft: 0,
2258
+ scrollTop: 0
2259
+ };
2260
+ let scale = createCoords(1);
2261
+ const offsets = createCoords(0);
2262
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
2263
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2264
+ scroll = getNodeScroll(offsetParent);
2265
+ }
2266
+ if (isHTMLElement(offsetParent)) {
2267
+ const offsetRect = getBoundingClientRect(offsetParent);
2268
+ scale = getScale(offsetParent);
2269
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2270
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2271
+ }
2272
+ }
2273
+ return {
2274
+ width: rect.width * scale.x,
2275
+ height: rect.height * scale.y,
2276
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
2277
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
2278
+ };
2279
+ }
2280
+
2281
+ function getClientRects(element) {
2282
+ return Array.from(element.getClientRects());
2283
+ }
2284
+
2285
+ function getWindowScrollBarX(element) {
2286
+ // If <html> has a CSS width greater than the viewport, then this will be
2287
+ // incorrect for RTL.
2288
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
2289
+ }
2290
+
2291
+ // Gets the entire size of the scrollable document area, even extending outside
2292
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
2293
+ function getDocumentRect(element) {
2294
+ const html = getDocumentElement(element);
2295
+ const scroll = getNodeScroll(element);
2296
+ const body = element.ownerDocument.body;
2297
+ const width = floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
2298
+ const height = floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
2299
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
2300
+ const y = -scroll.scrollTop;
2301
+ if (getComputedStyle(body).direction === 'rtl') {
2302
+ x += floating_ui_utils_max(html.clientWidth, body.clientWidth) - width;
2303
+ }
2304
+ return {
2305
+ width,
2306
+ height,
2307
+ x,
2308
+ y
2309
+ };
2310
+ }
2311
+
2312
+ function getViewportRect(element, strategy) {
2313
+ const win = getWindow(element);
2314
+ const html = getDocumentElement(element);
2315
+ const visualViewport = win.visualViewport;
2316
+ let width = html.clientWidth;
2317
+ let height = html.clientHeight;
2318
+ let x = 0;
2319
+ let y = 0;
2320
+ if (visualViewport) {
2321
+ width = visualViewport.width;
2322
+ height = visualViewport.height;
2323
+ const visualViewportBased = isWebKit();
2324
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
2325
+ x = visualViewport.offsetLeft;
2326
+ y = visualViewport.offsetTop;
2327
+ }
2328
+ }
2329
+ return {
2330
+ width,
2331
+ height,
2332
+ x,
2333
+ y
2334
+ };
2335
+ }
2336
+
2337
+ // Returns the inner client rect, subtracting scrollbars if present.
2338
+ function getInnerBoundingClientRect(element, strategy) {
2339
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
2340
+ const top = clientRect.top + element.clientTop;
2341
+ const left = clientRect.left + element.clientLeft;
2342
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
2343
+ const width = element.clientWidth * scale.x;
2344
+ const height = element.clientHeight * scale.y;
2345
+ const x = left * scale.x;
2346
+ const y = top * scale.y;
2347
+ return {
2348
+ width,
2349
+ height,
2350
+ x,
2351
+ y
2352
+ };
2353
+ }
2354
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
2355
+ let rect;
2356
+ if (clippingAncestor === 'viewport') {
2357
+ rect = getViewportRect(element, strategy);
2358
+ } else if (clippingAncestor === 'document') {
2359
+ rect = getDocumentRect(getDocumentElement(element));
2360
+ } else if (floating_ui_utils_dom_isElement(clippingAncestor)) {
2361
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
2362
+ } else {
2363
+ const visualOffsets = getVisualOffsets(element);
2364
+ rect = {
2365
+ ...clippingAncestor,
2366
+ x: clippingAncestor.x - visualOffsets.x,
2367
+ y: clippingAncestor.y - visualOffsets.y
2368
+ };
2369
+ }
2370
+ return rectToClientRect(rect);
2371
+ }
2372
+ function hasFixedPositionAncestor(element, stopNode) {
2373
+ const parentNode = getParentNode(element);
2374
+ if (parentNode === stopNode || !floating_ui_utils_dom_isElement(parentNode) || isLastTraversableNode(parentNode)) {
2375
+ return false;
2376
+ }
2377
+ return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
2378
+ }
2379
+
2380
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
2381
+ // clipping (or hiding) child elements. This returns all clipping ancestors
2382
+ // of the given element up the tree.
2383
+ function getClippingElementAncestors(element, cache) {
2384
+ const cachedResult = cache.get(element);
2385
+ if (cachedResult) {
2386
+ return cachedResult;
2387
+ }
2388
+ let result = getOverflowAncestors(element).filter(el => floating_ui_utils_dom_isElement(el) && getNodeName(el) !== 'body');
2389
+ let currentContainingBlockComputedStyle = null;
2390
+ const elementIsFixed = getComputedStyle(element).position === 'fixed';
2391
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
2392
+
2393
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
2394
+ while (floating_ui_utils_dom_isElement(currentNode) && !isLastTraversableNode(currentNode)) {
2395
+ const computedStyle = getComputedStyle(currentNode);
2396
+ const currentNodeIsContaining = isContainingBlock(currentNode);
2397
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
2398
+ currentContainingBlockComputedStyle = null;
2399
+ }
2400
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
2401
+ if (shouldDropCurrentNode) {
2402
+ // Drop non-containing blocks.
2403
+ result = result.filter(ancestor => ancestor !== currentNode);
2404
+ } else {
2405
+ // Record last containing block for next iteration.
2406
+ currentContainingBlockComputedStyle = computedStyle;
2407
+ }
2408
+ currentNode = getParentNode(currentNode);
2409
+ }
2410
+ cache.set(element, result);
2411
+ return result;
2412
+ }
2413
+
2414
+ // Gets the maximum area that the element is visible in due to any number of
2415
+ // clipping ancestors.
2416
+ function getClippingRect(_ref) {
2417
+ let {
2418
+ element,
2419
+ boundary,
2420
+ rootBoundary,
2421
+ strategy
2422
+ } = _ref;
2423
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
2424
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
2425
+ const firstClippingAncestor = clippingAncestors[0];
2426
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
2427
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
2428
+ accRect.top = floating_ui_utils_max(rect.top, accRect.top);
2429
+ accRect.right = floating_ui_utils_min(rect.right, accRect.right);
2430
+ accRect.bottom = floating_ui_utils_min(rect.bottom, accRect.bottom);
2431
+ accRect.left = floating_ui_utils_max(rect.left, accRect.left);
2432
+ return accRect;
2433
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
2434
+ return {
2435
+ width: clippingRect.right - clippingRect.left,
2436
+ height: clippingRect.bottom - clippingRect.top,
2437
+ x: clippingRect.left,
2438
+ y: clippingRect.top
2439
+ };
2440
+ }
2441
+
2442
+ function getDimensions(element) {
2443
+ return getCssDimensions(element);
2444
+ }
2445
+
2446
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
2447
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2448
+ const documentElement = getDocumentElement(offsetParent);
2449
+ const isFixed = strategy === 'fixed';
2450
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
2451
+ let scroll = {
2452
+ scrollLeft: 0,
2453
+ scrollTop: 0
2454
+ };
2455
+ const offsets = createCoords(0);
2456
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2457
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
2458
+ scroll = getNodeScroll(offsetParent);
2459
+ }
2460
+ if (isOffsetParentAnElement) {
2461
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
2462
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2463
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2464
+ } else if (documentElement) {
2465
+ offsets.x = getWindowScrollBarX(documentElement);
2466
+ }
2467
+ }
2468
+ return {
2469
+ x: rect.left + scroll.scrollLeft - offsets.x,
2470
+ y: rect.top + scroll.scrollTop - offsets.y,
2471
+ width: rect.width,
2472
+ height: rect.height
2473
+ };
2474
+ }
2475
+
2476
+ function getTrueOffsetParent(element, polyfill) {
2477
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
2478
+ return null;
2479
+ }
2480
+ if (polyfill) {
2481
+ return polyfill(element);
2482
+ }
2483
+ return element.offsetParent;
2484
+ }
2485
+ function getContainingBlock(element) {
2486
+ let currentNode = getParentNode(element);
2487
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2488
+ if (isContainingBlock(currentNode)) {
2489
+ return currentNode;
2490
+ } else {
2491
+ currentNode = getParentNode(currentNode);
2492
+ }
2493
+ }
2494
+ return null;
2495
+ }
2496
+
2497
+ // Gets the closest ancestor positioned element. Handles some edge cases,
2498
+ // such as table ancestors and cross browser bugs.
2499
+ function getOffsetParent(element, polyfill) {
2500
+ const window = getWindow(element);
2501
+ if (!isHTMLElement(element)) {
2502
+ return window;
2503
+ }
2504
+ let offsetParent = getTrueOffsetParent(element, polyfill);
2505
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
2506
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
2507
+ }
2508
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
2509
+ return window;
2510
+ }
2511
+ return offsetParent || getContainingBlock(element) || window;
2512
+ }
2513
+
2514
+ const getElementRects = async function (_ref) {
2515
+ let {
2516
+ reference,
2517
+ floating,
2518
+ strategy
2519
+ } = _ref;
2520
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
2521
+ const getDimensionsFn = this.getDimensions;
2522
+ return {
2523
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
2524
+ floating: {
2525
+ x: 0,
2526
+ y: 0,
2527
+ ...(await getDimensionsFn(floating))
2528
+ }
2529
+ };
2530
+ };
2531
+
2532
+ function isRTL(element) {
2533
+ return getComputedStyle(element).direction === 'rtl';
2534
+ }
2535
+
2536
+ const platform = {
2537
+ convertOffsetParentRelativeRectToViewportRelativeRect,
2538
+ getDocumentElement: getDocumentElement,
2539
+ getClippingRect,
2540
+ getOffsetParent,
2541
+ getElementRects,
2542
+ getClientRects,
2543
+ getDimensions,
2544
+ getScale,
2545
+ isElement: floating_ui_utils_dom_isElement,
2546
+ isRTL
2547
+ };
2548
+
2549
+ // https://samthor.au/2021/observing-dom/
2550
+ function observeMove(element, onMove) {
2551
+ let io = null;
2552
+ let timeoutId;
2553
+ const root = getDocumentElement(element);
2554
+ function cleanup() {
2555
+ clearTimeout(timeoutId);
2556
+ io && io.disconnect();
2557
+ io = null;
2558
+ }
2559
+ function refresh(skip, threshold) {
2560
+ if (skip === void 0) {
2561
+ skip = false;
2562
+ }
2563
+ if (threshold === void 0) {
2564
+ threshold = 1;
2565
+ }
2566
+ cleanup();
2567
+ const {
2568
+ left,
2569
+ top,
2570
+ width,
2571
+ height
2572
+ } = element.getBoundingClientRect();
2573
+ if (!skip) {
2574
+ onMove();
2575
+ }
2576
+ if (!width || !height) {
2577
+ return;
2578
+ }
2579
+ const insetTop = floor(top);
2580
+ const insetRight = floor(root.clientWidth - (left + width));
2581
+ const insetBottom = floor(root.clientHeight - (top + height));
2582
+ const insetLeft = floor(left);
2583
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
2584
+ const options = {
2585
+ rootMargin,
2586
+ threshold: floating_ui_utils_max(0, floating_ui_utils_min(1, threshold)) || 1
2587
+ };
2588
+ let isFirstUpdate = true;
2589
+ function handleObserve(entries) {
2590
+ const ratio = entries[0].intersectionRatio;
2591
+ if (ratio !== threshold) {
2592
+ if (!isFirstUpdate) {
2593
+ return refresh();
2594
+ }
2595
+ if (!ratio) {
2596
+ timeoutId = setTimeout(() => {
2597
+ refresh(false, 1e-7);
2598
+ }, 100);
2599
+ } else {
2600
+ refresh(false, ratio);
2601
+ }
2602
+ }
2603
+ isFirstUpdate = false;
2604
+ }
2605
+
2606
+ // Older browsers don't support a `document` as the root and will throw an
2607
+ // error.
2608
+ try {
2609
+ io = new IntersectionObserver(handleObserve, {
2610
+ ...options,
2611
+ // Handle <iframe>s
2612
+ root: root.ownerDocument
2613
+ });
2614
+ } catch (e) {
2615
+ io = new IntersectionObserver(handleObserve, options);
2616
+ }
2617
+ io.observe(element);
2618
+ }
2619
+ refresh(true);
2620
+ return cleanup;
2621
+ }
2622
+
2623
+ /**
2624
+ * Automatically updates the position of the floating element when necessary.
2625
+ * Should only be called when the floating element is mounted on the DOM or
2626
+ * visible on the screen.
2627
+ * @returns cleanup function that should be invoked when the floating element is
2628
+ * removed from the DOM or hidden from the screen.
2629
+ * @see https://floating-ui.com/docs/autoUpdate
2630
+ */
2631
+ function autoUpdate(reference, floating, update, options) {
2632
+ if (options === void 0) {
2633
+ options = {};
2634
+ }
2635
+ const {
2636
+ ancestorScroll = true,
2637
+ ancestorResize = true,
2638
+ elementResize = typeof ResizeObserver === 'function',
2639
+ layoutShift = typeof IntersectionObserver === 'function',
2640
+ animationFrame = false
2641
+ } = options;
2642
+ const referenceEl = unwrapElement(reference);
2643
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
2644
+ ancestors.forEach(ancestor => {
2645
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
2646
+ passive: true
2647
+ });
2648
+ ancestorResize && ancestor.addEventListener('resize', update);
2649
+ });
2650
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
2651
+ let reobserveFrame = -1;
2652
+ let resizeObserver = null;
2653
+ if (elementResize) {
2654
+ resizeObserver = new ResizeObserver(_ref => {
2655
+ let [firstEntry] = _ref;
2656
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
2657
+ // Prevent update loops when using the `size` middleware.
2658
+ // https://github.com/floating-ui/floating-ui/issues/1740
2659
+ resizeObserver.unobserve(floating);
2660
+ cancelAnimationFrame(reobserveFrame);
2661
+ reobserveFrame = requestAnimationFrame(() => {
2662
+ resizeObserver && resizeObserver.observe(floating);
2663
+ });
2664
+ }
2665
+ update();
2666
+ });
2667
+ if (referenceEl && !animationFrame) {
2668
+ resizeObserver.observe(referenceEl);
2669
+ }
2670
+ resizeObserver.observe(floating);
2671
+ }
2672
+ let frameId;
2673
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2674
+ if (animationFrame) {
2675
+ frameLoop();
2676
+ }
2677
+ function frameLoop() {
2678
+ const nextRefRect = getBoundingClientRect(reference);
2679
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
2680
+ update();
2681
+ }
2682
+ prevRefRect = nextRefRect;
2683
+ frameId = requestAnimationFrame(frameLoop);
2684
+ }
2685
+ update();
2686
+ return () => {
2687
+ ancestors.forEach(ancestor => {
2688
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
2689
+ ancestorResize && ancestor.removeEventListener('resize', update);
2690
+ });
2691
+ cleanupIo && cleanupIo();
2692
+ resizeObserver && resizeObserver.disconnect();
2693
+ resizeObserver = null;
2694
+ if (animationFrame) {
2695
+ cancelAnimationFrame(frameId);
2696
+ }
2697
+ };
2698
+ }
2699
+
2700
+ /**
2701
+ * Computes the `x` and `y` coordinates that will place the floating element
2702
+ * next to a reference element when it is given a certain CSS positioning
2703
+ * strategy.
2704
+ */
2705
+ const floating_ui_dom_computePosition = (reference, floating, options) => {
2706
+ // This caches the expensive `getClippingElementAncestors` function so that
2707
+ // multiple lifecycle resets re-use the same result. It only lives for a
2708
+ // single call. If other functions become expensive, we can add them as well.
2709
+ const cache = new Map();
2710
+ const mergedOptions = {
2711
+ platform,
2712
+ ...options
2713
+ };
2714
+ const platformWithCache = {
2715
+ ...mergedOptions.platform,
2716
+ _c: cache
2717
+ };
2718
+ return computePosition(reference, floating, {
2719
+ ...mergedOptions,
2720
+ platform: platformWithCache
2721
+ });
2722
+ };
2723
+
2724
+
2725
+
2726
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
2727
+ function _objectDestructuringEmpty(obj) {
2728
+ if (obj == null) throw new TypeError("Cannot destructure " + obj);
2729
+ }
2730
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-platform.tsx
2731
+
2732
+ /*
2733
+ * Tencent is pleased to support the open source community by making
2734
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2735
+ *
2736
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2737
+ *
2738
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2739
+ *
2740
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2741
+ *
2742
+ * ---------------------------------------------------
2743
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2744
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2745
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2746
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2747
+ *
2748
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2749
+ * the Software.
2750
+ *
2751
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2752
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2753
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2754
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2755
+ * IN THE SOFTWARE.
2756
+ */
2757
+ /* harmony default export */ const use_platform = (function (fullscreenTarget) {
2758
+ var getElementRects = function getElementRects(_ref) {
2759
+ var reference = _ref.reference,
2760
+ floating = _ref.floating;
2761
+ var refRect = reference.getBoundingClientRect();
2762
+ var floatRect = floating.getBoundingClientRect();
2763
+ return {
2764
+ reference: {
2765
+ width: refRect.width,
2766
+ height: refRect.height,
2767
+ x: refRect.x,
2768
+ y: refRect.y
2769
+ },
2770
+ floating: {
2771
+ width: floatRect.width,
2772
+ height: floatRect.height,
2773
+ x: floatRect.x,
2774
+ y: floatRect.y
2775
+ }
2776
+ };
2777
+ };
2778
+ var getDimensions = function getDimensions(element) {
2779
+ var _element$getBoundingC = element.getBoundingClientRect(),
2780
+ width = _element$getBoundingC.width,
2781
+ height = _element$getBoundingC.height;
2782
+ return {
2783
+ width: width,
2784
+ height: height
2785
+ };
2786
+ };
2787
+ var getClippingRect = function getClippingRect(_ref2) {
2788
+ _objectDestructuringEmpty(_ref2);
2789
+ var _a;
2790
+ var _ref3 = (_a = fullscreenTarget === null || fullscreenTarget === void 0 ? void 0 : fullscreenTarget.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {},
2791
+ _ref3$width = _ref3.width,
2792
+ width = _ref3$width === void 0 ? 0 : _ref3$width,
2793
+ _ref3$height = _ref3.height,
2794
+ height = _ref3$height === void 0 ? 0 : _ref3$height;
2795
+ return {
2796
+ width: width,
2797
+ height: height,
2798
+ x: 0,
2799
+ y: 0
2800
+ };
2801
+ };
2802
+ return {
2803
+ getElementRects: getElementRects,
2804
+ getDimensions: getDimensions,
2805
+ getClippingRect: getClippingRect
2806
+ };
2807
+ });
2808
+ // EXTERNAL MODULE: ../../node_modules/uuid/index.js
2809
+ var uuid = __webpack_require__(8022);
2810
+ ;// CONCATENATED MODULE: ../../packages/popover/src/utils.ts
2811
+ /*
2812
+ * Tencent is pleased to support the open source community by making
2813
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2814
+ *
2815
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2816
+ *
2817
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2818
+ *
2819
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2820
+ *
2821
+ * ---------------------------------------------------
2822
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2823
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2824
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2825
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2826
+ *
2827
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2828
+ * the Software.
2829
+ *
2830
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2831
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2832
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2833
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2834
+ * IN THE SOFTWARE.
2835
+ */
2836
+
2837
+ var CachedConst = {};
2838
+ var isAvailableId = function isAvailableId(query) {
2839
+ var container = document.querySelector(query);
2840
+ return container instanceof HTMLElement;
2841
+ };
2842
+ var getFullscreenUid = function getFullscreenUid() {
2843
+ if (!CachedConst.fullscreenReferId) {
2844
+ CachedConst.fullscreenReferId = "id_".concat((0,uuid.v4)());
2845
+ }
2846
+ return CachedConst.fullscreenReferId;
2847
+ };
2848
+ var utils_isElement = function isElement(element) {
2849
+ return element instanceof Element || element instanceof HTMLDocument;
2850
+ };
2851
+ var contentAsHTMLElement = function contentAsHTMLElement(content) {
2852
+ if (utils_isElement(content)) {
2853
+ return {
2854
+ isElement: true,
2855
+ content: content,
2856
+ vNode: undefined
2857
+ };
2858
+ }
2859
+ if (/^(#|\.)/.test(content)) {
2860
+ var target = document.querySelector(content);
2861
+ var isEle = utils_isElement(target);
2862
+ return {
2863
+ isElement: isEle,
2864
+ content: isEle ? target : content,
2865
+ vNode: isEle ? undefined : content
2866
+ };
2867
+ }
2868
+ return {
2869
+ isElement: false,
2870
+ content: content,
2871
+ vNode: content
2872
+ };
2873
+ };
2874
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-floating.tsx
2875
+
2876
+
2877
+ /*
2878
+ * Tencent is pleased to support the open source community by making
2879
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2880
+ *
2881
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2882
+ *
2883
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2884
+ *
2885
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2886
+ *
2887
+ * ---------------------------------------------------
2888
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2889
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2890
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2891
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2892
+ *
2893
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2894
+ * the Software.
2895
+ *
2896
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2897
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2898
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2899
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2900
+ * IN THE SOFTWARE.
2901
+ */
2902
+
2903
+
2904
+
2905
+
2906
+
2907
+
2908
+ /**
2909
+ * 解析popover相关配置
2910
+ */
2911
+ /* harmony default export */ const use_floating = (function (props, ctx, _ref) {
2912
+ var refReference = _ref.refReference,
2913
+ refContent = _ref.refContent,
2914
+ refArrow = _ref.refArrow,
2915
+ refRoot = _ref.refRoot;
2916
+ var localIsShow = (0,external_vue_.ref)(false);
2917
+ var fullScreenTarget = (0,external_vue_.ref)();
2918
+ var isElementFullScreen = function isElementFullScreen() {
2919
+ var _a, _b, _c;
2920
+ var elReference = resolveTargetElement((_a = refReference.value) === null || _a === void 0 ? void 0 : _a.$el);
2921
+ if ((_b = document.fullscreenElement) === null || _b === void 0 ? void 0 : _b.shadowRoot) {
2922
+ return document.fullscreenElement.shadowRoot.contains(elReference);
2923
+ }
2924
+ return (_c = document.fullscreenElement) === null || _c === void 0 ? void 0 : _c.contains(elReference);
2925
+ };
2926
+ /**
2927
+ * 当全屏模式开启,获取指定选择器下面的全屏元素
2928
+ * 如果是启用了webcomponent组件,则返回shadowRoot内指定的目标元素
2929
+ * @param selector
2930
+ * @returns
2931
+ */
2932
+ var getFullscreenRoot = function getFullscreenRoot(selector) {
2933
+ if (isElementFullScreen()) {
2934
+ if (document.fullscreenElement.shadowRoot) {
2935
+ return document.fullscreenElement.shadowRoot.querySelector(selector);
2936
+ }
2937
+ return document.fullscreenElement.querySelector(selector);
2938
+ }
2939
+ return document.body;
2940
+ };
2941
+ var themeList = ['dark', 'light'];
2942
+ /**
2943
+ * 根据props.theme计算theme
2944
+ * 返回systemTheme & customTheme
2945
+ * systemTheme是指包含在 ['dark', 'light'] 内置主题
2946
+ * customTheme是指自定义的theme,string类型
2947
+ */
2948
+ var compTheme = (0,external_vue_.computed)(function () {
2949
+ var _a, _b;
2950
+ var themes = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) !== null && _b !== void 0 ? _b : [];
2951
+ themes.sort(function (a, b) {
2952
+ return Number(themeList.includes(b)) - Number(themeList.includes(a));
2953
+ });
2954
+ var systemThemes = themes;
2955
+ var customThemes = themes.filter(function (item) {
2956
+ return !themeList.includes(item);
2957
+ });
2958
+ return {
2959
+ systemThemes: systemThemes,
2960
+ customThemes: customThemes
2961
+ };
2962
+ });
2963
+ var isHideMiddlewareAvailable = function isHideMiddlewareAvailable() {
2964
+ return props.autoVisibility;
2965
+ };
2966
+ var isAutoPlacementAvailable = function isAutoPlacementAvailable() {
2967
+ return props.autoPlacement;
2968
+ };
2969
+ /**
2970
+ * 解析弹出reference元素,content元素, arrow元素
2971
+ * @returns
2972
+ */
2973
+ var resolvePopElements = function resolvePopElements() {
2974
+ var _a, _b, _c, _d;
2975
+ var elReference = resolveTargetElement((_a = refReference.value) === null || _a === void 0 ? void 0 : _a.$el);
2976
+ var elContent = resolveTargetElement((_b = refContent.value) === null || _b === void 0 ? void 0 : _b.$el);
2977
+ var elArrow = props.arrow ? resolveTargetElement((_c = refArrow.value) === null || _c === void 0 ? void 0 : _c.$el) : null;
2978
+ var root = resolveTargetElement((_d = refRoot.value) === null || _d === void 0 ? void 0 : _d.$el);
2979
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
2980
+ isElement = _contentAsHTMLElement.isElement,
2981
+ content = _contentAsHTMLElement.content;
2982
+ if (elContent && isElement && !(elContent === null || elContent === void 0 ? void 0 : elContent.contains(content))) {
2983
+ elContent.append(content);
2984
+ }
2985
+ return {
2986
+ elReference: elReference,
2987
+ elContent: elContent,
2988
+ elArrow: elArrow,
2989
+ root: root
2990
+ };
2991
+ };
2992
+ var resolveModifiers = function resolveModifiers() {
2993
+ var resolveResult = {};
2994
+ if (Array.isArray(props.modifiers)) {
2995
+ props.modifiers.forEach(function (m) {
2996
+ var _a, _b, _c, _d;
2997
+ var result;
2998
+ if (m.name === 'offset') {
2999
+ if (typeof ((_a = m.options) === null || _a === void 0 ? void 0 : _a.offset) === 'number') {
3000
+ result = (_b = m.options) === null || _b === void 0 ? void 0 : _b.offset;
3001
+ }
3002
+ if (Array.isArray((_c = m.options) === null || _c === void 0 ? void 0 : _c.offset)) {
3003
+ var _ref2 = (_d = m.options) === null || _d === void 0 ? void 0 : _d.offset,
3004
+ _ref3 = _slicedToArray(_ref2, 2),
3005
+ mainAxis = _ref3[0],
3006
+ crossAxis = _ref3[1];
3007
+ result = {
3008
+ mainAxis: mainAxis,
3009
+ crossAxis: crossAxis
3010
+ };
3011
+ }
3012
+ Object.assign(resolveResult, {
3013
+ offset: result
3014
+ });
3015
+ }
3016
+ });
3017
+ }
3018
+ return resolveResult;
3019
+ };
3020
+ var resolvePopOptions = function resolvePopOptions(elArrow, props) {
3021
+ var _a;
3022
+ var modifiers = resolveModifiers();
3023
+ var middleware = [offset(modifiers.offset || props.offset), shift({
3024
+ padding: props.padding
3025
+ })];
3026
+ var options = {
3027
+ placement: props.placement,
3028
+ middleware: middleware
3029
+ };
3030
+ if (props.arrow) {
3031
+ middleware.push(arrow({
3032
+ element: elArrow
3033
+ }));
3034
+ }
3035
+ if (isAutoPlacementAvailable()) {
3036
+ middleware.push(autoPlacement());
3037
+ } else {
3038
+ middleware.unshift(inline());
3039
+ middleware.push(flip());
3040
+ }
3041
+ if (isHideMiddlewareAvailable()) {
3042
+ options.middleware.push(hide());
3043
+ }
3044
+ /**
3045
+ * 如果是全屏元素或者指定的虚拟元素
3046
+ * 则启用自定义的platform
3047
+ * 在弹出的全屏元素中,元素相对位置有别于document下面元素
3048
+ * 全屏模式下面,需要自定义当前元素的一个platform
3049
+ */
3050
+ if (isElementFullScreen() || props.isVirtualEl) {
3051
+ var _usePlatform = use_platform(fullScreenTarget.value),
3052
+ getElementRects = _usePlatform.getElementRects,
3053
+ getDimensions = _usePlatform.getDimensions,
3054
+ getClippingRect = _usePlatform.getClippingRect;
3055
+ Object.assign(options, {
3056
+ platform: Object.assign(Object.assign({}, (_a = props === null || props === void 0 ? void 0 : props.platform) !== null && _a !== void 0 ? _a : {}), {
3057
+ getElementRects: getElementRects,
3058
+ getDimensions: getDimensions,
3059
+ getClippingRect: getClippingRect
3060
+ })
3061
+ });
3062
+ }
3063
+ return options;
3064
+ };
3065
+ var resolveTargetElement = function resolveTargetElement(target) {
3066
+ if (target instanceof HTMLElement) {
3067
+ return target;
3068
+ }
3069
+ if (target instanceof Text) {
3070
+ return resolveTargetElement(target.nextElementSibling);
3071
+ }
3072
+ if (typeof (target === null || target === void 0 ? void 0 : target.getBoundingClientRect) === 'function') {
3073
+ return target;
3074
+ }
3075
+ return null;
3076
+ };
3077
+ // 兼容多种样式处理规则
3078
+ // class custom-theme
3079
+ var customThemeCls = compTheme.value.customThemes.join(' ');
3080
+ var customTheme = compTheme.value.customThemes.reduce(function (out, cur) {
3081
+ return Object.assign(_defineProperty({}, "data-".concat(cur, "-theme"), true), out);
3082
+ }, {});
3083
+ var contentClass = "".concat(customThemeCls);
3084
+ var cleanup = null;
3085
+ var getRoundPixelVal = function getRoundPixelVal(val) {
3086
+ var dpr = window.devicePixelRatio || 1;
3087
+ return Math.round(val * dpr) / dpr || 0;
3088
+ };
3089
+ var updatePopContentStyle = function updatePopContentStyle(elContent, x, y, middlewareData) {
3090
+ var _a;
3091
+ if (props.disableTransform) {
3092
+ Object.assign(elContent.style, {
3093
+ left: "".concat(getRoundPixelVal(x), "px"),
3094
+ top: "".concat(getRoundPixelVal(y), "px")
3095
+ });
3096
+ } else {
3097
+ Object.assign(elContent.style, {
3098
+ left: '0',
3099
+ top: '0',
3100
+ transform: "translate3d(".concat(getRoundPixelVal(x), "px,").concat(getRoundPixelVal(y), "px,0)")
3101
+ });
3102
+ }
3103
+ var referenceHidden = isHideMiddlewareAvailable() ? (_a = middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden : false;
3104
+ Object.assign(elContent.style, {
3105
+ visibility: referenceHidden ? 'hidden' : 'visible'
3106
+ });
3107
+ };
3108
+ var updateArrowStyle = function updateArrowStyle(elArrow, resolvedPlacement, middlewareData) {
3109
+ var _a;
3110
+ if (props.arrow) {
3111
+ var _ref4 = (_a = middlewareData.arrow) !== null && _a !== void 0 ? _a : {},
3112
+ arrowX = _ref4.x,
3113
+ arrowY = _ref4.y;
3114
+ elArrow.setAttribute('data-arrow', resolvedPlacement);
3115
+ var arrowConfig = {
3116
+ left: '',
3117
+ top: '',
3118
+ bottom: '',
3119
+ right: ''
3120
+ };
3121
+ Object.assign(elArrow.style, arrowConfig);
3122
+ var arrowSide = {
3123
+ top: 'bottom',
3124
+ right: 'left',
3125
+ bottom: 'top',
3126
+ left: 'right'
3127
+ }[resolvedPlacement];
3128
+ Object.assign(elArrow.style, _defineProperty({
3129
+ left: arrowX !== null ? "".concat(arrowX, "px") : '',
3130
+ top: arrowY !== null ? "".concat(arrowY, "px") : ''
3131
+ }, arrowSide, '-4px'));
3132
+ }
3133
+ };
3134
+ var createPopInstance = function createPopInstance() {
3135
+ var _resolvePopElements = resolvePopElements(),
3136
+ elReference = _resolvePopElements.elReference,
3137
+ elContent = _resolvePopElements.elContent;
3138
+ cleanup = autoUpdate(elReference, elContent, function () {
3139
+ if (localIsShow.value) {
3140
+ updatePopover(null, props);
3141
+ }
3142
+ });
3143
+ };
3144
+ var updatePopover = function updatePopover() {
3145
+ var virtualEl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
3146
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3147
+ var _resolvePopElements2 = resolvePopElements(),
3148
+ elReference = _resolvePopElements2.elReference,
3149
+ elContent = _resolvePopElements2.elContent,
3150
+ elArrow = _resolvePopElements2.elArrow;
3151
+ var targetEl = virtualEl || elReference;
3152
+ if (!targetEl || !elContent) return;
3153
+ var options = resolvePopOptions(elArrow, props);
3154
+ floating_ui_dom_computePosition(targetEl, elContent, options).then(function (_ref5) {
3155
+ var x = _ref5.x,
3156
+ y = _ref5.y,
3157
+ placement = _ref5.placement,
3158
+ middlewareData = _ref5.middlewareData;
3159
+ var oldClass = elContent.className;
3160
+ elContent.className = "".concat(oldClass.replace(contentClass, ''), " ").concat(contentClass).replace(/\s+/mg, ' ').replace(/^\s+|\s+$/g, '');
3161
+ Object.keys(customTheme).forEach(function (key) {
3162
+ elContent.setAttribute(key, customTheme[key]);
3163
+ });
3164
+ var placementStr = placement.split('-')[0];
3165
+ var resolvedPlacement = placementStr;
3166
+ if (!['left', 'right', 'top', 'bottom'].includes(placementStr)) {
3167
+ resolvedPlacement = 'top';
3168
+ }
3169
+ updatePopContentStyle(elContent, x, y, middlewareData);
3170
+ updateArrowStyle(elArrow, resolvedPlacement, middlewareData);
3171
+ });
3172
+ };
3173
+ var popHideTimerId = undefined;
3174
+ var popShowTimerId = undefined;
3175
+ var isMouseenter = false;
3176
+ var resolvePopoverDelay = function resolvePopoverDelay() {
3177
+ if (Array.isArray(props.popoverDelay)) {
3178
+ return [props.popoverDelay[0], props.popoverDelay.slice(-1)[0]];
3179
+ }
3180
+ return [props.popoverDelay, props.popoverDelay];
3181
+ };
3182
+ var showPopover = function showPopover() {
3183
+ var delay = resolvePopoverDelay()[0];
3184
+ // 设置settimeout避免hidePopover导致显示问题
3185
+ popShowTimerId = setTimeout(function () {
3186
+ if (popHideTimerId) {
3187
+ clearTimeout(popHideTimerId);
3188
+ }
3189
+ if (!props.disabled) {
3190
+ localIsShow.value = true;
3191
+ }
3192
+ }, delay);
3193
+ };
3194
+ var hidePopover = function hidePopover() {
3195
+ var delay = resolvePopoverDelay()[1];
3196
+ popHideTimerId = setTimeout(function () {
3197
+ popShowTimerId && clearTimeout(popShowTimerId);
3198
+ localIsShow.value = false;
3199
+ }, delay);
3200
+ };
3201
+ var hanldePopoverShow = function hanldePopoverShow() {
3202
+ var _a;
3203
+ var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
3204
+ elContent.style.setProperty('display', 'block');
3205
+ elContent.style.setProperty('z-index', "".concat(props.zIndex ? props.zIndex : external_shared_.bkZIndexManager.getPopperIndex()));
3206
+ updatePopover();
3207
+ ctx.emit('afterShow', {
3208
+ isShow: true
3209
+ });
3210
+ };
3211
+ var handlePopoverHide = function handlePopoverHide() {
3212
+ var _a;
3213
+ var elContent = resolveTargetElement((_a = refContent.value) === null || _a === void 0 ? void 0 : _a.$el);
3214
+ elContent.style.setProperty('display', 'none');
3215
+ ctx.emit('afterHidden', {
3216
+ isShow: false
3217
+ });
3218
+ };
3219
+ var triggerPopover = function triggerPopover() {
3220
+ if (!localIsShow.value) {
3221
+ showPopover();
3222
+ } else {
3223
+ hidePopover();
3224
+ }
3225
+ };
3226
+ var handleClickRef = function handleClickRef() {
3227
+ triggerPopover();
3228
+ };
3229
+ var handlePopContentMouseEnter = function handlePopContentMouseEnter() {
3230
+ if (props.trigger !== 'hover') {
3231
+ return;
3232
+ }
3233
+ if (popHideTimerId) {
3234
+ isMouseenter = true;
3235
+ clearTimeout(popHideTimerId);
3236
+ popHideTimerId = undefined;
3237
+ }
3238
+ emitPopContentMouseEnter();
3239
+ };
3240
+ var handlePopContentMouseLeave = function handlePopContentMouseLeave() {
3241
+ if (isMouseenter) {
3242
+ hidePopover();
3243
+ isMouseenter = false;
3244
+ emitPopContentMouseLeave();
3245
+ }
3246
+ };
3247
+ /**
3248
+ * 弹出内容鼠标移入事件
3249
+ * 抛出相关事件,方便后续操作
3250
+ * 例如:鼠标移入内容区域,则取消弹出内容隐藏操作
3251
+ */
3252
+ var emitPopContentMouseEnter = function emitPopContentMouseEnter() {
3253
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER);
3254
+ };
3255
+ /**
3256
+ * 弹出内容鼠标移出事件
3257
+ */
3258
+ var emitPopContentMouseLeave = function emitPopContentMouseLeave() {
3259
+ ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE);
3260
+ };
3261
+ var resolveTriggerEvents = function resolveTriggerEvents() {
3262
+ var _a;
3263
+ var triggerEvents = {
3264
+ hover: {
3265
+ content: [['mouseenter', handlePopContentMouseEnter], ['mouseleave', handlePopContentMouseLeave]],
3266
+ reference: [['mouseenter', showPopover], ['mouseleave', hidePopover], ['focus', showPopover], ['blur', hidePopover]]
3267
+ },
3268
+ click: [['click', handleClickRef]],
3269
+ manual: {
3270
+ content: [['mouseenter', emitPopContentMouseEnter], ['mouseleave', emitPopContentMouseLeave]],
3271
+ reference: [[]]
3272
+ }
3273
+ };
3274
+ return (_a = triggerEvents[props.trigger]) !== null && _a !== void 0 ? _a : [];
3275
+ };
3276
+ var updateFullscreenTarget = function updateFullscreenTarget(val) {
3277
+ fullScreenTarget.value = val;
3278
+ };
3279
+ (0,external_vue_.watch)(function () {
3280
+ return props.isShow;
3281
+ }, function (val) {
3282
+ localIsShow.value = val;
3283
+ });
3284
+ (0,external_vue_.watch)(localIsShow, function (val) {
3285
+ if (val) {
3286
+ hanldePopoverShow();
3287
+ } else {
3288
+ handlePopoverHide();
3289
+ }
3290
+ });
3291
+ var stopHide = function stopHide() {
3292
+ if (popHideTimerId) {
3293
+ isMouseenter = true;
3294
+ clearTimeout(popHideTimerId);
3295
+ popHideTimerId = undefined;
3296
+ }
3297
+ };
3298
+ return {
3299
+ showPopover: showPopover,
3300
+ hidePopover: hidePopover,
3301
+ resolveTriggerEvents: resolveTriggerEvents,
3302
+ updatePopover: updatePopover,
3303
+ triggerPopover: triggerPopover,
3304
+ resolvePopElements: resolvePopElements,
3305
+ isElementFullScreen: isElementFullScreen,
3306
+ resolveTargetElement: resolveTargetElement,
3307
+ createPopInstance: createPopInstance,
3308
+ updateFullscreenTarget: updateFullscreenTarget,
3309
+ getFullscreenRoot: getFullscreenRoot,
3310
+ stopHide: stopHide,
3311
+ localIsShow: localIsShow,
3312
+ cleanup: cleanup
3313
+ };
3314
+ });
3315
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popper-id.ts
3316
+ /*
3317
+ * Tencent is pleased to support the open source community by making
3318
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3319
+ *
3320
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3321
+ *
3322
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3323
+ *
3324
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3325
+ *
3326
+ * ---------------------------------------------------
3327
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3328
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3329
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3330
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3331
+ *
3332
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3333
+ * the Software.
3334
+ *
3335
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3336
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3337
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3338
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3339
+ * IN THE SOFTWARE.
3340
+ */
3341
+
3342
+
3343
+ var popContainerId = null;
3344
+ var parentNodeReferId = null;
3345
+ /* harmony default export */ const use_popper_id = (function (props) {
3346
+ var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#';
3347
+ var getPrefixId = function getPrefixId(root) {
3348
+ var resolvedBoundary = null;
3349
+ var resolveBoundary = function resolveBoundary(fn) {
3350
+ if (resolvedBoundary === null) {
3351
+ fn();
3352
+ }
3353
+ };
3354
+ var resolveParentBoundary = function resolveParentBoundary() {
3355
+ if (/^parent$/i.test(props.boundary)) {
3356
+ resolvedBoundary = "".concat(prefix).concat(popContainerId);
3357
+ var _ref = root || {},
3358
+ parentNode = _ref.parentNode;
3359
+ if (parentNode === null || parentNode === void 0 ? void 0 : parentNode.parentNode) {
3360
+ parentNode.parentNode.setAttribute('data-pnode-id', parentNodeReferId);
3361
+ resolvedBoundary = "[data-pnode-id=".concat(parentNodeReferId, "]");
3362
+ }
3363
+ }
3364
+ };
3365
+ var resolveCommonBoundary = function resolveCommonBoundary() {
3366
+ if (!/^body$/i.test(props.boundary)) {
3367
+ if (typeof props.boundary === 'string') {
3368
+ if (!isAvailableId(props.boundary)) {
3369
+ console.error('props.boundary is not available selector');
3370
+ resolvedBoundary = 'body';
3371
+ return;
3372
+ }
3373
+ resolvedBoundary = props.boundary;
3374
+ return;
3375
+ }
3376
+ if (utils_isElement(props.boundary)) {
3377
+ resolvedBoundary = props.boundary;
3378
+ return;
3379
+ }
3380
+ }
3381
+ };
3382
+ resolveBoundary(resolveParentBoundary);
3383
+ resolveBoundary(resolveCommonBoundary);
3384
+ resolveBoundary(function () {
3385
+ resolvedBoundary = typeof props.boundary === 'string' ? props.boundary : "".concat(prefix).concat(popContainerId);
3386
+ });
3387
+ return resolvedBoundary;
3388
+ };
3389
+ if (popContainerId === null || !isAvailableId("#".concat(popContainerId))) {
3390
+ popContainerId = "id_".concat((0,uuid.v4)());
3391
+ var popContainer = document.createElement('div');
3392
+ popContainer.setAttribute('id', popContainerId);
3393
+ popContainer.setAttribute('data-popper-id', popContainerId);
3394
+ document.body.append(popContainer);
3395
+ }
3396
+ if (parentNodeReferId === null) {
3397
+ parentNodeReferId = "id_".concat((0,uuid.v4)());
3398
+ }
3399
+ return {
3400
+ popContainerId: popContainerId,
3401
+ prefixId: getPrefixId(),
3402
+ getPrefixId: getPrefixId
3403
+ };
3404
+ });
3405
+ ;// CONCATENATED MODULE: ../../packages/popover/src/use-popover-init.ts
3406
+
3407
+ /*
3408
+ * Tencent is pleased to support the open source community by making
3409
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3410
+ *
3411
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3412
+ *
3413
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3414
+ *
3415
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3416
+ *
3417
+ * ---------------------------------------------------
3418
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3419
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3420
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3421
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3422
+ *
3423
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3424
+ * the Software.
3425
+ *
3426
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3427
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3428
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3429
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3430
+ * IN THE SOFTWARE.
3431
+ */
3432
+
3433
+
3434
+
3435
+
3436
+
3437
+ /* harmony default export */ const use_popover_init = (function (props, ctx, _ref) {
3438
+ var refReference = _ref.refReference,
3439
+ refContent = _ref.refContent,
3440
+ refArrow = _ref.refArrow,
3441
+ refRoot = _ref.refRoot;
3442
+ var storeEvents = null;
3443
+ var isFullscreen = (0,external_vue_.ref)(false);
3444
+ var fullscreenReferId = getFullscreenUid();
3445
+ var fullScreenTarget = (0,external_vue_.ref)();
3446
+ var _useFloating = use_floating(props, ctx, {
3447
+ refReference: refReference,
3448
+ refContent: refContent,
3449
+ refArrow: refArrow,
3450
+ refRoot: refRoot
3451
+ }),
3452
+ localIsShow = _useFloating.localIsShow,
3453
+ showPopover = _useFloating.showPopover,
3454
+ hidePopover = _useFloating.hidePopover,
3455
+ updatePopover = _useFloating.updatePopover,
3456
+ resolveTriggerEvents = _useFloating.resolveTriggerEvents,
3457
+ resolvePopElements = _useFloating.resolvePopElements,
3458
+ isElementFullScreen = _useFloating.isElementFullScreen,
3459
+ updateFullscreenTarget = _useFloating.updateFullscreenTarget,
3460
+ createPopInstance = _useFloating.createPopInstance,
3461
+ getFullscreenRoot = _useFloating.getFullscreenRoot,
3462
+ stopHide = _useFloating.stopHide;
3463
+ var showFn = function showFn() {
3464
+ showPopover();
3465
+ };
3466
+ var hideFn = function hideFn() {
3467
+ hidePopover();
3468
+ };
3469
+ var initPopInstance = function initPopInstance() {
3470
+ createPopInstance();
3471
+ if (props.always) {
3472
+ showPopover();
3473
+ } else {
3474
+ addEventToPopTargetEl();
3475
+ }
3476
+ };
3477
+ var addEventToPopTargetEl = function addEventToPopTargetEl() {
3478
+ var _resolvePopElements = resolvePopElements(),
3479
+ elReference = _resolvePopElements.elReference,
3480
+ elContent = _resolvePopElements.elContent;
3481
+ storeEvents = resolveTriggerEvents();
3482
+ if (Array.isArray(storeEvents)) {
3483
+ addEventToTargetEl(elReference, storeEvents);
3484
+ } else {
3485
+ var _storeEvents = storeEvents,
3486
+ content = _storeEvents.content,
3487
+ reference = _storeEvents.reference;
3488
+ addEventToTargetEl(elReference, reference);
3489
+ addEventToTargetEl(elContent, content);
3490
+ }
3491
+ };
3492
+ var addEventToTargetEl = function addEventToTargetEl(target, evets) {
3493
+ evets.forEach(function (_ref2) {
3494
+ var _ref3 = _slicedToArray(_ref2, 2),
3495
+ event = _ref3[0],
3496
+ listener = _ref3[1];
3497
+ if (event && typeof listener === 'function') {
3498
+ target.addEventListener(event, listener);
3499
+ }
3500
+ });
3501
+ };
3502
+ var removeEventListener = function removeEventListener() {
3503
+ if (storeEvents === null || storeEvents === void 0 ? void 0 : storeEvents.length) {
3504
+ var _resolvePopElements2 = resolvePopElements(),
3505
+ elReference = _resolvePopElements2.elReference;
3506
+ if (elReference) {
3507
+ storeEvents.forEach(function (_ref4) {
3508
+ var _ref5 = _slicedToArray(_ref4, 2),
3509
+ event = _ref5[0],
3510
+ listener = _ref5[1];
3511
+ if (event && typeof listener === 'function') {
3512
+ elReference.removeEventListener(event, listener);
3513
+ }
3514
+ });
3515
+ }
3516
+ storeEvents = null;
3517
+ }
3518
+ };
3519
+ var updateBoundary = function updateBoundary() {
3520
+ var _resolvePopElements3 = resolvePopElements(),
3521
+ elReference = _resolvePopElements3.elReference,
3522
+ root = _resolvePopElements3.root;
3523
+ if (isFullscreen.value) {
3524
+ boundary.value = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value;
3525
+ return;
3526
+ }
3527
+ boundary.value = getPrefixId(root || elReference);
3528
+ };
3529
+ var _usePopperId = use_popper_id(props, '#'),
3530
+ getPrefixId = _usePopperId.getPrefixId;
3531
+ var setFullscreenTag = function setFullscreenTag() {
3532
+ var _a;
3533
+ (_a = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) === null || _a === void 0 ? void 0 : _a.setAttribute('data-fllsrn-id', fullscreenReferId);
3534
+ };
3535
+ var clearFullscreenTag = function clearFullscreenTag() {
3536
+ var _a, _b;
3537
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3538
+ ((_b = (_a = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) === null || _a === void 0 ? void 0 : _a.querySelectorAll(query)) !== null && _b !== void 0 ? _b : []).forEach(function (element) {
3539
+ element === null || element === void 0 ? void 0 : element.removeAttribute('data-fllsrn-id');
3540
+ });
3541
+ };
3542
+ var boundary = (0,external_vue_.ref)();
3543
+ var beforeInstanceUnmount = function beforeInstanceUnmount() {
3544
+ removeEventListener();
3545
+ };
3546
+ var updateFullscreen = function updateFullscreen(target) {
3547
+ fullScreenTarget.value = target;
3548
+ updateFullscreenTarget(target);
3549
+ isFullscreen.value = isElementFullScreen();
3550
+ setFullscreenTag();
3551
+ };
3552
+ var handleFullscreenChange = function handleFullscreenChange(e) {
3553
+ if (!document.fullscreenElement) {
3554
+ clearFullscreenTag();
3555
+ }
3556
+ updateFullscreen(e.target);
3557
+ updateBoundary();
3558
+ updatePopover(null, props);
3559
+ };
3560
+ var onMountedFn = function onMountedFn() {
3561
+ if (props.disabled) {
3562
+ return;
3563
+ }
3564
+ initPopInstance();
3565
+ if (isElementFullScreen()) {
3566
+ var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
3567
+ var target = getFullscreenRoot(query);
3568
+ updateFullscreen(target);
3569
+ }
3570
+ updateBoundary();
3571
+ document.body.addEventListener('fullscreenchange', handleFullscreenChange);
3572
+ };
3573
+ var onUnmountedFn = function onUnmountedFn() {
3574
+ beforeInstanceUnmount();
3575
+ document.body.removeEventListener('fullscreenchange', handleFullscreenChange);
3576
+ };
3577
+ var handleClickOutside = function handleClickOutside(_e) {
3578
+ ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
3579
+ isShow: localIsShow.value,
3580
+ event: _e
3581
+ });
3582
+ if (props.disableOutsideClick || props.always || props.disabled || props.trigger === 'manual') {
3583
+ return;
3584
+ }
3585
+ if (localIsShow.value) {
3586
+ hideFn();
3587
+ }
3588
+ };
3589
+ return {
3590
+ onMountedFn: onMountedFn,
3591
+ onUnmountedFn: onUnmountedFn,
3592
+ handleClickOutside: handleClickOutside,
3593
+ beforeInstanceUnmount: beforeInstanceUnmount,
3594
+ updateBoundary: updateBoundary,
3595
+ initPopInstance: initPopInstance,
3596
+ updatePopover: updatePopover,
3597
+ showPopover: showPopover,
3598
+ hidePopover: hidePopover,
3599
+ showFn: showFn,
3600
+ hideFn: hideFn,
3601
+ stopHide: stopHide,
3602
+ isFullscreen: isFullscreen,
3603
+ boundary: boundary,
3604
+ localIsShow: localIsShow
3605
+ };
3606
+ });
3607
+ ;// CONCATENATED MODULE: ../../packages/popover/src/popover.tsx
3608
+
3609
+ /*
3610
+ * Tencent is pleased to support the open source community by making
3611
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3612
+ *
3613
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3614
+ *
3615
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3616
+ *
3617
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3618
+ *
3619
+ * ---------------------------------------------------
3620
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3621
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3622
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3623
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3624
+ *
3625
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3626
+ * the Software.
3627
+ *
3628
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3629
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3630
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3631
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3632
+ * IN THE SOFTWARE.
3633
+ */
3634
+
3635
+
3636
+
3637
+
3638
+
3639
+
3640
+
3641
+
3642
+
3643
+
3644
+
3645
+ /* harmony default export */ const popover = ((0,external_vue_.defineComponent)({
3646
+ name: 'Popover',
3647
+ components: {
3648
+ Content: content,
3649
+ Arrow: src_arrow,
3650
+ Root: root
3651
+ },
3652
+ directives: {
3653
+ clickoutside: clickoutside
3654
+ },
3655
+ props: PopoverProps,
3656
+ emits: EMIT_EVENT_TYPES,
3657
+ setup: function setup(props, ctx) {
3658
+ var content = props.content,
3659
+ theme = props.theme,
3660
+ disableTeleport = props.disableTeleport;
3661
+ var _toRefs = (0,external_vue_.toRefs)(props),
3662
+ reference = _toRefs.reference;
3663
+ var refDefaultReference = (0,external_vue_.ref)();
3664
+ var refContent = (0,external_vue_.ref)();
3665
+ var refArrow = (0,external_vue_.ref)();
3666
+ var refRoot = (0,external_vue_.ref)();
3667
+ var refReference = (0,external_vue_.computed)(function () {
3668
+ return reference.value || refDefaultReference.value;
3669
+ });
3670
+ var _usePopoverInit = use_popover_init(props, ctx, {
3671
+ refReference: refReference,
3672
+ refContent: refContent,
3673
+ refArrow: refArrow,
3674
+ refRoot: refRoot
3675
+ }),
3676
+ onMountedFn = _usePopoverInit.onMountedFn,
3677
+ onUnmountedFn = _usePopoverInit.onUnmountedFn,
3678
+ handleClickOutside = _usePopoverInit.handleClickOutside,
3679
+ beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount,
3680
+ updateBoundary = _usePopoverInit.updateBoundary,
3681
+ initPopInstance = _usePopoverInit.initPopInstance,
3682
+ showFn = _usePopoverInit.showFn,
3683
+ hideFn = _usePopoverInit.hideFn,
3684
+ showPopover = _usePopoverInit.showPopover,
3685
+ hidePopover = _usePopoverInit.hidePopover,
3686
+ updatePopover = _usePopoverInit.updatePopover,
3687
+ stopHide = _usePopoverInit.stopHide,
3688
+ localIsShow = _usePopoverInit.localIsShow,
3689
+ boundary = _usePopoverInit.boundary;
3690
+ if (!props.always && !props.disabled) {
3691
+ (0,external_vue_.watch)(function () {
3692
+ return props.isShow;
3693
+ }, function () {
3694
+ props.isShow ? showPopover() : hidePopover();
3695
+ }, {
3696
+ immediate: true
3697
+ });
3698
+ }
3699
+ (0,external_vue_.watch)(function () {
3700
+ return [props.disabled];
3701
+ }, function (val) {
3702
+ if (val[0]) {
3703
+ beforeInstanceUnmount();
3704
+ } else {
3705
+ initPopInstance();
3706
+ }
3707
+ });
3708
+ updateBoundary();
3709
+ (0,external_vue_.onMounted)(onMountedFn);
3710
+ (0,external_vue_.onBeforeUnmount)(onUnmountedFn);
3711
+ var transBoundary = (0,external_vue_.computed)(function () {
3712
+ return !disableTeleport;
3713
+ });
3714
+ var show = function show() {
3715
+ showFn();
3716
+ };
3717
+ var hide = function hide() {
3718
+ hideFn();
3719
+ };
3720
+ var contentIsShow = (0,external_vue_.computed)(function () {
3721
+ if (props.renderType === external_shared_.RenderType.AUTO) {
3722
+ return true;
3723
+ }
3724
+ return localIsShow.value;
3725
+ });
3726
+ var renderContent = function renderContent() {
3727
+ if (props.allowHtml) {
3728
+ var _contentAsHTMLElement = contentAsHTMLElement(props.content),
3729
+ vNode = _contentAsHTMLElement.vNode;
3730
+ return vNode;
3731
+ }
3732
+ return content;
3733
+ };
3734
+ return {
3735
+ boundary: boundary,
3736
+ arrow: props.arrow,
3737
+ refDefaultReference: refDefaultReference,
3738
+ refContent: refContent,
3739
+ refArrow: refArrow,
3740
+ content: content,
3741
+ theme: theme,
3742
+ transBoundary: transBoundary,
3743
+ handleClickOutside: handleClickOutside,
3744
+ updatePopover: updatePopover,
3745
+ hide: hide,
3746
+ show: show,
3747
+ stopHide: stopHide,
3748
+ contentIsShow: contentIsShow,
3749
+ renderContent: renderContent
3750
+ };
3751
+ },
3752
+ render: function render() {
3753
+ var _this = this;
3754
+ var _a, _b, _c, _d, _e, _f;
3755
+ return (0,external_vue_.createVNode)(root, {
3756
+ "ref": "refRoot"
3757
+ }, {
3758
+ "default": function _default() {
3759
+ return [(0,external_vue_.createVNode)(reference, {
3760
+ "ref": "refDefaultReference"
3761
+ }, {
3762
+ "default": function _default() {
3763
+ return [(_c = (_b = (_a = _this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,external_vue_.createVNode)("span", null, null)];
3764
+ }
3765
+ }), (0,external_vue_.createVNode)(external_vue_.Teleport, {
3766
+ "to": _this.boundary,
3767
+ "disabled": !_this.transBoundary
3768
+ }, {
3769
+ "default": function _default() {
3770
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(content, {
3771
+ "ref": "refContent",
3772
+ "data-theme": _this.theme,
3773
+ "extCls": _this.extCls,
3774
+ "width": _this.width,
3775
+ "height": _this.height,
3776
+ "maxHeight": _this.maxHeight
3777
+ }, {
3778
+ "default": function _default() {
3779
+ return [_this.contentIsShow ? (_f = (_e = (_d = _this.$slots).content) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : _this.renderContent() : ''];
3780
+ },
3781
+ arrow: function arrow() {
3782
+ var _a, _b;
3783
+ return _this.arrow ? (0,external_vue_.createVNode)(src_arrow, {
3784
+ "ref": "refArrow"
3785
+ }, {
3786
+ "default": function _default() {
3787
+ return [(_b = (_a = _this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];
3788
+ }
3789
+ }) : '';
3790
+ }
3791
+ }), [[(0,external_vue_.resolveDirective)("clickoutside"), _this.handleClickOutside]])];
3792
+ }
3793
+ })];
3794
+ }
3795
+ });
3796
+ }
3797
+ }));
3798
+ ;// CONCATENATED MODULE: ../../packages/popover/src/plugin-popover.tsx
3799
+
3800
+
3801
+ /*
3802
+ * Tencent is pleased to support the open source community by making
3803
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3804
+ *
3805
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3806
+ *
3807
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3808
+ *
3809
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3810
+ *
3811
+ * ---------------------------------------------------
3812
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3813
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3814
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3815
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3816
+ *
3817
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3818
+ * the Software.
3819
+ *
3820
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3821
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3822
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3823
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3824
+ * IN THE SOFTWARE.
3825
+ */
3826
+
3827
+
3828
+
3829
+ function createPopoverComponent(options) {
3830
+ var $PopoverInstance = null;
3831
+ var $PopoverInstanceVm = null;
3832
+ var $PopoverInstanceEl = null;
3833
+ var resolvedOptions = Object.assign(Object.assign({
3834
+ boundary: 'body',
3835
+ placement: 'top',
3836
+ autoVisibility: false
3837
+ }, options), {
3838
+ trigger: 'manual'
3839
+ });
3840
+ // const isElement = element => element instanceof Element || element instanceof HTMLDocument;
3841
+ var popoverComponent = {
3842
+ name: '$popover',
3843
+ setup: function setup(_, _ref) {
3844
+ var expose = _ref.expose;
3845
+ var refProps = (0,external_vue_.ref)(resolvedOptions);
3846
+ var refReference = (0,external_vue_.ref)();
3847
+ var referStyle = (0,external_vue_.ref)({
3848
+ position: 'absolute',
3849
+ pointerEvents: 'none',
3850
+ left: 0,
3851
+ top: 0,
3852
+ width: 'auto',
3853
+ height: 'auto',
3854
+ transform: ''
3855
+ });
3856
+ var updateStyle = function updateStyle(target) {
3857
+ if (utils_isElement(target)) {
3858
+ var _target$getBoundingCl = target.getBoundingClientRect(),
3859
+ x = _target$getBoundingCl.x,
3860
+ y = _target$getBoundingCl.y,
3861
+ width = _target$getBoundingCl.width,
3862
+ height = _target$getBoundingCl.height;
3863
+ Object.assign(referStyle.value, {
3864
+ width: "".concat(width, "px"),
3865
+ height: "".concat(height, "px"),
3866
+ transform: "translate3d(".concat(x, "px,").concat(y, "px,0)")
3867
+ });
3868
+ return;
3869
+ }
3870
+ var clientX = target.clientX,
3871
+ clientY = target.clientY;
3872
+ Object.assign(referStyle.value, {
3873
+ transform: "translate3d(".concat(clientX, "px,").concat(clientY, "px,0)"),
3874
+ width: '10px',
3875
+ height: '10px'
3876
+ });
3877
+ };
3878
+ updateStyle(refProps.value.target);
3879
+ var show = function show() {
3880
+ var _a, _b;
3881
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.call(_a);
3882
+ };
3883
+ var hide = function hide() {
3884
+ var _a, _b;
3885
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.hide) === null || _b === void 0 ? void 0 : _b.call(_a);
3886
+ };
3887
+ var stopHide = function stopHide() {
3888
+ var _a, _b;
3889
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.stopHide) === null || _b === void 0 ? void 0 : _b.call(_a);
3890
+ };
3891
+ var attrs = (0,external_vue_.computed)(function () {
3892
+ var excludeKeys = ['target'];
3893
+ return Object.keys(refProps.value).filter(function (key) {
3894
+ return !excludeKeys.includes(key);
3895
+ }).reduce(function (out, curKey) {
3896
+ return Object.assign(Object.assign({}, out), _defineProperty({}, curKey, refProps.value[curKey]));
3897
+ }, {});
3898
+ });
3899
+ var updateTarget = function updateTarget(target) {
3900
+ var _a, _b;
3901
+ refProps.value.target = target;
3902
+ updateStyle(target);
3903
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.updatePopover) === null || _b === void 0 ? void 0 : _b.call(_a);
3904
+ (0,external_vue_.nextTick)(function () {
3905
+ var _a, _b;
3906
+ (_b = (_a = refReference.value) === null || _a === void 0 ? void 0 : _a.updatePopover) === null || _b === void 0 ? void 0 : _b.call(_a);
3907
+ });
3908
+ };
3909
+ var handleContentMouseenter = function handleContentMouseenter() {
3910
+ var _a;
3911
+ (_a = resolvedOptions.onContentMouseenter) === null || _a === void 0 ? void 0 : _a.call(resolvedOptions);
3912
+ };
3913
+ var handleContentMouseleave = function handleContentMouseleave() {
3914
+ var _a;
3915
+ (_a = resolvedOptions.onContentMouseleave) === null || _a === void 0 ? void 0 : _a.call(resolvedOptions);
3916
+ };
3917
+ expose({
3918
+ show: show,
3919
+ hide: hide,
3920
+ updateTarget: updateTarget,
3921
+ stopHide: stopHide
3922
+ });
3923
+ return function () {
3924
+ return (0,external_vue_.createVNode)(popover, (0,external_vue_.mergeProps)(attrs.value, {
3925
+ "ref": refReference,
3926
+ "onContentMouseenter": handleContentMouseenter,
3927
+ "onContentMouseleave": handleContentMouseleave
3928
+ }), {
3929
+ "default": function _default() {
3930
+ return [(0,external_vue_.createVNode)("span", {
3931
+ "style": referStyle.value
3932
+ }, null)];
3933
+ }
3934
+ });
3935
+ };
3936
+ }
3937
+ };
3938
+ function getBoundaryDom(boundary) {
3939
+ if (/^body$/i.test(boundary)) {
3940
+ return document.body;
3941
+ }
3942
+ if (/^parent$/i.test(boundary)) {
3943
+ if (utils_isElement(resolvedOptions.target)) {
3944
+ return resolvedOptions.target.parentNode;
3945
+ }
3946
+ return resolvedOptions.target.target.parentNode;
3947
+ }
3948
+ if (typeof boundary === 'string' && isAvailableId(boundary)) {
3949
+ return document.querySelector(boundary);
3950
+ }
3951
+ return document.body;
3952
+ }
3953
+ if ($PopoverInstance === null) {
3954
+ $PopoverInstanceEl = document.createElement('div');
3955
+ getBoundaryDom(resolvedOptions.boundary).append($PopoverInstanceEl);
3956
+ $PopoverInstance = (0,external_vue_.createApp)(popoverComponent);
3957
+ $PopoverInstanceVm = $PopoverInstance.mount($PopoverInstanceEl);
3958
+ }
3959
+ function close() {
3960
+ if ($PopoverInstance) {
3961
+ $PopoverInstance.unmount();
3962
+ $PopoverInstanceVm = null;
3963
+ $PopoverInstance = null;
3964
+ $PopoverInstanceEl.remove();
3965
+ }
3966
+ }
3967
+ ;
3968
+ function show() {
3969
+ $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.show();
3970
+ }
3971
+ function update(e) {
3972
+ $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.updateTarget(e);
3973
+ }
3974
+ ;
3975
+ function hide() {
3976
+ $PopoverInstanceVm === null || $PopoverInstanceVm === void 0 ? void 0 : $PopoverInstanceVm.hide();
3977
+ }
3978
+ return {
3979
+ close: close,
3980
+ show: show,
3981
+ hide: hide,
3982
+ update: update,
3983
+ get vm() {
3984
+ return $PopoverInstanceVm;
3985
+ },
3986
+ get $el() {
3987
+ return $PopoverInstanceVm.$el;
3988
+ }
3989
+ };
3990
+ }
3991
+ ;// CONCATENATED MODULE: ../../packages/popover/src/index.ts
3992
+ /**
3993
+ * Tencent is pleased to support the open source community by making
3994
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3995
+ *
3996
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3997
+ *
3998
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3999
+ *
4000
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
4001
+ *
4002
+ * ---------------------------------------------------
4003
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4004
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
4005
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
4006
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4007
+ *
4008
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
4009
+ * the Software.
4010
+ *
4011
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
4012
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4013
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
4014
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
4015
+ * IN THE SOFTWARE.
4016
+ */
4017
+
4018
+
4019
+ var BkPopover = (0,external_shared_.withInstall)(popover);
4020
+ /* harmony default export */ const src = (BkPopover);
4021
+
4022
+
4023
+ })();
4024
+
4025
+ /******/ return __webpack_exports__;
4026
+ /******/ })()
4027
+ ;
4028
+ });