@politiet/sheriff-web-components 2.13.1 → 2.14.1
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 +3942 -1450
- package/dist/controllers/index.d.ts +3 -0
- package/dist/controllers/index.d.ts.map +1 -0
- package/dist/controllers/index.js +3 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/sds-drag-drop-controller.d.ts +25 -0
- package/dist/controllers/sds-drag-drop-controller.d.ts.map +1 -0
- package/dist/controllers/sds-drag-drop-controller.js +52 -0
- package/dist/controllers/sds-drag-drop-controller.js.map +1 -0
- package/dist/controllers/sds-file-preview-controller.d.ts +38 -0
- package/dist/controllers/sds-file-preview-controller.d.ts.map +1 -0
- package/dist/controllers/sds-file-preview-controller.js +90 -0
- package/dist/controllers/sds-file-preview-controller.js.map +1 -0
- package/dist/frameworks/preact.d.ts +15 -1
- package/dist/frameworks/preact.d.ts.map +1 -1
- package/dist/frameworks/react.d.ts +33 -1
- package/dist/frameworks/react.d.ts.map +1 -1
- package/dist/frameworks/solidjs.d.ts +4 -0
- package/dist/frameworks/solidjs.d.ts.map +1 -1
- package/dist/frameworks/svelte.d.ts +4 -0
- package/dist/frameworks/svelte.d.ts.map +1 -1
- package/dist/frameworks/vue.d.ts +24 -1
- package/dist/frameworks/vue.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.d.ts +1 -0
- package/dist/react-wrappers/SDSDialogWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js +1 -0
- package/dist/react-wrappers/SDSDialogWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSFileUploadFileListWrapper.d.ts +3 -0
- package/dist/react-wrappers/SDSFileUploadFileListWrapper.d.ts.map +1 -0
- package/dist/react-wrappers/SDSFileUploadFileListWrapper.js +10 -0
- package/dist/react-wrappers/SDSFileUploadFileListWrapper.js.map +1 -0
- package/dist/react-wrappers/SDSFileUploadItemWrapper.d.ts +6 -0
- package/dist/react-wrappers/SDSFileUploadItemWrapper.d.ts.map +1 -0
- package/dist/react-wrappers/SDSFileUploadItemWrapper.js +12 -0
- package/dist/react-wrappers/SDSFileUploadItemWrapper.js.map +1 -0
- package/dist/react-wrappers/SDSFileUploadWrapper.d.ts +12 -0
- package/dist/react-wrappers/SDSFileUploadWrapper.d.ts.map +1 -0
- package/dist/react-wrappers/SDSFileUploadWrapper.js +18 -0
- package/dist/react-wrappers/SDSFileUploadWrapper.js.map +1 -0
- package/dist/react-wrappers/SDSSearchWrapper.d.ts +15 -0
- package/dist/react-wrappers/SDSSearchWrapper.d.ts.map +1 -0
- package/dist/react-wrappers/SDSSearchWrapper.js +19 -0
- package/dist/react-wrappers/SDSSearchWrapper.js.map +1 -0
- package/dist/react-wrappers/SDSStepperStepWrapper.d.ts +4 -1
- package/dist/react-wrappers/SDSStepperStepWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSStepperStepWrapper.js +3 -1
- package/dist/react-wrappers/SDSStepperStepWrapper.js.map +1 -1
- package/dist/react-wrappers/index.d.ts +4 -0
- package/dist/react-wrappers/index.d.ts.map +1 -1
- package/dist/react-wrappers/index.js +4 -0
- package/dist/react-wrappers/index.js.map +1 -1
- package/dist/sds-alert/sds-alert.styles.js +1 -1
- package/dist/sds-alert/sds-alert.styles.js.map +1 -1
- package/dist/sds-button/sds-button.component.d.ts +0 -1
- package/dist/sds-button/sds-button.component.d.ts.map +1 -1
- package/dist/sds-button/sds-button.component.js +10 -16
- package/dist/sds-button/sds-button.component.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.styles.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.styles.js +6 -0
- package/dist/sds-checkbox/sds-checkbox.styles.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.js +11 -1
- package/dist/sds-dialog/sds-dialog.component.js.map +1 -1
- package/dist/sds-file-upload/sds-file-upload.d.ts +102 -0
- package/dist/sds-file-upload/sds-file-upload.d.ts.map +1 -0
- package/dist/sds-file-upload/sds-file-upload.js +384 -0
- package/dist/sds-file-upload/sds-file-upload.js.map +1 -0
- package/dist/sds-file-upload/sds-file-upload.styles.d.ts +2 -0
- package/dist/sds-file-upload/sds-file-upload.styles.d.ts.map +1 -0
- package/dist/sds-file-upload/sds-file-upload.styles.js +234 -0
- package/dist/sds-file-upload/sds-file-upload.styles.js.map +1 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.d.ts +14 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.d.ts.map +1 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.js +26 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.js.map +1 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.styles.d.ts +2 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.styles.d.ts.map +1 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.styles.js +19 -0
- package/dist/sds-file-upload-file-list/sds-file-upload-file-list.styles.js.map +1 -0
- package/dist/sds-file-upload-item/assets/u-progress.js +2 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.d.ts +62 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.d.ts.map +1 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.js +205 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.js.map +1 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.styles.d.ts +2 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.styles.d.ts.map +1 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.styles.js +227 -0
- package/dist/sds-file-upload-item/sds-file-upload-item.styles.js.map +1 -0
- package/dist/sds-icon/sds-icon.system.js +7 -7
- package/dist/sds-icon/sds-icon.system.js.map +1 -1
- package/dist/sds-internal-header/sds-internal-header.component.js +1 -1
- package/dist/sds-internal-header/sds-internal-header.component.js.map +1 -1
- package/dist/sds-internal-header/sds-internal-header.styles.js +1 -1
- package/dist/sds-internal-header/sds-internal-header.styles.js.map +1 -1
- package/dist/sds-notification/sds-notification.styles.js +1 -1
- package/dist/sds-notification/sds-notification.styles.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.styles.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.styles.js +6 -1
- package/dist/sds-radio/sds-radio.styles.js.map +1 -1
- package/dist/sds-search/sds-search.component.d.ts +128 -0
- package/dist/sds-search/sds-search.component.d.ts.map +1 -0
- package/dist/sds-search/sds-search.component.js +345 -0
- package/dist/sds-search/sds-search.component.js.map +1 -0
- package/dist/sds-search/sds-search.d.ts +13 -0
- package/dist/sds-search/sds-search.d.ts.map +1 -0
- package/dist/sds-search/sds-search.js +18 -0
- package/dist/sds-search/sds-search.js.map +1 -0
- package/dist/sds-search/sds-search.styles.d.ts +2 -0
- package/dist/sds-search/sds-search.styles.d.ts.map +1 -0
- package/dist/sds-search/sds-search.styles.js +74 -0
- package/dist/sds-search/sds-search.styles.js.map +1 -0
- package/dist/sds-stepper-step/sds-stepper-step.d.ts +3 -0
- package/dist/sds-stepper-step/sds-stepper-step.d.ts.map +1 -1
- package/dist/sds-stepper-step/sds-stepper-step.js +4 -3
- package/dist/sds-stepper-step/sds-stepper-step.js.map +1 -1
- package/dist/sds-stepper-step/sds-stepper-step.styles.js +3 -3
- package/dist/sds-stepper-step/sds-stepper-step.styles.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.component.d.ts +4 -1
- package/dist/sds-textfield/sds-textfield.component.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.component.js +20 -5
- package/dist/sds-textfield/sds-textfield.component.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.js +11 -0
- package/dist/sds-textfield/sds-textfield.styles.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/sds-tooltip/sds-tooltip.d.ts.map +1 -1
- package/dist/sds-tooltip/sds-tooltip.js +1 -1
- package/dist/sds-tooltip/sds-tooltip.js.map +1 -1
- package/dist/shared/assets/positioning.js +1 -1
- package/dist/sheriff-web-components.js +1103 -371
- package/dist/skill/SKILL.md +61 -50
- package/dist/skill/references/components.md +91 -3
- package/dist/skill/references/react-wrappers.md +28 -19
- package/dist/utils/file-validation.d.ts +31 -0
- package/dist/utils/file-validation.d.ts.map +1 -0
- package/dist/utils/file-validation.js +57 -0
- package/dist/utils/file-validation.js.map +1 -0
- package/dist/utils/format-bytes.d.ts +6 -0
- package/dist/utils/format-bytes.d.ts.map +1 -0
- package/dist/utils/format-bytes.js +13 -0
- package/dist/utils/format-bytes.js.map +1 -0
- package/dist/utils/video-thumbnail.d.ts +8 -0
- package/dist/utils/video-thumbnail.d.ts.map +1 -0
- package/dist/utils/video-thumbnail.js +77 -0
- package/dist/utils/video-thumbnail.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +27 -7
- package/web-types.json +3437 -1120
|
@@ -1 +1 @@
|
|
|
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 C(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 D=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))}D.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),C(e),n&&a&&"auto"===e.popover&&D.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=D.get(e);s&&(D.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 z=new WeakMap;function N(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)z.set(n,o);else if("pointerup"===e.type){let e=z.get(n)===o;z.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 V=globalThis.ShadowRoot||function(){};function _(e,t,n){let o=e[t];Object.defineProperty(e,t,{value(e){return o.call(this,n(e))}})}var q=/(^|[^\\]):popover-open\b/g;function I(){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 G(e){let t=I();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 X=Math.min,Y=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){return"function"==typeof e?e(t):e}function ee(e){return e.split("-")[0]}function te(e){return e.split("-")[1]}function ne(e){return"x"===e?"y":"x"}function oe(e){return"y"===e?"height":"width"}function re(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ie(e){return ne(re(e))}function le(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ae=["left","right"],se=["right","left"],ce=["top","bottom"],ue=["bottom","top"];function fe(e,t,n,o){const r=te(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?se:ae:t?ae:se;case"left":case"right":return t?ce:ue;default:return[]}}(ee(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(le)))),i}function pe(e){const t=ee(e);return U[t]+e.slice(t.length)}function de(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 he(e,t,n){let{reference:o,floating:r}=e;const i=re(t),l=ie(t),a=oe(l),s=ee(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}}const h=te(t);return h&&(d[l]+=p*("end"===h?1:-1)*(n&&c?-1:1)),d}async function me(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}=Z(t,e),h=function(e){return"number"!=typeof e?function(e){var t,n,o,r;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(o=e.bottom)?o:0,left:null!=(r=e.left)?r:0}}(e):{top:e,right:e,bottom:e,left:e}}(d),m=a[p?"floating"===f?"reference":"floating":f],g=de(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=de(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 ge=new Set(["left","top"]);function we(){return"undefined"!=typeof window}function ye(e){return xe(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function be(e){var t;return null==(t=(xe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xe(e){return!!we()&&(e instanceof Node||e instanceof ve(e).Node)}function Ee(e){return!!we()&&(e instanceof Element||e instanceof ve(e).Element)}function Se(e){return!!we()&&(e instanceof HTMLElement||e instanceof ve(e).HTMLElement)}function Te(e){return!(!we()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot)}function Le(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&"inline"!==r&&"contents"!==r}function Ae(e){return/^(table|td|th)$/.test(ye(e))}function Re(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Me=/transform|translate|scale|rotate|perspective|filter/,He=/paint|layout|strict|content/,Ce=e=>!!e&&"none"!==e;let De;function ke(e){const t=Ee(e)?We(e):e;return Ce(t.transform)||Ce(t.translate)||Ce(t.scale)||Ce(t.rotate)||Ce(t.perspective)||!Oe()&&(Ce(t.backdropFilter)||Ce(t.filter))||Me.test(t.willChange||"")||He.test(t.contain||"")}function Oe(){return null==De&&(De="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),De}function Pe(e){return/^(html|body|#document)$/.test(ye(e))}function We(e){return ve(e).getComputedStyle(e)}function Fe(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ze(e){if("html"===ye(e))return e;const t=e.assignedSlot||e.parentNode||Te(e)&&e.host||be(e);return Te(t)?t.host:t}function Ne(e){const t=ze(e);return Pe(t)?(e.ownerDocument||e).body:Se(t)&&Le(t)?t:Ne(t)}function $e(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Ne(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=ve(r);if(i){const e=Be(l);return t.concat(l,l.visualViewport||[],Le(r)?r:[],e&&n?$e(e):[])}return t.concat(r,$e(r,[],n))}function Be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ve(e){const t=We(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Se(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 _e(e){return Ee(e)?e:e.contextElement}function qe(e){const t=_e(e);if(!Se(t))return Q(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Ve(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 Ie=Q(0);function je(e){const t=ve(e);return Oe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ie}function Ge(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=_e(e);let l=Q(1);t&&(o?Ee(o)&&(l=qe(o)):l=qe(e));const a=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===ve(e)}(i,n,o)?je(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&&o){const e=ve(i),t=Ee(o)?ve(o):o;let n=e,r=Be(n);for(;r&&t!==n;){const e=qe(r),t=r.getBoundingClientRect(),o=We(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=ve(r),r=Be(n)}}return de({width:u,height:f,x:s,y:c})}function Xe(e,t){const n=Fe(e).scrollLeft;return t?t.left+n:Ge(be(e)).left+n}function Ye(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xe(e,n),y:n.top+t.scrollTop}}function Je(e,t,n){let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,n){void 0===n&&(n="viewport");const o="layoutViewport"===n,r=ve(e),i=be(e),l=r.visualViewport;let a=i.clientWidth,s=i.clientHeight,c=0,u=0;if(l){const e=!Oe()||"fixed"===t;o?e||(c=-l.offsetLeft,u=-l.offsetTop):(a=l.width,s=l.height,e&&(c=l.offsetLeft,u=l.offsetTop))}if(Xe(i)<=0){const e=i.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-t.clientWidth-o),l="stable both-edges"===getComputedStyle(i).scrollbarGutter?r/2:r;l<=25&&(a-=l)}return{width:a,height:s,x:c,y:u}}(e,n,t);else if("document"===t)o=function(e){const t=Fe(e),n=e.ownerDocument.body,o=Y(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Y(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+Xe(e);const l=-t.scrollTop;return"rtl"===We(n).direction&&(i+=Y(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:l}}(be(e));else if(Ee(t))o=function(e,t){const n=Ge(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=qe(e);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=je(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return de(o)}function Ke(e,t,n){const o=Se(t),r=be(t),i="fixed"===n,l=Ge(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=Q(0);if((o||!i)&&(("body"!==ye(t)||Le(r))&&(a=Fe(t)),o)){const e=Ge(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!o&&r&&(s.x=Xe(r));const c=!r||o||i?Q(0):Ye(r,a);return{x:l.left+a.scrollLeft-s.x-c.x,y:l.top+a.scrollTop-s.y-c.y,width:l.width,height:l.height}}function Qe(e){return"static"===We(e).position}function Ue(e,t){if(!Se(e)||"fixed"===We(e).position)return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function Ze(e,t){const n=ve(e);if(Re(e))return n;if(!Se(e)){let t=ze(e);for(;t&&!Pe(t);){if(Ee(t)&&!Qe(t))return t;t=ze(t)}return n}let o=Ue(e,t);for(;o&&Ae(o)&&Qe(o);)o=Ue(o,t);return o&&Pe(o)&&Qe(o)&&!ke(o)?n:o||function(e){let t=ze(e);for(;Se(t)&&!Pe(t);){if(ke(t))return t;if(Re(t))return null;t=ze(t)}return null}(e)||n}const et={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,l=be(o),a=!!t&&Re(t.floating);if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Q(1);const u=Q(0),f=Se(o);if((f||!i)&&(("body"!==ye(o)||Le(l))&&(s=Fe(o)),f)){const e=Ge(o);c=qe(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}const p=!l||f||i?Q(0):Ye(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:be,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?Re(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(e=>Ee(e)&&"body"!==ye(e)),r=null;const i="fixed"===We(e).position;let l=i?ze(e):e;for(;Ee(l)&&!Pe(l);){const e=We(l),t=ke(l),n=r?r.position:i?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?r=e:o=o.filter(e=>e!==l),l=ze(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=Je(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=Je(t,i[e],r);a=Y(n.top,a),s=X(n.right,s),c=X(n.bottom,c),u=Y(n.left,u)}return{width:s-u,height:c-a,x:u,y:a}},getOffsetParent:Ze,getElementRects:async function(e){const t=this.getOffsetParent||Ze,n=this.getDimensions,o=await n(e.floating);return{reference:Ke(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=Ve(e);return{width:t,height:n}},getScale:qe,isElement:Ee,isRTL:function(e){return"rtl"===We(e).direction}};function tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nt(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=_e(e),u=r||i?[...c?$e(c):[],...t?$e(t):[]]:[];u.forEach(e=>{r&&e.addEventListener("scroll",n),i&&e.addEventListener("resize",n)});const f=c&&a?function(e,t,n){let o,r=null;const i=be(e);function l(){var e;clearTimeout(o),null==(e=r)||e.disconnect(),r=null}function a(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),l();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(n||t(),!p||!d)return;const h={rootMargin:-K(f)+"px "+-K(i.clientWidth-(u+p))+"px "+-K(i.clientHeight-(f+d))+"px "+-K(u)+"px",threshold:Y(0,X(1,s))||1};let m=!0;function g(t){const n=t[0].intersectionRatio;if(!tt(c,e.getBoundingClientRect()))return a();if(n!==s){if(!m)return a();n?a(!1,n):o=setTimeout(()=>{a(!1,1e-7)},1e3)}m=!1}try{r=new IntersectionObserver(g,{...h,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}const s=ve(e),c=()=>a(n);return s.addEventListener("resize",c),a(!0),()=>{s.removeEventListener("resize",c),l()}}(c,n,i):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?Ge(e):null;return s&&function t(){const o=Ge(e);m&&!tt(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 ot=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=ee(n),a=te(n),s="y"===re(n),c=ge.has(l)?-1:1,u=i&&s?-1:1,f=Z(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}}}}},rt=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}=Z(e,t),u={x:n,y:o},f=await i.detectOverflow(t,c),p=re(r),d=ne(p);let h=u[d],m=u[p];const g=(e,t)=>{return n=t+f["y"===e?"top":"left"],o=t,r=t-f["y"===e?"bottom":"right"],Y(n,X(o,r));var n,o,r};l&&(h=g(d,h)),a&&(m=g(p,m));const w=s.fn({...t,[d]:h,[p]:m});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[d]:l,[p]:a}}}}}},it=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}=Z(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=ee(r),y=re(a),v=ee(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(v||!m?[pe(a)]:function(e){const t=pe(e);return[le(e),t,le(t)]}(a)),E="none"!==h;!p&&E&&x.push(...fe(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=te(e),r=ie(e),i=oe(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=pe(l)),[l,pe(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!==re(t))||A.every(e=>re(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=re(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{}}}},lt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:l=()=>{},...a}=Z(e,t),s=await r.detectOverflow(t,a),c=ee(n),u=te(n),f="y"===re(n),{width:p,height:d}=o.floating;let h,m;"top"===c||"bottom"===c?(h=c,m=u===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h="end"===u?"top":"bottom");const g=d-s.top-s.bottom,w=p-s.left-s.right,y=X(d-s[h],g),v=X(p-s[m],w),b=t.middlewareData.shift,x=!b;let E=y,S=v;null!=b&&b.enabled.x&&(S=w),null!=b&&b.enabled.y&&(E=g),x&&!u&&(f?S=p-2*Y(s.left,s.right):E=d-2*Y(s.top,s.bottom)),await l({...t,availableWidth:S,availableHeight:E});const T=await r.getDimensions(i.floating);return p!==T.width||d!==T.height?{reset:{rects:!0}}:{}}}},at=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:l,rects:a,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=Z(e,t),p={x:r,y:i},d=re(l),h=ne(d);let m=p[h],g=p[d];const w=Z(c,t),y="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:null!=(n=w.mainAxis)?n:0,crossAxis:null!=(o=w.crossAxis)?o:0};if(u){const e="y"===h?"height":"width",t=a.reference[h]-a.floating[e]+y.mainAxis,n=a.reference[h]+a.reference[e]-y.mainAxis;m<t?m=t:m>n&&(m=n)}if(f){var v,b;const e="y"===h?"width":"height",t=ge.has(ee(l)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=s.offset)?void 0:v[d])||0)+(t?0:y.crossAxis),o=a.reference[d]+a.reference[e]+(t?0:(null==(b=s.offset)?void 0:b[d])||0)-(t?y.crossAxis:0);g<n?g=n:g>o&&(g=o)}return{[h]:m,[d]:g}}}},st=(e,t,n)=>{const o=new Map,r=null!=n?n:{},i={...et,...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:me},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}=he(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}=he(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(q,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||c,_(Document.prototype,"querySelector",e),_(Document.prototype,"querySelectorAll",e),_(Element.prototype,"querySelector",e),_(Element.prototype,"querySelectorAll",e),_(Element.prototype,"matches",e),_(Element.prototype,"closest",e),_(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 G(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&&G(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 V)&&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 V||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",N),e.addEventListener("pointerup",N)})(document),G(document)}();const ct="data-placement",ut="data-autoplacement",ft=new Map;function pt(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 ft.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,ct)||n(l,ct)||a,u=n(i,ut)||n(l,ut),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:[ot(f),rt({padding:10,limiter:at({offset:{mainAxis:d}})}),mt(),..."false"===u?[]:[it({padding:10,crossAxis:!1})],...s?[lt({apply({availableHeight:e}){"fit"===s&&(i.style.width=`${l.offsetWidth}px`),i.style.maxHeight=`${Math.max(50,e-20)}px`}})]:[]]},m=nt(l,i,async()=>{if(!l?.isConnected)return ft.get(i)?.();let{x:e,y:t}=await st(l,i,h);i.style.translate=`${e}px ${t}px`});ft.set(i,()=>ft.delete(i)&&m())}let dt;const ht=({type:e})=>{if("mousedown"===e&&(dt=!1),"scroll"===e&&!1===dt&&(dt=!0),"mouseup"===e&&dt)for(let[e]of ft)e.showPopover()};l("popover",()=>[r(document,"mousedown scroll mouseup",ht,!0),r(document,"toggle ds-toggle-source",pt,e)]);const mt=()=>({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}});
|
|
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===n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n),null),o=(e,t)=>getComputedStyle(e).getPropertyValue(t).trim(),r=e=>{let t=e?.getRootNode?.()||e?.ownerDocument;return t instanceof Document||t instanceof ShadowRoot?t:e?.ownerDocument||document},i=e=>{let t=e.target?.shadowRoot&&e.composedPath()[0]||e.target;return 1===t?.nodeType?t:null},l=(e,...t)=>{let[n,...o]=t;for(let t of n.split(" "))e.addEventListener(t,...o);return()=>a(e,...t)},a=(e,...t)=>{let[n,...o]=t;for(let t of n.split(" "))e.removeEventListener(t,...o)},s="_dsHotReloadCleanup1.23.0",c=(e,n)=>{if(t()){window[s]||(window[s]=new Map);for(let t of window[s]?.get(e)||[])t();window[s]?.set(e,n())}};let u;const f=()=>{"complete"===document.readyState&&(u||(u=((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"}),u.style.overflow="hidden",u.style.position="fixed",u.style.whiteSpace="nowrap",u.style.width="1px"),u.isConnected||document.body.appendChild(u))};c("announce",()=>[l(document,"focus mouseover",f,e)]);var p=globalThis.Event||class{},d=class extends p{oldState;newState;constructor(e,t={}){let n=Object.assign({},t);delete n.oldState,delete n.newState,super(e,n),this.oldState=String(t.oldState||""),this.newState=String(t.newState||"")}},h=new WeakMap;function m(e,t,n){h.set(e,setTimeout(()=>{h.has(e)&&e.dispatchEvent(new d("toggle",{cancelable:!1,oldState:t,newState:n}))},0))}var g=globalThis.ShadowRoot||function(){},w=globalThis.HTMLDialogElement||function(){},v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap;function E(e){return x.get(e)||"hidden"}var S=new WeakMap;function T(e){return[...e].pop()}function L(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let n=E(t);("show"!==e.popoverTargetAction||"showing"!==n)&&("hide"!==e.popoverTargetAction||"hidden"!==n)&&("showing"===n?z(t,!0,!0):A(t,!1)&&(S.set(t,e),N(t)))}function A(e,t){return!("auto"!==e.popover&&"manual"!==e.popover&&"hint"!==e.popover||!e.isConnected||t&&"showing"!==E(e)||!t&&"hidden"!==E(e)||e instanceof w&&e.hasAttribute("open")||document.fullscreenElement===e)}function R(e){if(!e)return 0;let t=y.get(document)||new Set,n=b.get(document)||new Set;return n.has(e)?[...n].indexOf(e)+t.size+1:t.has(e)?[...t].indexOf(e)+1:0}function M(e){let t=C(e),n=function(e){for(;e;){let t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if((e=e.parentElement||D(e))instanceof g&&(e=e.host),e instanceof Document)return}}(e);return R(t)>R(n)?t:n}function P(e){let t,n=b.get(e)||new Set,o=y.get(e)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(t=T(r),t.isConnected?t:(r.delete(t),P(e))):null}function H(e){for(let t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function D(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?D(e.parentNode):e}function C(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===x.get(e))return e;if((e=e instanceof Element&&e.assignedSlot||e.parentElement||D(e))instanceof g&&(e=e.host),e instanceof Document)return}}function O(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;for(;!o;){if(i=C(t)||null,null===i||!n.has(i))return;("hint"===e.popover||"auto"===i.popover)&&(o=!0),o||(t=i.parentElement)}let l=n.get(i)??null;(null===r||n.get(r)<l)&&(r=i)}(e.parentElement||D(e)),r}function k(e){return!(e.hidden||e instanceof g||(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 W(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(k(r))return r;r=o.nextNode()}}(e))||t.focus()}var F=new WeakMap;function N(e){if(!A(e,!1))return;let t=e.ownerDocument;if(!e.dispatchEvent(new d("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!A(e,!1))return;let n=!1,o=e.popover,r=null,i=O(e,y.get(t)||new Set),l=O(e,b.get(t)||new Set);if("auto"===o&&($(b.get(t)||new Set,n,!0),j(i||t,n,!0),r="auto"),"hint"===o&&(l?(j(l,n,!0),r="hint"):($(b.get(t)||new Set,n,!0),i?(j(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==e.popover||!A(e,!1))return;P(t)||(n=!0),"auto"===r?(y.has(t)||y.set(t,new Set),y.get(t).add(e)):"hint"===r&&(b.has(t)||b.set(t,new Set),b.get(t).add(e))}F.delete(e);let a=t.activeElement;e.classList.add(":popover-open"),x.set(e,"showing"),v.has(t)||v.set(t,new Set),v.get(t).add(e),_(S.get(e),!0),W(e),n&&a&&"auto"===e.popover&&F.set(e,a),m(e,"closed","open")}function z(e,t=!1,n=!1){var o,r;if(!A(e,!0))return;let i=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(j(e,t,n),!A(e,!0)))return;let l=y.get(i)||new Set,a=l.has(e)&&T(l)===e;if(_(S.get(e),!1),S.delete(e),n&&(e.dispatchEvent(new d("beforetoggle",{oldState:"open",newState:"closed"})),a&&T(l)!==e&&j(e,t,n),!A(e,!0)))return;null==(o=v.get(i))||o.delete(e),l.delete(e),null==(r=b.get(i))||r.delete(e),e.classList.remove(":popover-open"),x.set(e,"hidden"),n&&m(e,"open","closed");let s=F.get(e);s&&(F.delete(e),t&&s.focus())}function $(e,t=!1,n=!1){let o=H(e);for(;o;)z(o,t,n),o=H(e)}function B(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"===E(l)&&t.size;)z(T(t),n,o);t.has(e)&&T(t)!==e&&(r=!0),r&&(o=!1)}}function j(e,t,n){let o=e.ownerDocument||e;if(e instanceof Document)return function(e,t=!1,n=!1){let o=P(e);for(;o;)z(o,t,n),o=P(e)}(o,t,n);b.get(o)?.has(e)?B(e,b.get(o),t,n):($(b.get(o)||new Set,t,n),y.get(o)?.has(e)&&B(e,y.get(o),t,n))}var q=new WeakMap;function V(e){if(!e.isTrusted)return;let t=e.composedPath()[0];if(!t)return;let n=t.ownerDocument||t;if(!P(n))return;let o=M(t);if(o&&"pointerdown"===e.type)q.set(n,o);else if("pointerup"===e.type){let e=q.get(n)===o;q.delete(n),e&&j(o||n,!1,!0)}}var I=new WeakMap;function _(e,t=!1){if(!e)return;I.has(e)||I.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=I.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var G=globalThis.ShadowRoot||function(){};function X(e,t,n){let o=e[t];Object.defineProperty(e,t,{value(e){return o.call(this,n(e))}})}var Y=/(^|[^\\]):popover-open\b/g;function J(e){let t="function"==typeof globalThis.CSSLayerBlockRule,n=e.split(".").map(e=>CSS.escape(e)).join(".");return`\n${t?`@layer ${n} {`:""}\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${t?"}":""}\n`}var K=null;function Q(e,t){let n=J(t);if(null===K)try{(K=new CSSStyleSheet).replaceSync(n)}catch{K=!1}if(!1!==K&&e.adoptedStyleSheets)e.adoptedStyleSheets=[K,...e.adoptedStyleSheets];else{let t=document.createElement("style");t.textContent=n,e instanceof Document?e.head.prepend(t):e.prepend(t)}}const U=Math.min,Z=Math.max,ee=Math.round,te=Math.floor,ne=e=>({x:e,y:e}),oe={left:"right",right:"left",bottom:"top",top:"bottom"};function re(e,t){return"function"==typeof e?e(t):e}function ie(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function ae(e){return"x"===e?"y":"x"}function se(e){return"y"===e?"height":"width"}function ce(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ue(e){return ae(ce(e))}function fe(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const pe=["left","right"],de=["right","left"],he=["top","bottom"],me=["bottom","top"];function ge(e,t,n,o){const r=le(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?de:pe:t?pe:de;case"left":case"right":return t?he:me;default:return[]}}(ie(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(fe)))),i}function we(e){const t=ie(e);return oe[t]+e.slice(t.length)}function ve(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 ye(e,t,n){let{reference:o,floating:r}=e;const i=ce(t),l=ue(t),a=se(l),s=ie(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}}const h=le(t);return h&&(d[l]+=p*("end"===h?1:-1)*(n&&c?-1:1)),d}async function be(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}=re(t,e),h=function(e){return"number"!=typeof e?function(e){var t,n,o,r;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(o=e.bottom)?o:0,left:null!=(r=e.left)?r:0}}(e):{top:e,right:e,bottom:e,left:e}}(d),m=a[p?"floating"===f?"reference":"floating":f],g=ve(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,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},b=ve(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:s}):w);return{top:(g.top-b.top+h.top)/y.y,bottom:(b.bottom-g.bottom+h.bottom)/y.y,left:(g.left-b.left+h.left)/y.x,right:(b.right-g.right+h.right)/y.x}}const xe=new Set(["left","top"]);function Ee(){return"undefined"!=typeof window}function Se(e){return Ae(e)?(e.nodeName||"").toLowerCase():"#document"}function Te(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Le(e){var t;return null==(t=(Ae(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ae(e){return!!Ee()&&(e instanceof Node||e instanceof Te(e).Node)}function Re(e){return!!Ee()&&(e instanceof Element||e instanceof Te(e).Element)}function Me(e){return!!Ee()&&(e instanceof HTMLElement||e instanceof Te(e).HTMLElement)}function Pe(e){return!(!Ee()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Te(e).ShadowRoot)}function He(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Be(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&"inline"!==r&&"contents"!==r}function De(e){return/^(table|td|th)$/.test(Se(e))}function Ce(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Oe=/transform|translate|scale|rotate|perspective|filter/,ke=/paint|layout|strict|content/,We=e=>!!e&&"none"!==e;let Fe;function Ne(e){const t=Re(e)?Be(e):e;return We(t.transform)||We(t.translate)||We(t.scale)||We(t.rotate)||We(t.perspective)||!ze()&&(We(t.backdropFilter)||We(t.filter))||Oe.test(t.willChange||"")||ke.test(t.contain||"")}function ze(){return null==Fe&&(Fe="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fe}function $e(e){return/^(html|body|#document)$/.test(Se(e))}function Be(e){return Te(e).getComputedStyle(e)}function je(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qe(e){if("html"===Se(e))return e;const t=e.assignedSlot||e.parentNode||Pe(e)&&e.host||Le(e);return Pe(t)?t.host:t}function Ve(e){const t=qe(e);return $e(t)?(e.ownerDocument||e).body:Me(t)&&He(t)?t:Ve(t)}function Ie(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Ve(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=Te(r);if(i){const e=_e(l);return t.concat(l,l.visualViewport||[],He(r)?r:[],e&&n?Ie(e):[])}return t.concat(r,Ie(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ge(e){const t=Be(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Me(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=ee(n)!==i||ee(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Xe(e){return Re(e)?e:e.contextElement}function Ye(e){const t=Xe(e);if(!Me(t))return ne(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Ge(t);let l=(i?ee(n.width):n.width)/o,a=(i?ee(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Je=ne(0);function Ke(e){const t=Te(e);return ze()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Je}function Qe(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Xe(e);let l=ne(1);t&&(o?Re(o)&&(l=Ye(o)):l=Ye(e));const a=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===Te(e)}(i,n,o)?Ke(i):ne(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&&o){const e=Te(i),t=Re(o)?Te(o):o;let n=e,r=_e(n);for(;r&&t!==n;){const e=Ye(r),t=r.getBoundingClientRect(),o=Be(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=Te(r),r=_e(n)}}return ve({width:u,height:f,x:s,y:c})}function Ue(e,t){const n=je(e).scrollLeft;return t?t.left+n:Qe(Le(e)).left+n}function Ze(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ue(e,n),y:n.top+t.scrollTop}}function et(e,t,n){let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,n){void 0===n&&(n="viewport");const o="layoutViewport"===n,r=Te(e),i=Le(e),l=r.visualViewport;let a=i.clientWidth,s=i.clientHeight,c=0,u=0;if(l){const e=!ze()||"fixed"===t;o?e||(c=-l.offsetLeft,u=-l.offsetTop):(a=l.width,s=l.height,e&&(c=l.offsetLeft,u=l.offsetTop))}if(Ue(i)<=0){const e=i.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-t.clientWidth-o),l="stable both-edges"===getComputedStyle(i).scrollbarGutter?r/2:r;l<=25&&(a-=l)}return{width:a,height:s,x:c,y:u}}(e,n,t);else if("document"===t)o=function(e){const t=je(e),n=e.ownerDocument.body,o=Z(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Z(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+Ue(e);const l=-t.scrollTop;return"rtl"===Be(n).direction&&(i+=Z(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:l}}(Le(e));else if(Re(t))o=function(e,t){const n=Qe(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Ye(e);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Ke(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ve(o)}function tt(e,t,n){const o=Me(t),r=Le(t),i="fixed"===n,l=Qe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=ne(0);if((o||!i)&&(("body"!==Se(t)||He(r))&&(a=je(t)),o)){const e=Qe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!o&&r&&(s.x=Ue(r));const c=!r||o||i?ne(0):Ze(r,a);return{x:l.left+a.scrollLeft-s.x-c.x,y:l.top+a.scrollTop-s.y-c.y,width:l.width,height:l.height}}function nt(e){return"static"===Be(e).position}function ot(e,t){if(!Me(e)||"fixed"===Be(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Le(e)===n&&(n=n.ownerDocument.body),n}function rt(e,t){const n=Te(e);if(Ce(e))return n;if(!Me(e)){let t=qe(e);for(;t&&!$e(t);){if(Re(t)&&!nt(t))return t;t=qe(t)}return n}let o=ot(e,t);for(;o&&De(o)&&nt(o);)o=ot(o,t);return o&&$e(o)&&nt(o)&&!Ne(o)?n:o||function(e){let t=qe(e);for(;Me(t)&&!$e(t);){if(Ne(t))return t;if(Ce(t))return null;t=qe(t)}return null}(e)||n}const it={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,l=Le(o),a=!!t&&Ce(t.floating);if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=ne(1);const u=ne(0),f=Me(o);if((f||!i)&&(("body"!==Se(o)||He(l))&&(s=je(o)),f)){const e=Qe(o);c=Ye(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}const p=!l||f||i?ne(0):Ze(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:Le,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?Ce(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Ie(e,[],!1).filter(e=>Re(e)&&"body"!==Se(e)),r=null;const i="fixed"===Be(e).position;let l=i?qe(e):e;for(;Re(l)&&!$e(l);){const e=Be(l),t=Ne(l),n=r?r.position:i?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?r=e:o=o.filter(e=>e!==l),l=qe(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=et(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=et(t,i[e],r);a=Z(n.top,a),s=U(n.right,s),c=U(n.bottom,c),u=Z(n.left,u)}return{width:s-u,height:c-a,x:u,y:a}},getOffsetParent:rt,getElementRects:async function(e){const t=this.getOffsetParent||rt,n=this.getDimensions,o=await n(e.floating);return{reference:tt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=Ge(e);return{width:t,height:n}},getScale:Ye,isElement:Re,isRTL:function(e){return"rtl"===Be(e).direction}};function lt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function at(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=Xe(e),u=r||i?[...c?Ie(c):[],...t?Ie(t):[]]:[];u.forEach(e=>{r&&e.addEventListener("scroll",n),i&&e.addEventListener("resize",n)});const f=c&&a?function(e,t,n){let o,r=null;const i=Le(e);function l(){var e;clearTimeout(o),null==(e=r)||e.disconnect(),r=null}function a(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),l();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(n||t(),!p||!d)return;const h={rootMargin:-te(f)+"px "+-te(i.clientWidth-(u+p))+"px "+-te(i.clientHeight-(f+d))+"px "+-te(u)+"px",threshold:Z(0,U(1,s))||1};let m=!0;function g(t){const n=t[0].intersectionRatio;if(!lt(c,e.getBoundingClientRect()))return a();if(n!==s){if(!m)return a();n?a(!1,n):o=setTimeout(()=>{a(!1,1e-7)},1e3)}m=!1}try{r=new IntersectionObserver(g,{...h,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}const s=Te(e),c=()=>a(n);return s.addEventListener("resize",c),a(!0),()=>{s.removeEventListener("resize",c),l()}}(c,n,i):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?Qe(e):null;return s&&function t(){const o=Qe(e);m&&!lt(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 st=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=ie(n),a=le(n),s="y"===ce(n),c=xe.has(l)?-1:1,u=i&&s?-1:1,f=re(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}}}}},ct=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}=re(e,t),u={x:n,y:o},f=await i.detectOverflow(t,c),p=ce(r),d=ae(p);let h=u[d],m=u[p];const g=(e,t)=>{return n=t+f["y"===e?"top":"left"],o=t,r=t-f["y"===e?"bottom":"right"],Z(n,U(o,r));var n,o,r};l&&(h=g(d,h)),a&&(m=g(p,m));const w=s.fn({...t,[d]:h,[p]:m});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[d]:l,[p]:a}}}}}},ut=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}=re(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=ie(r),v=ce(a),y=ie(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(y||!m?[we(a)]:function(e){const t=we(e);return[fe(e),t,fe(t)]}(a)),E="none"!==h;!p&&E&&x.push(...ge(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=le(e),r=ue(e),i=se(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=we(l)),[l,we(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&&v!==ce(t))||A.every(e=>ce(e.placement)!==v||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 P;const e=null==(P=A.filter(e=>{if(E){const t=ce(e.placement);return t===v||"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:P[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},ft=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:l=()=>{},...a}=re(e,t),s=await r.detectOverflow(t,a),c=ie(n),u=le(n),f="y"===ce(n),{width:p,height:d}=o.floating;let h,m;"top"===c||"bottom"===c?(h=c,m=u===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h="end"===u?"top":"bottom");const g=d-s.top-s.bottom,w=p-s.left-s.right,v=U(d-s[h],g),y=U(p-s[m],w),b=t.middlewareData.shift,x=!b;let E=v,S=y;null!=b&&b.enabled.x&&(S=w),null!=b&&b.enabled.y&&(E=g),x&&!u&&(f?S=p-2*Z(s.left,s.right):E=d-2*Z(s.top,s.bottom)),await l({...t,availableWidth:S,availableHeight:E});const T=await r.getDimensions(i.floating);return p!==T.width||d!==T.height?{reset:{rects:!0}}:{}}}},pt=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:l,rects:a,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=re(e,t),p={x:r,y:i},d=ce(l),h=ae(d);let m=p[h],g=p[d];const w=re(c,t),v="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:null!=(n=w.mainAxis)?n:0,crossAxis:null!=(o=w.crossAxis)?o:0};if(u){const e="y"===h?"height":"width",t=a.reference[h]-a.floating[e]+v.mainAxis,n=a.reference[h]+a.reference[e]-v.mainAxis;m<t?m=t:m>n&&(m=n)}if(f){var y,b;const e="y"===h?"width":"height",t=xe.has(ie(l)),n=a.reference[d]-a.floating[e]+(t&&(null==(y=s.offset)?void 0:y[d])||0)+(t?0:v.crossAxis),o=a.reference[d]+a.reference[e]+(t?0:(null==(b=s.offset)?void 0:b[d])||0)-(t?v.crossAxis:0);g<n?g=n:g>o&&(g=o)}return{[h]:m,[d]:g}}}},dt=(e,t,n)=>{const o=new Map,r=null!=n?n:{},i={...it,...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:be},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}=ye(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:v,y:y,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!=v?v:u,f=null!=y?y: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}=ye(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&&"showPopover"in HTMLElement.prototype)&&(!document.body?.showPopover||/native code/i.test(document.body.showPopover.toString()))&&function(e){if(typeof window>"u")return;let t=e?.layerName;function n(e){return e?.includes(":popover-open")&&(e=e.replace(Y,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||d,X(Document.prototype,"querySelector",n),X(Document.prototype,"querySelectorAll",n),X(Element.prototype,"querySelector",n),X(Element.prototype,"querySelectorAll",n),X(Element.prototype,"matches",n),X(Element.prototype,"closest",n),X(DocumentFragment.prototype,"querySelectorAll",n),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,writable:!0,value(e={}){N(this)}},hidePopover:{enumerable:!0,configurable:!0,writable:!0,value(){z(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,writable:!0,value(e={}){return"boolean"==typeof e&&(e={force:e}),"showing"===x.get(this)&&void 0===e.force||!1===e.force?z(this,!0,!0):(void 0===e.force||!0===e.force)&&N(this),"showing"===x.get(this)}}});let o=Element.prototype.attachShadow;o&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let n=o.call(this,e);return Q(n,t),n}}});let r=HTMLElement.prototype.attachInternals;r&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=r.call(this);return e.shadowRoot&&Q(e.shadowRoot,t),e}}});let i=new WeakMap;function l(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),i.delete(this);else{if(!(e instanceof Element))throw TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),i.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=i.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return i.delete(this),null;let t=D(this),n=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof G)&&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)}}})}l(HTMLButtonElement),l(HTMLInputElement);let a=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=t[0];if(!(n instanceof Element)||n?.shadowRoot)return;let o=D(n);if(!(o instanceof G||o instanceof Document))return;let r=t.find(e=>e.matches?.call(e,"[popovertargetaction],[popovertarget]"));return r?(L(r),void e.preventDefault()):void 0},s=e=>{let t=e.key,n=e.target;!e.defaultPrevented&&n&&("Escape"===t||"Esc"===t)&&j(n.ownerDocument||n,!0,!0)};(e=>{e.addEventListener("click",a),e.addEventListener("keydown",s),e.addEventListener("pointerdown",V),e.addEventListener("pointerup",V)})(document),Q(document,t)}({layerName:"ds.base"});const ht=new Map,mt="data-placement",gt="data-autoplacement",wt=new Map,vt=e=>yt(i(e),e.newState,e.oldState,e.source||e.detail);function yt(e,t,i,l){let a=e instanceof HTMLElement&&null!==n(e,"popover"),s=wt.get(e);if("open"===t&&s&&s.source===l||(s?.cleanup(),"closed"===t||!a))return;if(!l){let t=e.id&&`[popovertarget="${e.id}"],[commandfor="${e.id}"]`;l=t&&r(e).querySelector(t)||void 0}if(!l||l===e||i&&i===t)return;let c=o(e,"--_ds-floating"),u=n(e,mt)??n(l,mt);if(null===u&&!c)return;e.style.scrollMarginBottom="var(--_ds-floating-arrow-size)";let f=u||c||"top",p=o(e,"--_ds-floating-overscroll"),d=n(e,gt)||n(l,gt),h=parseFloat(o(e,"scroll-margin-bottom"))||0,m=f.match(/left|right/gi)?"Height":"Width",g=l[`offset${m}`]/2+h;if("none"===f)return;let w=!1,v={strategy:"absolute",placement:f,middleware:[st(h),ct({padding:10,limiter:pt({offset:{mainAxis:g}})}),St(),..."false"===d?[]:[ut({padding:10,crossAxis:!1})],...p?[ft({apply({availableHeight:t}){if(w)return;w=!0;let n=`${Math.max(50,t-20)}px`;requestAnimationFrame(()=>{e.style.maxHeight!==n&&(e.style.maxHeight=n)})}})]:[]]},y=at(l,e,async()=>{if(!l?.isConnected)return wt.get(e)?.cleanup();if("fit"===p){let t=`${l.offsetWidth}px`;e.style.width!==t&&(e.style.width=t)}let{x:t,y:n}=await dt(l,e,v);e.style.translate=`${t}px ${n}px`});wt.set(e,{source:l,cleanup:()=>wt.delete(e)&&y()})}let bt;const xt=e=>{if("pointerdown"===e.type&&(bt=!1),"scroll"===e.type&&!1===bt&&(bt=!0),"pointerup"===e.type&&bt)for(let[e]of wt)e.showPopover()},Et=t=>{for(let[e,t]of ht)!e.host?.isConnected&&ht.delete(e)&&t();let n=r(i(t));n instanceof ShadowRoot&&!ht.has(n)&&ht.set(n,l(n,"toggle",vt,e))};c("popover",()=>{let t=Object.getOwnPropertyDescriptors(HTMLElement.prototype),n=HTMLElement.prototype.togglePopover,o=HTMLElement.prototype.showPopover,r=HTMLElement.prototype.hidePopover;return Object.defineProperties(HTMLElement.prototype,{togglePopover:{...t.togglePopover,value(e){let t=this.matches(":popover-open"),o="boolean"==typeof e,r=t?"open":"closed",i=(o?e:e?.force??!t)?"open":"closed",l=o?void 0:e?.source,a=n?.call(this,e);return yt(this,i,r,l),a}},showPopover:{...t.showPopover,value(e){let t=this.matches(":popover-open")?"open":"closed",n=o?.call(this,e);return yt(this,"open",t,e?.source),n}},hidePopover:{...t.hidePopover,value(){let e=this.matches(":popover-open")?"open":"closed",t=r?.call(this);return yt(this,"closed",e),t}}}),[l(document,"click",Et,e),l(document,"pointerdown pointerup scroll",xt,e),l(document,"toggle ds-toggle-source",vt,e),()=>{Object.defineProperties(HTMLElement.prototype,{togglePopover:{...t.togglePopover,value:n},showPopover:{...t.showPopover,value:o},hidePopover:{...t.hidePopover,value:r}});for(let[,e]of ht)e();ht.clear()}]});const St=()=>({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}});
|