@politiet/sheriff-web-components 2.8.0 → 2.9.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.
- package/custom-elements.json +343 -2
- package/dist/mixins/sds-event-dispatcher-mixin.js +1 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js.map +1 -1
- package/dist/sds-button/sds-button.component.d.ts +5 -0
- package/dist/sds-button/sds-button.component.d.ts.map +1 -1
- package/dist/sds-button/sds-button.component.js +47 -49
- package/dist/sds-button/sds-button.component.js.map +1 -1
- package/dist/sds-card/sds-card.d.ts +1 -0
- package/dist/sds-card/sds-card.d.ts.map +1 -1
- package/dist/sds-card/sds-card.js +11 -3
- package/dist/sds-card/sds-card.js.map +1 -1
- package/dist/sds-card/sds-card.styles.d.ts.map +1 -1
- package/dist/sds-card/sds-card.styles.js +5 -0
- package/dist/sds-card/sds-card.styles.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts +3 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.js +13 -3
- package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
- package/dist/sds-chip/sds-chip.d.ts +1 -0
- package/dist/sds-chip/sds-chip.d.ts.map +1 -1
- package/dist/sds-chip/sds-chip.js +3 -0
- package/dist/sds-chip/sds-chip.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.d.ts +1 -0
- package/dist/sds-dialog/sds-dialog.component.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.js +10 -0
- package/dist/sds-dialog/sds-dialog.component.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.d.ts +1 -0
- package/dist/sds-dialog/sds-dialog.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.js.map +1 -1
- package/dist/sds-popover/assets/popover-styles.d.ts.map +1 -1
- package/dist/sds-popover/assets/popover-styles.js +1 -1
- package/dist/sds-popover/assets/popover-styles.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +3 -1
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +13 -3
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-select/sds-select.component.d.ts +2 -0
- package/dist/sds-select/sds-select.component.d.ts.map +1 -1
- package/dist/sds-select/sds-select.component.js +12 -4
- package/dist/sds-select/sds-select.component.js.map +1 -1
- package/dist/sds-switch/sds-switch.d.ts +4 -0
- package/dist/sds-switch/sds-switch.d.ts.map +1 -1
- package/dist/sds-switch/sds-switch.js +16 -2
- package/dist/sds-switch/sds-switch.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.d.ts +3 -0
- package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.js +19 -10
- package/dist/sds-textarea/sds-textarea.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.styles.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.styles.js +1 -0
- package/dist/sds-textarea/sds-textarea.styles.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.d.ts +3 -0
- package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.js +13 -3
- package/dist/sds-textfield/sds-textfield.js.map +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.d.ts.map +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.js +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.js.map +1 -1
- package/dist/shared/assets/positioning.js +1 -1
- package/dist/sheriff-web-components.js +158 -137
- package/dist/skill/references/components.md +1 -1
- package/dist/skill/references/react-wrappers.md +1 -1
- package/package.json +1 -1
- package/web-types.json +215 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={passive:!0,capture:!0},e=(t,e,n)=>void 0===n?t.getAttribute(e)??null:(null===n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),n=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),o=(t,...e)=>{let[n,...o]=e;for(let e of n.split(" "))t.addEventListener(e,...o);return()=>i(t,...e)},i=(t,...e)=>{let[n,...o]=e;for(let e of n.split(" "))t.removeEventListener(e,...o)},r=(t,e)=>{typeof window<"u"&&typeof document<"u"&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(t=>t()),window._dsHotReloadCleanup?.set(t,e()))};let l;const s=()=>{"complete"===document.readyState&&(l||(l=((t,n)=>{let o=document.createElement(t);if(n)for(let[t,i]of Object.entries(n))e(o,t,i);return o})("div",{"aria-live":"assertive"}),l.style.overflow="hidden",l.style.position="fixed",l.style.whiteSpace="nowrap",l.style.width="1px"),l.isConnected||document.body.appendChild(l))};r("announce",()=>[o(document,"focus mouseover",s,t)]);const c=Math.min,a=Math.max,f=Math.round,u=Math.floor,d=t=>({x:t,y:t}),h={left:"right",right:"left",bottom:"top",top:"bottom"};function p(t,e,n){return a(t,c(e,n))}function m(t,e){return"function"==typeof t?t(e):t}function g(t){return t.split("-")[0]}function y(t){return t.split("-")[1]}function w(t){return"x"===t?"y":"x"}function x(t){return"y"===t?"height":"width"}function v(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function b(t){return w(v(t))}function R(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const A=["left","right"],L=["right","left"],T=["top","bottom"],C=["bottom","top"];function E(t,e,n,o){const i=y(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?L:A:e?A:L;case"left":case"right":return e?T:C;default:return[]}}(g(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(R)))),r}function S(t){const e=g(t);return h[e]+t.slice(e.length)}function D(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 O(t,e,n){let{reference:o,floating:i}=t;const r=v(e),l=b(e),s=x(l),c=g(e),a="y"===r,f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,d=o[s]/2-i[s]/2;let h;switch(c){case"top":h={x:f,y:o.y-i.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}switch(y(e)){case"start":h[l]-=d*(n&&a?-1:1);break;case"end":h[l]+=d*(n&&a?-1:1)}return h}async function P(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:h=0}=m(e,t),p=function(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}}(h),g=s[d?"floating"===u?"reference":"floating":u],y=D(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:a,rootBoundary:f,strategy:c})),w="floating"===u?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),v=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},b=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-b.top+p.top)/v.y,bottom:(b.bottom-y.bottom+p.bottom)/v.y,left:(y.left-b.left+p.left)/v.x,right:(b.right-y.right+p.right)/v.x}}const H=new Set(["left","top"]);function F(){return"undefined"!=typeof window}function M(t){return k(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function $(t){var e;return null==(e=(k(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function k(t){return!!F()&&(t instanceof Node||t instanceof W(t).Node)}function B(t){return!!F()&&(t instanceof Element||t instanceof W(t).Element)}function V(t){return!!F()&&(t instanceof HTMLElement||t instanceof W(t).HTMLElement)}function _(t){return!(!F()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof W(t).ShadowRoot)}function z(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Q(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function N(t){return/^(table|td|th)$/.test(M(t))}function j(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const q=/transform|translate|scale|rotate|perspective|filter/,I=/paint|layout|strict|content/,X=t=>!!t&&"none"!==t;let Y;function G(t){const e=B(t)?Q(t):t;return X(e.transform)||X(e.translate)||X(e.scale)||X(e.rotate)||X(e.perspective)||!J()&&(X(e.backdropFilter)||X(e.filter))||q.test(e.willChange||"")||I.test(e.contain||"")}function J(){return null==Y&&(Y="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Y}function K(t){return/^(html|body|#document)$/.test(M(t))}function Q(t){return W(t).getComputedStyle(t)}function U(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Z(t){if("html"===M(t))return t;const e=t.assignedSlot||t.parentNode||_(t)&&t.host||$(t);return _(e)?e.host:e}function tt(t){const e=Z(t);return K(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&z(e)?e:tt(e)}function et(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=tt(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=W(i);if(r){const t=nt(l);return e.concat(l,l.visualViewport||[],z(i)?i:[],t&&n?et(t):[])}return e.concat(i,et(i,[],n))}function nt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ot(t){const e=Q(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=V(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,s=f(n)!==r||f(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function it(t){return B(t)?t:t.contextElement}function rt(t){const e=it(t);if(!V(e))return d(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ot(e);let l=(r?f(n.width):n.width)/o,s=(r?f(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const lt=d(0);function st(t){const e=W(t);return J()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:lt}function ct(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=it(t);let l=d(1);e&&(o?B(o)&&(l=rt(o)):l=rt(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==W(t))&&e}(r,n,o)?st(r):d(0);let c=(i.left+s.x)/l.x,a=(i.top+s.y)/l.y,f=i.width/l.x,u=i.height/l.y;if(r){const t=W(r),e=o&&B(o)?W(o):o;let n=t,i=nt(n);for(;i&&o&&e!==n;){const t=rt(i),e=i.getBoundingClientRect(),o=Q(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,a*=t.y,f*=t.x,u*=t.y,c+=r,a+=l,n=W(i),i=nt(n)}}return D({width:f,height:u,x:c,y:a})}function at(t,e){const n=U(t).scrollLeft;return e?e.left+n:ct($(t)).left+n}function ft(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-at(t,n),y:n.top+e.scrollTop}}function ut(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=W(t),o=$(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,c=0;if(i){r=i.width,l=i.height;const t=J();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}const a=at(o);if(a<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-e.clientWidth-i);l<=25&&(r-=l)}else a<=25&&(r+=a);return{width:r,height:l,x:s,y:c}}(t,n);else if("document"===e)o=function(t){const e=$(t),n=U(t),o=t.ownerDocument.body,i=a(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=a(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+at(t);const s=-n.scrollTop;return"rtl"===Q(o).direction&&(l+=a(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}($(t));else if(B(e))o=function(t,e){const n=ct(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=V(t)?rt(t):d(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=st(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function dt(t,e){const n=Z(t);return!(n===e||!B(n)||K(n))&&("fixed"===Q(n).position||dt(n,e))}function ht(t,e,n){const o=V(e),i=$(e),r="fixed"===n,l=ct(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const c=d(0);function a(){c.x=at(i)}if(o||!o&&!r)if(("body"!==M(e)||z(i))&&(s=U(e)),o){const t=ct(e,!0,r,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&a();r&&!o&&i&&a();const f=!i||o||r?d(0):ft(i,s);return{x:l.left+s.scrollLeft-c.x-f.x,y:l.top+s.scrollTop-c.y-f.y,width:l.width,height:l.height}}function pt(t){return"static"===Q(t).position}function mt(t,e){if(!V(t)||"fixed"===Q(t).position)return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function gt(t,e){const n=W(t);if(j(t))return n;if(!V(t)){let e=Z(t);for(;e&&!K(e);){if(B(e)&&!pt(e))return e;e=Z(e)}return n}let o=mt(t,e);for(;o&&N(o)&&pt(o);)o=mt(o,e);return o&&K(o)&&pt(o)&&!G(o)?n:o||function(t){let e=Z(t);for(;V(e)&&!K(e);){if(G(e))return e;if(j(e))return null;e=Z(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=$(o),s=!!e&&j(e.floating);if(o===l||s&&r)return n;let c={scrollLeft:0,scrollTop:0},a=d(1);const f=d(0),u=V(o);if((u||!u&&!r)&&(("body"!==M(o)||z(l))&&(c=U(o)),u)){const t=ct(o);a=rt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const h=!l||u||r?d(0):ft(l,c);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+f.x+h.x,y:n.y*a.y-c.scrollTop*a.y+f.y+h.y}},getDocumentElement:$,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?j(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(t=>B(t)&&"body"!==M(t)),i=null;const r="fixed"===Q(t).position;let l=r?Z(t):t;for(;B(l)&&!K(l);){const e=Q(l),n=G(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&("absolute"===i.position||"fixed"===i.position)||z(l)&&!n&&dt(t,l))?o=o.filter(t=>t!==l):i=e,l=Z(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=ut(e,r[0],i);let s=l.top,f=l.right,u=l.bottom,d=l.left;for(let t=1;t<r.length;t++){const n=ut(e,r[t],i);s=a(n.top,s),f=c(n.right,f),u=c(n.bottom,u),d=a(n.left,d)}return{width:f-d,height:u-s,x:d,y:s}},getOffsetParent:gt,getElementRects:async function(t){const e=this.getOffsetParent||gt,n=this.getDimensions,o=await n(t.floating);return{reference:ht(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}=ot(t);return{width:e,height:n}},getScale:rt,isElement:B,isRTL:function(t){return"rtl"===Q(t).direction}};function wt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:f=!1}=o,d=it(t),h=i||r?[...d?et(d):[],...e?et(e):[]]:[];h.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const p=d&&s?function(t,e){let n,o=null;const i=$(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(s,f){void 0===s&&(s=!1),void 0===f&&(f=1),r();const d=t.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=d;if(s||e(),!m||!g)return;const y={rootMargin:-u(p)+"px "+-u(i.clientWidth-(h+m))+"px "+-u(i.clientHeight-(p+g))+"px "+-u(h)+"px",threshold:a(0,c(1,f))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==f){if(!w)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||wt(d,t.getBoundingClientRect())||l(),w=!1}try{o=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(x,y)}o.observe(t)}(!0),r}(d,n):null;let m,g=-1,y=null;l&&(y=new ResizeObserver(t=>{let[o]=t;o&&o.target===d&&y&&e&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),d&&!f&&y.observe(d),e&&y.observe(e));let w=f?ct(t):null;return f&&function e(){const o=ct(t);w&&!wt(w,o)&&n();w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;h.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==p||p(),null==(t=y)||t.disconnect(),y=null,f&&cancelAnimationFrame(m)}}const vt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=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)),l=g(n),s=y(n),c="y"===v(n),a=H.has(l)?-1:1,f=r&&c?-1:1,u=m(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),c?{x:h*f,y:d*a}:{x:d*a,y:h*f}}(e,t);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:l}}}}},bt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:l=!0,crossAxis:s=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=m(t,e),f={x:n,y:o},u=await r.detectOverflow(e,a),d=v(g(i)),h=w(d);let y=f[h],x=f[d];if(l){const t="y"===h?"bottom":"right";y=p(y+u["y"===h?"top":"left"],y,y-u[t])}if(s){const t="y"===d?"bottom":"right";x=p(x+u["y"===d?"top":"left"],x,x-u[t])}const b=c.fn({...e,[h]:y,[d]:x});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[h]:l,[d]:s}}}}}},Rt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s,platform:c,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:w=!0,...A}=m(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const L=g(i),T=v(s),C=g(s)===s,D=await(null==c.isRTL?void 0:c.isRTL(a.floating)),O=d||(C||!w?[S(s)]:function(t){const e=S(t);return[R(t),e,R(e)]}(s)),P="none"!==p;!d&&P&&O.push(...E(s,w,p,D));const H=[s,...O],F=await c.detectOverflow(e,A),M=[];let W=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&M.push(F[L]),u){const t=function(t,e,n){void 0===n&&(n=!1);const o=y(t),i=b(t),r=x(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=S(l)),[l,S(l)]}(i,l,D);M.push(F[t[0]],F[t[1]])}if(W=[...W,{placement:i,overflows:M}],!M.every(t=>t<=0)){var $,k;const t=((null==($=r.flip)?void 0:$.index)||0)+1,e=H[t];if(e){if(!("alignment"===u&&T!==v(e))||W.every(t=>v(t.placement)!==T||t.overflows[0]>0))return{data:{index:t,overflows:W},reset:{placement:e}}}let n=null==(k=W.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:k.placement;if(!n)switch(h){case"bestFit":{var B;const t=null==(B=W.filter(t=>{if(P){const e=v(t.placement);return e===T||"y"===e}return!0}).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=s}if(i!==n)return{reset:{placement:n}}}return{}}}},At=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:l,elements:s}=e,{apply:f=()=>{},...u}=m(t,e),d=await l.detectOverflow(e,u),h=g(i),p=y(i),w="y"===v(i),{width:x,height:b}=r.floating;let R,A;"top"===h||"bottom"===h?(R=h,A=p===(await(null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(A=h,R="end"===p?"top":"bottom");const L=b-d.top-d.bottom,T=x-d.left-d.right,C=c(b-d[R],L),E=c(x-d[A],T),S=!e.middlewareData.shift;let D=C,O=E;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(O=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(D=L),S&&!p){const t=a(d.left,0),e=a(d.right,0),n=a(d.top,0),o=a(d.bottom,0);w?O=x-2*(0!==t||0!==e?t+e:a(d.left,d.right)):D=b-2*(0!==n||0!==o?n+o:a(d.top,d.bottom))}await f({...e,availableWidth:O,availableHeight:D});const P=await l.getDimensions(s.floating);return x!==P.width||b!==P.height?{reset:{rects:!0}}:{}}}},Lt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=e,{offset:s=0,mainAxis:c=!0,crossAxis:a=!0}=m(t,e),f={x:n,y:o},u=v(i),d=w(u);let h=f[d],p=f[u];const y=m(s,e),x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const t="y"===d?"height":"width",e=r.reference[d]-r.floating[t]+x.mainAxis,n=r.reference[d]+r.reference[t]-x.mainAxis;h<e?h=e:h>n&&(h=n)}if(a){var b,R;const t="y"===d?"width":"height",e=H.has(g(i)),n=r.reference[u]-r.floating[t]+(e&&(null==(b=l.offset)?void 0:b[u])||0)+(e?0:x.crossAxis),o=r.reference[u]+r.reference[t]+(e?0:(null==(R=l.offset)?void 0:R[u])||0)-(e?x.crossAxis:0);p<n?p=n:p>o&&(p=o)}return{[d]:h,[u]:p}}}},Tt=(t,e,n)=>{const o=new Map,i={platform:yt,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:P},c=await(null==l.isRTL?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=O(a,o,c),d=o,h=0;const p={};for(let n=0;n<r.length;n++){const m=r[n];if(!m)continue;const{name:g,fn:y}=m,{x:w,y:x,data:v,reset:b}=await y({x:f,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:p,rects:a,platform:s,elements:{reference:t,floating:e}});f=null!=w?w:f,u=null!=x?x:u,p[g]={...p[g],...v},b&&h<50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(a=!0===b.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:f,y:u}=O(a,d,c))),n=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:p}})(t,e,{...i,platform:r})},Ct="data-placement",Et="data-autoplacement",St=new Map;function Dt(t){let{newState:o,oldState:i,target:r,source:l=t.detail}=t,s=r instanceof HTMLElement&&null!==e(r,"popover")&&n(r,"--_ds-floating");if(!s)return;if("closed"===o)return St.get(r)?.();if(!l){let t=r.getRootNode(),e=`[popovertarget="${r.id}"],[commandfor="${r.id}"]`;l=r.id&&t?.querySelector?.(e)||void 0}if(!l||l===r||i&&i===o)return;let c=n(r,"--_ds-floating-overscroll"),a=e(r,Ct)||e(l,Ct)||s,f=e(r,Et)||e(l,Et),u=parseFloat(getComputedStyle(r,"::before").height)||0,d=a.match(/left|right/gi)?"Height":"Width",h=l[`offset${d}`]/2+u;if("none"===a)return;let p={strategy:"absolute",placement:a,middleware:[vt(u||0),bt({padding:10,limiter:Lt({offset:{mainAxis:h}})}),Ht(),..."false"===f?[]:[Rt({padding:10,crossAxis:!1})],...c?[At({apply({availableHeight:t}){"fit"===c&&(r.style.width=`${l.clientWidth}px`),r.style.maxHeight=`${Math.max(50,t-20)}px`}})]:[]]},m=xt(l,r,async()=>{if(!l?.isConnected)return St.get(r)?.();let{x:t,y:e}=await Tt(l,r,p);r.style.translate=`${t}px ${e}px`});St.set(r,()=>St.delete(r)&&m())}let Ot;const Pt=({type:t})=>{if("mousedown"===t&&(Ot=!1),"scroll"===t&&!1===Ot&&(Ot=!0),"mouseup"===t&&Ot)for(let[t]of St)t.showPopover()};r("popover",()=>[o(document,"mousedown scroll mouseup",Pt,!0),o(document,"toggle ds-toggle-source",Dt,t)]);const Ht=()=>({name:"arrowPseudo",fn(t){let n=t.elements.floating,o=t.rects.reference,i=`${Math.round(o.width/2+o.x-t.x)}px`,r=`${Math.round(o.height/2+o.y-t.y)}px`;return n.style.setProperty("--_ds-floating-arrow-x",i),n.style.setProperty("--_ds-floating-arrow-y",r),e(n,"data-floating",t.placement),t}});
|
|
1
|
+
const e={passive:!0,capture:!0},t=()=>typeof window<"u"&&typeof document<"u",n=(e,t,n)=>void 0===n?e.getAttribute(t)??null:(null===n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n),null),o=(e,t)=>getComputedStyle(e).getPropertyValue(t).trim(),r=(e,...t)=>{let[n,...o]=t;for(let t of n.split(" "))e.addEventListener(t,...o);return()=>i(e,...t)},i=(e,...t)=>{let[n,...o]=t;for(let t of n.split(" "))e.removeEventListener(t,...o)},l=(e,n)=>{t()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(e)?.map(e=>e()),window._dsHotReloadCleanup?.set(e,n()))};let a;const s=()=>{"complete"===document.readyState&&(a||(a=((e,t)=>{let o=document.createElement(e);if(t)for(let[e,r]of Object.entries(t))n(o,e,r);return o})("div",{"aria-live":"assertive"}),a.style.overflow="hidden",a.style.position="fixed",a.style.whiteSpace="nowrap",a.style.width="1px"),a.isConnected||document.body.appendChild(a))};l("announce",()=>[r(document,"focus mouseover",s,e)]);var c=class extends Event{oldState;newState;constructor(e,{oldState:t="",newState:n="",...o}={}){super(e,o),this.oldState=String(t||""),this.newState=String(n||"")}},u=new WeakMap;function f(e,t,n){u.set(e,setTimeout(()=>{u.has(e)&&e.dispatchEvent(new c("toggle",{cancelable:!1,oldState:t,newState:n}))},0))}var p=globalThis.ShadowRoot||function(){},d=globalThis.HTMLDialogElement||function(){},h=new WeakMap,m=new WeakMap,g=new WeakMap,w=new WeakMap;function y(e){return w.get(e)||"hidden"}var v=new WeakMap;function b(e){return[...e].pop()}function x(e,t){return!("auto"!==e.popover&&"manual"!==e.popover&&"hint"!==e.popover||!e.isConnected||t&&"showing"!==y(e)||!t&&"hidden"!==y(e)||e instanceof d&&e.hasAttribute("open")||document.fullscreenElement===e)}function E(e){if(!e)return 0;let t=m.get(document)||new Set,n=g.get(document)||new Set;return n.has(e)?[...n].indexOf(e)+t.size+1:t.has(e)?[...t].indexOf(e)+1:0}function S(e){let t=R(e),n=function(e){for(;e;){let t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if((e=e.parentElement||A(e))instanceof p&&(e=e.host),e instanceof Document)return}}(e);return E(t)>E(n)?t:n}function T(e){let t,n=g.get(e)||new Set,o=m.get(e)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(t=b(r),t.isConnected?t:(r.delete(t),T(e))):null}function L(e){for(let t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function A(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?A(e.parentNode):e}function R(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===w.get(e))return e;if((e=e instanceof Element&&e.assignedSlot||e.parentElement||A(e))instanceof p&&(e=e.host),e instanceof Document)return}}function M(e,t){let n=new Map,o=0;for(let e of t||[])n.set(e,o),o+=1;n.set(e,o),o+=1;let r=null;return function(t){if(!t)return;let o=!1,i=null,l=null;for(;!o;){if(i=R(t)||null,null===i||!n.has(i))return;("hint"===e.popover||"auto"===i.popover)&&(o=!0),o||(t=i.parentElement)}l=n.get(i),(null===r||n.get(r)<l)&&(r=i)}(e.parentElement||A(e)),r}function H(e){return!(e.hidden||e instanceof p||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&"hidden"===e.type||e instanceof HTMLAnchorElement&&""===e.href)&&("number"==typeof e.tabIndex&&-1!==e.tabIndex)}function D(e){var t;null==(t=function(e){if(e.shadowRoot&&!0!==e.shadowRoot.delegatesFocus)return null;let t=e;t.shadowRoot&&(t=t.shadowRoot);let n=t.querySelector("[autofocus]");if(n)return n;{let e=t.querySelectorAll("slot");for(let t of e){let e=t.assignedElements({flatten:!0});for(let t of e){if(t.hasAttribute("autofocus"))return t;if(n=t.querySelector("[autofocus]"),n)return n}}}let o=e.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),r=o.currentNode;for(;r;){if(H(r))return r;r=o.nextNode()}}(e))||t.focus()}var C=new WeakMap;function k(e){if(!x(e,!1))return;let t=e.ownerDocument;if(!e.dispatchEvent(new c("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!x(e,!1))return;let n=!1,o=e.popover,r=null,i=M(e,m.get(t)||new Set),l=M(e,g.get(t)||new Set);if("auto"===o&&(P(g.get(t)||new Set,n,!0),F(i||t,n,!0),r="auto"),"hint"===o&&(l?(F(l,n,!0),r="hint"):(P(g.get(t)||new Set,n,!0),i?(F(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==e.popover||!x(e,!1))return;T(t)||(n=!0),"auto"===r?(m.has(t)||m.set(t,new Set),m.get(t).add(e)):"hint"===r&&(g.has(t)||g.set(t,new Set),g.get(t).add(e))}C.delete(e);let a=t.activeElement;e.classList.add(":popover-open"),w.set(e,"showing"),h.has(t)||h.set(t,new Set),h.get(t).add(e),B(v.get(e),!0),D(e),n&&a&&"auto"===e.popover&&C.set(e,a),f(e,"closed","open")}function O(e,t=!1,n=!1){var o,r;if(!x(e,!0))return;let i=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(F(e,t,n),!x(e,!0)))return;let l=m.get(i)||new Set,a=l.has(e)&&b(l)===e;if(B(v.get(e),!1),v.delete(e),n&&(e.dispatchEvent(new c("beforetoggle",{oldState:"open",newState:"closed"})),a&&b(l)!==e&&F(e,t,n),!x(e,!0)))return;null==(o=h.get(i))||o.delete(e),l.delete(e),null==(r=g.get(i))||r.delete(e),e.classList.remove(":popover-open"),w.set(e,"hidden"),n&&f(e,"open","closed");let s=C.get(e);s&&(C.delete(e),t&&s.focus())}function P(e,t=!1,n=!1){let o=L(e);for(;o;)O(o,t,n),o=L(e)}function W(e,t,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let l=null,a=!1;for(let n of t)if(n===e)a=!0;else if(a){l=n;break}if(!l)return;for(;"showing"===y(l)&&t.size;)O(b(t),n,o);t.has(e)&&b(t)!==e&&(r=!0),r&&(o=!1)}}function F(e,t,n){let o=e.ownerDocument||e;if(e instanceof Document)return function(e,t=!1,n=!1){let o=T(e);for(;o;)O(o,t,n),o=T(e)}(o,t,n);g.get(o)?.has(e)?W(e,g.get(o),t,n):(P(g.get(o)||new Set,t,n),m.get(o)?.has(e)&&W(e,m.get(o),t,n))}var N=new WeakMap;function z(e){if(!e.isTrusted)return;let t=e.composedPath()[0];if(!t)return;let n=t.ownerDocument;if(!T(n))return;let o=S(t);if(o&&"pointerdown"===e.type)N.set(n,o);else if("pointerup"===e.type){let e=N.get(n)===o;N.delete(n),e&&F(o||n,!1,!0)}}var $=new WeakMap;function B(e,t=!1){if(!e)return;$.has(e)||$.set(e,e.getAttribute("aria-expanded"));let n=e.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)e.setAttribute("aria-expanded",String(t));else{let t=$.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var _=globalThis.ShadowRoot||function(){};function q(e,t,n){let o=e[t];Object.defineProperty(e,t,{value(e){return o.call(this,n(e))}})}var I=/(^|[^\\]):popover-open\b/g;function V(){let e="function"==typeof globalThis.CSSLayerBlockRule;return`\n${e?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${e?"}":""}\n`}var j=null;function X(e){let t=V();if(null===j)try{(j=new CSSStyleSheet).replaceSync(t)}catch{j=!1}if(!1===j){let n=document.createElement("style");n.textContent=t,e instanceof Document?e.head.prepend(n):e.prepend(n)}else e.adoptedStyleSheets=[j,...e.adoptedStyleSheets]}const Y=Math.min,G=Math.max,J=Math.round,K=Math.floor,Q=e=>({x:e,y:e}),U={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e,t,n){return G(e,Y(t,n))}function ee(e,t){return"function"==typeof e?e(t):e}function te(e){return e.split("-")[0]}function ne(e){return e.split("-")[1]}function oe(e){return"x"===e?"y":"x"}function re(e){return"y"===e?"height":"width"}function ie(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function le(e){return oe(ie(e))}function ae(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const se=["left","right"],ce=["right","left"],ue=["top","bottom"],fe=["bottom","top"];function pe(e,t,n,o){const r=ne(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ce:se:t?se:ce;case"left":case"right":return t?ue:fe;default:return[]}}(te(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(ae)))),i}function de(e){const t=te(e);return U[t]+e.slice(t.length)}function he(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function me(e,t,n){let{reference:o,floating:r}=e;const i=ie(t),l=le(t),a=re(l),s=te(t),c="y"===i,u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let d;switch(s){case"top":d={x:u,y:o.y-r.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(ne(t)){case"start":d[l]-=p*(n&&c?-1:1);break;case"end":d[l]+=p*(n&&c?-1:1)}return d}async function ge(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=ee(t,e),h=function(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}}(d),m=a[p?"floating"===f?"reference":"floating":f],g=he(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:u,strategy:s})),w="floating"===f?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=he(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:s}):w);return{top:(g.top-b.top+h.top)/v.y,bottom:(b.bottom-g.bottom+h.bottom)/v.y,left:(g.left-b.left+h.left)/v.x,right:(b.right-g.right+h.right)/v.x}}const we=new Set(["left","top"]);function ye(){return"undefined"!=typeof window}function ve(e){return Ee(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function xe(e){var t;return null==(t=(Ee(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ee(e){return!!ye()&&(e instanceof Node||e instanceof be(e).Node)}function Se(e){return!!ye()&&(e instanceof Element||e instanceof be(e).Element)}function Te(e){return!!ye()&&(e instanceof HTMLElement||e instanceof be(e).HTMLElement)}function Le(e){return!(!ye()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof be(e).ShadowRoot)}function Ae(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&"inline"!==r&&"contents"!==r}function Re(e){return/^(table|td|th)$/.test(ve(e))}function Me(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const He=/transform|translate|scale|rotate|perspective|filter/,De=/paint|layout|strict|content/,Ce=e=>!!e&&"none"!==e;let ke;function Oe(e){const t=Se(e)?Fe(e):e;return Ce(t.transform)||Ce(t.translate)||Ce(t.scale)||Ce(t.rotate)||Ce(t.perspective)||!Pe()&&(Ce(t.backdropFilter)||Ce(t.filter))||He.test(t.willChange||"")||De.test(t.contain||"")}function Pe(){return null==ke&&(ke="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ke}function We(e){return/^(html|body|#document)$/.test(ve(e))}function Fe(e){return be(e).getComputedStyle(e)}function Ne(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ze(e){if("html"===ve(e))return e;const t=e.assignedSlot||e.parentNode||Le(e)&&e.host||xe(e);return Le(t)?t.host:t}function $e(e){const t=ze(e);return We(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Ae(t)?t:$e(t)}function Be(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=$e(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=be(r);if(i){const e=_e(l);return t.concat(l,l.visualViewport||[],Ae(r)?r:[],e&&n?Be(e):[])}return t.concat(r,Be(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qe(e){const t=Fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Te(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=J(n)!==i||J(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Ie(e){return Se(e)?e:e.contextElement}function Ve(e){const t=Ie(e);if(!Te(t))return Q(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=qe(t);let l=(i?J(n.width):n.width)/o,a=(i?J(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const je=Q(0);function Xe(e){const t=be(e);return Pe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:je}function Ye(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Ie(e);let l=Q(1);t&&(o?Se(o)&&(l=Ve(o)):l=Ve(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==be(e))&&t}(i,n,o)?Xe(i):Q(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,f=r.height/l.y;if(i){const e=be(i),t=o&&Se(o)?be(o):o;let n=e,r=_e(n);for(;r&&o&&t!==n;){const e=Ve(r),t=r.getBoundingClientRect(),o=Fe(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=l,n=be(r),r=_e(n)}}return he({width:u,height:f,x:s,y:c})}function Ge(e,t){const n=Ne(e).scrollLeft;return t?t.left+n:Ye(xe(e)).left+n}function Je(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ge(e,n),y:n.top+t.scrollTop}}function Ke(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=be(e),o=xe(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=Pe();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}const c=Ge(o);if(c<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-t.clientWidth-r);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=xe(e),n=Ne(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Ge(e);const a=-n.scrollTop;return"rtl"===Fe(o).direction&&(l+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(xe(e));else if(Se(t))o=function(e,t){const n=Ye(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e)?Ve(e):Q(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=Xe(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return he(o)}function Qe(e,t){const n=ze(e);return!(n===t||!Se(n)||We(n))&&("fixed"===Fe(n).position||Qe(n,t))}function Ue(e,t,n){const o=Te(t),r=xe(t),i="fixed"===n,l=Ye(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=Q(0);function c(){s.x=Ge(r)}if(o||!o&&!i)if(("body"!==ve(t)||Ae(r))&&(a=Ne(t)),o){const e=Ye(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&c();i&&!o&&r&&c();const u=!r||o||i?Q(0):Je(r,a);return{x:l.left+a.scrollLeft-s.x-u.x,y:l.top+a.scrollTop-s.y-u.y,width:l.width,height:l.height}}function Ze(e){return"static"===Fe(e).position}function et(e,t){if(!Te(e)||"fixed"===Fe(e).position)return null;if(t)return t(e);let n=e.offsetParent;return xe(e)===n&&(n=n.ownerDocument.body),n}function tt(e,t){const n=be(e);if(Me(e))return n;if(!Te(e)){let t=ze(e);for(;t&&!We(t);){if(Se(t)&&!Ze(t))return t;t=ze(t)}return n}let o=et(e,t);for(;o&&Re(o)&&Ze(o);)o=et(o,t);return o&&We(o)&&Ze(o)&&!Oe(o)?n:o||function(e){let t=ze(e);for(;Te(t)&&!We(t);){if(Oe(t))return t;if(Me(t))return null;t=ze(t)}return null}(e)||n}const nt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,l=xe(o),a=!!t&&Me(t.floating);if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Q(1);const u=Q(0),f=Te(o);if((f||!f&&!i)&&(("body"!==ve(o)||Ae(l))&&(s=Ne(o)),f)){const e=Ye(o);c=Ve(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}const p=!l||f||i?Q(0):Je(l,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-s.scrollTop*c.y+u.y+p.y}},getDocumentElement:xe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?Me(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Be(e,[],!1).filter(e=>Se(e)&&"body"!==ve(e)),r=null;const i="fixed"===Fe(e).position;let l=i?ze(e):e;for(;Se(l)&&!We(l);){const t=Fe(l),n=Oe(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||Ae(l)&&!n&&Qe(e,l))?o=o.filter(e=>e!==l):r=t,l=ze(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=Ke(t,i[0],r);let a=l.top,s=l.right,c=l.bottom,u=l.left;for(let e=1;e<i.length;e++){const n=Ke(t,i[e],r);a=G(n.top,a),s=Y(n.right,s),c=Y(n.bottom,c),u=G(n.left,u)}return{width:s-u,height:c-a,x:u,y:a}},getOffsetParent:tt,getElementRects:async function(e){const t=this.getOffsetParent||tt,n=this.getDimensions,o=await n(e.floating);return{reference:Ue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=qe(e);return{width:t,height:n}},getScale:Ve,isElement:Se,isRTL:function(e){return"rtl"===Fe(e).direction}};function ot(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rt(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:s=!1}=o,c=Ie(e),u=r||i?[...c?Be(c):[],...t?Be(t):[]]:[];u.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=xe(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(a||t(),!p||!d)return;const h={rootMargin:-K(f)+"px "+-K(r.clientWidth-(u+p))+"px "+-K(r.clientHeight-(f+d))+"px "+-K(u)+"px",threshold:G(0,Y(1,s))||1};let m=!0;function g(t){const o=t[0].intersectionRatio;if(o!==s){if(!m)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||ot(c,e.getBoundingClientRect())||l(),m=!1}try{o=new IntersectionObserver(g,{...h,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,h)}o.observe(e)}(!0),i}(c,n):null;let p,d=-1,h=null;l&&(h=new ResizeObserver(e=>{let[o]=e;o&&o.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!s&&h.observe(c),t&&h.observe(t));let m=s?Ye(e):null;return s&&function t(){const o=Ye(e);m&&!ot(m,o)&&n();m=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(p)}}const it=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:a}=t,s=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=te(n),a=ne(n),s="y"===ie(n),c=we.has(l)?-1:1,u=i&&s?-1:1,f=ee(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(d="end"===a?-1*h:h),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},lt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ee(e,t),u={x:n,y:o},f=await i.detectOverflow(t,c),p=ie(te(r)),d=oe(p);let h=u[d],m=u[p];if(l){const e="y"===d?"bottom":"right";h=Z(h+f["y"===d?"top":"left"],h,h-f[e])}if(a){const e="y"===p?"bottom":"right";m=Z(m+f["y"===p?"top":"left"],m,m-f[e])}const g=s.fn({...t,[d]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:l,[p]:a}}}}}},at=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ee(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=te(r),y=ie(a),v=te(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(v||!m?[de(a)]:function(e){const t=de(e);return[ae(e),t,ae(t)]}(a)),E="none"!==h;!p&&E&&x.push(...pe(a,m,h,b));const S=[a,...x],T=await s.detectOverflow(t,g),L=[];let A=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&L.push(T[w]),f){const e=function(e,t,n){void 0===n&&(n=!1);const o=ne(e),r=le(e),i=re(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=de(l)),[l,de(l)]}(r,l,b);L.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:L}],!L.every(e=>e<=0)){var R,M;const e=((null==(R=i.flip)?void 0:R.index)||0)+1,t=S[e];if(t){if(!("alignment"===f&&y!==ie(t))||A.every(e=>ie(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:A},reset:{placement:t}}}let n=null==(M=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:M.placement;if(!n)switch(d){case"bestFit":{var H;const e=null==(H=A.filter(e=>{if(E){const t=ie(e.placement);return t===y||"y"===t}return!0}).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:H[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},st=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:l,elements:a}=t,{apply:s=()=>{},...c}=ee(e,t),u=await l.detectOverflow(t,c),f=te(r),p=ne(r),d="y"===ie(r),{width:h,height:m}=i.floating;let g,w;"top"===f||"bottom"===f?(g=f,w=p===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,g="end"===p?"top":"bottom");const y=m-u.top-u.bottom,v=h-u.left-u.right,b=Y(m-u[g],y),x=Y(h-u[w],v),E=!t.middlewareData.shift;let S=b,T=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=v),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(S=y),E&&!p){const e=G(u.left,0),t=G(u.right,0),n=G(u.top,0),o=G(u.bottom,0);d?T=h-2*(0!==e||0!==t?e+t:G(u.left,u.right)):S=m-2*(0!==n||0!==o?n+o:G(u.top,u.bottom))}await s({...t,availableWidth:T,availableHeight:S});const L=await l.getDimensions(a.floating);return h!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}},ct=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:c=!0}=ee(e,t),u={x:n,y:o},f=ie(r),p=oe(f);let d=u[p],h=u[f];const m=ee(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;d<t?d=t:d>n&&(d=n)}if(c){var w,y;const e="y"===p?"width":"height",t=we.has(te(r)),n=i.reference[f]-i.floating[e]+(t&&(null==(w=l.offset)?void 0:w[f])||0)+(t?0:g.crossAxis),o=i.reference[f]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[f])||0)-(t?g.crossAxis:0);h<n?h=n:h>o&&(h=o)}return{[p]:d,[f]:h}}}},ut=(e,t,n)=>{const o=new Map,r={platform:nt,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:ge},s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=me(c,o,s),p=o,d=0;const h={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:g,fn:w}=m,{x:y,y:v,data:b,reset:x}=await w({x:u,y:f,initialPlacement:o,placement:p,strategy:r,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,f=null!=v?v:f,h[g]={...h[g],...b},x&&d<50&&(d++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):x.rects),({x:u,y:f}=me(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:r,middlewareData:h}})(e,t,{...r,platform:i})};t()&&!(typeof HTMLElement<"u"&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype)&&function(){if(typeof window>"u")return;function e(e){return e?.includes(":popover-open")&&(e=e.replace(I,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||c,q(Document.prototype,"querySelector",e),q(Document.prototype,"querySelectorAll",e),q(Element.prototype,"querySelector",e),q(Element.prototype,"querySelectorAll",e),q(Element.prototype,"matches",e),q(Element.prototype,"closest",e),q(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let e=(this.getAttribute("popover")||"").toLowerCase();return""===e||"auto"==e?"auto":"hint"==e?"hint":"manual"},set(e){null===e?this.removeAttribute("popover"):this.setAttribute("popover",e)}},showPopover:{enumerable:!0,configurable:!0,value(e={}){k(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){O(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e={}){return"boolean"==typeof e&&(e={force:e}),"showing"===w.get(this)&&void 0===e.force||!1===e.force?O(this,!0,!0):(void 0===e.force||!0===e.force)&&k(this),"showing"===w.get(this)}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let n=t.call(this,e);return X(n),n}}});let n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=n.call(this);return e.shadowRoot&&X(e.shadowRoot),e}}});let o=new WeakMap;function r(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(e instanceof Element))throw TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,e)}},get(){if("button"!==this.localName&&"input"!==this.localName||"input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type||this.disabled||this.form&&"submit"===this.type)return null;let e=o.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return o.delete(this),null;let t=A(this),n=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof _)&&n&&t.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let e=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===e||"hide"===e?e:"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}})}r(HTMLButtonElement),r(HTMLInputElement);let i=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=t[0];if(!(n instanceof Element)||n?.shadowRoot)return;let o=A(n);if(!(o instanceof _||o instanceof Document))return;let r=t.find(e=>e.matches?.call(e,"[popovertargetaction],[popovertarget]"));return r?(function(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let n=y(t);"show"===e.popoverTargetAction&&"showing"===n||"hide"===e.popoverTargetAction&&"hidden"===n||("showing"===n?O(t,!0,!0):x(t,!1)&&(v.set(t,e),k(t)))}(r),void e.preventDefault()):void 0},l=e=>{let t=e.key,n=e.target;!e.defaultPrevented&&n&&("Escape"===t||"Esc"===t)&&F(n.ownerDocument,!0,!0)};(e=>{e.addEventListener("click",i),e.addEventListener("keydown",l),e.addEventListener("pointerdown",z),e.addEventListener("pointerup",z)})(document),X(document)}();const ft="data-placement",pt="data-autoplacement",dt=new Map;function ht(e){let{newState:t,oldState:r,target:i,source:l=e.detail}=e,a=i instanceof HTMLElement&&null!==n(i,"popover")&&o(i,"--_ds-floating");if(!a)return;if("closed"===t)return dt.get(i)?.();if(!l){let e=i.getRootNode(),t=`[popovertarget="${i.id}"],[commandfor="${i.id}"]`;l=i.id&&e?.querySelector?.(t)||void 0}if(!l||l===i||r&&r===t)return;i.style.scrollMarginBottom="var(--_ds-floating-arrow-size)";let s=o(i,"--_ds-floating-overscroll"),c=n(i,ft)||n(l,ft)||a,u=n(i,pt)||n(l,pt),f=parseFloat(o(i,"scroll-margin-bottom"))||0,p=c.match(/left|right/gi)?"Height":"Width",d=l[`offset${p}`]/2+f;if("none"===c)return;let h={strategy:"absolute",placement:c,middleware:[it(f),lt({padding:10,limiter:ct({offset:{mainAxis:d}})}),wt(),..."false"===u?[]:[at({padding:10,crossAxis:!1})],...s?[st({apply({availableHeight:e}){"fit"===s&&(i.style.width=`${l.offsetWidth}px`),i.style.maxHeight=`${Math.max(50,e-20)}px`}})]:[]]},m=rt(l,i,async()=>{if(!l?.isConnected)return dt.get(i)?.();let{x:e,y:t}=await ut(l,i,h);i.style.translate=`${e}px ${t}px`});dt.set(i,()=>dt.delete(i)&&m())}let mt;const gt=({type:e})=>{if("mousedown"===e&&(mt=!1),"scroll"===e&&!1===mt&&(mt=!0),"mouseup"===e&&mt)for(let[e]of dt)e.showPopover()};l("popover",()=>[r(document,"mousedown scroll mouseup",gt,!0),r(document,"toggle ds-toggle-source",ht,e)]);const wt=()=>({name:"arrowPseudo",fn(e){let t=e.elements.floating,o=e.rects.reference,r=`${Math.round(o.width/2+o.x-e.x)}px`,i=`${Math.round(o.height/2+o.y-e.y)}px`;return t.style.setProperty("--_ds-floating-arrow-x",r),t.style.setProperty("--_ds-floating-arrow-y",i),n(t,"data-floating",e.placement),e}});
|