bkui-vue 0.0.2-beta.82 → 0.0.2-beta.84

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