@tabworthy/components 0.14.2 → 0.15.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/loader.cjs.js +1 -1
- package/dist/cjs/tabworthy-components.cjs.js +1 -1
- package/dist/cjs/tabworthy-dates-calendar_2.cjs.entry.js +8 -8
- package/dist/cjs/tabworthy-times.cjs.entry.js +20 -4
- package/dist/collection/components/tabworthy-dates-calendar/tabworthy-dates-calendar.js +6 -6
- package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +2 -2
- package/dist/collection/components/tabworthy-times/tabworthy-times.js +40 -4
- package/dist/components/p-C_Pq_S0e.js +1 -0
- package/dist/components/{p-CMIEIvTW.js → p-DXCumu2Y.js} +1 -1
- package/dist/components/tabworthy-dates-calendar.js +1 -1
- package/dist/components/tabworthy-dates-modal.js +1 -1
- package/dist/components/tabworthy-dates.js +1 -1
- package/dist/components/tabworthy-times.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tabworthy-components.js +1 -1
- package/dist/esm/tabworthy-dates-calendar_2.entry.js +8 -8
- package/dist/esm/tabworthy-times.entry.js +20 -4
- package/dist/tabworthy-components/p-66c929f1.entry.js +1 -0
- package/dist/tabworthy-components/p-cee41e54.entry.js +1 -0
- package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
- package/dist/themes/light.css +1 -1
- package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +2 -0
- package/dist/types/components.d.ts +9 -0
- package/package.json +1 -1
- package/dist/components/p-BzY8iIVW.js +0 -1
- package/dist/tabworthy-components/p-3af91c7f.entry.js +0 -1
- package/dist/tabworthy-components/p-7cd6ccc1.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as n,c as e,h as i,d as r,t as o}from"./p-BiJ0HZVY.js";function a(t,n,e,i=20,r=0){let o=[];if(r>=i)return o;const s=t=>{const o=t.assignedNodes().filter((t=>1===t.nodeType));return o.length>0?a(o[0].parentElement,n,e,i,r+1):[]},u=Array.from(t.children||[]);for(const t of u)n(t)||(e(t)&&o.push(t),null!=t.shadowRoot?o.push(...a(t.shadowRoot,n,e,i,r+1)):"SLOT"===t.tagName?o.push(...s(t)):o.push(...a(t,n,e,i,r+1)));return o}function s(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function u(t){return"-1"!==t.getAttribute("tabindex")&&!s(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}const c=new Map,f=document.createElement("template");f.innerHTML='\n\t<div id="start"></div>\n\t<div id="backup"></div>\n\t<slot></slot>\n\t<div id="end"></div>\n';class d extends HTMLElement{constructor(){super(),this.debounceId=Math.random().toString(),this._focused=!1;const t=this.attachShadow({mode:"open"});t.appendChild(f.content.cloneNode(!0)),this.$backup=t.querySelector("#backup"),this.$start=t.querySelector("#start"),this.$end=t.querySelector("#end"),this.focusLastElement=this.focusLastElement.bind(this),this.focusFirstElement=this.focusFirstElement.bind(this),this.onFocusIn=this.onFocusIn.bind(this),this.onFocusOut=this.onFocusOut.bind(this)}static get observedAttributes(){return["inactive"]}get inactive(){return this.hasAttribute("inactive")}set inactive(t){t?this.setAttribute("inactive",""):this.removeAttribute("inactive")}get focused(){return this._focused}connectedCallback(){this.$start.addEventListener("focus",this.focusLastElement),this.$end.addEventListener("focus",this.focusFirstElement),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.render()}disconnectedCallback(){this.$start.removeEventListener("focus",this.focusLastElement),this.$end.removeEventListener("focus",this.focusFirstElement),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut)}attributeChangedCallback(){this.render()}focusFirstElement(){this.trapFocus()}focusLastElement(){this.trapFocus(!0)}getFocusableElements(){return a(this,s,u)}trapFocus(t){if(this.inactive)return;let n=this.getFocusableElements();n.length>0?(t?n[n.length-1].focus():n[0].focus(),this.$backup.setAttribute("tabindex","-1")):(this.$backup.setAttribute("tabindex","0"),this.$backup.focus())}onFocusIn(){this.updateFocused(!0)}onFocusOut(){this.updateFocused(!1)}updateFocused(t){!function(t,n,e){const i=c.get(e);null!=i&&window.clearTimeout(i),c.set(e,window.setTimeout((()=>{t(),c.delete(e)}),0))}((()=>{this.focused!==t&&(this._focused=t,this.render())}),0,this.debounceId)}render(){this.$start.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.$end.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.focused?this.setAttribute("focused",""):this.removeAttribute("focused")}}window.customElements.define("focus-trap",d);var h=new WeakMap,l=new WeakMap,p={},v=0,b=function(t){return t&&(t.host||b(t.parentNode))},m=function(t,n,e){void 0===e&&(e="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body}(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),function(t,n,e,i){var r=function(t,n){return n.map((function(n){if(t.contains(n))return n;var e=b(n);return e&&t.contains(e)?e:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)})).filter((function(t){return Boolean(t)}))}(n,Array.isArray(t)?t:[t]);p[e]||(p[e]=new WeakMap);var o=p[e],a=[],s=new Set,u=new Set(r),c=function(t){t&&!s.has(t)&&(s.add(t),c(t.parentNode))};r.forEach(c);var f=function(t){t&&!u.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(s.has(t))f(t);else{var n=t.getAttribute(i),r=null!==n&&"false"!==n,u=(h.get(t)||0)+1,c=(o.get(t)||0)+1;h.set(t,u),o.set(t,c),a.push(t),1===u&&r&&l.set(t,!0),1===c&&t.setAttribute(e,"true"),r||t.setAttribute(i,"true")}}))};return f(n),s.clear(),v++,function(){a.forEach((function(t){var n=h.get(t)-1,r=o.get(t)-1;h.set(t,n),o.set(t,r),n||(l.has(t)||t.removeAttribute(i),l.delete(t)),r||t.removeAttribute(e)})),--v||(h=new WeakMap,h=new WeakMap,l=new WeakMap,p={})}}(i,r,e,"aria-hidden")):function(){return null}},y="top",w="bottom",g="right",x="left",O="auto",j=[y,w,g,x],k="start",M="end",E="viewport",A="popper",T=j.reduce((function(t,n){return t.concat([n+"-"+k,n+"-"+M])}),[]),S=[].concat(j,[O]).reduce((function(t,n){return t.concat([n,n+"-"+k,n+"-"+M])}),[]),L=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function P(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function W(t){return t instanceof H(t).Element||t instanceof Element}function B(t){return t instanceof H(t).HTMLElement||t instanceof HTMLElement}function F(t){return"undefined"!=typeof ShadowRoot&&(t instanceof H(t).ShadowRoot||t instanceof ShadowRoot)}function q(t){return t.split("-")[0]}var C=Math.max,I=Math.min,R=Math.round;function z(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function D(){return!/^((?!chrome|android).)*safari/i.test(z())}function V(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&B(t)&&(r=t.offsetWidth>0&&R(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&R(i.height)/t.offsetHeight||1);var a=(W(t)?H(t):window).visualViewport,s=!D()&&e,u=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,f=i.width/r,d=i.height/o;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function J(t){var n=V(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function K(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&F(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function U(t){return H(t).getComputedStyle(t)}function Y(t){return["table","td","th"].indexOf(P(t))>=0}function Z(t){return((W(t)?t.ownerDocument:t.document)||window.document).documentElement}function _(t){return"html"===P(t)?t:t.assignedSlot||t.parentNode||(F(t)?t.host:null)||Z(t)}function G(t){return B(t)&&"fixed"!==U(t).position?t.offsetParent:null}function N(t){for(var n=H(t),e=G(t);e&&Y(e)&&"static"===U(e).position;)e=G(e);return e&&("html"===P(e)||"body"===P(e)&&"static"===U(e).position)?n:e||function(t){var n=/firefox/i.test(z());if(/Trident/i.test(z())&&B(t)&&"fixed"===U(t).position)return null;var e=_(t);for(F(e)&&(e=e.host);B(e)&&["html","body"].indexOf(P(e))<0;){var i=U(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}function Q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,n,e){return C(t,I(n,e))}function $(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function tt(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function nt(t){return t.split("-")[1]}var et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function it(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,a=t.offsets,s=t.position,u=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,d=t.isFixed,h=a.x,l=void 0===h?0:h,p=a.y,v=void 0===p?0:p,b="function"==typeof f?f({x:l,y:v}):{x:l,y:v};l=b.x,v=b.y;var m=a.hasOwnProperty("x"),O=a.hasOwnProperty("y"),j=x,k=y,E=window;if(c){var A=N(e),T="clientHeight",S="clientWidth";A===H(e)&&"static"!==U(A=Z(e)).position&&"absolute"===s&&(T="scrollHeight",S="scrollWidth"),(r===y||(r===x||r===g)&&o===M)&&(k=w,v-=(d&&A===E&&E.visualViewport?E.visualViewport.height:A[T])-i.height,v*=u?1:-1),r!==x&&(r!==y&&r!==w||o!==M)||(j=g,l-=(d&&A===E&&E.visualViewport?E.visualViewport.width:A[S])-i.width,l*=u?1:-1)}var L,P=Object.assign({position:s},c&&et),W=!0===f?function(t,n){var e=t.y,i=n.devicePixelRatio||1;return{x:R(t.x*i)/i||0,y:R(e*i)/i||0}}({x:l,y:v},H(e)):{x:l,y:v};return l=W.x,v=W.y,Object.assign({},P,u?((L={})[k]=O?"0":"",L[j]=m?"0":"",L.transform=(E.devicePixelRatio||1)<=1?"translate("+l+"px, "+v+"px)":"translate3d("+l+"px, "+v+"px, 0)",L):((n={})[k]=O?v+"px":"",n[j]=m?l+"px":"",n.transform="",n))}var rt={passive:!0},ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return ot[t]}))}var st={start:"end",end:"start"};function ut(t){return t.replace(/start|end/g,(function(t){return st[t]}))}function ct(t){var n=H(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function ft(t){return V(Z(t)).left+ct(t).scrollLeft}function dt(t){var n=U(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function ht(t){return["html","body","#document"].indexOf(P(t))>=0?t.ownerDocument.body:B(t)&&dt(t)?t:ht(_(t))}function lt(t,n){var e;void 0===n&&(n=[]);var i=ht(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=H(i),a=r?[o].concat(o.visualViewport||[],dt(i)?i:[]):i,s=n.concat(a);return r?s:s.concat(lt(_(a)))}function pt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vt(t,n,e){return n===E?pt(function(t,n){var e=H(t),i=Z(t),r=e.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,u=0;if(r){o=r.width,a=r.height;var c=D();(c||!c&&"fixed"===n)&&(s=r.offsetLeft,u=r.offsetTop)}return{width:o,height:a,x:s+ft(t),y:u}}(t,e)):W(n)?function(t,n){var e=V(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):pt(function(t){var n,e=Z(t),i=ct(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=C(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=C(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+ft(t),u=-i.scrollTop;return"rtl"===U(r||e).direction&&(s+=C(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(Z(t)))}function bt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?q(r):null,a=r?nt(r):null,s=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case y:n={x:s,y:e.y-i.height};break;case w:n={x:s,y:e.y+e.height};break;case g:n={x:e.x+e.width,y:u};break;case x:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?Q(o):null;if(null!=c){var f="y"===c?"height":"width";switch(a){case k:n[c]=n[c]-(e[f]/2-i[f]/2);break;case M:n[c]=n[c]+(e[f]/2-i[f]/2)}}return n}function mt(t,n){void 0===n&&(n={});var e=n.placement,i=void 0===e?t.placement:e,r=n.strategy,o=void 0===r?t.strategy:r,a=n.boundary,s=void 0===a?"clippingParents":a,u=n.rootBoundary,c=void 0===u?E:u,f=n.elementContext,d=void 0===f?A:f,h=n.altBoundary,l=void 0!==h&&h,p=n.padding,v=void 0===p?0:p,b=$("number"!=typeof v?v:tt(v,j)),m=t.rects.popper,x=t.elements[l?d===A?"reference":A:d],O=function(t,n,e,i){var r="clippingParents"===n?function(t){var n=lt(_(t)),e=["absolute","fixed"].indexOf(U(t).position)>=0&&B(t)?N(t):t;return W(e)?n.filter((function(t){return W(t)&&K(t,e)&&"body"!==P(t)})):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o.reduce((function(n,e){var r=vt(t,e,i);return n.top=C(r.top,n.top),n.right=I(r.right,n.right),n.bottom=I(r.bottom,n.bottom),n.left=C(r.left,n.left),n}),vt(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(W(x)?x:x.contextElement||Z(t.elements.popper),s,c,o),k=V(t.elements.reference),M=bt({reference:k,element:m,placement:i}),T=pt(Object.assign({},m,M)),S=d===A?T:k,L={top:O.top-S.top+b.top,bottom:S.bottom-O.bottom+b.bottom,left:O.left-S.left+b.left,right:S.right-O.right+b.right},H=t.modifiersData.offset;if(d===A&&H){var F=H[i];Object.keys(L).forEach((function(t){var n=[g,w].indexOf(t)>=0?1:-1,e=[y,w].indexOf(t)>=0?"y":"x";L[t]+=F[e]*n}))}return L}function yt(t,n){void 0===n&&(n={});var e=n.boundary,i=n.rootBoundary,r=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,s=void 0===a?S:a,u=nt(n.placement),c=u?o?T:T.filter((function(t){return nt(t)===u})):j,f=c.filter((function(t){return s.indexOf(t)>=0}));0===f.length&&(f=c);var d=f.reduce((function(n,o){return n[o]=mt(t,{placement:o,boundary:e,rootBoundary:i,padding:r})[q(o)],n}),{});return Object.keys(d).sort((function(t,n){return d[t]-d[n]}))}var wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,a=e.altAxis,s=void 0===a||a,u=e.fallbackPlacements,c=e.padding,f=e.boundary,d=e.rootBoundary,h=e.altBoundary,l=e.flipVariations,p=void 0===l||l,v=e.allowedAutoPlacements,b=n.options.placement,m=q(b),j=u||(m!==b&&p?function(t){if(q(t)===O)return[];var n=at(t);return[ut(t),n,ut(n)]}(b):[at(b)]),M=[b].concat(j).reduce((function(t,e){return t.concat(q(e)===O?yt(n,{placement:e,boundary:f,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),E=n.rects.reference,A=n.rects.popper,T=new Map,S=!0,L=M[0],P=0;P<M.length;P++){var H=M[P],W=q(H),B=nt(H)===k,F=[y,w].indexOf(W)>=0,C=F?"width":"height",I=mt(n,{placement:H,boundary:f,rootBoundary:d,altBoundary:h,padding:c}),R=F?B?g:x:B?w:y;E[C]>A[C]&&(R=at(R));var z=at(R),D=[];if(o&&D.push(I[W]<=0),s&&D.push(I[R]<=0,I[z]<=0),D.every((function(t){return t}))){L=H,S=!1;break}T.set(H,D)}if(S)for(var V=function(t){var n=M.find((function(n){var e=T.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return L=n,"break"},J=p?3:1;J>0&&"break"!==V(J);J--);n.placement!==L&&(n.modifiersData[i]._skip=!0,n.placement=L,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function gt(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function xt(t){return[y,g,w,x].some((function(n){return t[n]>=0}))}function Ot(t,n,e){void 0===e&&(e=!1);var i,r,o=B(n),a=B(n)&&function(t){var n=t.getBoundingClientRect(),e=R(n.width)/t.offsetWidth||1,i=R(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),s=Z(n),u=V(t,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!e)&&(("body"!==P(n)||dt(s))&&(c=(i=n)!==H(i)&&B(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:ct(i)),B(n)?((f=V(n,!0)).x+=n.clientLeft,f.y+=n.clientTop):s&&(f.x=ft(s))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function jt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var kt={placement:"bottom",modifiers:[],strategy:"absolute"};function Mt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Et(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,i=t.defaultOptions,r=void 0===i?kt:i;return function(t,n,i){void 0===i&&(i=r);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},kt,r),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,f={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;d(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:W(t)?lt(t):t.contextElement?lt(t.contextElement):[],popper:lt(n)};var a,c,h=function(t){var n=jt(t);return L.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,s.options.modifiers),c=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var i=e({state:s,name:t.name,instance:f,options:void 0===n?{}:n});u.push(i||function(){})}})),f.update()},forceUpdate:function(){if(!c){var t=s.elements,n=t.reference,e=t.popper;if(Mt(n,e)){s.rects={reference:Ot(n,N(e),"fixed"===s.options.strategy),popper:J(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options;"function"==typeof o&&(s=o({state:s,options:void 0===a?{}:a,name:r.name,instance:f})||s)}else s.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){f.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){d(),c=!0}};if(!Mt(t,n))return f;function d(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),f}}var At=Et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,u=H(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,rt)})),s&&u.addEventListener("resize",e.update,rt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,rt)})),s&&u.removeEventListener("resize",e.update,rt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=bt({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,a=void 0===o||o,s=e.roundOffsets,u=void 0===s||s,c={placement:q(n.placement),variation:nt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,it(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,it(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];B(r)&&P(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});B(i)&&P(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,o=S.reduce((function(t,e){return t[e]=function(t,n,e){var i=q(t),r=[x,y].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,a=o[0],s=o[1];return a=a||0,s=(s||0)*r,[x,g].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(e,n.rects,r),t}),{}),a=o[n.placement],s=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=a.x,n.modifiersData.popperOffsets.y+=s),n.modifiersData[e]=o}},wt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,a=e.altAxis,s=void 0!==a&&a,u=e.tether,c=void 0===u||u,f=e.tetherOffset,d=void 0===f?0:f,h=mt(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),l=q(n.placement),p=nt(n.placement),v=!p,b=Q(l),m="x"===b?"y":"x",O=n.modifiersData.popperOffsets,j=n.rects.reference,M=n.rects.popper,E="function"==typeof d?d(Object.assign({},n.rects,{placement:n.placement})):d,A="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,S={x:0,y:0};if(O){if(o){var L,P="y"===b?y:x,H="y"===b?w:g,W="y"===b?"height":"width",B=O[b],F=B+h[P],R=B-h[H],z=c?-M[W]/2:0,D=p===k?j[W]:M[W],V=p===k?-M[W]:-j[W],K=n.elements.arrow,U=c&&K?J(K):{width:0,height:0},Y=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=Y[P],_=Y[H],G=X(0,j[W],U[W]),$=v?j[W]/2-z-G-Z-A.mainAxis:D-G-Z-A.mainAxis,tt=v?-j[W]/2+z+G+_+A.mainAxis:V+G+_+A.mainAxis,et=n.elements.arrow&&N(n.elements.arrow),it=null!=(L=null==T?void 0:T[b])?L:0,rt=B+tt-it,ot=X(c?I(F,B+$-it-(et?"y"===b?et.clientTop||0:et.clientLeft||0:0)):F,B,c?C(R,rt):R);O[b]=ot,S[b]=ot-B}if(s){var at,st=O[m],ut="y"===m?"height":"width",ct=st+h["x"===b?y:x],ft=st-h["x"===b?w:g],dt=-1!==[y,x].indexOf(l),ht=null!=(at=null==T?void 0:T[m])?at:0,lt=dt?ct:st-j[ut]-M[ut]-ht+A.altAxis,pt=dt?st+j[ut]+M[ut]-ht-A.altAxis:ft,vt=c&&dt?function(t,n,e){var i=X(t,n,e);return i>e?e:i}(lt,st,pt):X(c?lt:ct,st,c?pt:ft);O[m]=vt,S[m]=vt-st}n.modifiersData[i]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,a=e.modifiersData.popperOffsets,s=q(e.placement),u=Q(s),c=[x,g].indexOf(s)>=0?"height":"width";if(o&&a){var f=function(t,n){return $("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:tt(t,j))}(r.padding,e),d=J(o),h="y"===u?y:x,l="y"===u?w:g,p=e.rects.reference[c]+e.rects.reference[u]-a[u]-e.rects.popper[c],v=a[u]-e.rects.reference[u],b=N(o),m=b?"y"===u?b.clientHeight||0:b.clientWidth||0:0,O=m/2-d[c]/2+(p/2-v/2),k=X(f[h],O,m-d[c]-f[l]);e.modifiersData[i]=((n={})[u]=k,n.centerOffset=k-O,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&K(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,a=mt(n,{elementContext:"reference"}),s=mt(n,{altBoundary:!0}),u=gt(a,i),c=gt(s,r,o),f=xt(u),d=xt(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}}]});const Tt=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.inline=!1,this.placement="bottom-start",this.offset=[0,8],this.closing=!1,this.showing=this.inline||!1,this.positioned=!1,this.originalParent=null,this.originalNextSibling=null,this.isMovingPortal=!1,this.popperInstance=null,this.onKeyDown=t=>{"Escape"===t.code&&this.close()}}watchShowing(t){t||(this.destroyPopperInstance(),this.cleanupPortal()),this.positioned=!1}getAppendToElement(){return this.appendTo?"body"===this.appendTo?document.body:"string"==typeof this.appendTo?document.querySelector(this.appendTo):this.appendTo:null}setupPortal(){const t=this.getAppendToElement();t&&(this.originalParent=this.hostElement.parentElement,this.originalNextSibling=this.hostElement.nextSibling,this.isMovingPortal=!0,t.appendChild(this.hostElement),this.isMovingPortal=!1)}cleanupPortal(){this.isMovingPortal||this.originalParent&&(this.isMovingPortal=!0,this.originalNextSibling?this.originalParent.insertBefore(this.hostElement,this.originalNextSibling):this.originalParent.appendChild(this.hostElement),this.originalParent=null,this.originalNextSibling=null,this.isMovingPortal=!1)}createPopperInstance(){if(!this.triggerElement||!this.bodyRef)return;const t=!!this.appendTo,n=t?"viewport":"clippingParents";this.popperInstance=At(this.triggerElement,this.bodyRef,{placement:this.placement,strategy:t?"fixed":"absolute",modifiers:[{name:"offset",options:{offset:this.offset}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],boundary:n}},{name:"preventOverflow",options:{boundary:n,altAxis:!0,padding:8}},{name:"computeStyles",options:{gpuAcceleration:!0}},{name:"applyStyles",enabled:!0}]}),this.popperInstance.forceUpdate(),this.positioned=!0}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}async open(){this.inline||(this.showing=!0,this.undo=m(this.el),this.opened.emit(void 0))}async close(){var t;this.inline||(this.showing=!1,this.closed.emit(void 0),null===(t=this.undo)||void 0===t||t.call(this),this.triggerElement&&this.triggerElement.focus())}disconnectedCallback(){this.isMovingPortal||(this.destroyPopperInstance(),this.cleanupPortal())}async getState(){return this.showing}async setTriggerElement(t){this.triggerElement=t}async updatePosition(){var t;await(null===(t=this.popperInstance)||void 0===t?void 0:t.update())}handleClick(t){var n;if(this.showing){const e=t.target;this.hostElement.contains(e)||(null===(n=this.triggerElement)||void 0===n?void 0:n.contains(e))||this.originalParent&&this.originalParent.contains(e)||this.close()}}render(){return i(r,{key:"488fb845bb3a168c45f715b5f7315a80e1857589",showing:this.showing,ref:t=>t&&(this.el=t)},!this.inline&&this.showing&&i("div",{key:"d6263beffa3dbeaa7f0e5e65c1f2627c07164648",part:"body",ref:t=>{t&&(this.bodyRef=t,this.showing&&this.triggerElement&&!this.popperInstance&&(this.setupPortal(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.createPopperInstance()}))}))))},style:{visibility:this.positioned?"visible":"hidden"},onKeyDown:this.onKeyDown,role:"dialog",tabindex:-1,"aria-hidden":!this.showing,"aria-label":this.label,"aria-modal":this.showing},i("focus-trap",{key:"7ffb9cc684198ab9f3b127a4abe5f60f3241cd49"},i("div",{key:"c6c7c14220c01969f3a5c92dda882685f4c43268",part:"content"},i("slot",{key:"a1e6ce7ed152f61b3970e20b40e36bb13ee7580a"})))),this.inline&&i("div",{key:"632750cfce76139771642e03051f5c4a654db56a",part:"content"},i("slot",{key:"c1aa297a6ffdeee55840a9e05adddb7220e7f954"})))}get hostElement(){return this}static get watchers(){return{showing:[{watchShowing:0}]}}static get style(){return":host::part(body){position:absolute;top:0;left:0;width:-moz-fit-content;width:fit-content;z-index:1200}:host::part(backdrop){}:host::part(content){}"}},[257,"tabworthy-dates-modal",{label:[1],inline:[4],placement:[1],offset:[16],appendTo:[1,"append-to"],closing:[32],showing:[32],positioned:[32],open:[64],close:[64],getState:[64],setTriggerElement:[64],updatePosition:[64]},[[10,"click","handleClick"]],{showing:[{watchShowing:0}]}]);function St(){"undefined"!=typeof customElements&&["tabworthy-dates-modal"].forEach((t=>{"tabworthy-dates-modal"===t&&(customElements.get(o(t))||customElements.define(o(t),Tt))}))}export{Tt as T,St as d}
|
|
1
|
+
import{p as t,H as n,c as e,h as i,d as r,t as o}from"./p-BiJ0HZVY.js";function a(t,n,e,i=20,r=0){let o=[];if(r>=i)return o;const s=t=>{const o=t.assignedNodes().filter((t=>1===t.nodeType));return o.length>0?a(o[0].parentElement,n,e,i,r+1):[]},u=Array.from(t.children||[]);for(const t of u)n(t)||(e(t)&&o.push(t),null!=t.shadowRoot?o.push(...a(t.shadowRoot,n,e,i,r+1)):"SLOT"===t.tagName?o.push(...s(t)):o.push(...a(t,n,e,i,r+1)));return o}function s(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function u(t){return"-1"!==t.getAttribute("tabindex")&&!s(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}const c=new Map,f=document.createElement("template");f.innerHTML='\n\t<div id="start"></div>\n\t<div id="backup"></div>\n\t<slot></slot>\n\t<div id="end"></div>\n';class d extends HTMLElement{constructor(){super(),this.debounceId=Math.random().toString(),this._focused=!1;const t=this.attachShadow({mode:"open"});t.appendChild(f.content.cloneNode(!0)),this.$backup=t.querySelector("#backup"),this.$start=t.querySelector("#start"),this.$end=t.querySelector("#end"),this.focusLastElement=this.focusLastElement.bind(this),this.focusFirstElement=this.focusFirstElement.bind(this),this.onFocusIn=this.onFocusIn.bind(this),this.onFocusOut=this.onFocusOut.bind(this)}static get observedAttributes(){return["inactive"]}get inactive(){return this.hasAttribute("inactive")}set inactive(t){t?this.setAttribute("inactive",""):this.removeAttribute("inactive")}get focused(){return this._focused}connectedCallback(){this.$start.addEventListener("focus",this.focusLastElement),this.$end.addEventListener("focus",this.focusFirstElement),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.render()}disconnectedCallback(){this.$start.removeEventListener("focus",this.focusLastElement),this.$end.removeEventListener("focus",this.focusFirstElement),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut)}attributeChangedCallback(){this.render()}focusFirstElement(){this.trapFocus()}focusLastElement(){this.trapFocus(!0)}getFocusableElements(){return a(this,s,u)}trapFocus(t){if(this.inactive)return;let n=this.getFocusableElements();n.length>0?(t?n[n.length-1].focus():n[0].focus(),this.$backup.setAttribute("tabindex","-1")):(this.$backup.setAttribute("tabindex","0"),this.$backup.focus())}onFocusIn(){this.updateFocused(!0)}onFocusOut(){this.updateFocused(!1)}updateFocused(t){!function(t,n,e){const i=c.get(e);null!=i&&window.clearTimeout(i),c.set(e,window.setTimeout((()=>{t(),c.delete(e)}),0))}((()=>{this.focused!==t&&(this._focused=t,this.render())}),0,this.debounceId)}render(){this.$start.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.$end.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.focused?this.setAttribute("focused",""):this.removeAttribute("focused")}}window.customElements.define("focus-trap",d);var h=new WeakMap,l=new WeakMap,p={},v=0,b=function(t){return t&&(t.host||b(t.parentNode))},m=function(t,n,e){void 0===e&&(e="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body}(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),function(t,n,e,i){var r=function(t,n){return n.map((function(n){if(t.contains(n))return n;var e=b(n);return e&&t.contains(e)?e:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)})).filter((function(t){return Boolean(t)}))}(n,Array.isArray(t)?t:[t]);p[e]||(p[e]=new WeakMap);var o=p[e],a=[],s=new Set,u=new Set(r),c=function(t){t&&!s.has(t)&&(s.add(t),c(t.parentNode))};r.forEach(c);var f=function(t){t&&!u.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(s.has(t))f(t);else{var n=t.getAttribute(i),r=null!==n&&"false"!==n,u=(h.get(t)||0)+1,c=(o.get(t)||0)+1;h.set(t,u),o.set(t,c),a.push(t),1===u&&r&&l.set(t,!0),1===c&&t.setAttribute(e,"true"),r||t.setAttribute(i,"true")}}))};return f(n),s.clear(),v++,function(){a.forEach((function(t){var n=h.get(t)-1,r=o.get(t)-1;h.set(t,n),o.set(t,r),n||(l.has(t)||t.removeAttribute(i),l.delete(t)),r||t.removeAttribute(e)})),--v||(h=new WeakMap,h=new WeakMap,l=new WeakMap,p={})}}(i,r,e,"aria-hidden")):function(){return null}},y="top",w="bottom",g="right",x="left",O="auto",j=[y,w,g,x],k="start",M="end",E="viewport",A="popper",T=j.reduce((function(t,n){return t.concat([n+"-"+k,n+"-"+M])}),[]),S=[].concat(j,[O]).reduce((function(t,n){return t.concat([n,n+"-"+k,n+"-"+M])}),[]),L=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function P(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function W(t){return t instanceof H(t).Element||t instanceof Element}function B(t){return t instanceof H(t).HTMLElement||t instanceof HTMLElement}function F(t){return"undefined"!=typeof ShadowRoot&&(t instanceof H(t).ShadowRoot||t instanceof ShadowRoot)}function q(t){return t.split("-")[0]}var C=Math.max,I=Math.min,R=Math.round;function z(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function D(){return!/^((?!chrome|android).)*safari/i.test(z())}function V(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&B(t)&&(r=t.offsetWidth>0&&R(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&R(i.height)/t.offsetHeight||1);var a=(W(t)?H(t):window).visualViewport,s=!D()&&e,u=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,f=i.width/r,d=i.height/o;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function J(t){var n=V(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function K(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&F(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function U(t){return H(t).getComputedStyle(t)}function Y(t){return["table","td","th"].indexOf(P(t))>=0}function Z(t){return((W(t)?t.ownerDocument:t.document)||window.document).documentElement}function _(t){return"html"===P(t)?t:t.assignedSlot||t.parentNode||(F(t)?t.host:null)||Z(t)}function G(t){return B(t)&&"fixed"!==U(t).position?t.offsetParent:null}function N(t){for(var n=H(t),e=G(t);e&&Y(e)&&"static"===U(e).position;)e=G(e);return e&&("html"===P(e)||"body"===P(e)&&"static"===U(e).position)?n:e||function(t){var n=/firefox/i.test(z());if(/Trident/i.test(z())&&B(t)&&"fixed"===U(t).position)return null;var e=_(t);for(F(e)&&(e=e.host);B(e)&&["html","body"].indexOf(P(e))<0;){var i=U(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter)return e;e=e.parentNode}return null}(t)||n}function Q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,n,e){return C(t,I(n,e))}function $(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function tt(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function nt(t){return t.split("-")[1]}var et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function it(t){var n,e=t.popper,i=t.popperRect,r=t.placement,o=t.variation,a=t.offsets,s=t.position,u=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,d=t.isFixed,h=a.x,l=void 0===h?0:h,p=a.y,v=void 0===p?0:p,b="function"==typeof f?f({x:l,y:v}):{x:l,y:v};l=b.x,v=b.y;var m=a.hasOwnProperty("x"),O=a.hasOwnProperty("y"),j=x,k=y,E=window;if(c){var A=N(e),T="clientHeight",S="clientWidth";A===H(e)&&"static"!==U(A=Z(e)).position&&"absolute"===s&&(T="scrollHeight",S="scrollWidth"),(r===y||(r===x||r===g)&&o===M)&&(k=w,v-=(d&&A===E&&E.visualViewport?E.visualViewport.height:A[T])-i.height,v*=u?1:-1),r!==x&&(r!==y&&r!==w||o!==M)||(j=g,l-=(d&&A===E&&E.visualViewport?E.visualViewport.width:A[S])-i.width,l*=u?1:-1)}var L,P=Object.assign({position:s},c&&et),W=!0===f?function(t,n){var e=t.y,i=n.devicePixelRatio||1;return{x:R(t.x*i)/i||0,y:R(e*i)/i||0}}({x:l,y:v},H(e)):{x:l,y:v};return l=W.x,v=W.y,Object.assign({},P,u?((L={})[k]=O?"0":"",L[j]=m?"0":"",L.transform=(E.devicePixelRatio||1)<=1?"translate("+l+"px, "+v+"px)":"translate3d("+l+"px, "+v+"px, 0)",L):((n={})[k]=O?v+"px":"",n[j]=m?l+"px":"",n.transform="",n))}var rt={passive:!0},ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return ot[t]}))}var st={start:"end",end:"start"};function ut(t){return t.replace(/start|end/g,(function(t){return st[t]}))}function ct(t){var n=H(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function ft(t){return V(Z(t)).left+ct(t).scrollLeft}function dt(t){var n=U(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function ht(t){return["html","body","#document"].indexOf(P(t))>=0?t.ownerDocument.body:B(t)&&dt(t)?t:ht(_(t))}function lt(t,n){var e;void 0===n&&(n=[]);var i=ht(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=H(i),a=r?[o].concat(o.visualViewport||[],dt(i)?i:[]):i,s=n.concat(a);return r?s:s.concat(lt(_(a)))}function pt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vt(t,n,e){return n===E?pt(function(t,n){var e=H(t),i=Z(t),r=e.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,u=0;if(r){o=r.width,a=r.height;var c=D();(c||!c&&"fixed"===n)&&(s=r.offsetLeft,u=r.offsetTop)}return{width:o,height:a,x:s+ft(t),y:u}}(t,e)):W(n)?function(t,n){var e=V(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):pt(function(t){var n,e=Z(t),i=ct(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=C(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=C(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+ft(t),u=-i.scrollTop;return"rtl"===U(r||e).direction&&(s+=C(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(Z(t)))}function bt(t){var n,e=t.reference,i=t.element,r=t.placement,o=r?q(r):null,a=r?nt(r):null,s=e.x+e.width/2-i.width/2,u=e.y+e.height/2-i.height/2;switch(o){case y:n={x:s,y:e.y-i.height};break;case w:n={x:s,y:e.y+e.height};break;case g:n={x:e.x+e.width,y:u};break;case x:n={x:e.x-i.width,y:u};break;default:n={x:e.x,y:e.y}}var c=o?Q(o):null;if(null!=c){var f="y"===c?"height":"width";switch(a){case k:n[c]=n[c]-(e[f]/2-i[f]/2);break;case M:n[c]=n[c]+(e[f]/2-i[f]/2)}}return n}function mt(t,n){void 0===n&&(n={});var e=n.placement,i=void 0===e?t.placement:e,r=n.strategy,o=void 0===r?t.strategy:r,a=n.boundary,s=void 0===a?"clippingParents":a,u=n.rootBoundary,c=void 0===u?E:u,f=n.elementContext,d=void 0===f?A:f,h=n.altBoundary,l=void 0!==h&&h,p=n.padding,v=void 0===p?0:p,b=$("number"!=typeof v?v:tt(v,j)),m=t.rects.popper,x=t.elements[l?d===A?"reference":A:d],O=function(t,n,e,i){var r="clippingParents"===n?function(t){var n=lt(_(t)),e=["absolute","fixed"].indexOf(U(t).position)>=0&&B(t)?N(t):t;return W(e)?n.filter((function(t){return W(t)&&K(t,e)&&"body"!==P(t)})):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o.reduce((function(n,e){var r=vt(t,e,i);return n.top=C(r.top,n.top),n.right=I(r.right,n.right),n.bottom=I(r.bottom,n.bottom),n.left=C(r.left,n.left),n}),vt(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(W(x)?x:x.contextElement||Z(t.elements.popper),s,c,o),k=V(t.elements.reference),M=bt({reference:k,element:m,placement:i}),T=pt(Object.assign({},m,M)),S=d===A?T:k,L={top:O.top-S.top+b.top,bottom:S.bottom-O.bottom+b.bottom,left:O.left-S.left+b.left,right:S.right-O.right+b.right},H=t.modifiersData.offset;if(d===A&&H){var F=H[i];Object.keys(L).forEach((function(t){var n=[g,w].indexOf(t)>=0?1:-1,e=[y,w].indexOf(t)>=0?"y":"x";L[t]+=F[e]*n}))}return L}function yt(t,n){void 0===n&&(n={});var e=n.boundary,i=n.rootBoundary,r=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,s=void 0===a?S:a,u=nt(n.placement),c=u?o?T:T.filter((function(t){return nt(t)===u})):j,f=c.filter((function(t){return s.indexOf(t)>=0}));0===f.length&&(f=c);var d=f.reduce((function(n,o){return n[o]=mt(t,{placement:o,boundary:e,rootBoundary:i,padding:r})[q(o)],n}),{});return Object.keys(d).sort((function(t,n){return d[t]-d[n]}))}var wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,a=e.altAxis,s=void 0===a||a,u=e.fallbackPlacements,c=e.padding,f=e.boundary,d=e.rootBoundary,h=e.altBoundary,l=e.flipVariations,p=void 0===l||l,v=e.allowedAutoPlacements,b=n.options.placement,m=q(b),j=u||(m!==b&&p?function(t){if(q(t)===O)return[];var n=at(t);return[ut(t),n,ut(n)]}(b):[at(b)]),M=[b].concat(j).reduce((function(t,e){return t.concat(q(e)===O?yt(n,{placement:e,boundary:f,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:v}):e)}),[]),E=n.rects.reference,A=n.rects.popper,T=new Map,S=!0,L=M[0],P=0;P<M.length;P++){var H=M[P],W=q(H),B=nt(H)===k,F=[y,w].indexOf(W)>=0,C=F?"width":"height",I=mt(n,{placement:H,boundary:f,rootBoundary:d,altBoundary:h,padding:c}),R=F?B?g:x:B?w:y;E[C]>A[C]&&(R=at(R));var z=at(R),D=[];if(o&&D.push(I[W]<=0),s&&D.push(I[R]<=0,I[z]<=0),D.every((function(t){return t}))){L=H,S=!1;break}T.set(H,D)}if(S)for(var V=function(t){var n=M.find((function(n){var e=T.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return L=n,"break"},J=p?3:1;J>0&&"break"!==V(J);J--);n.placement!==L&&(n.modifiersData[i]._skip=!0,n.placement=L,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function gt(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function xt(t){return[y,g,w,x].some((function(n){return t[n]>=0}))}function Ot(t,n,e){void 0===e&&(e=!1);var i,r,o=B(n),a=B(n)&&function(t){var n=t.getBoundingClientRect(),e=R(n.width)/t.offsetWidth||1,i=R(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),s=Z(n),u=V(t,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!e)&&(("body"!==P(n)||dt(s))&&(c=(i=n)!==H(i)&&B(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:ct(i)),B(n)?((f=V(n,!0)).x+=n.clientLeft,f.y+=n.clientTop):s&&(f.x=ft(s))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function jt(t){var n=new Map,e=new Set,i=[];function r(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var i=n.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||r(t)})),i}var kt={placement:"bottom",modifiers:[],strategy:"absolute"};function Mt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Et(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,i=t.defaultOptions,r=void 0===i?kt:i;return function(t,n,i){void 0===i&&(i=r);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},kt,r),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},u=[],c=!1,f={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;d(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:W(t)?lt(t):t.contextElement?lt(t.contextElement):[],popper:lt(n)};var a,c,h=function(t){var n=jt(t);return L.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,s.options.modifiers),c=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var i=e({state:s,name:t.name,instance:f,options:void 0===n?{}:n});u.push(i||function(){})}})),f.update()},forceUpdate:function(){if(!c){var t=s.elements,n=t.reference,e=t.popper;if(Mt(n,e)){s.rects={reference:Ot(n,N(e),"fixed"===s.options.strategy),popper:J(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options;"function"==typeof o&&(s=o({state:s,options:void 0===a?{}:a,name:r.name,instance:f})||s)}else s.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){f.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){d(),c=!0}};if(!Mt(t,n))return f;function d(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),f}}var At=Et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,u=H(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,rt)})),s&&u.addEventListener("resize",e.update,rt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,rt)})),s&&u.removeEventListener("resize",e.update,rt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=bt({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,a=void 0===o||o,s=e.roundOffsets,u=void 0===s||s,c={placement:q(n.placement),variation:nt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,it(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:u})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,it(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},i=n.attributes[t]||{},r=n.elements[t];B(r)&&P(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(t){var n=i[t];!1===n?r.removeAttribute(t):r.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var i=n.elements[t],r=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});B(i)&&P(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,o=S.reduce((function(t,e){return t[e]=function(t,n,e){var i=q(t),r=[x,y].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,a=o[0],s=o[1];return a=a||0,s=(s||0)*r,[x,g].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(e,n.rects,r),t}),{}),a=o[n.placement],s=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=a.x,n.modifiersData.popperOffsets.y+=s),n.modifiersData[e]=o}},wt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,a=e.altAxis,s=void 0!==a&&a,u=e.tether,c=void 0===u||u,f=e.tetherOffset,d=void 0===f?0:f,h=mt(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),l=q(n.placement),p=nt(n.placement),v=!p,b=Q(l),m="x"===b?"y":"x",O=n.modifiersData.popperOffsets,j=n.rects.reference,M=n.rects.popper,E="function"==typeof d?d(Object.assign({},n.rects,{placement:n.placement})):d,A="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,S={x:0,y:0};if(O){if(o){var L,P="y"===b?y:x,H="y"===b?w:g,W="y"===b?"height":"width",B=O[b],F=B+h[P],R=B-h[H],z=c?-M[W]/2:0,D=p===k?j[W]:M[W],V=p===k?-M[W]:-j[W],K=n.elements.arrow,U=c&&K?J(K):{width:0,height:0},Y=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=Y[P],_=Y[H],G=X(0,j[W],U[W]),$=v?j[W]/2-z-G-Z-A.mainAxis:D-G-Z-A.mainAxis,tt=v?-j[W]/2+z+G+_+A.mainAxis:V+G+_+A.mainAxis,et=n.elements.arrow&&N(n.elements.arrow),it=null!=(L=null==T?void 0:T[b])?L:0,rt=B+tt-it,ot=X(c?I(F,B+$-it-(et?"y"===b?et.clientTop||0:et.clientLeft||0:0)):F,B,c?C(R,rt):R);O[b]=ot,S[b]=ot-B}if(s){var at,st=O[m],ut="y"===m?"height":"width",ct=st+h["x"===b?y:x],ft=st-h["x"===b?w:g],dt=-1!==[y,x].indexOf(l),ht=null!=(at=null==T?void 0:T[m])?at:0,lt=dt?ct:st-j[ut]-M[ut]-ht+A.altAxis,pt=dt?st+j[ut]+M[ut]-ht-A.altAxis:ft,vt=c&&dt?function(t,n,e){var i=X(t,n,e);return i>e?e:i}(lt,st,pt):X(c?lt:ct,st,c?pt:ft);O[m]=vt,S[m]=vt-st}n.modifiersData[i]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,a=e.modifiersData.popperOffsets,s=q(e.placement),u=Q(s),c=[x,g].indexOf(s)>=0?"height":"width";if(o&&a){var f=function(t,n){return $("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:tt(t,j))}(r.padding,e),d=J(o),h="y"===u?y:x,l="y"===u?w:g,p=e.rects.reference[c]+e.rects.reference[u]-a[u]-e.rects.popper[c],v=a[u]-e.rects.reference[u],b=N(o),m=b?"y"===u?b.clientHeight||0:b.clientWidth||0:0,O=m/2-d[c]/2+(p/2-v/2),k=X(f[h],O,m-d[c]-f[l]);e.modifiersData[i]=((n={})[u]=k,n.centerOffset=k-O,n)}},effect:function(t){var n=t.state,e=t.options.element,i=void 0===e?"[data-popper-arrow]":e;null!=i&&("string"!=typeof i||(i=n.elements.popper.querySelector(i)))&&K(n.elements.popper,i)&&(n.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,i=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,a=mt(n,{elementContext:"reference"}),s=mt(n,{altBoundary:!0}),u=gt(a,i),c=gt(s,r,o),f=xt(u),d=xt(c);n.modifiersData[e]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}}]});const Tt=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.inline=!1,this.placement="bottom-start",this.offset=[0,8],this.closing=!1,this.showing=this.inline||!1,this.positioned=!1,this.originalParent=null,this.originalNextSibling=null,this.isMovingPortal=!1,this.popperInstance=null,this.onKeyDown=t=>{"Escape"===t.code&&this.close()}}watchShowing(t){t||(this.destroyPopperInstance(),this.cleanupPortal()),this.positioned=!1}getAppendToElement(){return this.appendTo?"body"===this.appendTo?document.body:"string"==typeof this.appendTo?document.querySelector(this.appendTo):this.appendTo:null}setupPortal(){const t=this.getAppendToElement();t&&(this.originalParent=this.hostElement.parentElement,this.originalNextSibling=this.hostElement.nextSibling,this.isMovingPortal=!0,t.appendChild(this.hostElement),this.isMovingPortal=!1)}cleanupPortal(){this.isMovingPortal||this.originalParent&&(this.isMovingPortal=!0,this.originalNextSibling?this.originalParent.insertBefore(this.hostElement,this.originalNextSibling):this.originalParent.appendChild(this.hostElement),this.originalParent=null,this.originalNextSibling=null,this.isMovingPortal=!1)}createPopperInstance(){if(!this.triggerElement||!this.bodyRef)return;const t=!!this.appendTo,n=t?"viewport":"clippingParents";this.popperInstance=At(this.triggerElement,this.bodyRef,{placement:this.placement,strategy:t?"fixed":"absolute",modifiers:[{name:"offset",options:{offset:this.offset}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],boundary:n}},{name:"preventOverflow",options:{boundary:n,altAxis:!0,padding:8}},{name:"computeStyles",options:{gpuAcceleration:!0}},{name:"applyStyles",enabled:!0}]}),this.popperInstance.forceUpdate(),this.positioned=!0}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}async open(){this.inline||(this.showing=!0,this.undo=m(this.el),this.opened.emit(void 0))}async close(){var t;this.inline||(this.showing=!1,this.closed.emit(void 0),null===(t=this.undo)||void 0===t||t.call(this),this.triggerElement&&this.triggerElement.focus())}disconnectedCallback(){this.isMovingPortal||(this.destroyPopperInstance(),this.cleanupPortal())}async getState(){return this.showing}async setTriggerElement(t){this.triggerElement=t}async updatePosition(){var t;await(null===(t=this.popperInstance)||void 0===t?void 0:t.update())}handleClick(t){var n;if(this.showing){const e=t.target;this.hostElement.contains(e)||(null===(n=this.triggerElement)||void 0===n?void 0:n.contains(e))||this.originalParent&&this.originalParent.contains(e)||this.close()}}render(){return i(r,{key:"2c9c3ade4eb4964dbb5ba86bd196240851dbb996",showing:this.showing,ref:t=>t&&(this.el=t)},!this.inline&&this.showing&&i("div",{key:"961c2d9e34d7ddadb512f8652f14ed4ed4ec6ce5",part:"body",ref:t=>{t&&(this.bodyRef=t,this.showing&&this.triggerElement&&!this.popperInstance&&(this.setupPortal(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.createPopperInstance()}))}))))},style:{visibility:this.positioned?"visible":"hidden"},onKeyDown:this.onKeyDown,role:"dialog",tabindex:-1,"aria-hidden":!this.showing,"aria-label":this.label,"aria-modal":this.showing},i("focus-trap",{key:"719a3e82aab59326d1aa069b237d158d2311cd62"},i("div",{key:"b33e1aabdb7477409d97f757bf7121697979d50c",part:"content"},i("slot",{key:"c7e85552f37b930e298484c0040c138fdccb8ea7"})))),this.inline&&i("div",{key:"59e0333fb0e980c17e0a1da041e6bc492d025bd8",part:"content"},i("slot",{key:"d52759f124c038fbde4b510ae1df8c3a1bdad25e"})))}get hostElement(){return this}static get watchers(){return{showing:[{watchShowing:0}]}}static get style(){return":host::part(body){position:absolute;top:0;left:0;width:-moz-fit-content;width:fit-content;z-index:1200}:host::part(backdrop){}:host::part(content){}"}},[257,"tabworthy-dates-modal",{label:[1],inline:[4],placement:[1],offset:[16],appendTo:[1,"append-to"],closing:[32],showing:[32],positioned:[32],open:[64],close:[64],getState:[64],setTriggerElement:[64],updatePosition:[64]},[[10,"click","handleClick"]],{showing:[{watchShowing:0}]}]);function St(){"undefined"!=typeof customElements&&["tabworthy-dates-modal"].forEach((t=>{"tabworthy-dates-modal"===t&&(customElements.get(o(t))||customElements.define(o(t),Tt))}))}export{Tt as T,St as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as o,c as s}from"./p-
|
|
1
|
+
import{T as o,c as s}from"./p-C_Pq_S0e.js";const p=o,r=s;export{p as TabworthyDatesCalendar,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as o,d as s}from"./p-
|
|
1
|
+
import{T as o,d as s}from"./p-DXCumu2Y.js";const m=o,p=s;export{m as TabworthyDatesModal,p as defineCustomElement}
|