@pod-os/elements 0.41.0-rc.fcadbb6.0 → 0.41.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/dist/cjs/{chunk.URTPIBTY-CyUQzrtC.js → chunk.URTPIBTY-C9cOc4B-.js} +2 -2
- package/dist/cjs/{chunk.XQ2OKYYA-Dfzydh50.js → chunk.XQ2OKYYA-CTZvRtz3.js} +3 -3
- package/dist/cjs/{chunk.ZGGPD2XJ-BhNheC5q.js → chunk.ZGGPD2XJ-BvGHEYp6.js} +1 -1
- package/dist/cjs/{class-map-DFvbJjpM.js → class-map-C9P5WsLw.js} +1 -1
- package/dist/cjs/elements.cjs.js +2 -2
- package/dist/cjs/{index-BP03J2RA.js → index-BPvAwpRj.js} +137 -33
- package/dist/cjs/{index-CFcC3IGM.js → index-CjKppELa.js} +2 -2
- package/dist/cjs/{jsonld-V2RB47OZ-B6QDxKa1.js → jsonld-V2RB47OZ-C8WVLsWC.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +5 -5
- package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +27 -10
- package/dist/cjs/pos-add-relation.cjs.entry.js +3 -3
- package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
- package/dist/cjs/pos-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-case.cjs.entry.js +1 -1
- package/dist/cjs/pos-container-contents.cjs.entry.js +2 -2
- package/dist/cjs/pos-container-item_3.cjs.entry.js +4 -4
- package/dist/cjs/pos-document.cjs.entry.js +4 -4
- package/dist/cjs/pos-list.cjs.entry.js +1 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +412 -122
- package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +2 -2
- package/dist/cjs/pos-switch.cjs.entry.js +1 -1
- package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-value.cjs.entry.js +22 -2
- package/dist/collection/components/pos-description/pos-description.js +18 -3
- package/dist/collection/components/pos-label/pos-label.js +15 -4
- package/dist/collection/components/pos-value/pos-value.js +27 -4
- package/dist/components/index2.js +2 -2
- package/dist/components/pos-description2.js +1 -1
- package/dist/components/pos-label2.js +1 -1
- package/dist/components/pos-markdown-document2.js +1 -1
- package/dist/components/pos-value.js +1 -1
- package/dist/custom-elements.json +5 -3
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-33783890.entry.js → p-1b8c9b61.entry.js} +1 -1
- package/dist/elements/p-1bcdde10.entry.js +1 -0
- package/dist/elements/{p-2f122da6.entry.js → p-1e98efdc.entry.js} +1 -1
- package/dist/elements/{p-3ef3a9a9.entry.js → p-380d72c2.entry.js} +1 -1
- package/dist/elements/{p-31370224.entry.js → p-440a8508.entry.js} +1 -1
- package/dist/elements/{p-aca646a4.entry.js → p-4d349a89.entry.js} +1 -1
- package/dist/elements/{p-a234b3fe.entry.js → p-52443feb.entry.js} +1 -1
- package/dist/elements/{p-513f7548.entry.js → p-641e64fd.entry.js} +1 -1
- package/dist/elements/{p-DqO-cIHe.js → p-7TsXf0Xj.js} +1 -1
- package/dist/elements/{p-a78df72b.entry.js → p-941b9b51.entry.js} +1 -1
- package/dist/elements/{p-5506bf9a.entry.js → p-9b5c45b6.entry.js} +1 -1
- package/dist/elements/{p-DPNKR_cm.js → p-BKLehMby.js} +5 -5
- package/dist/elements/p-BzjgviTt.js +67 -0
- package/dist/elements/{p-DO6v4X9H.js → p-C-Ke6Sdx.js} +3 -3
- package/dist/elements/{p-spEUIGXI.js → p-CsdCh9hf.js} +1 -1
- package/dist/elements/{p-Bz2zblgU.js → p-KLP10Ef6.js} +7 -7
- package/dist/elements/{p-d31c55b9.entry.js → p-a62af5eb.entry.js} +1 -1
- package/dist/elements/{p-1e0bd264.entry.js → p-b30e9b9c.entry.js} +9 -9
- package/dist/elements/{p-5f8df3c2.entry.js → p-c1cb97ef.entry.js} +1 -1
- package/dist/elements/p-c60dc303.entry.js +1 -0
- package/dist/elements/{p-c4034954.entry.js → p-c697bb3c.entry.js} +1 -1
- package/dist/elements/{p-0febf76e.entry.js → p-c83d76f9.entry.js} +1 -1
- package/dist/elements/{p-4fa32d10.entry.js → p-ccfbad21.entry.js} +1 -1
- package/dist/elements/{p-e4eae182.entry.js → p-eadbef6c.entry.js} +1 -1
- package/dist/elements/p-f26842e5.entry.js +1 -0
- package/dist/elements/{p-17d63fec.entry.js → p-f57e26b7.entry.js} +1 -1
- package/dist/elements/{p-DpbuT47x.js → p-jSCnU8fW.js} +1 -1
- package/dist/esm/{chunk.URTPIBTY-DGDKVdvN.js → chunk.URTPIBTY-CndE5cVS.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-DY8d9BRU.js → chunk.XQ2OKYYA-BBXcL00i.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-CLV8PNGL.js → chunk.ZGGPD2XJ-DGIJXk11.js} +1 -1
- package/dist/esm/{class-map-CtuZET5H.js → class-map-BaV3g1im.js} +1 -1
- package/dist/esm/elements.js +3 -3
- package/dist/esm/{index-CMbRpNym.js → index-CmKOSDim.js} +137 -33
- package/dist/esm/{index-spEUIGXI.js → index-CsdCh9hf.js} +1 -1
- package/dist/esm/{jsonld-V2RB47OZ-zn531VHn.js → jsonld-V2RB47OZ-CIDz9zb9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pos-add-literal-value_3.entry.js +5 -5
- package/dist/esm/pos-add-new-thing_32.entry.js +27 -10
- package/dist/esm/pos-add-relation.entry.js +3 -3
- package/dist/esm/pos-app-document-viewer.entry.js +1 -1
- package/dist/esm/pos-app-generic.entry.js +1 -1
- package/dist/esm/pos-app-image-viewer.entry.js +1 -1
- package/dist/esm/pos-app-ldp-container.entry.js +1 -1
- package/dist/esm/pos-app-rdf-document.entry.js +1 -1
- package/dist/esm/pos-attachments.entry.js +1 -1
- package/dist/esm/pos-case.entry.js +1 -1
- package/dist/esm/pos-container-contents.entry.js +2 -2
- package/dist/esm/pos-container-item_3.entry.js +4 -4
- package/dist/esm/pos-document.entry.js +4 -4
- package/dist/esm/pos-list.entry.js +1 -1
- package/dist/esm/pos-markdown-document.entry.js +412 -122
- package/dist/esm/pos-relations_2.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +2 -2
- package/dist/esm/pos-switch.entry.js +1 -1
- package/dist/esm/pos-tool-attachments.entry.js +1 -1
- package/dist/esm/pos-value.entry.js +22 -2
- package/dist/types/components/pos-description/pos-description.d.ts +9 -2
- package/dist/types/components/pos-label/pos-label.d.ts +6 -2
- package/dist/types/components/pos-value/pos-value.d.ts +7 -2
- package/dist/types/components.d.ts +32 -8
- package/package.json +7 -7
- package/dist/elements/p-624503dd.entry.js +0 -1
- package/dist/elements/p-d6e9d178.entry.js +0 -1
- package/dist/elements/p-f9c10964.entry.js +0 -1
- package/dist/elements/p-sVi8GCz5.js +0 -67
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as e,h as i,H as a}from"./p-
|
|
1
|
+
import{r as s,c as e,h as i,H as a}from"./p-CsdCh9hf.js";import{s as r}from"./p-BW_CkW1K.js";const o=class{constructor(i){s(this,i),this.subscribeResource=e(this,"pod-os:resource",7),this.receiveResource=s=>{this.resource=s}}componentWillLoad(){r(this)}render(){return this.resource?i(a,null,i("section",null,i("pos-image",{src:this.resource.uri})),i("section",null,i("article",null,i("header",null,i("h1",null,i("pos-label",null)),i("pos-type-badges",null)),i("pos-literals",null)))):null}};o.style="pos-image{--max-width:100%}:host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}section{display:flex;flex-direction:column;gap:var(--gap-size)}@media (min-width: 640px){:host{--gap-size:var(--size-4);flex-direction:row;flex-wrap:wrap;section{&:first-of-type{flex:1}}section:not(:first-of-type){flex:0 0 30%}}}article{padding:var(--size-2);display:flex;flex-direction:column;gap:var(--size-2);outline:var(--pos-border-solid);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);background-color:var(--pos-card-background);header{display:flex;flex-direction:column;gap:var(--size-2);h1{margin:0}}}";export{o as pos_app_image_viewer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as o,h as t,H as e}from"./p-
|
|
1
|
+
import{r as s,c as o,h as t,H as e}from"./p-CsdCh9hf.js";import{l}from"./p-BzjgviTt.js";import{s as i}from"./p-jlzl8vRd.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-KLP10Ef6.js";import"./p-BKLehMby.js";import"./p-jSCnU8fW.js";const a=class{constructor(t){s(this,t),this.subscribePodOs=o(this,"pod-os:init",7),this.subscribeResource=o(this,"pod-os:resource",7),this.addedLiteralValue=o(this,"pod-os:added-literal-value",7),this.error=o(this,"pod-os:error",7),this.receiveResource=s=>{this.resource=s},this.receivePodOs=async s=>{this.os=s}}setName(){}componentWillLoad(){r(this),i(this)}async save(){try{await this.os.addPropertyValue(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:l(this.selectedTermUri),values:[this.currentValue]};this.addedLiteralValue.emit(s),this.currentValue=""}catch(s){this.error.emit(s)}}onTermSelected(s){this.selectedTermUri=s.detail.uri,this.valueInput.focus()}render(){var s;if(null===(s=this.resource)||void 0===s?void 0:s.editable)return t(e,null,t("sl-icon",{name:"plus-circle"}),t("pos-select-term",{placeholder:"Add literal","onPod-os:term-selected":s=>this.onTermSelected(s)}),t("input",{ref:s=>this.valueInput=s,value:this.currentValue,placeholder:"",onInput:s=>this.currentValue=s.target.value,onChange:()=>this.save()}))}static get watchers(){return{os:[{setName:0}]}}};a.style=":host{display:flex;align-items:center;gap:0.2rem}input{padding:var(--size-2);background-color:transparent;color:var(--pos-normal-text-color);border:none}input:focus{outline:2px solid var(--pos-primary-color);background-color:var(--pos-input-background-color);transition:outline 0.1s, background-color 0.1s}";const n=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.receiveResource=s=>{this.data=s.literals()}}componentWillLoad(){r(this)}literalValueAdded(s){const o=this.data.find((o=>o.predicate===s.predicate));this.data=o?this.data.map((t=>t.predicate===o.predicate?{predicate:o.predicate,label:o.label,values:[...o.values,...s.values]}:t)):[...this.data,s]}render(){return t(e,{key:"79a29288f727943c57b62ffc4f3090ecf236f693"},this.data.length>0?t("dl",null,this.data.map((s=>t("div",{class:"predicate-values"},t("dt",null,t("pos-predicate",{uri:s.predicate,label:s.label})),t("div",{class:"values"},s.values.map((s=>t("dd",null,s)))))))):null,t("pos-add-literal-value",{key:"68d1936aca1dff7ff11493266aaf8e3c4d6d67e6","onPod-os:added-literal-value":s=>this.literalValueAdded(s.detail)}))}};n.style=":host{--background-base-color:color-mix(in srgb, var(--pos-background-color), var(--color-grey-800) 10%);--background-color-even:hsl(from var(--background-base-color) h s calc(l + 7));--background-color-odd:hsl(from var(--background-base-color) h s calc(l + 10));--border-color:var(--background-base-color)}dd{padding:0;margin:0}dl{padding:0;margin:0;display:flex;flex-direction:column;gap:var(--size-1)}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-2)}}";const c=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.typeLabels=[],this.isExpanded=!1,this.receiveResource=s=>{this.data=s.types(),this.typeLabels=[...new Set(s.types().map((s=>s.label)))]}}componentWillLoad(){r(this)}toggleDetails(){this.isExpanded=!this.isExpanded}render(){return 0==this.data.length?null:this.isExpanded?t("div",{class:"types expanded"},t("sl-tooltip",{content:"Collapse types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-collapse"}))),t("ul",null,this.data.map((s=>t("li",null,s.uri))))):t(e,null,t("div",{class:"types"},t("ul",null,this.typeLabels.map((s=>t("li",null,s)))),t("sl-tooltip",{content:"Expand types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-expand"})))))}};c.style=".types{display:flex;gap:var(--size-1)}.expanded{flex-direction:column;justify-content:flex-start;align-items:flex-start;ul{flex-direction:column}}button.toggle{display:flex;cursor:pointer;justify-content:center;align-items:center;aspect-ratio:1 / 1}ul{margin:0;padding:0;display:flex;flex-direction:row;font-size:var(--size-3);gap:var(--size-2);li{cursor:default;display:inline-flex;align-items:center;padding:var(--size-1);border-radius:var(--radius-sm);background-color:var(--pos-subtle-text-color);color:var(--pos-background-color);list-style:none}}";export{a as pos_add_literal_value,n as pos_literals,c as pos_type_badges}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as t,b as e,i,c as n,_ as o,n as r,S as s,x as a,w as l}from"./p-
|
|
1
|
+
import{a as t,b as e,i,c as n,_ as o,n as r,S as s,x as a,w as l}from"./p-KLP10Ef6.js";import{e as c}from"./p-jSCnU8fW.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
@@ -9,7 +9,7 @@ import{a as t,b as e,i,c as n,_ as o,n as r,S as s,x as a,w as l}from"./p-Bz2zbl
|
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
function h(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return this.renderRoot?.querySelector(t)??null}})}const u=new Set,p=new Map;let d,f="ltr",m="en";const g="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(g){const t=new MutationObserver(b);f=document.documentElement.dir||"ltr",m=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function y(...t){t.map((t=>{const e=t.$code.toLowerCase();p.has(e)?p.set(e,Object.assign(Object.assign({},p.get(e)),t)):p.set(e,t),d||(d=t)})),b()}function b(){g&&(f=document.documentElement.dir||"ltr",m=document.documentElement.lang||navigator.language),[...u.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}let v=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){u.add(this.host)}hostDisconnected(){u.delete(this.host)}dir(){return`${this.host.dir||f}`.toLowerCase()}lang(){return`${this.host.lang||m}`.toLowerCase()}getTranslationData(t){var e,i;const n=new Intl.Locale(t.replace(/_/g,"-")),o=null==n?void 0:n.language.toLowerCase(),r=null!==(i=null===(e=null==n?void 0:n.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==i?i:"";return{locale:n,language:o,region:r,primary:p.get(`${o}-${r}`),secondary:p.get(o)}}exists(t,e){var i;const{primary:n,secondary:o}=this.getTranslationData(null!==(i=e.lang)&&void 0!==i?i:this.lang());return e=Object.assign({includeFallback:!1},e),!!(n&&n[t]||o&&o[t]||e.includeFallback&&d&&d[t])}term(t,...e){const{primary:i,secondary:n}=this.getTranslationData(this.lang());let o;if(i&&i[t])o=i[t];else if(n&&n[t])o=n[t];else{if(!d||!d[t])return console.error(`No translation found for: ${String(t)}`),String(t);o=d[t]}return"function"==typeof o?o(...e):o}date(t,e){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),e).format(t)}number(t,e){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),e).format(t)}relativeTime(t,e,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(t,e)}};var w={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>0===t?"No options selected":1===t?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};y(w);var x=w,
|
|
12
|
+
function h(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return this.renderRoot?.querySelector(t)??null}})}const u=new Set,p=new Map;let d,f="ltr",m="en";const g="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(g){const t=new MutationObserver(b);f=document.documentElement.dir||"ltr",m=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function y(...t){t.map((t=>{const e=t.$code.toLowerCase();p.has(e)?p.set(e,Object.assign(Object.assign({},p.get(e)),t)):p.set(e,t),d||(d=t)})),b()}function b(){g&&(f=document.documentElement.dir||"ltr",m=document.documentElement.lang||navigator.language),[...u.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}let v=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){u.add(this.host)}hostDisconnected(){u.delete(this.host)}dir(){return`${this.host.dir||f}`.toLowerCase()}lang(){return`${this.host.lang||m}`.toLowerCase()}getTranslationData(t){var e,i;const n=new Intl.Locale(t.replace(/_/g,"-")),o=null==n?void 0:n.language.toLowerCase(),r=null!==(i=null===(e=null==n?void 0:n.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==i?i:"";return{locale:n,language:o,region:r,primary:p.get(`${o}-${r}`),secondary:p.get(o)}}exists(t,e){var i;const{primary:n,secondary:o}=this.getTranslationData(null!==(i=e.lang)&&void 0!==i?i:this.lang());return e=Object.assign({includeFallback:!1},e),!!(n&&n[t]||o&&o[t]||e.includeFallback&&d&&d[t])}term(t,...e){const{primary:i,secondary:n}=this.getTranslationData(this.lang());let o;if(i&&i[t])o=i[t];else if(n&&n[t])o=n[t];else{if(!d||!d[t])return console.error(`No translation found for: ${String(t)}`),String(t);o=d[t]}return"function"==typeof o?o(...e):o}date(t,e){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),e).format(t)}number(t,e){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),e).format(t)}relativeTime(t,e,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(t,e)}};var w={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>0===t?"No options selected":1===t?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};y(w);var x=w,S=class extends v{};y(x);var $=new Map,z=new WeakMap;function k(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function C(t,e){$.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function A(t,e,i){const n=z.get(t);if(null==n?void 0:n[e])return k(n[e],i.dir);const o=$.get(e);return o?k(o,i.dir):{keyframes:[],options:{duration:0}}}function O(t,e){return new Promise((i=>{t.addEventListener(e,(function n(o){o.target===t&&(t.removeEventListener(e,n),i())}))}))}function P(i,n,o){return new Promise((r=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=i.animate(n,t(e({},o),{duration:window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:o.duration}));s.addEventListener("cancel",r,{once:!0}),s.addEventListener("finish",r,{once:!0})}))}function F(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function T(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}var B=i`
|
|
13
13
|
:host {
|
|
14
14
|
--arrow-color: var(--sl-color-neutral-1000);
|
|
15
15
|
--arrow-size: 6px;
|
|
@@ -67,7 +67,7 @@ function h(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.
|
|
|
67
67
|
var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
|
-
`;const R=Math.min,_=Math.max,E=Math.round,N=Math.floor,D=t=>({x:t,y:t}),j={left:"right",right:"left",bottom:"top",top:"bottom"},M={start:"end",end:"start"};function L(t,e,i){return _(t,R(e,i))}function H(t,e){return"function"==typeof t?t(e):t}function I(t){return t.split("-")[0]}function W(t){return t.split("-")[1]}function q(t){return"x"===t?"y":"x"}function U(t){return"y"===t?"height":"width"}const V=new Set(["top","bottom"]);function Y(t){return V.has(I(t))?"y":"x"}function G(t){return q(Y(t))}function X(t){return t.replace(/start|end/g,(t=>M[t]))}const J=["left","right"],K=["right","left"],Q=["top","bottom"],Z=["bottom","top"];function tt(t){return t.replace(/left|right|bottom|top/g,(t=>j[t]))}function et(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function it(t){const{x:e,y:i,width:n,height:o}=t;return{width:n,height:o,top:i,left:e,right:e+n,bottom:i+o,x:e,y:i}}function nt(t,e,i){let{reference:n,floating:o}=t;const r=Y(e),s=G(e),a=U(s),l=I(e),c="y"===r,h=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let d;switch(l){case"top":d={x:h,y:n.y-o.height};break;case"bottom":d={x:h,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:u};break;case"left":d={x:n.x-o.width,y:u};break;default:d={x:n.x,y:n.y}}switch(W(e)){case"start":d[s]-=p*(i&&c?-1:1);break;case"end":d[s]+=p*(i&&c?-1:1)}return d}async function ot(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=H(e,t),f=et(d),m=a[p?"floating"===u?"reference":"floating":u],g=it(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(m)))||i?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),y="floating"===u?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),v=await(null==r.isElement?void 0:r.isElement(b))&&await(null==r.getScale?void 0:r.getScale(b))||{x:1,y:1},w=it(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+f.top)/v.y,bottom:(w.bottom-g.bottom+f.bottom)/v.y,left:(g.left-w.left+f.left)/v.x,right:(w.right-g.right+f.right)/v.x}}const rt=new Set(["left","top"]);function st(){return"undefined"!=typeof window}function at(t){return ht(t)?(t.nodeName||"").toLowerCase():"#document"}function lt(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ct(t){var e;return null==(e=(ht(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function ht(t){return!!st()&&(t instanceof Node||t instanceof lt(t).Node)}function ut(t){return!!st()&&(t instanceof Element||t instanceof lt(t).Element)}function pt(t){return!!st()&&(t instanceof HTMLElement||t instanceof lt(t).HTMLElement)}function dt(t){return!(!st()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof lt(t).ShadowRoot)}const ft=new Set(["inline","contents"]);function mt(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=At(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!ft.has(o)}const gt=new Set(["table","td","th"]);function yt(t){return gt.has(at(t))}const bt=[":popover-open",":modal"];function vt(t){return bt.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const wt=["transform","translate","scale","rotate","perspective"],xt=["transform","translate","scale","rotate","perspective","filter"],zt=["paint","layout","strict","content"];function St(t){const e=$t(),i=ut(t)?At(t):t;return wt.some((t=>!!i[t]&&"none"!==i[t]))||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||xt.some((t=>(i.willChange||"").includes(t)))||zt.some((t=>(i.contain||"").includes(t)))}function $t(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const kt=new Set(["html","body","#document"]);function Ct(t){return kt.has(at(t))}function At(t){return lt(t).getComputedStyle(t)}function Ot(t){return ut(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Pt(t){if("html"===at(t))return t;const e=t.assignedSlot||t.parentNode||dt(t)&&t.host||ct(t);return dt(e)?e.host:e}function Ft(t){const e=Pt(t);return Ct(e)?t.ownerDocument?t.ownerDocument.body:t.body:pt(e)&&mt(e)?e:Ft(e)}function Tt(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const o=Ft(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),s=lt(o);if(r){const t=Bt(s);return e.concat(s,s.visualViewport||[],mt(o)?o:[],t&&i?Tt(t):[])}return e.concat(o,Tt(o,[],i))}function Bt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Rt(t){const e=At(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=pt(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,a=E(i)!==r||E(n)!==s;return a&&(i=r,n=s),{width:i,height:n,$:a}}function _t(t){return ut(t)?t:t.contextElement}function Et(t){const e=_t(t);if(!pt(e))return D(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=Rt(e);let s=(r?E(i.width):i.width)/n,a=(r?E(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Nt=D(0);function Dt(t){const e=lt(t);return $t()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Nt}function jt(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const o=t.getBoundingClientRect(),r=_t(t);let s=D(1);e&&(n?ut(n)&&(s=Et(n)):s=Et(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==lt(t))&&e}(r,i,n)?Dt(r):D(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,h=o.width/s.x,u=o.height/s.y;if(r){const t=lt(r),e=n&&ut(n)?lt(n):n;let i=t,o=Bt(i);for(;o&&n&&e!==i;){const t=Et(o),e=o.getBoundingClientRect(),n=At(o),r=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,u*=t.y,l+=r,c+=s,i=lt(o),o=Bt(i)}}return it({width:h,height:u,x:l,y:c})}function Mt(t,e){const i=Ot(t).scrollLeft;return e?e.left+i:jt(ct(t)).left+i}function Lt(t,e,i){void 0===i&&(i=!1);const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-(i?0:Mt(t,n)),y:n.top+e.scrollTop}}const Ht=new Set(["absolute","fixed"]);function It(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=lt(t),n=ct(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=$t();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=ct(t),i=Ot(t),n=t.ownerDocument.body,o=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+Mt(t);const a=-i.scrollTop;return"rtl"===At(n).direction&&(s+=_(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:a}}(ct(t));else if(ut(e))n=function(t,e){const i=jt(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=pt(t)?Et(t):D(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:n*r.y}}(e,i);else{const i=Dt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return it(n)}function Wt(t,e){const i=Pt(t);return!(i===e||!ut(i)||Ct(i))&&("fixed"===At(i).position||Wt(i,e))}function qt(t,e,i){const n=pt(e),o=ct(e),r="fixed"===i,s=jt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=D(0);function c(){l.x=Mt(o)}if(n||!n&&!r)if(("body"!==at(e)||mt(o))&&(a=Ot(e)),n){const t=jt(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&c();r&&!n&&o&&c();const h=!o||n||r?D(0):Lt(o,a);return{x:s.left+a.scrollLeft-l.x-h.x,y:s.top+a.scrollTop-l.y-h.y,width:s.width,height:s.height}}function Ut(t){return"static"===At(t).position}function Vt(t,e){if(!pt(t)||"fixed"===At(t).position)return null;if(e)return e(t);let i=t.offsetParent;return ct(t)===i&&(i=i.ownerDocument.body),i}function Yt(t,e){const i=lt(t);if(vt(t))return i;if(!pt(t)){let e=Pt(t);for(;e&&!Ct(e);){if(ut(e)&&!Ut(e))return e;e=Pt(e)}return i}let n=Vt(t,e);for(;n&&yt(n)&&Ut(n);)n=Vt(n,e);return n&&Ct(n)&&Ut(n)&&!St(n)?i:n||function(t){let e=Pt(t);for(;pt(e)&&!Ct(e);){if(St(e))return e;if(vt(e))return null;e=Pt(e)}return null}(t)||i}const Gt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r="fixed"===o,s=ct(n),a=!!e&&vt(e.floating);if(n===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=D(1);const h=D(0),u=pt(n);if((u||!u&&!r)&&(("body"!==at(n)||mt(s))&&(l=Ot(n)),pt(n))){const t=jt(n);c=Et(n),h.x=t.x+n.clientLeft,h.y=t.y+n.clientTop}const p=!s||u||r?D(0):Lt(s,l,!0);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+h.x+p.x,y:i.y*c.y-l.scrollTop*c.y+h.y+p.y}},getDocumentElement:ct,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const r=[..."clippingAncestors"===i?vt(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let n=Tt(t,[],!1).filter((t=>ut(t)&&"body"!==at(t))),o=null;const r="fixed"===At(t).position;let s=r?Pt(t):t;for(;ut(s)&&!Ct(s);){const e=At(s),i=St(s);i||"fixed"!==e.position||(o=null),(r?!i&&!o:!i&&"static"===e.position&&o&&Ht.has(o.position)||mt(s)&&!i&&Wt(t,s))?n=n.filter((t=>t!==s)):o=e,s=Pt(s)}return e.set(t,n),n}(e,this._c):[].concat(i),n],s=r.reduce(((t,i)=>{const n=It(e,i,o);return t.top=_(n.top,t.top),t.right=R(n.right,t.right),t.bottom=R(n.bottom,t.bottom),t.left=_(n.left,t.left),t}),It(e,r[0],o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Yt,getElementRects:async function(t){const e=this.getOffsetParent||Yt,i=this.getDimensions,n=await i(t.floating);return{reference:qt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=Rt(t);return{width:e,height:i}},getScale:Et,isElement:ut,isRTL:function(t){return"rtl"===At(t).direction}};function Xt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Jt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=H(t,e);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const y=I(o),b=Y(a),v=I(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[tt(a)]:function(t){const e=tt(t);return[X(t),e,X(e)]}(a)),z="none"!==f;!p&&z&&x.push(...function(t,e,i,n){const o=W(t);let r=function(t,e,i){switch(t){case"top":case"bottom":return i?e?K:J:e?J:K;case"left":case"right":return e?Q:Z;default:return[]}}(I(t),"start"===i,n);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(X)))),r}(a,m,f,w));const S=[a,...x],$=await ot(e,g),k=[];let C=(null==(n=r.flip)?void 0:n.overflows)||[];if(h&&k.push($[y]),u){const t=function(t,e,i){void 0===i&&(i=!1);const n=W(t),o=G(t),r=U(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=tt(s)),[s,tt(s)]}(o,s,w);k.push($[t[0]],$[t[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every((t=>t<=0))){var A,O;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=S[t];if(e&&("alignment"!==u||b===Y(e)||C.every((t=>t.overflows[0]>0&&Y(t.placement)===b))))return{data:{index:t,overflows:C},reset:{placement:e}};let i=null==(O=C.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:O.placement;if(!i)switch(d){case"bestFit":{var P;const t=null==(P=C.filter((t=>{if(z){const e=Y(t.placement);return e===b||"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:P[0];t&&(i=t);break}case"initialPlacement":i=a}if(o!==i)return{reset:{placement:i}}}return{}}}},Kt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var i,n;const{placement:o,rects:r,platform:s,elements:a}=e,{apply:l=()=>{},...c}=H(t,e),h=await ot(e,c),u=I(o),p=W(o),d="y"===Y(o),{width:f,height:m}=r.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=p===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,g="end"===p?"top":"bottom");const b=m-h.top-h.bottom,v=f-h.left-h.right;let w=R(m-h[g],b),x=R(f-h[y],v);if(null!=(i=e.middlewareData.shift)&&i.enabled.x&&(x=v),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(w=b),!e.middlewareData.shift&&!p){const t=_(h.left,0),e=_(h.right,0),i=_(h.top,0),n=_(h.bottom,0);d?x=f-2*(0!==t||0!==e?t+e:_(h.left,h.right)):w=m-2*(0!==i||0!==n?i+n:_(h.top,h.bottom))}await l({...e,availableWidth:x,availableHeight:w});const z=await s.getDimensions(a.floating);return f!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function Qt(t){return function(t){for(let e=t;e;e=Zt(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Zt(t);e;e=Zt(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||St(t))return e;if("BODY"===e.tagName)return e}}return null}(t)}function Zt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var te=class extends s{constructor(){super(...arguments),this.localize=new z(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let i=0,n=0,o=0,r=0,s=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(i=t.left,n=t.bottom,o=t.right,r=t.bottom,s=e.left,a=e.top,l=e.right,c=e.top):(i=e.left,n=e.bottom,o=e.right,r=e.bottom,s=t.left,a=t.top,l=t.right,c=t.top):t.left<e.left?(i=t.right,n=t.top,o=e.left,r=e.top,s=t.right,a=t.bottom,l=e.left,c=e.bottom):(i=e.right,n=e.top,o=t.left,r=t.top,s=e.right,a=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${i}px`),this.style.setProperty("--hover-bridge-top-left-y",`${n}px`),this.style.setProperty("--hover-bridge-top-right-x",`${o}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchorEl=this.anchor instanceof Element||function(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t.contextElement instanceof Element)}(this.anchor)?this.anchor:this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.active&&this.start()}start(){this.anchorEl&&this.active&&(this.cleanup=function(t,e,i,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=_t(t),h=o||r?[...c?Tt(c):[],...Tt(e)]:[];h.forEach((t=>{o&&t.addEventListener("scroll",i,{passive:!0}),r&&t.addEventListener("resize",i)}));const u=c&&a?function(t,e){let i,n=null;const o=ct(t);function r(){var t;clearTimeout(i),null==(t=n)||t.disconnect(),n=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const c=t.getBoundingClientRect(),{left:h,top:u,width:p,height:d}=c;if(a||e(),!p||!d)return;const f={rootMargin:-N(u)+"px "+-N(o.clientWidth-(h+p))+"px "+-N(o.clientHeight-(u+d))+"px "+-N(h)+"px",threshold:_(0,R(1,l))||1};let m=!0;function g(e){const n=e[0].intersectionRatio;if(n!==l){if(!m)return s();n?s(!1,n):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==n||Xt(c,t.getBoundingClientRect())||s(),m=!1}try{n=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(t){n=new IntersectionObserver(g,f)}n.observe(t)}(!0),r}(c,i):null;let p,d=-1,f=null;s&&(f=new ResizeObserver((t=>{let[n]=t;n&&n.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),i()})),c&&!l&&f.observe(c),f.observe(e));let m=l?jt(t):null;return l&&function e(){const n=jt(t);m&&!Xt(m,n)&&i(),m=n,p=requestAnimationFrame(e)}(),i(),()=>{var t;h.forEach((t=>{o&&t.removeEventListener("scroll",i),r&&t.removeEventListener("resize",i)})),null==u||u(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(p)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const i=[(n={mainAxis:this.distance,crossAxis:this.skidding},void 0===n&&(n=0),{name:"offset",options:n,async fn(t){var e,i;const{x:o,y:r,placement:s,middlewareData:a}=t,l=await async function(t,e){const{placement:i,platform:n,elements:o}=t,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=I(i),a=W(i),l="y"===Y(i),c=rt.has(s)?-1:1,h=r&&l?-1:1,u=H(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(d="end"===a?-1*f:f),l?{x:d*h,y:p*c}:{x:p*c,y:d*h}}(t,n);return s===(null==(e=a.offset)?void 0:e.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}})];var n;this.sync?i.push(Kt({apply:({rects:t})=>{const e="height"===this.sync||"both"===this.sync;this.popup.style.width="width"===this.sync||"both"===this.sync?`${t.reference.width}px`:"",this.popup.style.height=e?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&i.push(Jt({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&i.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=H(t,e),c={x:i,y:n},h=await ot(e,l),u=Y(I(o)),p=q(u);let d=c[p],f=c[u];r&&(d=L(d+h["y"===p?"top":"left"],d,d-h["y"===p?"bottom":"right"])),s&&(f=L(f+h["y"===u?"top":"left"],f,f-h["y"===u?"bottom":"right"]));const m=a.fn({...e,[p]:d,[u]:f});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[p]:r,[u]:s}}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?i.push(Kt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&i.push((t=>({name:"arrow",options:t,async fn(e){const{x:i,y:n,placement:o,rects:r,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=H(t,e)||{};if(null==c)return{};const u=et(h),p={x:i,y:n},d=G(o),f=U(d),m=await s.getDimensions(c),g="y"===d,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[d]-p[d]-r.floating[f],x=p[d]-r.reference[d],z=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let S=z?z[v]:0;S&&await(null==s.isElement?void 0:s.isElement(z))||(S=a.floating[v]||r.floating[f]);const $=w/2-x/2,k=S/2-m[f]/2-1,C=R(u[y],k),A=R(u[b],k),O=C,P=S-m[f]-A,F=S/2-m[f]/2+$,T=L(O,F,P),B=!l.arrow&&null!=W(o)&&F!==T&&r.reference[f]/2-(F<O?C:A)-m[f]/2<0,_=B?F<O?F-O:F-P:0;return{[d]:p[d]+_,data:{[d]:T,centerOffset:F-T-_,...B&&{alignmentOffset:_}},reset:B}}}))({element:this.arrowEl,padding:this.arrowPadding}));const o="absolute"===this.strategy?t=>Gt.getOffsetParent(t,Qt):Gt.getOffsetParent;((t,e,i)=>{const n=new Map,o={platform:Gt,...i},r={...o.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:h,y:u}=nt(c,n,l),p=n,d={},f=0;for(let i=0;i<a.length;i++){const{name:r,fn:m}=a[i],{x:g,y,data:b,reset:v}=await m({x:h,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=g?g:h,u=null!=y?y:u,d={...d,[r]:{...d[r],...b}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):v.rects),({x:h,y:u}=nt(c,p,l))),i=-1)}return{x:h,y:u,placement:p,strategy:o,middlewareData:d}})(t,e,{...o,platform:r})})(this.anchorEl,this.popup,{placement:this.placement,middleware:i,strategy:this.strategy,platform:t(e({},Gt),{getOffsetParent:o})}).then((({x:t,y:e,middlewareData:i,placement:n})=>{const o="rtl"===this.localize.dir(),r={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let n="",s="",a="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",s=o?i:"",l=o?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s=o?"":i,l=o?i:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",n="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",n="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:n,right:s,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return a`
|
|
70
|
+
`;const E=Math.min,R=Math.max,_=Math.round,N=Math.floor,j=t=>({x:t,y:t}),D={left:"right",right:"left",bottom:"top",top:"bottom"},M={start:"end",end:"start"};function L(t,e,i){return R(t,E(e,i))}function H(t,e){return"function"==typeof t?t(e):t}function I(t){return t.split("-")[0]}function W(t){return t.split("-")[1]}function q(t){return"x"===t?"y":"x"}function U(t){return"y"===t?"height":"width"}const V=new Set(["top","bottom"]);function Y(t){return V.has(I(t))?"y":"x"}function G(t){return q(Y(t))}function K(t){return t.replace(/start|end/g,(t=>M[t]))}const X=["left","right"],J=["right","left"],Q=["top","bottom"],Z=["bottom","top"];function tt(t){return t.replace(/left|right|bottom|top/g,(t=>D[t]))}function et(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function it(t){const{x:e,y:i,width:n,height:o}=t;return{width:n,height:o,top:i,left:e,right:e+n,bottom:i+o,x:e,y:i}}function nt(t,e,i){let{reference:n,floating:o}=t;const r=Y(e),s=G(e),a=U(s),l=I(e),c="y"===r,h=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let d;switch(l){case"top":d={x:h,y:n.y-o.height};break;case"bottom":d={x:h,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:u};break;case"left":d={x:n.x-o.width,y:u};break;default:d={x:n.x,y:n.y}}switch(W(e)){case"start":d[s]-=p*(i&&c?-1:1);break;case"end":d[s]+=p*(i&&c?-1:1)}return d}async function ot(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=H(e,t),f=et(d),m=a[p?"floating"===u?"reference":"floating":u],g=it(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(m)))||i?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),y="floating"===u?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),v=await(null==r.isElement?void 0:r.isElement(b))&&await(null==r.getScale?void 0:r.getScale(b))||{x:1,y:1},w=it(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+f.top)/v.y,bottom:(w.bottom-g.bottom+f.bottom)/v.y,left:(g.left-w.left+f.left)/v.x,right:(w.right-g.right+f.right)/v.x}}const rt=new Set(["left","top"]);function st(){return"undefined"!=typeof window}function at(t){return ht(t)?(t.nodeName||"").toLowerCase():"#document"}function lt(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ct(t){var e;return null==(e=(ht(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function ht(t){return!!st()&&(t instanceof Node||t instanceof lt(t).Node)}function ut(t){return!!st()&&(t instanceof Element||t instanceof lt(t).Element)}function pt(t){return!!st()&&(t instanceof HTMLElement||t instanceof lt(t).HTMLElement)}function dt(t){return!(!st()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof lt(t).ShadowRoot)}const ft=new Set(["inline","contents"]);function mt(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=At(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!ft.has(o)}const gt=new Set(["table","td","th"]);function yt(t){return gt.has(at(t))}const bt=[":popover-open",":modal"];function vt(t){return bt.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const wt=["transform","translate","scale","rotate","perspective"],xt=["transform","translate","scale","rotate","perspective","filter"],St=["paint","layout","strict","content"];function $t(t){const e=zt(),i=ut(t)?At(t):t;return wt.some((t=>!!i[t]&&"none"!==i[t]))||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||xt.some((t=>(i.willChange||"").includes(t)))||St.some((t=>(i.contain||"").includes(t)))}function zt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const kt=new Set(["html","body","#document"]);function Ct(t){return kt.has(at(t))}function At(t){return lt(t).getComputedStyle(t)}function Ot(t){return ut(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Pt(t){if("html"===at(t))return t;const e=t.assignedSlot||t.parentNode||dt(t)&&t.host||ct(t);return dt(e)?e.host:e}function Ft(t){const e=Pt(t);return Ct(e)?t.ownerDocument?t.ownerDocument.body:t.body:pt(e)&&mt(e)?e:Ft(e)}function Tt(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const o=Ft(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),s=lt(o);if(r){const t=Bt(s);return e.concat(s,s.visualViewport||[],mt(o)?o:[],t&&i?Tt(t):[])}return e.concat(o,Tt(o,[],i))}function Bt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Et(t){const e=At(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=pt(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,a=_(i)!==r||_(n)!==s;return a&&(i=r,n=s),{width:i,height:n,$:a}}function Rt(t){return ut(t)?t:t.contextElement}function _t(t){const e=Rt(t);if(!pt(e))return j(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=Et(e);let s=(r?_(i.width):i.width)/n,a=(r?_(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Nt=j(0);function jt(t){const e=lt(t);return zt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Nt}function Dt(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const o=t.getBoundingClientRect(),r=Rt(t);let s=j(1);e&&(n?ut(n)&&(s=_t(n)):s=_t(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==lt(t))&&e}(r,i,n)?jt(r):j(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,h=o.width/s.x,u=o.height/s.y;if(r){const t=lt(r),e=n&&ut(n)?lt(n):n;let i=t,o=Bt(i);for(;o&&n&&e!==i;){const t=_t(o),e=o.getBoundingClientRect(),n=At(o),r=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,u*=t.y,l+=r,c+=s,i=lt(o),o=Bt(i)}}return it({width:h,height:u,x:l,y:c})}function Mt(t,e){const i=Ot(t).scrollLeft;return e?e.left+i:Dt(ct(t)).left+i}function Lt(t,e,i){void 0===i&&(i=!1);const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-(i?0:Mt(t,n)),y:n.top+e.scrollTop}}const Ht=new Set(["absolute","fixed"]);function It(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=lt(t),n=ct(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=zt();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=ct(t),i=Ot(t),n=t.ownerDocument.body,o=R(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=R(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+Mt(t);const a=-i.scrollTop;return"rtl"===At(n).direction&&(s+=R(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:a}}(ct(t));else if(ut(e))n=function(t,e){const i=Dt(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=pt(t)?_t(t):j(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:n*r.y}}(e,i);else{const i=jt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return it(n)}function Wt(t,e){const i=Pt(t);return!(i===e||!ut(i)||Ct(i))&&("fixed"===At(i).position||Wt(i,e))}function qt(t,e,i){const n=pt(e),o=ct(e),r="fixed"===i,s=Dt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=j(0);function c(){l.x=Mt(o)}if(n||!n&&!r)if(("body"!==at(e)||mt(o))&&(a=Ot(e)),n){const t=Dt(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&c();r&&!n&&o&&c();const h=!o||n||r?j(0):Lt(o,a);return{x:s.left+a.scrollLeft-l.x-h.x,y:s.top+a.scrollTop-l.y-h.y,width:s.width,height:s.height}}function Ut(t){return"static"===At(t).position}function Vt(t,e){if(!pt(t)||"fixed"===At(t).position)return null;if(e)return e(t);let i=t.offsetParent;return ct(t)===i&&(i=i.ownerDocument.body),i}function Yt(t,e){const i=lt(t);if(vt(t))return i;if(!pt(t)){let e=Pt(t);for(;e&&!Ct(e);){if(ut(e)&&!Ut(e))return e;e=Pt(e)}return i}let n=Vt(t,e);for(;n&&yt(n)&&Ut(n);)n=Vt(n,e);return n&&Ct(n)&&Ut(n)&&!$t(n)?i:n||function(t){let e=Pt(t);for(;pt(e)&&!Ct(e);){if($t(e))return e;if(vt(e))return null;e=Pt(e)}return null}(t)||i}const Gt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r="fixed"===o,s=ct(n),a=!!e&&vt(e.floating);if(n===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=j(1);const h=j(0),u=pt(n);if((u||!u&&!r)&&(("body"!==at(n)||mt(s))&&(l=Ot(n)),pt(n))){const t=Dt(n);c=_t(n),h.x=t.x+n.clientLeft,h.y=t.y+n.clientTop}const p=!s||u||r?j(0):Lt(s,l,!0);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+h.x+p.x,y:i.y*c.y-l.scrollTop*c.y+h.y+p.y}},getDocumentElement:ct,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const r=[..."clippingAncestors"===i?vt(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let n=Tt(t,[],!1).filter((t=>ut(t)&&"body"!==at(t))),o=null;const r="fixed"===At(t).position;let s=r?Pt(t):t;for(;ut(s)&&!Ct(s);){const e=At(s),i=$t(s);i||"fixed"!==e.position||(o=null),(r?!i&&!o:!i&&"static"===e.position&&o&&Ht.has(o.position)||mt(s)&&!i&&Wt(t,s))?n=n.filter((t=>t!==s)):o=e,s=Pt(s)}return e.set(t,n),n}(e,this._c):[].concat(i),n],s=r.reduce(((t,i)=>{const n=It(e,i,o);return t.top=R(n.top,t.top),t.right=E(n.right,t.right),t.bottom=E(n.bottom,t.bottom),t.left=R(n.left,t.left),t}),It(e,r[0],o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Yt,getElementRects:async function(t){const e=this.getOffsetParent||Yt,i=this.getDimensions,n=await i(t.floating);return{reference:qt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=Et(t);return{width:e,height:i}},getScale:_t,isElement:ut,isRTL:function(t){return"rtl"===At(t).direction}};function Kt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Xt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=H(t,e);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const y=I(o),b=Y(a),v=I(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[tt(a)]:function(t){const e=tt(t);return[K(t),e,K(e)]}(a)),S="none"!==f;!p&&S&&x.push(...function(t,e,i,n){const o=W(t);let r=function(t,e,i){switch(t){case"top":case"bottom":return i?e?J:X:e?X:J;case"left":case"right":return e?Q:Z;default:return[]}}(I(t),"start"===i,n);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(K)))),r}(a,m,f,w));const $=[a,...x],z=await ot(e,g),k=[];let C=(null==(n=r.flip)?void 0:n.overflows)||[];if(h&&k.push(z[y]),u){const t=function(t,e,i){void 0===i&&(i=!1);const n=W(t),o=G(t),r=U(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=tt(s)),[s,tt(s)]}(o,s,w);k.push(z[t[0]],z[t[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every((t=>t<=0))){var A,O;const t=((null==(A=r.flip)?void 0:A.index)||0)+1,e=$[t];if(e&&("alignment"!==u||b===Y(e)||C.every((t=>t.overflows[0]>0&&Y(t.placement)===b))))return{data:{index:t,overflows:C},reset:{placement:e}};let i=null==(O=C.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:O.placement;if(!i)switch(d){case"bestFit":{var P;const t=null==(P=C.filter((t=>{if(S){const e=Y(t.placement);return e===b||"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:P[0];t&&(i=t);break}case"initialPlacement":i=a}if(o!==i)return{reset:{placement:i}}}return{}}}},Jt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var i,n;const{placement:o,rects:r,platform:s,elements:a}=e,{apply:l=()=>{},...c}=H(t,e),h=await ot(e,c),u=I(o),p=W(o),d="y"===Y(o),{width:f,height:m}=r.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=p===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,g="end"===p?"top":"bottom");const b=m-h.top-h.bottom,v=f-h.left-h.right;let w=E(m-h[g],b),x=E(f-h[y],v);if(null!=(i=e.middlewareData.shift)&&i.enabled.x&&(x=v),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(w=b),!e.middlewareData.shift&&!p){const t=R(h.left,0),e=R(h.right,0),i=R(h.top,0),n=R(h.bottom,0);d?x=f-2*(0!==t||0!==e?t+e:R(h.left,h.right)):w=m-2*(0!==i||0!==n?i+n:R(h.top,h.bottom))}await l({...e,availableWidth:x,availableHeight:w});const S=await s.getDimensions(a.floating);return f!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function Qt(t){return function(t){for(let e=t;e;e=Zt(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Zt(t);e;e=Zt(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||$t(t))return e;if("BODY"===e.tagName)return e}}return null}(t)}function Zt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var te=class extends s{constructor(){super(...arguments),this.localize=new S(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let i=0,n=0,o=0,r=0,s=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(i=t.left,n=t.bottom,o=t.right,r=t.bottom,s=e.left,a=e.top,l=e.right,c=e.top):(i=e.left,n=e.bottom,o=e.right,r=e.bottom,s=t.left,a=t.top,l=t.right,c=t.top):t.left<e.left?(i=t.right,n=t.top,o=e.left,r=e.top,s=t.right,a=t.bottom,l=e.left,c=e.bottom):(i=e.right,n=e.top,o=t.left,r=t.top,s=e.right,a=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${i}px`),this.style.setProperty("--hover-bridge-top-left-y",`${n}px`),this.style.setProperty("--hover-bridge-top-right-x",`${o}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchorEl=this.anchor instanceof Element||function(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t.contextElement instanceof Element)}(this.anchor)?this.anchor:this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.active&&this.start()}start(){this.anchorEl&&this.active&&(this.cleanup=function(t,e,i,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Rt(t),h=o||r?[...c?Tt(c):[],...Tt(e)]:[];h.forEach((t=>{o&&t.addEventListener("scroll",i,{passive:!0}),r&&t.addEventListener("resize",i)}));const u=c&&a?function(t,e){let i,n=null;const o=ct(t);function r(){var t;clearTimeout(i),null==(t=n)||t.disconnect(),n=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const c=t.getBoundingClientRect(),{left:h,top:u,width:p,height:d}=c;if(a||e(),!p||!d)return;const f={rootMargin:-N(u)+"px "+-N(o.clientWidth-(h+p))+"px "+-N(o.clientHeight-(u+d))+"px "+-N(h)+"px",threshold:R(0,E(1,l))||1};let m=!0;function g(e){const n=e[0].intersectionRatio;if(n!==l){if(!m)return s();n?s(!1,n):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==n||Kt(c,t.getBoundingClientRect())||s(),m=!1}try{n=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(t){n=new IntersectionObserver(g,f)}n.observe(t)}(!0),r}(c,i):null;let p,d=-1,f=null;s&&(f=new ResizeObserver((t=>{let[n]=t;n&&n.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),i()})),c&&!l&&f.observe(c),f.observe(e));let m=l?Dt(t):null;return l&&function e(){const n=Dt(t);m&&!Kt(m,n)&&i(),m=n,p=requestAnimationFrame(e)}(),i(),()=>{var t;h.forEach((t=>{o&&t.removeEventListener("scroll",i),r&&t.removeEventListener("resize",i)})),null==u||u(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(p)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const i=[(n={mainAxis:this.distance,crossAxis:this.skidding},void 0===n&&(n=0),{name:"offset",options:n,async fn(t){var e,i;const{x:o,y:r,placement:s,middlewareData:a}=t,l=await async function(t,e){const{placement:i,platform:n,elements:o}=t,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=I(i),a=W(i),l="y"===Y(i),c=rt.has(s)?-1:1,h=r&&l?-1:1,u=H(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(d="end"===a?-1*f:f),l?{x:d*h,y:p*c}:{x:p*c,y:d*h}}(t,n);return s===(null==(e=a.offset)?void 0:e.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}})];var n;this.sync?i.push(Jt({apply:({rects:t})=>{const e="height"===this.sync||"both"===this.sync;this.popup.style.width="width"===this.sync||"both"===this.sync?`${t.reference.width}px`:"",this.popup.style.height=e?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&i.push(Xt({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&i.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=H(t,e),c={x:i,y:n},h=await ot(e,l),u=Y(I(o)),p=q(u);let d=c[p],f=c[u];r&&(d=L(d+h["y"===p?"top":"left"],d,d-h["y"===p?"bottom":"right"])),s&&(f=L(f+h["y"===u?"top":"left"],f,f-h["y"===u?"bottom":"right"]));const m=a.fn({...e,[p]:d,[u]:f});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[p]:r,[u]:s}}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?i.push(Jt({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&i.push((t=>({name:"arrow",options:t,async fn(e){const{x:i,y:n,placement:o,rects:r,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=H(t,e)||{};if(null==c)return{};const u=et(h),p={x:i,y:n},d=G(o),f=U(d),m=await s.getDimensions(c),g="y"===d,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[d]-p[d]-r.floating[f],x=p[d]-r.reference[d],S=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let $=S?S[v]:0;$&&await(null==s.isElement?void 0:s.isElement(S))||($=a.floating[v]||r.floating[f]);const z=w/2-x/2,k=$/2-m[f]/2-1,C=E(u[y],k),A=E(u[b],k),O=C,P=$-m[f]-A,F=$/2-m[f]/2+z,T=L(O,F,P),B=!l.arrow&&null!=W(o)&&F!==T&&r.reference[f]/2-(F<O?C:A)-m[f]/2<0,R=B?F<O?F-O:F-P:0;return{[d]:p[d]+R,data:{[d]:T,centerOffset:F-T-R,...B&&{alignmentOffset:R}},reset:B}}}))({element:this.arrowEl,padding:this.arrowPadding}));const o="absolute"===this.strategy?t=>Gt.getOffsetParent(t,Qt):Gt.getOffsetParent;((t,e,i)=>{const n=new Map,o={platform:Gt,...i},r={...o.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:h,y:u}=nt(c,n,l),p=n,d={},f=0;for(let i=0;i<a.length;i++){const{name:r,fn:m}=a[i],{x:g,y,data:b,reset:v}=await m({x:h,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=g?g:h,u=null!=y?y:u,d={...d,[r]:{...d[r],...b}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):v.rects),({x:h,y:u}=nt(c,p,l))),i=-1)}return{x:h,y:u,placement:p,strategy:o,middlewareData:d}})(t,e,{...o,platform:r})})(this.anchorEl,this.popup,{placement:this.placement,middleware:i,strategy:this.strategy,platform:t(e({},Gt),{getOffsetParent:o})}).then((({x:t,y:e,middlewareData:i,placement:n})=>{const o="rtl"===this.localize.dir(),r={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let n="",s="",a="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",s=o?i:"",l=o?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s=o?"":i,l=o?i:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",n="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",n="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:n,right:s,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return a`
|
|
71
71
|
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
|
72
72
|
|
|
73
73
|
<span
|
|
@@ -134,7 +134,7 @@ function h(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.
|
|
|
134
134
|
user-select: none;
|
|
135
135
|
-webkit-user-select: none;
|
|
136
136
|
}
|
|
137
|
-
`,ie=class extends s{constructor(){super(),this.localize=new
|
|
137
|
+
`,ie=class extends s{constructor(){super(),this.localize=new S(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=t=>{"Escape"===t.key&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const t=F(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=F(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){var t,e;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await T(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:i}=A(this,"tooltip.show",{dir:this.localize.dir()});await P(this.popup.popup,e,i),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await T(this.body);const{keyframes:t,options:i}=A(this,"tooltip.hide",{dir:this.localize.dir()});await P(this.popup.popup,t,i),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,O(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,O(this,"sl-after-hide")}render(){return a`
|
|
138
138
|
<sl-popup
|
|
139
139
|
part="base"
|
|
140
140
|
exportparts="
|
|
@@ -159,4 +159,4 @@ function h(t){return(e,i)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.
|
|
|
159
159
|
<slot name="content">${this.content}</slot>
|
|
160
160
|
</div>
|
|
161
161
|
</sl-popup>
|
|
162
|
-
`}};ie.styles=[n,ee],ie.dependencies={"sl-popup":te},o([h("slot:not([name])")],ie.prototype,"defaultSlot",2),o([h(".tooltip__body")],ie.prototype,"body",2),o([h("sl-popup")],ie.prototype,"popup",2),o([r()],ie.prototype,"content",2),o([r()],ie.prototype,"placement",2),o([r({type:Boolean,reflect:!0})],ie.prototype,"disabled",2),o([r({type:Number})],ie.prototype,"distance",2),o([r({type:Boolean,reflect:!0})],ie.prototype,"open",2),o([r({type:Number})],ie.prototype,"skidding",2),o([r()],ie.prototype,"trigger",2),o([r({type:Boolean})],ie.prototype,"hoist",2),o([l("open",{waitUntilFirstUpdate:!0})],ie.prototype,"handleOpenChange",1),o([l(["content","distance","hoist","placement","skidding"])],ie.prototype,"handleOptionsChange",1),o([l("disabled")],ie.prototype,"handleDisabledChange",1),C("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),C("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ie.define("sl-tooltip");export{
|
|
162
|
+
`}};ie.styles=[n,ee],ie.dependencies={"sl-popup":te},o([h("slot:not([name])")],ie.prototype,"defaultSlot",2),o([h(".tooltip__body")],ie.prototype,"body",2),o([h("sl-popup")],ie.prototype,"popup",2),o([r()],ie.prototype,"content",2),o([r()],ie.prototype,"placement",2),o([r({type:Boolean,reflect:!0})],ie.prototype,"disabled",2),o([r({type:Number})],ie.prototype,"distance",2),o([r({type:Boolean,reflect:!0})],ie.prototype,"open",2),o([r({type:Number})],ie.prototype,"skidding",2),o([r()],ie.prototype,"trigger",2),o([r({type:Boolean})],ie.prototype,"hoist",2),o([l("open",{waitUntilFirstUpdate:!0})],ie.prototype,"handleOpenChange",1),o([l(["content","distance","hoist","placement","skidding"])],ie.prototype,"handleOptionsChange",1),o([l("disabled")],ie.prototype,"handleDisabledChange",1),C("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),C("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),ie.define("sl-tooltip");export{S as L,te as S,T as a,P as b,h as e,A as g,C as s,O as w}
|