@nova-design-system/nova-webcomponents 3.31.2-beta.4 → 3.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/THIRD_PARTY_NOTICES.txt +89925 -90780
  2. package/dist/cjs/events.utils-CIlm7hGM.js +47 -0
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/{index.esm-CG1TVKfu.js → index.esm-D5HbQDBa.js} +48 -30
  5. package/dist/cjs/nv-calendar.cjs.entry.js +2 -2
  6. package/dist/cjs/nv-dialog.cjs.entry.js +35 -14
  7. package/dist/cjs/nv-drawer.cjs.entry.js +6 -6
  8. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-fielddate.cjs.entry.js +1 -1
  10. package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
  14. package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
  15. package/dist/cjs/nv-fieldradio.cjs.entry.js +21 -6
  16. package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
  17. package/dist/cjs/nv-fieldslider.cjs.entry.js +1 -1
  18. package/dist/cjs/nv-fieldtext.cjs.entry.js +1 -1
  19. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +1 -1
  20. package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
  21. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-notification.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-popover.cjs.entry.js +182 -136
  24. package/dist/cjs/nv-toggle.cjs.entry.js +1 -1
  25. package/dist/cjs/v4-_2BfiRUa.js +52 -0
  26. package/dist/collection/components/nv-dialog/nv-dialog.css +8 -7
  27. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +7 -0
  28. package/dist/collection/components/nv-dialog/nv-dialog.js +30 -9
  29. package/dist/collection/components/nv-drawer/nv-drawer.js +2 -2
  30. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +10 -0
  31. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +20 -5
  32. package/dist/collection/components/nv-popover/nv-popover.js +13 -7
  33. package/dist/collection/utils/events.utils.js +28 -10
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/nv-accordion-item.js +1 -1
  36. package/dist/components/nv-accordion.js +1 -1
  37. package/dist/components/nv-alert.js +1 -1
  38. package/dist/components/nv-avatar.js +1 -1
  39. package/dist/components/nv-badge.js +1 -1
  40. package/dist/components/nv-breadcrumb.js +1 -1
  41. package/dist/components/nv-calendar.js +1 -1
  42. package/dist/components/nv-datagrid.js +1 -1
  43. package/dist/components/nv-dialog.js +1 -1
  44. package/dist/components/nv-dialogfooter.js +1 -1
  45. package/dist/components/nv-drawer.js +1 -1
  46. package/dist/components/nv-drawerfooter.js +1 -1
  47. package/dist/components/nv-fieldcheckbox.js +1 -1
  48. package/dist/components/nv-fielddate.js +1 -1
  49. package/dist/components/nv-fielddaterange.js +1 -1
  50. package/dist/components/nv-fielddropdown.js +1 -1
  51. package/dist/components/nv-fielddropdownitem.js +1 -1
  52. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  53. package/dist/components/nv-fieldmultiselect.js +1 -1
  54. package/dist/components/nv-fieldnumber.js +1 -1
  55. package/dist/components/nv-fieldpassword.js +1 -1
  56. package/dist/components/nv-fieldradio.js +1 -1
  57. package/dist/components/nv-fieldselect.js +1 -1
  58. package/dist/components/nv-fieldslider.js +1 -1
  59. package/dist/components/nv-fieldtext.js +1 -1
  60. package/dist/components/nv-fieldtextarea.js +1 -1
  61. package/dist/components/nv-fieldtime.js +1 -1
  62. package/dist/components/nv-icon.js +1 -1
  63. package/dist/components/nv-iconbutton.js +1 -1
  64. package/dist/components/nv-menu.js +1 -1
  65. package/dist/components/nv-menuitem.js +1 -1
  66. package/dist/components/nv-notification.js +1 -1
  67. package/dist/components/nv-pagination-nav.js +1 -1
  68. package/dist/components/nv-paginationtable.js +1 -1
  69. package/dist/components/nv-pill.js +1 -1
  70. package/dist/components/nv-popover.js +1 -1
  71. package/dist/components/nv-sidebar.js +1 -1
  72. package/dist/components/nv-sidebarnavitem.js +1 -1
  73. package/dist/components/nv-statusindicator.js +1 -1
  74. package/dist/components/nv-tableheader.js +1 -1
  75. package/dist/components/nv-tag.js +1 -1
  76. package/dist/components/nv-toggle.js +1 -1
  77. package/dist/components/nv-tooltip.js +1 -1
  78. package/dist/components/{p-m37Anefm.js → p-8N4lU0iY.js} +1 -1
  79. package/dist/components/p-B0u4Ixsb.js +1 -0
  80. package/dist/components/{p-BWRw4xPL.js → p-B4Bj7woW.js} +1 -1
  81. package/dist/components/{p-DiZ4PH5U.js → p-BO1b1Va8.js} +1 -1
  82. package/dist/components/{p-p6cOkAo9.js → p-BRGkbQcZ.js} +1 -1
  83. package/dist/components/{p-DCP9DeqM.js → p-Bb6b1l7X.js} +1 -1
  84. package/dist/components/p-BysSxG1C.js +1 -0
  85. package/dist/components/p-C4Gisby9.js +1 -0
  86. package/dist/components/{p-CHBitkH2.js → p-C5hX9g5W.js} +1 -1
  87. package/dist/components/p-CK3_k8jD.js +1 -0
  88. package/dist/components/p-DBTxpXCn.js +5 -0
  89. package/dist/components/{p-CM4DYhll.js → p-DNND0rYo.js} +1 -1
  90. package/dist/components/{p-C0sYXnfw.js → p-DnFgexAD.js} +1 -1
  91. package/dist/components/{p-151La_Re.js → p-DtrETIc3.js} +1 -1
  92. package/dist/components/{p-BLVk95gn.js → p-DyrYhAHY.js} +1 -1
  93. package/dist/components/p-S0RrRAAC.js +1 -0
  94. package/dist/components/{p-N_OyEprf.js → p-XZ5yyea3.js} +1 -1
  95. package/dist/components/{p-MJEiA0Bq.js → p-Z4Q7ZQYs.js} +1 -1
  96. package/dist/components/{p-6T2ybMzE.js → p-iZAJ4_uI.js} +1 -1
  97. package/dist/components/{p-DQwzzl-e.js → p-vcF-XOKu.js} +1 -1
  98. package/dist/esm/events.utils-BysSxG1C.js +43 -0
  99. package/dist/esm/{index.esm-D3eWMME9.js → index.esm-DBTxpXCn.js} +48 -30
  100. package/dist/esm/index.js +1 -1
  101. package/dist/esm/nv-calendar.entry.js +2 -2
  102. package/dist/esm/nv-dialog.entry.js +35 -14
  103. package/dist/esm/nv-drawer.entry.js +6 -6
  104. package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
  105. package/dist/esm/nv-fielddate.entry.js +1 -1
  106. package/dist/esm/nv-fielddaterange.entry.js +1 -1
  107. package/dist/esm/nv-fielddropdown.entry.js +1 -1
  108. package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
  109. package/dist/esm/nv-fieldnumber.entry.js +1 -1
  110. package/dist/esm/nv-fieldpassword.entry.js +1 -1
  111. package/dist/esm/nv-fieldradio.entry.js +21 -6
  112. package/dist/esm/nv-fieldselect.entry.js +1 -1
  113. package/dist/esm/nv-fieldslider.entry.js +1 -1
  114. package/dist/esm/nv-fieldtext.entry.js +1 -1
  115. package/dist/esm/nv-fieldtextarea.entry.js +1 -1
  116. package/dist/esm/nv-fieldtime.entry.js +1 -1
  117. package/dist/esm/nv-icon.entry.js +1 -1
  118. package/dist/esm/nv-notification.entry.js +1 -1
  119. package/dist/esm/nv-popover.entry.js +182 -136
  120. package/dist/esm/nv-toggle.entry.js +1 -1
  121. package/dist/esm/v4-CK3_k8jD.js +50 -0
  122. package/dist/native/index.esm.js +1 -1
  123. package/dist/native/native.esm.js +1 -1
  124. package/dist/native/p-003aae89.entry.js +1 -0
  125. package/dist/native/p-0a067f5d.entry.js +1 -0
  126. package/dist/native/{p-7a2189fd.entry.js → p-0cfa2a12.entry.js} +1 -1
  127. package/dist/native/{p-29283b5d.entry.js → p-0e1f410b.entry.js} +1 -1
  128. package/dist/native/{p-f49dac2e.entry.js → p-1a77f957.entry.js} +1 -1
  129. package/dist/native/{p-fde8def2.entry.js → p-25e0f795.entry.js} +1 -1
  130. package/dist/native/p-2808c51d.entry.js +1 -0
  131. package/dist/native/{p-a14356a2.entry.js → p-3ad4b348.entry.js} +1 -1
  132. package/dist/native/{p-84069455.entry.js → p-5084e62a.entry.js} +1 -1
  133. package/dist/native/{p-f551703a.entry.js → p-59bab8ca.entry.js} +1 -1
  134. package/dist/native/p-67c4583d.entry.js +1 -0
  135. package/dist/native/{p-9ae86283.entry.js → p-6c200454.entry.js} +1 -1
  136. package/dist/native/{p-282f27a8.entry.js → p-96debbf0.entry.js} +1 -1
  137. package/dist/native/p-9d4f3fa8.entry.js +1 -0
  138. package/dist/native/p-BysSxG1C.js +1 -0
  139. package/dist/native/p-CK3_k8jD.js +1 -0
  140. package/dist/native/p-DBTxpXCn.js +5 -0
  141. package/dist/native/p-ab22c992.entry.js +1 -0
  142. package/dist/native/{p-f35cfcf7.entry.js → p-ade6d065.entry.js} +1 -1
  143. package/dist/native/{p-006b0662.entry.js → p-c0cb8fbd.entry.js} +1 -1
  144. package/dist/native/{p-35cca4d2.entry.js → p-c59cbcf7.entry.js} +1 -1
  145. package/dist/native/{p-0be43863.entry.js → p-dd636420.entry.js} +1 -1
  146. package/dist/native/{p-9cb72554.entry.js → p-fe8e022f.entry.js} +1 -1
  147. package/dist/types/components/nv-dialog/nv-dialog.d.ts +10 -0
  148. package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +2 -0
  149. package/dist/types/utils/events.utils.d.ts +29 -8
  150. package/hydrate/index.js +358 -245
  151. package/hydrate/index.mjs +358 -245
  152. package/package.json +2 -2
  153. package/dist/cjs/events.utils-BE6R5q9C.js +0 -30
  154. package/dist/cjs/v4-C1vaJ4yP.js +0 -56
  155. package/dist/components/p-B4EbX_RC.js +0 -1
  156. package/dist/components/p-B6GgGra-.js +0 -1
  157. package/dist/components/p-BdYh22OP.js +0 -1
  158. package/dist/components/p-CtKp5aji.js +0 -1
  159. package/dist/components/p-D3eWMME9.js +0 -5
  160. package/dist/components/p-hklkrJsV.js +0 -1
  161. package/dist/esm/events.utils-B6GgGra-.js +0 -26
  162. package/dist/esm/v4-BdYh22OP.js +0 -54
  163. package/dist/native/p-11ae498c.entry.js +0 -1
  164. package/dist/native/p-193d5813.entry.js +0 -1
  165. package/dist/native/p-38b731e1.entry.js +0 -1
  166. package/dist/native/p-45191d81.entry.js +0 -1
  167. package/dist/native/p-520e5d0d.entry.js +0 -1
  168. package/dist/native/p-B6GgGra-.js +0 -1
  169. package/dist/native/p-BdYh22OP.js +0 -1
  170. package/dist/native/p-D3eWMME9.js +0 -5
  171. package/dist/native/p-ba32c793.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{S as t,t as e,p as n,H as o,c as r,h as i,d as s}from"./p-DMtFowUl.js";import{u as a}from"./p-9xYwU7ku.js";import{u as c}from"./p-D02w_Ru6.js";import"./p-Dz1GUhVy.js";import{a as l,r as u}from"./p-B6GgGra-.js";import{a as f}from"./p-CuXVGECR.js";const d=Math.min,h=Math.max,p=Math.round,m=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function v(t,e,n){return h(t,d(e,n))}function w(t,e){return"function"==typeof t?t(e):t}function b(t){return t.split("-")[0]}function x(t){return t.split("-")[1]}function k(t){return"x"===t?"y":"x"}function A(t){return"y"===t?"height":"width"}function T(t){return["top","bottom"].includes(b(t))?"y":"x"}function C(t){return k(T(t))}function O(t){return t.replace(/start|end/g,(t=>y[t]))}function S(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function j(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function D(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function P(t,e,n){let{reference:o,floating:r}=t;const i=T(e),s=C(e),a=A(s),c=b(e),l="y"===i,u=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 h;switch(c){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(x(e)){case"start":h[s]-=d*(n&&l?-1:1);break;case"end":h[s]+=d*(n&&l?-1:1)}return h}async function R(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=w(e,t),p=j(h),m=a[d?"floating"===f?"reference":"floating":f],g=D(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:l,rootBoundary:u,strategy:c})),y="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=D(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:c}):y);return{top:(g.top-x.top+p.top)/b.y,bottom:(x.bottom-g.bottom+p.bottom)/b.y,left:(g.left-x.left+p.left)/b.x,right:(x.right-g.right+p.right)/b.x}}function E(){return"undefined"!=typeof window}function M(t){return B(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function L(t){var e;return null==(e=(B(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function B(t){return!!E()&&(t instanceof Node||t instanceof F(t).Node)}function N(t){return!!E()&&(t instanceof Element||t instanceof F(t).Element)}function $(t){return!!E()&&(t instanceof HTMLElement||t instanceof F(t).HTMLElement)}function G(t){return!(!E()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof F(t).ShadowRoot)}function z(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=X(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function H(t){return["table","td","th"].includes(M(t))}function U(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function V(t){const e=W(),n=N(t)?X(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function W(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function I(t){return["html","body","#document"].includes(M(t))}function X(t){return F(t).getComputedStyle(t)}function Y(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if("html"===M(t))return t;const e=t.assignedSlot||t.parentNode||G(t)&&t.host||L(t);return G(e)?e.host:e}function K(t){const e=_(t);return I(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&z(e)?e:K(e)}function q(t,e){var n;void 0===e&&(e=[]);const o=K(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=F(o);return r?e.concat(i,i.visualViewport||[],z(o)?o:[],[]):e.concat(o,q(o,[]))}function J(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Q(t){const e=X(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=$(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=p(n)!==i||p(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Z(t){return N(t)?t:t.contextElement}function tt(t){const e=Z(t);if(!$(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Q(e);let s=(i?p(n.width):n.width)/o,a=(i?p(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const et=m(0);function nt(t){const e=F(t);return W()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:et}function ot(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=Z(t);let s=m(1);e&&(o?N(o)&&(s=tt(o)):s=tt(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==F(t))&&e}(i,n,o)?nt(i):m(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,u=r.width/s.x,f=r.height/s.y;if(i){const t=F(i),e=o&&N(o)?F(o):o;let n=t,r=J(n);for(;r&&o&&e!==n;){const t=tt(r),e=r.getBoundingClientRect(),o=X(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,u*=t.x,f*=t.y,c+=i,l+=s,n=F(r),r=J(n)}}return D({width:u,height:f,x:c,y:l})}function rt(t,e){const n=Y(t).scrollLeft;return e?e.left+n:ot(L(t)).left+n}function it(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=F(t),o=L(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=W();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=L(t),n=Y(t),o=t.ownerDocument.body,r=h(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=h(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+rt(t);const a=-n.scrollTop;return"rtl"===X(o).direction&&(s+=h(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(L(t));else if(N(e))o=function(t,e){const n=ot(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=$(t)?tt(t):m(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=nt(t);o={...e,x:e.x-n.x,y:e.y-n.y}}return D(o)}function st(t,e){const n=_(t);return!(n===e||!N(n)||I(n))&&("fixed"===X(n).position||st(n,e))}function at(t,e,n){const o=$(e),r=L(e),i="fixed"===n,s=ot(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=m(0);if(o||!o&&!i)if(("body"!==M(e)||z(r))&&(a=Y(e)),o){const t=ot(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&(c.x=rt(r));let l=0,u=0;if(r&&!o&&!i){const t=r.getBoundingClientRect();u=t.top+a.scrollTop,l=t.left+a.scrollLeft-rt(r,t)}return{x:s.left+a.scrollLeft-c.x-l,y:s.top+a.scrollTop-c.y-u,width:s.width,height:s.height}}function ct(t){return"static"===X(t).position}function lt(t,e){if(!$(t)||"fixed"===X(t).position)return null;if(e)return e(t);let n=t.offsetParent;return L(t)===n&&(n=n.ownerDocument.body),n}function ut(t,e){const n=F(t);if(U(t))return n;if(!$(t)){let e=_(t);for(;e&&!I(e);){if(N(e)&&!ct(e))return e;e=_(e)}return n}let o=lt(t,e);for(;o&&H(o)&&ct(o);)o=lt(o,e);return o&&I(o)&&ct(o)&&!V(o)?n:o||function(t){let e=_(t);for(;$(e)&&!I(e);){if(V(e))return e;if(U(e))return null;e=_(e)}return null}(t)||n}const ft={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=L(o),a=!!e&&U(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=m(1);const u=m(0),f=$(o);if((f||!f&&!i)&&(("body"!==M(o)||z(s))&&(c=Y(o)),$(o))){const t=ot(o);l=tt(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}},getDocumentElement:L,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?U(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=q(t,[]).filter((t=>N(t)&&"body"!==M(t))),r=null;const i="fixed"===X(t).position;let s=i?_(t):t;for(;N(s)&&!I(s);){const e=X(s),n=V(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||z(s)&&!n&&st(t,s))?o=o.filter((t=>t!==s)):r=e,s=_(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=i.reduce(((t,n)=>{const o=it(e,n,r);return t.top=h(o.top,t.top),t.right=d(o.right,t.right),t.bottom=d(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),it(e,i[0],r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ut,getElementRects:async function(t){const e=this.getOffsetParent||ut,n=this.getDimensions,o=await n(t.floating);return{reference:at(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Q(t);return{width:e,height:n}},getScale:tt,isElement:N,isRTL:function(t){return"rtl"===X(t).direction}},dt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=w(t,e),l={x:n,y:o},u=await R(e,c),f=T(b(r)),d=k(f);let h=l[d],p=l[f];i&&(h=v(h+u["y"===d?"top":"left"],h,h-u["y"===d?"bottom":"right"])),s&&(p=v(p+u["y"===f?"top":"left"],p,p-u["y"===f?"bottom":"right"]));const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-o}}}}},ht=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=w(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=b(r),v=b(a)===a,k=await(null==c.isRTL?void 0:c.isRTL(l.floating)),T=d||(v||!m?[S(a)]:function(t){const e=S(t);return[O(t),e,O(e)]}(a));d||"none"===p||T.push(...function(t,e,n,o){const r=x(t);let i=function(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:s;default:return[]}}(b(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(O)))),i}(a,m,p,k));const j=[a,...T],D=await R(e,g),P=[];let E=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&P.push(D[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=x(t),r=C(t),i=A(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=S(s)),[s,S(s)]}(r,s,k);P.push(D[t[0]],D[t[1]])}if(E=[...E,{placement:r,overflows:P}],!P.every((t=>t<=0))){var M,F;const t=((null==(M=i.flip)?void 0:M.index)||0)+1,e=j[t];if(e)return{data:{index:t,overflows:E},reset:{placement:e}};let n=null==(F=E.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:F.placement;if(!n)switch(h){case"bestFit":{var L;const t=null==(L=E.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:L[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},pt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=w(t,e)||{};if(null==l)return{};const f=j(u),h={x:n,y:o},p=C(r),m=A(p),g=await s.getDimensions(l),y="y"===p,b=y?"top":"left",k=y?"bottom":"right",T=y?"clientHeight":"clientWidth",O=i.reference[m]+i.reference[p]-h[p]-i.floating[m],S=h[p]-i.reference[p],D=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let P=D?D[T]:0;P&&await(null==s.isElement?void 0:s.isElement(D))||(P=a.floating[T]||i.floating[m]);const R=O/2-S/2,E=P/2-g[m]/2-1,M=d(f[b],E),F=d(f[k],E),L=M,B=P-g[m]-F,N=P/2-g[m]/2+R,$=v(L,N,B),G=!c.arrow&&null!=x(r)&&N!==$&&i.reference[m]/2-(N<L?M:F)-g[m]/2<0,z=G?N<L?N-L:N-B:0;return{[p]:h[p]+z,data:{[p]:$,centerOffset:N-$-z,...G&&{alignmentOffset:z}},reset:G}}}),mt=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys()){const n=t.get(e).filter((t=>{const e=t.deref();return e&&(!("isConnected"in(n=e))||n.isConnected);var n}));t.set(e,n)}})(...e)}),2e3)}})(),gt=t.forceUpdate,yt=t.getRenderingRef,vt=(t,e)=>{const n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.length--)},{state:wt}=(()=>{const t=((t,e=(t,e)=>t!==e)=>{const n=()=>{return("function"==typeof(e=t)?e():e)??{};var e},o=n();let r=new Map(Object.entries(o));const i="undefined"!=typeof Proxy,s=i?null:{},a={dispose:[],get:[],set:[],reset:[]},c=new Map,l=()=>{r=new Map(Object.entries(n())),i||m(),a.reset.forEach((t=>t()))},u=t=>(a.get.forEach((e=>e(t))),r.get(t)),f=(t,n)=>{const o=r.get(t);e(n,o,t)&&(r.set(t,n),i||p(t),a.set.forEach((e=>e(t,n,o))))},d=i?new Proxy(o,{get:(t,e)=>u(e),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>r.has(e),set:(t,e,n)=>(f(e,n),!0)}):(m(),s),h=(t,e)=>(a[t].push(e),()=>{vt(a[t],e)});function p(t){!i&&s&&(Object.prototype.hasOwnProperty.call(s,t)||Object.defineProperty(s,t,{configurable:!0,enumerable:!0,get:()=>u(t),set(e){f(t,e)}}))}function m(){if(i||!s)return;const t=new Set(r.keys());for(const e of Object.keys(s))t.has(e)||delete s[e];for(const e of t)p(e)}return{state:d,get:u,set:f,on:h,onChange:(t,e)=>{const o=(n,o)=>{n===t&&e(o)},r=()=>{const o=n();e(o[t])},i=h("set",o),s=h("reset",r);return c.set(e,{setHandler:o,resetHandler:r,propName:t}),()=>{i(),s(),c.delete(e)}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(h("set",e.set)),e.get&&t.push(h("get",e.get)),e.reset&&t.push(h("reset",e.reset)),e.dispose&&t.push(h("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{a.dispose.forEach((t=>t())),l()},reset:l,forceUpdate:t=>{const e=r.get(t);a.set.forEach((n=>n(t,e,e)))},removeListener:(t,e)=>{const n=c.get(e);n&&n.propName===t&&(vt(a.set,n.setHandler),vt(a.reset,n.resetHandler),c.delete(e))}}})({groups:new Map},void 0);return t.use((()=>{if("function"!=typeof yt||"function"!=typeof gt)return{};const t=gt,e=yt,n=new Map;return{dispose:()=>n.clear(),get:t=>{const o=e();o&&((t,e,n)=>{let o=t.get(e);o||(o=[],t.set(e,o)),o.some((t=>t.deref()===n))||o.push(new WeakRef(n))})(n,t,o)},set:e=>{const o=n.get(e);if(o){const r=o.filter((e=>{const n=e.deref();return!!n&&t(n)}));n.set(e,r)}mt(n)},reset:()=>{n.forEach((e=>{e.forEach((e=>{const n=e.deref();n&&t(n)}))})),mt(n)}}})()),t})(),bt=n(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.openChanged=r(this,"openChanged",3),this.eventsAttached=!1,this.isAnimating=!1,this.clickEvents=[["click",()=>this.open=!this.open]],this.hoverEvents=[["focus",()=>{clearTimeout(this.hideTimeout),this.showTimeout=setTimeout((()=>this.open=!0),this.enterDelay)}],["blur",()=>{clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>this.open=!1),50)}],["mouseenter",()=>{clearTimeout(this.hideTimeout),this.showTimeout=setTimeout((()=>this.open=!0),this.enterDelay)}],["mouseleave",()=>{clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>this.open=!1),100)}]],this.closeEvents=[["keydown",t=>{"Escape"===t.key&&"controlled"!==this.triggerMode&&(this.open=!1)}]],this.open=!1,this.triggerMode="click",this.placement="bottom",this.strategy="absolute",this.offset=6,this.hasArrow=!1,this.disableFlip=!1,this.shiftPadding=0,this.enterDelay=0,this.nested=!1,this.handleClickOutside=t=>{this.el.contains(t.target)||this.triggerElement?.contains(t.target)||(this.open=!1)},this.outsideClickEvents=[["click",this.handleClickOutside],["touchstart",this.handleClickOutside]]}async show(){this.open=!0}async hide(){this.open=!1}async toggle(){this.open=!this.open}attachEventListeners(){this.triggerElement&&!this.eventsAttached&&(l(this.closeEvents,document,this),"click"===this.triggerMode&&(l(this.clickEvents,this.triggerElement,this),l(this.outsideClickEvents,document,this)),"hover"===this.triggerMode&&l(this.hoverEvents,this.triggerElement,this),this.eventsAttached=!0)}positionPopover(){var t;this.triggerElement&&((t,e,n)=>{const o=new Map,r={platform:ft,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=P(l,o,c),d=o,h={},p=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y,data:v,reset:w}=await m({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:h,rects:l,platform:s,elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=y?y:f,h={...h,[i]:{...h[i],...v}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(l=!0===w.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):w.rects),({x:u,y:f}=P(l,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:h}})(t,e,{...r,platform:i})})(f(this.triggerElement),this.popoverElement,{placement:this.placement,strategy:this.strategy,middleware:[(t=this.offset,void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=b(n),a=x(n),c="y"===T(n),l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,f=w(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof p&&(h="end"===a?-1*p:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}),!this.disableFlip&&ht({fallbackStrategy:"bestFit",crossAxis:!0,fallbackPlacements:["bottom"]}),dt({padding:this.shiftPadding}),this.hasArrow&&pt({element:this.arrowElement})]}).then((({x:t,y:e,placement:n,middlewareData:o,strategy:r})=>{if(Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${e}px`,position:r}),this.hasArrow){const t={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]],e={top:"rotate(225deg)",right:"rotate(315deg)",bottom:"rotate(45deg)",left:"rotate(135deg)"}[n.split("-")[0]],{x:r,y:i}=o.arrow;Object.assign(this.arrowElement.style,{left:null!=r?`${r}px`:"",top:null!=i?`${i}px`:"",right:"",bottom:"",transform:e,[t]:"-4px"})}}))}async handleOpenChange(t){for(;this.isAnimating;)await new Promise((t=>setTimeout(t,50)));this.isAnimating=!0;const e=wt.groups.get(this.groupName),n=e&&e.openedBy!==this.el,o=e&&e.openedBy===this.el;t&&this.popoverElement.style.removeProperty("display"),o&&!t&&wt.groups.delete(this.groupName),this.groupName&&t&&wt.groups.set(this.groupName,{openedBy:this.el});const{growIn:r}=c(this.popoverElement,{duration:n?0:100,amount:.85}),{fadeOut:i}=a(this.popoverElement,{duration:n?0:100});!0===t&&(this.popoverElement.removeAttribute("hidden"),this.positionPopover(),await r()),!1===t&&(await i(),this.popoverElement.setAttribute("hidden","")),this.isAnimating=!1,this.openChanged.emit(t)}handleStrategyChange(){this.open&&this.positionPopover()}componentWillRender(){this.triggerElement||(this.triggerElement=this.el.querySelector('[slot="trigger"]')),this.attachEventListeners()}componentDidLoad(){if(this.open){const{setFadeIn:t}=a(this.popoverElement);t(),this.popoverElement.removeAttribute("hidden")}else{const{setGrowOut:t}=c(this.popoverElement);t()}this.positionPopover()}disconnectedCallback(){u(this.closeEvents,document,this),"click"===this.triggerMode&&(u(this.clickEvents,this.triggerElement,this),u(this.outsideClickEvents,document,this)),"hover"===this.triggerMode&&u(this.hoverEvents,this.triggerElement,this),this.eventsAttached=!1,this.hideTimeout&&clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout)}render(){return i(s,{key:"1a604043f59c8aa04237b6d03838125079ac5c49"},i("slot",{key:"c22461b3d5050f7b502635221cbe17c03ef425a9",name:"trigger"}),i("div",{key:"58a438db8308be12d854afe3deda462d4ae528fb","data-scope":"popover","data-strategy":this.strategy,hidden:!0,ref:t=>this.popoverElement=t},this.hasArrow&&i("div",{key:"af18bf4b8700484ca989a8d45da8295e8d11ea2e","data-scope":"arrow",ref:t=>this.arrowElement=t}),i("slot",{key:"f3308bfc01d5a4f954a1f0b822cf378cd874f9bd",name:"content"})))}get el(){return this}static get watchers(){return{open:[{handleOpenChange:0}],strategy:[{handleStrategyChange:0}]}}static get style(){return"nv-popover{display:inline-block;position:relative}nv-popover:has([fluid]:not([fluid=false])){display:block}nv-popover[strategy=fixed]{position:static}nv-popover>[data-scope=popover]{width:max-content;background-color:var(--components-popover-background);border-color:var(--components-popover-border);font-weight:var(--font-weight-medium-emphasis);border-width:1px;border-style:solid;border-radius:var(--popover-radius);padding:var(--popover-padding-y) var(--popover-padding-x);position:absolute;top:0;left:0;z-index:1;box-shadow:var(--popover-shadow-1-x) var(--popover-shadow-1-y) var(--popover-shadow-1-blur) -2px var(--popover-shadow-1-opacity), var(--popover-shadow-2-x) var(--popover-shadow-2-y) var(--popover-shadow-2-blur) var(--shadow-spread-lg-2) var(--popover-shadow-2-opacity)}nv-popover>[data-scope=popover][hidden]:not([hidden=false]){display:none}nv-popover>[data-scope=popover][data-strategy=fixed]{position:fixed;z-index:9999}nv-popover>[data-scope=popover]>[data-scope=arrow]{background-color:var(--components-popover-background);position:absolute;border-color:var(--components-popover-border);border-width:1px;border-style:solid;border-bottom-color:transparent;border-right-color:transparent;width:8px;height:8px;transform:rotate(45deg);border-radius:1px}nv-popover>[data-scope=popover]>[slot=content]{position:relative;z-index:1}nv-popover>slot-fb{display:none}"}},[260,"nv-popover",{triggerElement:[1040],open:[1540],triggerMode:[513,"trigger-mode"],placement:[513],strategy:[513],groupName:[513,"group-name"],offset:[514],hasArrow:[516,"has-arrow"],disableFlip:[516,"disable-flip"],shiftPadding:[514,"shift-padding"],enterDelay:[514,"enter-delay"],nested:[516],show:[64],hide:[64],toggle:[64]},void 0,{open:[{handleOpenChange:0}],strategy:[{handleStrategyChange:0}]}]);function xt(){"undefined"!=typeof customElements&&["nv-popover"].forEach((t=>{"nv-popover"===t&&(customElements.get(e(t))||customElements.define(e(t),bt))}))}xt();export{bt as N,xt as d}
@@ -1,26 +0,0 @@
1
- /**
2
- * Adds a set of event listeners to the given target.
3
- * @param {EventsAndListeners} events - The events and listeners to add.
4
- * @param {Element | Window | Document} target - The target element or window to add the event listeners to.
5
- * @param {T} context - The class context to bind the event listeners to.
6
- */
7
- function addEventListeners(events, target, context) {
8
- events.forEach(([event, listener]) => target.addEventListener(event, listener.bind(context)));
9
- }
10
- /**
11
- * Removes a set of event listeners from the given target.
12
- * @param {EventsAndListeners} events - The events and listeners to remove.
13
- * @param {Element | Window | Document} target - The target element or window to remove the event listeners from.
14
- * @param {T} context - The class context to bind the event listeners to.
15
- */
16
- function removeEventListeners(events, target, context) {
17
- events.forEach(([event, listener]) => target.removeEventListener(event, listener.bind(context)));
18
- }
19
-
20
- var events_utils = /*#__PURE__*/Object.freeze({
21
- __proto__: null,
22
- addEventListeners: addEventListeners,
23
- removeEventListeners: removeEventListeners
24
- });
25
-
26
- export { addEventListeners as a, events_utils as e, removeEventListeners as r };
@@ -1,54 +0,0 @@
1
- /**
2
- * Convert array of 16 byte values to UUID string format of the form:
3
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
4
- */
5
- var byteToHex = [];
6
- for (var i = 0; i < 256; ++i) {
7
- byteToHex.push((i + 0x100).toString(16).slice(1));
8
- }
9
- function unsafeStringify(arr, offset = 0) {
10
- // Note: Be careful editing this code! It's been tuned for performance
11
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
12
- //
13
- // Note to future-self: No, you can't remove the `toLowerCase()` call.
14
- // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
15
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
16
- }
17
-
18
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
19
- // require the crypto API and do not support built-in fallback to lower quality random number
20
- // generators (like Math.random()).
21
-
22
- var getRandomValues;
23
- var rnds8 = new Uint8Array(16);
24
- function rng() {
25
- // lazy load so that environments that need to polyfill have a chance to do so
26
- if (!getRandomValues) {
27
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
28
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
29
- if (!getRandomValues) {
30
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
31
- }
32
- }
33
- return getRandomValues(rnds8);
34
- }
35
-
36
- var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
37
- var native = {
38
- randomUUID
39
- };
40
-
41
- function v4(options, buf, offset) {
42
- if (native.randomUUID && true && !options) {
43
- return native.randomUUID();
44
- }
45
- options = options || {};
46
- var rnds = options.random || (options.rng || rng)();
47
-
48
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
49
- rnds[6] = rnds[6] & 0x0f | 0x40;
50
- rnds[8] = rnds[8] & 0x3f | 0x80;
51
- return unsafeStringify(rnds);
52
- }
53
-
54
- export { v4 as v };
@@ -1 +0,0 @@
1
- import{r as t,a as i,h as o,d as s,e as a}from"./p-Dtg-LGcy.js";import{t as e}from"./p-D3eWMME9.js";import{a as n,r}from"./p-B6GgGra-.js";import{u as d}from"./p-13YSIyGW.js";import{u as h}from"./p-Blc6XEY7.js";import"./p-xlgmw4x8.js";import{p as l}from"./p-CgHCo_Ho.js";import{c}from"./p-ChV9xqsO.js";import{b as g}from"./p-gOKBmbgZ.js";import{i as p}from"./p-C4Cy9iy8.js";import{v as f}from"./p-BdYh22OP.js";const b=class{constructor(o){t(this,o),this.openChanged=i(this,"openChanged",3),this.eventsAttached=!1,this.pointerDownTarget=null,this.triggerClickEvents=[["click",this.show],["keydown",t=>{p(t.key)&&(t.preventDefault(),this.show())}]],this.open=!1,this.undismissable=!1,this.clickOutside=!1,this.controlled=!1,this.full=!1,this.autofocus=!1,this.checkForForm=()=>{if(!this.form){const t=this.el.querySelector("form");t&&(this.form=this.ensureFormId(t))}},this.handleDialogClose=()=>{this.open&&this.close()},this.handleDialogPointerDown=t=>{this.pointerDownTarget=t.target},this.handleDialogClick=t=>{this.clickOutside&&!this.undismissable&&(this.checkForOpenPopovers()||(t.target===this.backdropElement&&this.pointerDownTarget===this.backdropElement&&(this.close(),t.preventDefault(),t.stopPropagation()),this.pointerDownTarget=null))},this.checkForOpenPopovers=()=>{let t=!1;return this.el.querySelectorAll("nv-popover").forEach((i=>{i.hasAttribute("open")&&(t=!0)})),t}}async show(){this.open=!0,this.preventScroll();const{setFadeOut:t}=d(this.dialogElement);t(),this.dialogElement.showModal();const{setGrowIn:i,growIn:o}=h(this.contentElement,{duration:100,amount:.9}),{fadeIn:s}=d(this.dialogElement,{duration:100});i(),await l(s,o).start()}async close(){this.open=!1,this.allowScroll();const{growOut:t}=h(this.contentElement,{duration:150,amount:.85}),{fadeOut:i}=d(this.dialogElement,{duration:150});await l(t,i).start(),this.dialogElement.close()}setAutofocus(){const t=e(this.dialogElement,{displayCheck:"none"});if(t.length>0){let i=t[0],o=i.getBoundingClientRect();t.forEach((t=>{const s=t.getBoundingClientRect();(s.top<o.top||s.left<o.left)&&(i=t,o=s)})),i.setAttribute("autofocus","true")}}attachEventListeners(){!this.triggerElement||this.eventsAttached||this.controlled||(n(this.triggerClickEvents,this.triggerElement,this),this.eventsAttached=!0)}preventScroll(){const t=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${t}px`}allowScroll(){document.documentElement.style.removeProperty("overflow"),document.documentElement.style.removeProperty("padding-right")}ensureFormId(t){return t.id||(t.id=`dialog-form-${f()}`),t.id}async handleDialogOpenChange(t){t?(this.show(),this.openChanged.emit(t)):(this.close(),this.openChanged.emit(t))}handleKeyDown(t){if("Escape"!==t.key)return;if(!this.open)return;t.preventDefault(),t.stopPropagation();const i=this.checkForOpenPopovers();this.undismissable||i||(t.preventDefault(),t.stopPropagation(),this.close())}componentWillLoad(){this.headerElement||(this.headerElement=this.el.querySelector('[slot="header"]')??this.el.querySelector("nv-dialogheader")),this.footerElement||(this.footerElement=this.el.querySelector('[slot="footer"]')??this.el.querySelector("nv-dialogfooter")),this.checkForForm()}componentDidRender(){this.triggerElement=this.el.querySelector('[slot="trigger"]'),this.attachEventListeners()}componentDidLoad(){this.open&&this.show(),this.autofocus&&!this.dialogElement.querySelector("[autofocus]")&&this.setAutofocus(),this.checkForForm()}disconnectedCallback(){!this.triggerElement||this.eventsAttached||this.controlled||(r(this.triggerClickEvents,this.triggerElement,this),this.eventsAttached=!1),this.allowScroll()}render(){const t=this.form||this.el.querySelector("form");return o(s,{key:"d4daea5bfea9157d8e101d805bf14019a5d092f8"},o("slot",{key:"873111709d1fe310886aaac9f4c7ff50b5d6f507",name:"trigger"}),o("dialog",{key:"2eb47ccecea0bdceadbfadd594a2a29ae67b1403",ref:t=>this.dialogElement=t,onClose:this.handleDialogClose,onPointerDown:this.handleDialogPointerDown,onClick:this.handleDialogClick,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-header","aria-describedby":"dialog-content",class:c({full:this.full})},o("div",{key:"a919090e8344ec40028cdfe5c53aa00b71f51b28",class:"backdrop",ref:t=>this.backdropElement=t},o("div",{key:"98c1b9a0774c203f01caf756553147d44c362168",class:"content",ref:t=>this.contentElement=t},!this.undismissable&&o("nv-button",{key:"6521f34860acacf2f069aee99ab60d16dc4c607f",class:"close-button",emphasis:"lower",size:"sm",onClick:this.handleDialogClose,"aria-label":"Close dialog"},o("nv-icon",{key:"2f48cb5814a6638fe5a0c71f26304902fda5744f",name:"x",size:"sm"})),this.headerElement?o("slot",{name:"header"}):o("nv-dialogheader",{id:"dialog-header"}),o("div",{key:"f2b885c7450f6393e1b95add60b7b832658b136a",class:"content-body",id:"dialog-content"},o("slot",{key:"10be559e037a9d050e25c71b5aa74fc74a53757e"})),this.footerElement?o("slot",{name:"footer"}):o("nv-dialogfooter",{form:this.form,primaryButtonType:t?g.Submit:g.Button,onDialogCanceled:this.handleDialogClose,undismissable:this.undismissable})))))}get el(){return a(this)}static get watchers(){return{open:[{handleDialogOpenChange:0}]}}};b.style="nv-dialog dialog{width:100vw;height:100svh;margin:0;max-height:unset;max-width:unset;padding:0;background:color-mix(in srgb, var(--components-overlay-background) 70%, transparent);backdrop-filter:blur(4px)}nv-dialog dialog.full .content{min-width:90vw;width:90vw;max-width:90vw}nv-dialog .backdrop{display:flex;min-height:100%;padding:var(--spacing-3);box-shadow:0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3)}nv-dialog .backdrop .content{border-radius:var(--radius-rounded-2xl);background:var(--color-level-00-background);min-width:min(90vw, 400px);width:fit-content;max-width:clamp(90vw, min(90vw, 960px), 960px);margin:auto;display:flex;flex-direction:column;align-items:flex-start;height:fit-content;position:relative}nv-dialog .backdrop .content nv-button.close-button{position:absolute;top:var(--dialog-dismissible-position-top);right:var(--dialog-dismissible-position-right);display:flex;padding:var(--button-sm-icon-button-padding);justify-content:flex-end;align-items:flex-start;gap:10px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar{width:6px;height:6px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-dialog .backdrop .content .content-body::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-dialog .backdrop .content .content-body{box-sizing:border-box;padding:var(--dialog-body-padding-y) var(--dialog-body-padding-x);scrollbar-gutter:stable both-edges;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--font-size-md);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--line-height-base);color:var(--color-content-medium-text);width:100%}";export{b as nv_dialog}
@@ -1 +0,0 @@
1
- import{S as t,r as e,a as n,h as o,d as i,e as r}from"./p-Dtg-LGcy.js";import{u as s}from"./p-13YSIyGW.js";import{u as a}from"./p-Blc6XEY7.js";import"./p-xlgmw4x8.js";import{a as c,r as l}from"./p-B6GgGra-.js";import{a as u}from"./p-CuXVGECR.js";const f=Math.min,d=Math.max,h=Math.round,p=t=>({x:t,y:t}),m={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(t,e,n){return d(t,f(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function x(t){return"x"===t?"y":"x"}function k(t){return"y"===t?"height":"width"}function A(t){return["top","bottom"].includes(w(t))?"y":"x"}function T(t){return x(A(t))}function O(t){return t.replace(/start|end/g,(t=>y[t]))}function S(t){return t.replace(/left|right|bottom|top/g,(t=>m[t]))}function C(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function j(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function P(t,e,n){let{reference:o,floating:i}=t;const r=A(e),s=T(e),a=k(s),c=w(e),l="y"===r,u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:o.y-i.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-i.width,y:f};break;default:h={x:o.x,y:o.y}}switch(b(e)){case"start":h[s]-=d*(n&&l?-1:1);break;case"end":h[s]+=d*(n&&l?-1:1)}return h}async function R(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=v(e,t),p=C(h),m=a[d?"floating"===f?"reference":"floating":f],y=j(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(m)))||n?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),g="floating"===f?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},x=j(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:c}):g);return{top:(y.top-x.top+p.top)/b.y,bottom:(x.bottom-y.bottom+p.bottom)/b.y,left:(y.left-x.left+p.left)/b.x,right:(x.right-y.right+p.right)/b.x}}function D(){return"undefined"!=typeof window}function L(t){return B(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function E(t){var e;return null==(e=(B(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function B(t){return!!D()&&(t instanceof Node||t instanceof M(t).Node)}function F(t){return!!D()&&(t instanceof Element||t instanceof M(t).Element)}function G(t){return!!D()&&(t instanceof HTMLElement||t instanceof M(t).HTMLElement)}function $(t){return!(!D()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof M(t).ShadowRoot)}function H(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Y(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function N(t){return["table","td","th"].includes(L(t))}function W(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function z(t){const e=I(),n=F(t)?Y(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function I(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function X(t){return["html","body","#document"].includes(L(t))}function Y(t){return M(t).getComputedStyle(t)}function V(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if("html"===L(t))return t;const e=t.assignedSlot||t.parentNode||$(t)&&t.host||E(t);return $(e)?e.host:e}function K(t){const e=_(t);return X(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&H(e)?e:K(e)}function U(t,e){var n;void 0===e&&(e=[]);const o=K(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=M(o);return i?e.concat(r,r.visualViewport||[],H(o)?o:[],[]):e.concat(o,U(o,[]))}function q(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function J(t){const e=Y(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=G(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=h(n)!==r||h(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function Q(t){return F(t)?t:t.contextElement}function Z(t){const e=Q(t);if(!G(e))return p(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=J(e);let s=(r?h(n.width):n.width)/o,a=(r?h(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const tt=p(0);function et(t){const e=M(t);return I()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:tt}function nt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=Q(t);let s=p(1);e&&(o?F(o)&&(s=Z(o)):s=Z(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==M(t))&&e}(r,n,o)?et(r):p(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(r){const t=M(r),e=o&&F(o)?M(o):o;let n=t,i=q(n);for(;i&&o&&e!==n;){const t=Z(i),e=i.getBoundingClientRect(),o=Y(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,u*=t.x,f*=t.y,c+=r,l+=s,n=M(i),i=q(n)}}return j({width:u,height:f,x:c,y:l})}function ot(t,e){const n=V(t).scrollLeft;return e?e.left+n:nt(E(t)).left+n}function it(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=M(t),o=E(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const t=I();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=E(t),n=V(t),o=t.ownerDocument.body,i=d(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=d(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ot(t);const a=-n.scrollTop;return"rtl"===Y(o).direction&&(s+=d(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}(E(t));else if(F(e))o=function(t,e){const n=nt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=G(t)?Z(t):p(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=et(t);o={...e,x:e.x-n.x,y:e.y-n.y}}return j(o)}function rt(t,e){const n=_(t);return!(n===e||!F(n)||X(n))&&("fixed"===Y(n).position||rt(n,e))}function st(t,e,n){const o=G(e),i=E(e),r="fixed"===n,s=nt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const c=p(0);if(o||!o&&!r)if(("body"!==L(e)||H(i))&&(a=V(e)),o){const t=nt(e,!0,r,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&(c.x=ot(i));let l=0,u=0;if(i&&!o&&!r){const t=i.getBoundingClientRect();u=t.top+a.scrollTop,l=t.left+a.scrollLeft-ot(i,t)}return{x:s.left+a.scrollLeft-c.x-l,y:s.top+a.scrollTop-c.y-u,width:s.width,height:s.height}}function at(t){return"static"===Y(t).position}function ct(t,e){if(!G(t)||"fixed"===Y(t).position)return null;if(e)return e(t);let n=t.offsetParent;return E(t)===n&&(n=n.ownerDocument.body),n}function lt(t,e){const n=M(t);if(W(t))return n;if(!G(t)){let e=_(t);for(;e&&!X(e);){if(F(e)&&!at(e))return e;e=_(e)}return n}let o=ct(t,e);for(;o&&N(o)&&at(o);)o=ct(o,e);return o&&X(o)&&at(o)&&!z(o)?n:o||function(t){let e=_(t);for(;G(e)&&!X(e);){if(z(e))return e;if(W(e))return null;e=_(e)}return null}(t)||n}const ut={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,s=E(o),a=!!e&&W(e.floating);if(o===s||a&&r)return n;let c={scrollLeft:0,scrollTop:0},l=p(1);const u=p(0),f=G(o);if((f||!f&&!r)&&(("body"!==L(o)||H(s))&&(c=V(o)),G(o))){const t=nt(o);l=Z(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}},getDocumentElement:E,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?W(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=U(t,[]).filter((t=>F(t)&&"body"!==L(t))),i=null;const r="fixed"===Y(t).position;let s=r?_(t):t;for(;F(s)&&!X(s);){const e=Y(s),n=z(s);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||H(s)&&!n&&rt(t,s))?o=o.filter((t=>t!==s)):i=e,s=_(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=r.reduce(((t,n)=>{const o=it(e,n,i);return t.top=d(o.top,t.top),t.right=f(o.right,t.right),t.bottom=f(o.bottom,t.bottom),t.left=d(o.left,t.left),t}),it(e,r[0],i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:lt,getElementRects:async function(t){const e=this.getOffsetParent||lt,n=this.getDimensions,o=await n(t.floating);return{reference:st(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=J(t);return{width:e,height:n}},getScale:Z,isElement:F,isRTL:function(t){return"rtl"===Y(t).direction}},ft=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=v(t,e),l={x:n,y:o},u=await R(e,c),f=A(w(i)),d=x(f);let h=l[d],p=l[f];r&&(h=g(h+u["y"===d?"top":"left"],h,h-u["y"===d?"bottom":"right"])),s&&(p=g(p+u["y"===f?"top":"left"],p,p-u["y"===f?"bottom":"right"]));const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-o}}}}},dt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=v(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const g=w(i),x=w(a)===a,A=await(null==c.isRTL?void 0:c.isRTL(l.floating)),C=d||(x||!m?[S(a)]:function(t){const e=S(t);return[O(t),e,O(e)]}(a));d||"none"===p||C.push(...function(t,e,n,o){const i=b(t);let r=function(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}(w(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(O)))),r}(a,m,p,A));const j=[a,...C],P=await R(e,y),D=[];let L=(null==(o=r.flip)?void 0:o.overflows)||[];if(u&&D.push(P[g]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),i=T(t),r=k(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=S(s)),[s,S(s)]}(i,s,A);D.push(P[t[0]],P[t[1]])}if(L=[...L,{placement:i,overflows:D}],!D.every((t=>t<=0))){var M,E;const t=((null==(M=r.flip)?void 0:M.index)||0)+1,e=j[t];if(e)return{data:{index:t,overflows:L},reset:{placement:e}};let n=null==(E=L.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:E.placement;if(!n)switch(h){case"bestFit":{var B;const t=null==(B=L.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:B[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},ht=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=v(t,e)||{};if(null==l)return{};const d=C(u),h={x:n,y:o},p=T(i),m=k(p),y=await s.getDimensions(l),w="y"===p,x=w?"top":"left",A=w?"bottom":"right",O=w?"clientHeight":"clientWidth",S=r.reference[m]+r.reference[p]-h[p]-r.floating[m],j=h[p]-r.reference[p],P=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let R=P?P[O]:0;R&&await(null==s.isElement?void 0:s.isElement(P))||(R=a.floating[O]||r.floating[m]);const D=S/2-j/2,L=R/2-y[m]/2-1,M=f(d[x],L),E=f(d[A],L),B=M,F=R-y[m]-E,G=R/2-y[m]/2+D,$=g(B,G,F),H=!c.arrow&&null!=b(i)&&G!==$&&r.reference[m]/2-(G<B?M:E)-y[m]/2<0,N=H?G<B?G-B:G-F:0;return{[p]:h[p]+N,data:{[p]:$,centerOffset:G-$-N,...H&&{alignmentOffset:N}},reset:H}}}),pt=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys()){const n=t.get(e).filter((t=>{const e=t.deref();return e&&(!("isConnected"in(n=e))||n.isConnected);var n}));t.set(e,n)}})(...e)}),2e3)}})(),mt=t.forceUpdate,yt=t.getRenderingRef,gt=(t,e)=>{const n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.length--)},{state:vt}=(()=>{const t=((t,e=(t,e)=>t!==e)=>{const n=()=>{return("function"==typeof(e=t)?e():e)??{};var e},o=n();let i=new Map(Object.entries(o));const r="undefined"!=typeof Proxy,s=r?null:{},a={dispose:[],get:[],set:[],reset:[]},c=new Map,l=()=>{i=new Map(Object.entries(n())),r||m(),a.reset.forEach((t=>t()))},u=t=>(a.get.forEach((e=>e(t))),i.get(t)),f=(t,n)=>{const o=i.get(t);e(n,o,t)&&(i.set(t,n),r||p(t),a.set.forEach((e=>e(t,n,o))))},d=r?new Proxy(o,{get:(t,e)=>u(e),ownKeys:()=>Array.from(i.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>i.has(e),set:(t,e,n)=>(f(e,n),!0)}):(m(),s),h=(t,e)=>(a[t].push(e),()=>{gt(a[t],e)});function p(t){!r&&s&&(Object.prototype.hasOwnProperty.call(s,t)||Object.defineProperty(s,t,{configurable:!0,enumerable:!0,get:()=>u(t),set(e){f(t,e)}}))}function m(){if(r||!s)return;const t=new Set(i.keys());for(const e of Object.keys(s))t.has(e)||delete s[e];for(const e of t)p(e)}return{state:d,get:u,set:f,on:h,onChange:(t,e)=>{const o=(n,o)=>{n===t&&e(o)},i=()=>{const o=n();e(o[t])},r=h("set",o),s=h("reset",i);return c.set(e,{setHandler:o,resetHandler:i,propName:t}),()=>{r(),s(),c.delete(e)}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(h("set",e.set)),e.get&&t.push(h("get",e.get)),e.reset&&t.push(h("reset",e.reset)),e.dispose&&t.push(h("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{a.dispose.forEach((t=>t())),l()},reset:l,forceUpdate:t=>{const e=i.get(t);a.set.forEach((n=>n(t,e,e)))},removeListener:(t,e)=>{const n=c.get(e);n&&n.propName===t&&(gt(a.set,n.setHandler),gt(a.reset,n.resetHandler),c.delete(e))}}})({groups:new Map},void 0);return t.use((()=>{if("function"!=typeof yt||"function"!=typeof mt)return{};const t=mt,e=yt,n=new Map;return{dispose:()=>n.clear(),get:t=>{const o=e();o&&((t,e,n)=>{let o=t.get(e);o||(o=[],t.set(e,o)),o.some((t=>t.deref()===n))||o.push(new WeakRef(n))})(n,t,o)},set:e=>{const o=n.get(e);if(o){const i=o.filter((e=>{const n=e.deref();return!!n&&t(n)}));n.set(e,i)}pt(n)},reset:()=>{n.forEach((e=>{e.forEach((e=>{const n=e.deref();n&&t(n)}))})),pt(n)}}})()),t})(),wt=class{constructor(t){e(this,t),this.openChanged=n(this,"openChanged",3),this.eventsAttached=!1,this.isAnimating=!1,this.clickEvents=[["click",()=>this.open=!this.open]],this.hoverEvents=[["focus",()=>{clearTimeout(this.hideTimeout),this.showTimeout=setTimeout((()=>this.open=!0),this.enterDelay)}],["blur",()=>{clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>this.open=!1),50)}],["mouseenter",()=>{clearTimeout(this.hideTimeout),this.showTimeout=setTimeout((()=>this.open=!0),this.enterDelay)}],["mouseleave",()=>{clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>this.open=!1),100)}]],this.closeEvents=[["keydown",t=>{"Escape"===t.key&&"controlled"!==this.triggerMode&&(this.open=!1)}]],this.open=!1,this.triggerMode="click",this.placement="bottom",this.strategy="absolute",this.offset=6,this.hasArrow=!1,this.disableFlip=!1,this.shiftPadding=0,this.enterDelay=0,this.nested=!1,this.handleClickOutside=t=>{this.el.contains(t.target)||this.triggerElement?.contains(t.target)||(this.open=!1)},this.outsideClickEvents=[["click",this.handleClickOutside],["touchstart",this.handleClickOutside]]}async show(){this.open=!0}async hide(){this.open=!1}async toggle(){this.open=!this.open}attachEventListeners(){this.triggerElement&&!this.eventsAttached&&(c(this.closeEvents,document,this),"click"===this.triggerMode&&(c(this.clickEvents,this.triggerElement,this),c(this.outsideClickEvents,document,this)),"hover"===this.triggerMode&&c(this.hoverEvents,this.triggerElement,this),this.eventsAttached=!0)}positionPopover(){var t;this.triggerElement&&((t,e,n)=>{const o=new Map,i={platform:ut,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=P(l,o,c),d=o,h={},p=0;for(let n=0;n<a.length;n++){const{name:r,fn:m}=a[n],{x:y,y:g,data:v,reset:w}=await m({x:u,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:l,platform:s,elements:{reference:t,floating:e}});u=null!=y?y:u,f=null!=g?g:f,h={...h,[r]:{...h[r],...v}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(l=!0===w.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):w.rects),({x:u,y:f}=P(l,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}})(t,e,{...i,platform:r})})(u(this.triggerElement),this.popoverElement,{placement:this.placement,strategy:this.strategy,middleware:[(t=this.offset,void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=w(n),a=b(n),c="y"===A(n),l=["left","top"].includes(s)?-1:1,u=r&&c?-1:1,f=v(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof p&&(h="end"===a?-1*p:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}),!this.disableFlip&&dt({fallbackStrategy:"bestFit",crossAxis:!0,fallbackPlacements:["bottom"]}),ft({padding:this.shiftPadding}),this.hasArrow&&ht({element:this.arrowElement})]}).then((({x:t,y:e,placement:n,middlewareData:o,strategy:i})=>{if(Object.assign(this.popoverElement.style,{left:`${t}px`,top:`${e}px`,position:i}),this.hasArrow){const t={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]],e={top:"rotate(225deg)",right:"rotate(315deg)",bottom:"rotate(45deg)",left:"rotate(135deg)"}[n.split("-")[0]],{x:i,y:r}=o.arrow;Object.assign(this.arrowElement.style,{left:null!=i?`${i}px`:"",top:null!=r?`${r}px`:"",right:"",bottom:"",transform:e,[t]:"-4px"})}}))}async handleOpenChange(t){for(;this.isAnimating;)await new Promise((t=>setTimeout(t,50)));this.isAnimating=!0;const e=vt.groups.get(this.groupName),n=e&&e.openedBy!==this.el,o=e&&e.openedBy===this.el;t&&this.popoverElement.style.removeProperty("display"),o&&!t&&vt.groups.delete(this.groupName),this.groupName&&t&&vt.groups.set(this.groupName,{openedBy:this.el});const{growIn:i}=a(this.popoverElement,{duration:n?0:100,amount:.85}),{fadeOut:r}=s(this.popoverElement,{duration:n?0:100});!0===t&&(this.popoverElement.removeAttribute("hidden"),this.positionPopover(),await i()),!1===t&&(await r(),this.popoverElement.setAttribute("hidden","")),this.isAnimating=!1,this.openChanged.emit(t)}handleStrategyChange(){this.open&&this.positionPopover()}componentWillRender(){this.triggerElement||(this.triggerElement=this.el.querySelector('[slot="trigger"]')),this.attachEventListeners()}componentDidLoad(){if(this.open){const{setFadeIn:t}=s(this.popoverElement);t(),this.popoverElement.removeAttribute("hidden")}else{const{setGrowOut:t}=a(this.popoverElement);t()}this.positionPopover()}disconnectedCallback(){l(this.closeEvents,document,this),"click"===this.triggerMode&&(l(this.clickEvents,this.triggerElement,this),l(this.outsideClickEvents,document,this)),"hover"===this.triggerMode&&l(this.hoverEvents,this.triggerElement,this),this.eventsAttached=!1,this.hideTimeout&&clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout)}render(){return o(i,{key:"1a604043f59c8aa04237b6d03838125079ac5c49"},o("slot",{key:"c22461b3d5050f7b502635221cbe17c03ef425a9",name:"trigger"}),o("div",{key:"58a438db8308be12d854afe3deda462d4ae528fb","data-scope":"popover","data-strategy":this.strategy,hidden:!0,ref:t=>this.popoverElement=t},this.hasArrow&&o("div",{key:"af18bf4b8700484ca989a8d45da8295e8d11ea2e","data-scope":"arrow",ref:t=>this.arrowElement=t}),o("slot",{key:"f3308bfc01d5a4f954a1f0b822cf378cd874f9bd",name:"content"})))}get el(){return r(this)}static get watchers(){return{open:[{handleOpenChange:0}],strategy:[{handleStrategyChange:0}]}}};wt.style="nv-popover{display:inline-block;position:relative}nv-popover:has([fluid]:not([fluid=false])){display:block}nv-popover[strategy=fixed]{position:static}nv-popover>[data-scope=popover]{width:max-content;background-color:var(--components-popover-background);border-color:var(--components-popover-border);font-weight:var(--font-weight-medium-emphasis);border-width:1px;border-style:solid;border-radius:var(--popover-radius);padding:var(--popover-padding-y) var(--popover-padding-x);position:absolute;top:0;left:0;z-index:1;box-shadow:var(--popover-shadow-1-x) var(--popover-shadow-1-y) var(--popover-shadow-1-blur) -2px var(--popover-shadow-1-opacity), var(--popover-shadow-2-x) var(--popover-shadow-2-y) var(--popover-shadow-2-blur) var(--shadow-spread-lg-2) var(--popover-shadow-2-opacity)}nv-popover>[data-scope=popover][hidden]:not([hidden=false]){display:none}nv-popover>[data-scope=popover][data-strategy=fixed]{position:fixed;z-index:9999}nv-popover>[data-scope=popover]>[data-scope=arrow]{background-color:var(--components-popover-background);position:absolute;border-color:var(--components-popover-border);border-width:1px;border-style:solid;border-bottom-color:transparent;border-right-color:transparent;width:8px;height:8px;transform:rotate(45deg);border-radius:1px}nv-popover>[data-scope=popover]>[slot=content]{position:relative;z-index:1}nv-popover>slot-fb{display:none}";export{wt as nv_popover}