@moni-labs/moni-ui 0.4.2 → 0.4.3
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/README.md +6 -6
- package/custom-elements.json +8 -8
- package/dist/browser/moni-ui.iife.min.js +56 -0
- package/dist/browser/moni-ui.iife.min.js.br +0 -0
- package/dist/browser/moni-ui.iife.min.js.gz +0 -0
- package/dist/browser/moni-ui.iife.min.js.map +1 -1
- package/dist/browser/moni-ui.min.css +1 -1
- package/dist/browser/moni-ui.min.css.br +0 -0
- package/dist/browser/moni-ui.min.css.gz +0 -0
- package/dist/browser/moni-ui.min.css.map +1 -1
- package/dist/browser/moni-ui.min.js +56 -0
- package/dist/browser/moni-ui.min.js.br +0 -0
- package/dist/browser/moni-ui.min.js.gz +0 -0
- package/dist/browser/moni-ui.min.js.map +1 -1
- package/dist/cdn/chunks/{class-map-DBljv-_e.js → class-map-EVPcxmRq.js} +1 -1
- package/dist/cdn/chunks/{decorate-DxX3e27g.js → decorate-D4jKxi6H.js} +56 -0
- package/dist/cdn/chunks/if-defined-DlAUOFi9.js +1 -0
- package/dist/cdn/chunks/{live-B7Rjg1kt.js → live-DdUrWiUp.js} +1 -1
- package/dist/cdn/components/moni-app-bar.js +1 -1
- package/dist/cdn/components/moni-badge.js +1 -1
- package/dist/cdn/components/moni-bottom-sheet.js +1 -1
- package/dist/cdn/components/moni-button-group.js +1 -1
- package/dist/cdn/components/moni-button-segment.js +1 -1
- package/dist/cdn/components/moni-button.js +1 -1
- package/dist/cdn/components/moni-card.js +1 -1
- package/dist/cdn/components/moni-carousel.js +1 -1
- package/dist/cdn/components/moni-checkbox.js +1 -1
- package/dist/cdn/components/moni-chip.js +1 -1
- package/dist/cdn/components/moni-color-field.js +1 -1
- package/dist/cdn/components/moni-context-menu.js +1 -1
- package/dist/cdn/components/moni-dialog.js +1 -1
- package/dist/cdn/components/moni-divider.js +1 -1
- package/dist/cdn/components/moni-expansion.js +1 -1
- package/dist/cdn/components/moni-fab-menu.js +1 -1
- package/dist/cdn/components/moni-fab.js +1 -1
- package/dist/cdn/components/moni-file-field.js +1 -1
- package/dist/cdn/components/moni-icon.js +1 -1
- package/dist/cdn/components/moni-list-item.js +1 -1
- package/dist/cdn/components/moni-list.js +1 -1
- package/dist/cdn/components/moni-loading-indicator.js +1 -1
- package/dist/cdn/components/moni-menu-item.js +1 -1
- package/dist/cdn/components/moni-menu.js +1 -1
- package/dist/cdn/components/moni-morph-modal.js +1 -1
- package/dist/cdn/components/moni-nav-item.js +1 -1
- package/dist/cdn/components/moni-nav.js +1 -1
- package/dist/cdn/components/moni-progress.js +1 -1
- package/dist/cdn/components/moni-radio.js +1 -1
- package/dist/cdn/components/moni-ripple.js +1 -1
- package/dist/cdn/components/moni-segmented-button.js +1 -1
- package/dist/cdn/components/moni-select-option.js +1 -1
- package/dist/cdn/components/moni-select.js +1 -1
- package/dist/cdn/components/moni-shape.js +1 -1
- package/dist/cdn/components/moni-side-sheet.js +1 -1
- package/dist/cdn/components/moni-slider.js +1 -1
- package/dist/cdn/components/moni-snackbar.js +1 -1
- package/dist/cdn/components/moni-split-button.js +1 -1
- package/dist/cdn/components/moni-step.js +1 -1
- package/dist/cdn/components/moni-stepper.js +1 -1
- package/dist/cdn/components/moni-switch.js +1 -1
- package/dist/cdn/components/moni-tab.js +1 -1
- package/dist/cdn/components/moni-tabs.js +1 -1
- package/dist/cdn/components/moni-text-field.js +1 -1
- package/dist/cdn/components/moni-textarea.js +1 -1
- package/dist/cdn/components/moni-time-picker.js +1 -1
- package/dist/cdn/components/moni-toolbar.js +1 -1
- package/dist/cdn/components/moni-tooltip.js +1 -1
- package/dist/cdn/components/moni-typography.js +1 -1
- package/dist/cdn/importmap.json +98 -98
- package/dist/cdn/moni-ui.min.css +1 -1
- package/dist/components/_base/shared-styles.d.ts.map +1 -1
- package/dist/components/_base/shared-styles.js +56 -0
- package/dist/styles/base.css +27 -7
- package/package.json +1 -1
- package/src/components/_base/shared-styles.test.ts +15 -0
- package/src/components/_base/shared-styles.ts +56 -0
- package/src/styles/base.css +27 -7
- package/dist/cdn/chunks/if-defined-CuEAJKpp.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,d as t,i as n,m as r,o as i,r as a,s as o,t as s}from"../chunks/decorate-DxX3e27g.js";import{t as c}from"../chunks/query-SWT-tzvq.js";import"./moni-icon.js";import{t as l}from"../chunks/gsap-DWxn8li7.js";var u,d,f,p,m,h,g,_,v=`transform`,y=v+`Origin`,b,x=function(e){var t=e.ownerDocument||e;for(!(v in e.style)&&(`msTransform`in e.style)&&(v=`msTransform`,y=v+`Origin`);t.parentNode&&(t=t.parentNode););if(d=window,g=new N,t){u=t,f=t.documentElement,p=t.body,_=u.createElementNS(`http://www.w3.org/2000/svg`,`g`),_.style.transform=`none`;var n=t.createElement(`div`),r=t.createElement(`div`),i=t&&(t.body||t.firstElementChild);i&&i.appendChild&&(i.appendChild(n),n.appendChild(r),n.style.position=`static`,n.style.transform=`translate3d(0,0,1px)`,b=r.offsetParent!==n,i.removeChild(n))}return t},S=function(e){for(var t,n;e&&e!==p;)n=e._gsap,n&&n.uncache&&n.get(e,`x`),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),t?t.push(n):t=[n]),e=e.parentNode;return t},C=[],w=[],T=function(){return d.pageYOffset||u.scrollTop||f.scrollTop||p.scrollTop||0},E=function(){return d.pageXOffset||u.scrollLeft||f.scrollLeft||p.scrollLeft||0},D=function(e){return e.ownerSVGElement||((e.tagName+``).toLowerCase()===`svg`?e:null)},O=function e(t){if(d.getComputedStyle(t).position===`fixed`)return!0;if(t=t.parentNode,t&&t.nodeType===1)return e(t)},k=function e(t,n){if(t.parentNode&&(u||x(t))){var r=D(t),i=r?r.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`:`http://www.w3.org/1999/xhtml`,a=r?n?`rect`:`g`:`div`,o=n===2?100:0,s=n===3?100:0,c={position:`absolute`,display:`block`,pointerEvents:`none`,margin:`0`,padding:`0`},l=u.createElementNS?u.createElementNS(i.replace(/^https/,`http`),a):u.createElement(a);return n&&(r?(h||=e(t),l.setAttribute(`width`,.01),l.setAttribute(`height`,.01),l.setAttribute(`transform`,`translate(`+o+`,`+s+`)`),l.setAttribute(`fill`,`transparent`),h.appendChild(l)):(m||(m=e(t),Object.assign(m.style,c)),Object.assign(l.style,c,{width:`0.1px`,height:`0.1px`,top:s+`px`,left:o+`px`}),m.appendChild(l))),l}throw`Need document and parent.`},A=function(e){for(var t=new N,n=0;n<e.numberOfItems;n++)t.multiply(e.getItem(n).matrix);return t},j=function(e){var t=e.getCTM(),n;return t||(n=e.style[v],e.style[v]=`none`,e.appendChild(_),t=_.getCTM(),e.removeChild(_),n?e.style[v]=n:e.style.removeProperty(v.replace(/([A-Z])/g,`-$1`).toLowerCase())),t||g.clone()},M=function(e,t){var n=D(e),r=e===n,i=n?C:w,a=e.parentNode,o=a&&!n&&a.shadowRoot&&a.shadowRoot.appendChild?a.shadowRoot:a,s,c,l,u,f,p;if(e===d)return e;if(i.length||i.push(k(e,1),k(e,2),k(e,3)),s=n?h:m,n)r?(l=j(e),u=-l.e/l.a,f=-l.f/l.d,c=g):e.getBBox?(l=e.getBBox(),c=e.transform?e.transform.baseVal:{},c=c.numberOfItems?c.numberOfItems>1?A(c):c.getItem(0).matrix:g,u=c.a*l.x+c.c*l.y,f=c.b*l.x+c.d*l.y):(c=new N,u=f=0),t&&e.tagName.toLowerCase()===`g`&&(u=f=0),(r||!e.getBoundingClientRect().width?n:a).appendChild(s),s.setAttribute(`transform`,`matrix(`+c.a+`,`+c.b+`,`+c.c+`,`+c.d+`,`+(c.e+u)+`,`+(c.f+f)+`)`);else{if(u=f=0,b)for(c=e.offsetParent,l=e;(l&&=l.parentNode)&&l!==c&&l.parentNode;)(d.getComputedStyle(l)[v]+``).length>4&&(u=l.offsetLeft,f=l.offsetTop,l=0);if(p=d.getComputedStyle(e),p.position!==`absolute`&&p.position!==`fixed`)for(c=e.offsetParent;a&&a!==c;)u+=a.scrollLeft||0,f+=a.scrollTop||0,a=a.parentNode;l=s.style,l.top=e.offsetTop-f+`px`,l.left=e.offsetLeft-u+`px`,l[v]=p[v],l[y]=p[y],l.position=p.position===`fixed`?`fixed`:`absolute`,o.appendChild(s)}return s},ee=function(e,t,n,r,i,a,o){return e.a=t,e.b=n,e.c=r,e.d=i,e.e=a,e.f=o,e},N=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),ee(this,e,t,n,r,i,a)}var t=e.prototype;return t.inverse=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=e*r-t*n||1e-10;return ee(this,r/o,-t/o,-n/o,e/o,(n*a-r*i)/o,-(e*a-t*i)/o)},t.multiply=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f,s=e.a,c=e.c,l=e.b,u=e.d,d=e.e,f=e.f;return ee(this,s*t+l*r,s*n+l*i,c*t+u*r,c*n+u*i,a+d*t+f*r,o+d*n+f*i)},t.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f;return t===e.a&&n===e.b&&r===e.c&&i===e.d&&a===e.e&&o===e.f},t.apply=function(e,t){t===void 0&&(t={});var n=e.x,r=e.y,i=this.a,a=this.b,o=this.c,s=this.d,c=this.e,l=this.f;return t.x=n*i+r*o+c||0,t.y=n*a+r*s+l||0,t},e}();function P(e,t,n,r){if(!e||!e.parentNode||(u||x(e)).documentElement===e)return new N;var i=S(e),a=D(e)?C:w,o=M(e,n),s=a[0].getBoundingClientRect(),c=a[1].getBoundingClientRect(),l=a[2].getBoundingClientRect(),d=o.parentNode,f=!r&&O(e),p=new N((c.left-s.left)/100,(c.top-s.top)/100,(l.left-s.left)/100,(l.top-s.top)/100,s.left+(f?0:E()),s.top+(f?0:T()));if(d.removeChild(o),i)for(s=i.length;s--;)c=i[s],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?p.inverse():p}var te=1,F,I,L,R,z,B,V,H=function(e,t){return e.actions.forEach(function(e){return e.vars[t]&&e.vars[t](e)})},U={},W=180/Math.PI,ne=Math.PI/180,G={},K={},re={},ie=function(e){return typeof e==`string`?e.split(` `).join(``).split(`,`):e},ae=ie(`onStart,onUpdate,onComplete,onReverseComplete,onInterrupt`),oe=ie(`transform,transformOrigin,width,height,position,top,left,opacity,zIndex,maxWidth,maxHeight,minWidth,minHeight`),q=function(e){return F(e)[0]||console.warn(`Element not found:`,e)},J=function(e){return Math.round(e*1e4)/1e4||0},se=function(e,t,n){return e.forEach(function(e){return e.classList[n](t)})},ce={zIndex:1,kill:1,simple:1,spin:1,clearProps:1,targets:1,toggleClass:1,onComplete:1,onUpdate:1,onInterrupt:1,onStart:1,delay:1,repeat:1,repeatDelay:1,yoyo:1,scale:1,fade:1,absolute:1,props:1,onEnter:1,onLeave:1,custom:1,paused:1,nested:1,prune:1,absoluteOnLeave:1},le={zIndex:1,simple:1,clearProps:1,scale:1,absolute:1,fitChild:1,getVars:1,props:1},ue=function(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()},de=function(e,t){var n={},r;for(r in e)t[r]||(n[r]=e[r]);return n},fe={},pe=function(e){var t=fe[e]=ie(e);return re[e]=t.concat(oe),t},me=function(e){var t=e._gsap||I.core.getCache(e);return t.gmCache===I.ticker.frame?t.gMatrix:(t.gmCache=I.ticker.frame,t.gMatrix=P(e,!0,!1,!0))},he=function e(t,n,r){r===void 0&&(r=0);for(var i=t.parentNode,a=1e3*10**r*(n?-1:1),o=n?-a*900:0;t;)o+=a,t=t.previousSibling;return i?o+e(i,n,r+1):o},ge=function(e,t,n){return e.forEach(function(e){return e.d=he(n?e.element:e.t,t)}),e.sort(function(e,t){return e.d-t.d}),e},_e=function(e,t){for(var n=e.element.style,r=e.css=e.css||[],i=t.length,a,o;i--;)a=t[i],o=n[a]||n.getPropertyValue(a),r.push(o?a:K[a]||(K[a]=ue(a)),o);return n},ve=function(e){var t=e.css,n=e.element.style,r=0;for(e.cache.uncache=1;r<t.length;r+=2)t[r+1]?n[t[r]]=t[r+1]:n.removeProperty(t[r]);!t[t.indexOf(`transform`)+1]&&n.translate&&(n.removeProperty(`translate`),n.removeProperty(`scale`),n.removeProperty(`rotate`))},ye=function(e,t){e.forEach(function(e){return e.a.cache.uncache=1}),t||e.finalStates.forEach(ve)},be=`paddingTop,paddingRight,paddingBottom,paddingLeft,gridArea,transition`.split(`,`),xe=function(e,t,n){var r=e.element,i=e.width,a=e.height,o=e.uncache,s=e.getProp,c=r.style,l=4,u,d,f;if(typeof t!=`object`&&(t=e),L&&n!==1)return L._abs.push({t:r,b:e,a:e,sd:0}),L._final.push(function(){return(e.cache.uncache=1)&&ve(e)}),r;for(d=s(`display`)===`none`,(!e.isVisible||d)&&(d&&(_e(e,[`display`]).display=t.display),e.matrix=t.matrix,e.width=i=e.width||t.width,e.height=a=e.height||t.height),_e(e,be),f=window.getComputedStyle(r);l--;)c[be[l]]=f[be[l]];if(c.gridArea=`1 / 1 / 1 / 1`,c.transition=`none`,c.position=`absolute`,c.width=i+`px`,c.height=a+`px`,c.top||=`0px`,c.left||=`0px`,o)u=new Ue(r);else if(u=de(e,G),u.position=`absolute`,e.simple){var p=r.getBoundingClientRect();u.matrix=new N(1,0,0,1,p.left+E(),p.top+T())}else u.matrix=P(r,!1,!1,!0);return u=je(u,e,!0),e.x=B(u.x,.01),e.y=B(u.y,.01),r},Se=function(e,t){return t!==!0&&(t=F(t),e=e.filter(function(e){if(t.indexOf((e.sd<0?e.b:e.a).element)!==-1)return!0;e.t._gsap.renderTransform(1),e.b.isVisible&&(e.t.style.width=e.b.width+`px`,e.t.style.height=e.b.height+`px`)})),e},Ce=function(e){return ge(e,!0).forEach(function(e){return(e.a.isVisible||e.b.isVisible)&&xe(e.sd<0?e.b:e.a,e.b,1)})},we=function(e,t){return t&&e.idLookup[Te(t).id]||e.elementStates[0]},Te=function(e,t,n,r){return e instanceof Ue?e:e instanceof Y?we(e,r):new Ue(typeof e==`string`?q(e)||console.warn(e+` not found`):e,t,n)},Ee=function(e,t){for(var n=I.getProperty(e.element,null,`native`),r=e.props={},i=t.length;i--;)r[t[i]]=(n(t[i])+``).trim();return r.zIndex&&=parseFloat(r.zIndex)||0,e},De=function(e,t){var n=e.style||e,r;for(r in t)n[r]=t[r]},Oe=function(e){var t=e.getAttribute(`data-flip-id`);return t||e.setAttribute(`data-flip-id`,t=`auto-`+te++),t},ke=function(e){return e.map(function(e){return e.element})},Ae=function(e,t,n){return e&&t.length&&n.add(e(ke(t),n,new Y(t,0,!0)),0)},je=function(e,t,n,r,i,a){var o=e.element,s=e.cache,c=e.parent,l=e.x,u=e.y,d=t.width,f=t.height,p=t.scaleX,m=t.scaleY,h=t.rotation,g=t.bounds,_=a&&V&&V(o,`transform,width,height`),v=e,y=t.matrix,b=y.e,x=y.f,S=e.bounds.width!==g.width||e.bounds.height!==g.height||e.scaleX!==p||e.scaleY!==m||e.rotation!==h,C=!S&&e.simple&&t.simple&&!i,w,T,E,D,O,k,A;return C||!c?(p=m=1,h=w=0):(O=me(c),k=O.clone().multiply(t.ctm?t.matrix.clone().multiply(t.ctm):t.matrix),h=J(Math.atan2(k.b,k.a)*W),w=J(Math.atan2(k.c,k.d)*W+h)%360,p=Math.sqrt(k.a**2+k.b**2),m=Math.sqrt(k.c**2+k.d**2)*Math.cos(w*ne),i&&(i=F(i)[0],D=I.getProperty(i),A=i.getBBox&&typeof i.getBBox==`function`&&i.getBBox(),v={scaleX:D(`scaleX`),scaleY:D(`scaleY`),width:A?A.width:Math.ceil(parseFloat(D(`width`,`px`))),height:A?A.height:parseFloat(D(`height`,`px`))}),s.rotation=h+`deg`,s.skewX=w+`deg`),n?(p*=d===v.width||!v.width?1:d/v.width,m*=f===v.height||!v.height?1:f/v.height,s.scaleX=p,s.scaleY=m):(d=B(d*p/v.scaleX,0),f=B(f*m/v.scaleY,0),o.style.width=d+`px`,o.style.height=f+`px`),r&&De(o,t.props),C||!c?(l+=b-e.matrix.e,u+=x-e.matrix.f):S||c!==t.parent?(s.x=l+`px`,s.y=u+`px`,s.renderTransform(1,s),k=P(i||o,!1,!1,!0),T=O.apply({x:k.e,y:k.f}),E=O.apply({x:b,y:x}),l+=E.x-T.x,u+=E.y-T.y):(O.e=O.f=0,E=O.apply({x:b-e.matrix.e,y:x-e.matrix.f}),l+=E.x,u+=E.y),l=B(l,.02),u=B(u,.02),a&&!(a instanceof Ue)?_&&_.revert():(s.x=l+`px`,s.y=u+`px`,s.renderTransform(1,s)),a&&(a.x=l,a.y=u,a.rotation=h,a.skewX=w,n?(a.scaleX=p,a.scaleY=m):(a.width=d,a.height=f)),a||s},Me=function(e,t){return e instanceof Y?e:new Y(e,t)},Ne=function(e,t,n){var r=e.idLookup[n],i=e.alt[n];return i.isVisible&&(!(t.getElementState(i.element)||i).isVisible||!r.isVisible)?i:r},Pe=[],Fe=`width,height,overflowX,overflowY`.split(`,`),Ie,Le=function(e){if(e!==Ie){var t=z.style,n=z.clientWidth===window.outerWidth,r=z.clientHeight===window.outerHeight,i=4;if(e&&(n||r)){for(;i--;)Pe[i]=t[Fe[i]];n&&(t.width=z.clientWidth+`px`,t.overflowY=`hidden`),r&&(t.height=z.clientHeight+`px`,t.overflowX=`hidden`),Ie=e}else if(Ie){for(;i--;)Pe[i]?t[Fe[i]]=Pe[i]:t.removeProperty(ue(Fe[i]));Ie=e}}},Re=function(e,t){for(var n=0;n<e.length;n+=3)I.set(e[n],{clearProps:!0}),e[n].setAttribute(`style`,e[n+t]),e[n]._gsap.gmCache=-1},ze=function(e,t,n,r){e instanceof Y&&t instanceof Y||console.warn(`Not a valid state object.`),n||={};var i=n,a=i.clearProps,o=i.onEnter,s=i.onLeave,c=i.absolute,l=i.absoluteOnLeave,u=i.custom,d=i.delay,f=i.paused,p=i.repeat,m=i.repeatDelay,h=i.yoyo,g=i.toggleClass,_=i.nested,v=i.zIndex,y=i.scale,b=i.fade,x=i.stagger,S=i.spin,C=i.prune,w=(`props`in n?n:e).props,T=de(n,ce),E=I.timeline({delay:d,paused:f,repeat:p,repeatDelay:m,yoyo:h,data:`isFlip`}),D=T,O=[],k=[],A=[],j=[],M=S===!0?1:S||0,ee=typeof S==`function`?S:function(){return M},N=e.interrupted||t.interrupted,te=E[r===1?`from`:`to`],F,R,z,B,V,H,U,W,ne,G,K,ie,q,J;for(R in t.idLookup)K=t.alt[R]?Ne(t,e,R):t.idLookup[R],V=K.element,G=e.idLookup[R],e.alt[R]&&V===G.element&&(e.alt[R].isVisible||!K.isVisible)&&(G=e.alt[R]),G?(H={t:V,b:G,a:K,sd:G.element===V?0:K.isVisible?1:-1},A.push(H),H.sd&&(H.sd<0&&(H.b=K,H.a=G),N&&_e(H.b,w?re[w]:oe),b&&A.push(H.swap={t:G.element,b:H.b,a:H.a,sd:-H.sd,swap:H})),V._flip=G.element._flip=L?L.timeline:E):K.isVisible&&(A.push({t:V,b:de(K,{isVisible:1}),a:K,sd:0,entering:1}),V._flip=L?L.timeline:E);if(w&&(fe[w]||pe(w)).forEach(function(e){return T[e]=function(t){return A[t].a.props[e]}}),A.finalStates=ne=[],ie=function(){ge(A),Le(!0);var t=[];for(B=0;B<A.length;B++)H=A[B],q=H.a,J=H.b,C&&!q.isDifferent(J)&&!H.entering?A.splice(B--,1):(V=H.t,_&&!(H.sd<0)&&B&&(q=H.a=q.clone({matrix:P(V,!1,!1,!0)})),J.isVisible&&q.isVisible?(H.sd<0?(_&&Re(t,1),U=new Ue(V,w,e.simple),je(U,q,y,0,0,U),U.matrix=P(V,!1,!1,!0),U.bounds=V.getBoundingClientRect(),U.css=H.b.css,H.a=q=U,b&&(V.style.opacity=N?J.opacity:q.opacity),x&&j.push(V),_&&(Re(t,2),t.push(V,V.getAttribute(`style`)))):H.sd>0&&b&&(V.style.opacity=N?q.opacity-J.opacity:`0`),je(q,J,y,w),_&&H.sd<0&&t.push(V.getAttribute(`style`))):J.isVisible!==q.isVisible&&(J.isVisible?q.isVisible||(J.css=q.css,k.push(J),A.splice(B--,1),c&&_&&je(q,J,y,w)):(q.isVisible&&O.push(q),A.splice(B--,1))),y||(V.style.maxWidth=Math.max(q.width,J.width)+`px`,V.style.maxHeight=Math.max(q.height,J.height)+`px`,V.style.minWidth=Math.min(q.width,J.width)+`px`,V.style.minHeight=Math.min(q.height,J.height)+`px`),_&&g&&V.classList.add(g)),ne.push(q);var r;if(g&&(r=ne.map(function(e){return e.element}),_&&r.forEach(function(e){return e.classList.remove(g)})),Le(!1),y?(T.scaleX=function(e){return A[e].a.scaleX},T.scaleY=function(e){return A[e].a.scaleY}):(T.width=function(e){return A[e].a.width+`px`},T.height=function(e){return A[e].a.height+`px`},T.autoRound=n.autoRound||!1),T.x=function(e){return A[e].a.x+`px`},T.y=function(e){return A[e].a.y+`px`},T.rotation=function(e){return A[e].a.rotation+(S?ee(e,W[e],W)*360:0)},T.skewX=function(e){return A[e].a.skewX},W=A.map(function(e){return e.t}),(v||v===0)&&(T.modifiers={zIndex:function(){return v}},T.zIndex=v,T.immediateRender=n.immediateRender!==!1),b&&(T.opacity=function(e){return A[e].sd<0?0:A[e].sd>0?A[e].a.opacity:`+=0`}),j.length){x=I.utils.distribute(x);var i=W.slice(j.length);T.stagger=function(e,t){return x(~j.indexOf(t)?W.indexOf(A[e].swap.t):e,t,i)}}if(ae.forEach(function(e){return n[e]&&E.eventCallback(e,n[e],n[e+`Params`])}),u&&W.length)for(R in D=de(T,ce),`scale`in u&&(u.scaleX=u.scaleY=u.scale,delete u.scale),u)F=de(u[R],le),F[R]=T[R],!(`duration`in F)&&`duration`in T&&(F.duration=T.duration),F.stagger=T.stagger,te.call(E,W,F,0),delete D[R];(W.length||k.length||O.length)&&(g&&E.add(function(){return se(r,g,E._zTime<0?`remove`:`add`)},0)&&!f&&se(r,g,`add`),W.length&&te.call(E,W,D,0)),Ae(o,O,E),Ae(s,k,E);var l=L&&L.timeline;l&&(l.add(E,0),L._final.push(function(){return ye(A,!a)})),z=E.duration(),E.call(function(){var e=E.time()>=z;e&&!l&&ye(A,!a),g&&se(r,g,e?`remove`:`add`)})},l&&(c=A.filter(function(e){return!e.sd&&!e.a.isVisible&&e.b.isVisible}).map(function(e){return e.a.element})),L){var ue;c&&(ue=L._abs).push.apply(ue,Se(A,c)),L._run.push(ie)}else c&&Ce(Se(A,c)),ie();var me=L?L.timeline:E;return me.revert=function(){return Ve(me,1,1)},me},Be=function e(t){t.vars.onInterrupt&&t.vars.onInterrupt.apply(t,t.vars.onInterruptParams||[]),t.getChildren(!0,!1,!0).forEach(e)},Ve=function(e,t,n){if(e&&e.progress()<1&&(!e.paused()||n))return t&&(Be(e),t<2&&e.progress(1),e.kill()),!0},He=function(e){for(var t=e.idLookup={},n=e.alt={},r=e.elementStates,i=r.length,a;i--;)a=r[i],t[a.id]?n[a.id]=a:t[a.id]=a},Y=function(){function e(e,t,n){if(this.props=t&&t.props,this.simple=!!(t&&t.simple),n)this.targets=ke(e),this.elementStates=e,He(this);else{this.targets=F(e);var r=t&&(t.kill===!1||t.batch&&!t.kill);L&&!r&&L._kill.push(this),this.update(r||!!L)}}var t=e.prototype;return t.update=function(e){var t=this;return this.elementStates=this.targets.map(function(e){return new Ue(e,t.props,t.simple)}),He(this),this.interrupt(e),this.recordInlineStyles(),this},t.clear=function(){return this.targets.length=this.elementStates.length=0,He(this),this},t.fit=function(e,t,n){for(var r=ge(this.elementStates.slice(0),!1,!0),i=(e||this).idLookup,a=0,o,s;a<r.length;a++)o=r[a],n&&(o.matrix=P(o.element,!1,!1,!0)),s=i[o.id],s&&je(o,s,t,!0,0,o),o.matrix=P(o.element,!1,!1,!0);return this},t.getProperty=function(e,t){var n=this.getElementState(e)||G;return(t in n?n:n.props||G)[t]},t.add=function(e){for(var t=e.targets.length,n=this.idLookup,r=this.alt,i,a,o;t--;)a=e.elementStates[t],o=n[a.id],o&&(a.element===o.element||r[a.id]&&r[a.id].element===a.element)?(i=this.elementStates.indexOf(a.element===o.element?o:r[a.id]),this.targets.splice(i,1,e.targets[t]),this.elementStates.splice(i,1,a)):(this.targets.push(e.targets[t]),this.elementStates.push(a));return e.interrupted&&(this.interrupted=!0),e.simple||(this.simple=!1),He(this),this},t.compare=function(e){var t=e.idLookup,n=this.idLookup,r=[],i=[],a=[],o=[],s=[],c=e.alt,l=this.alt,u=function(e,t,n){return(e.isVisible===t.isVisible?e.isVisible?i:r:e.isVisible?a:o).push(n)&&s.push(n)},d=function(e,t,n){return s.indexOf(n)<0&&u(e,t,n)},f,p,m,h,g,_,v,y;for(m in t)g=c[m],_=l[m],f=g?Ne(e,this,m):t[m],h=f.element,p=n[m],_?(y=p.isVisible||!_.isVisible&&h===p.element?p:_,v=g&&!f.isVisible&&!g.isVisible&&y.element===g.element?g:f,v.isVisible&&y.isVisible&&v.element!==y.element?((v.isDifferent(y)?i:r).push(v.element,y.element),s.push(v.element,y.element)):u(v,y,v.element),g&&v.element===g.element&&(g=t[m]),d(v.element!==p.element&&g?g:v,p,p.element),d(g&&g.element===_.element?g:v,_,_.element),g&&d(g,_.element===g.element?_:p,g.element)):(p?p.isDifferent(f)?u(f,p,h):r.push(h):a.push(h),g&&d(g,p,g.element));for(m in n)t[m]||(o.push(n[m].element),l[m]&&o.push(l[m].element));return{changed:i,unchanged:r,enter:a,leave:o}},t.recordInlineStyles=function(){for(var e=re[this.props]||oe,t=this.elementStates.length;t--;)_e(this.elementStates[t],e)},t.interrupt=function(e){var t=this,n=[];this.targets.forEach(function(r){var i=r._flip,a=Ve(i,+!e);e&&a&&n.indexOf(i)<0&&i.add(function(){return t.updateVisibility()}),a&&n.push(i)}),!e&&n.length&&this.updateVisibility(),this.interrupted||=!!n.length},t.updateVisibility=function(){this.elementStates.forEach(function(e){var t=e.element.getBoundingClientRect();e.isVisible=!!(t.width||t.height||t.top||t.left),e.uncache=1})},t.getElementState=function(e){return this.elementStates[this.targets.indexOf(q(e))]},t.makeAbsolute=function(){return ge(this.elementStates.slice(0),!0,!0).map(xe)},e}(),Ue=function(){function e(t,n,r){t instanceof e?Object.assign(this,t,n||{}):(this.element=t,this.update(n,r))}var t=e.prototype;return t.isDifferent=function(e){var t=this.bounds,n=e.bounds;return t.top!==n.top||t.left!==n.left||t.width!==n.width||t.height!==n.height||!this.matrix.equals(e.matrix)||this.opacity!==e.opacity||this.props&&e.props&&JSON.stringify(this.props)!==JSON.stringify(e.props)},t.clone=function(t){return new e(this,t)},t.update=function(e,t){var n=this,r=n.element,i=I.getProperty(r),a=I.core.getCache(r),o=r.getBoundingClientRect(),s=r.getBBox&&typeof r.getBBox==`function`&&r.nodeName.toLowerCase()!==`svg`&&r.getBBox(),c=t?new N(1,0,0,1,o.left+E(),o.top+T()):P(r,!1,!1,!0);a.uncache=1,n.getProp=i,n.element=r,n.id=Oe(r),n.matrix=c,n.cache=a,n.bounds=o,n.isVisible=!!(o.width||o.height||o.left||o.top),n.display=i(`display`),n.position=i(`position`),n.parent=r.parentNode,n.x=i(`x`,`px`),n.y=i(`y`,`px`),n.scaleX=a.scaleX,n.scaleY=a.scaleY,n.rotation=i(`rotation`),n.skewX=i(`skewX`),n.opacity=i(`opacity`),n.width=s?s.width:B(i(`width`,`px`),.04),n.height=s?s.height:B(i(`height`,`px`),.04),e&&Ee(n,fe[e]||pe(e)),n.ctm=r.getCTM&&r.nodeName.toLowerCase()===`svg`&&j(r).inverse(),n.simple=t||J(c.a)===1&&!J(c.b)&&!J(c.c)&&J(c.d)===1,n.uncache=0},e}(),We=function(){function e(e,t){this.vars=e,this.batch=t,this.states=[],this.timeline=t.timeline}var t=e.prototype;return t.getStateById=function(e){for(var t=this.states.length;t--;)if(this.states[t].idLookup[e])return this.states[t]},t.kill=function(){this.batch.remove(this)},e}(),Ge=function(){function e(e){this.id=e,this.actions=[],this._kill=[],this._final=[],this._abs=[],this._run=[],this.data={},this.state=new Y,this.timeline=I.timeline()}var t=e.prototype;return t.add=function(e){var t=this.actions.filter(function(t){return t.vars===e});return t.length?t[0]:(t=new We(typeof e==`function`?{animate:e}:e,this),this.actions.push(t),t)},t.remove=function(e){var t=this.actions.indexOf(e);return t>=0&&this.actions.splice(t,1),this},t.getState=function(e){var t=this,n=L,r=R;return L=this,this.state.clear(),this._kill.length=0,this.actions.forEach(function(n){n.vars.getState&&(n.states.length=0,R=n,n.state=n.vars.getState(n)),e&&n.states.forEach(function(e){return t.state.add(e)})}),R=r,L=n,this.killConflicts(),this},t.animate=function(){var e=this,t=L,n=this.timeline,r=this.actions.length,i,a;for(L=this,n.clear(),this._abs.length=this._final.length=this._run.length=0,this.actions.forEach(function(e){e.vars.animate&&e.vars.animate(e);var t=e.vars.onEnter,n=e.vars.onLeave,r=e.targets,i,a;r&&r.length&&(t||n)&&(i=new Y,e.states.forEach(function(e){return i.add(e)}),a=i.compare(X.getState(r)),a.enter.length&&t&&t(a.enter),a.leave.length&&n&&n(a.leave))}),Ce(this._abs),this._run.forEach(function(e){return e()}),a=n.duration(),i=this._final.slice(0),n.add(function(){a<=n.time()&&(i.forEach(function(e){return e()}),H(e,`onComplete`))}),L=t;r--;)this.actions[r].vars.once&&this.actions[r].kill();return H(this,`onStart`),n.restart(),this},t.loadState=function(e){e||=function(){return 0};var t=[];return this.actions.forEach(function(n){if(n.vars.loadState){var r,i=function i(a){a&&(n.targets=a),r=t.indexOf(i),~r&&(t.splice(r,1),t.length||e())};t.push(i),n.vars.loadState(i)}}),t.length||e(),this},t.setState=function(){return this.actions.forEach(function(e){return e.targets=e.vars.setState&&e.vars.setState(e)}),this},t.killConflicts=function(e){return this.state.interrupt(e),this._kill.forEach(function(t){return t.interrupt(e)}),this},t.run=function(e,t){var n=this;return this!==L&&(e||this.getState(t),this.loadState(function(){n._killed||(n.setState(),n.animate())})),this},t.clear=function(e){this.state.clear(),e||(this.actions.length=0)},t.getStateById=function(e){for(var t=this.actions.length,n;t--;)if(n=this.actions[t].getStateById(e),n)return n;return this.state.idLookup[e]&&this.state},t.kill=function(){this._killed=1,this.clear(),delete U[this.id]},e}(),X=function(){function e(){}return e.getState=function(t,n){var r=Me(t,n);return R&&R.states.push(r),n&&n.batch&&e.batch(n.batch).state.add(r),r},e.from=function(e,t){return t||={},`clearProps`in t||(t.clearProps=!0),ze(e,Me(t.targets||e.targets,{props:t.props||e.props,simple:t.simple,kill:!!t.kill}),t,-1)},e.to=function(e,t){return ze(e,Me(t.targets||e.targets,{props:t.props||e.props,simple:t.simple,kill:!!t.kill}),t,1)},e.fromTo=function(e,t,n){return ze(e,t,n)},e.fit=function(e,t,n){var r=n?de(n,le):{},i=n||r,a=i.absolute,o=i.scale,s=i.getVars,c=i.props,l=i.runBackwards,u=i.onComplete,d=i.simple,f=n&&n.fitChild&&q(n.fitChild),p=Te(t,c,d,e),m=Te(e,0,d,p),h=c?re[c]:oe,g=I.context();return c&&De(r,p.props),_e(m,h),l&&(`immediateRender`in r||(r.immediateRender=!0),r.onComplete=function(){ve(m),u&&u.apply(this,arguments)}),a&&xe(m,p),r=je(m,p,o||f,!r.duration&&c,f,r.duration||s?r:0),typeof n==`object`&&`zIndex`in n&&(r.zIndex=n.zIndex),g&&!s&&g.add(function(){return function(){return ve(m)}}),s?r:r.duration?I.to(m.element,r):null},e.makeAbsolute=function(e,t){return(e instanceof Y?e:new Y(e,t)).makeAbsolute()},e.batch=function(e){return e||=`default`,U[e]||(U[e]=new Ge(e))},e.killFlipsOf=function(e,t){(e instanceof Y?e.targets:F(e)).forEach(function(e){return e&&Ve(e._flip,t===!1?2:1)})},e.isFlipping=function(t){var n=e.getByTarget(t);return!!n&&n.isActive()},e.getByTarget=function(e){return(q(e)||G)._flip},e.getElementState=function(e,t){return new Ue(q(e),t)},e.convertCoordinates=function(e,t,n){var r=P(t,!0,!0).multiply(P(e));return n?r.apply(n):r},e.register=function(e){if(z=typeof document<`u`&&document.body,z){I=e,x(z),F=I.utils.toArray,V=I.core.getStyleSaver;var t=I.utils.snap(.1);B=function(e,n){return t(parseFloat(e)+n)}}},e}();X.version=`3.15.0`,typeof window<`u`&&window.gsap&&window.gsap.registerPlugin(X);var Ke=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,qe=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,Je=Math.PI/180;180/Math.PI;var Ye=Math.sin,Xe=Math.cos,Ze=Math.abs,Qe=Math.sqrt,$e=function(e){return typeof e==`number`},et=1e5,tt=function(e){return Math.round(e*et)/et||0},nt=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001};function rt(e,t,n,r,i,a,o){for(var s=e.length,c,l,u,d,f;--s>-1;)for(c=e[s],l=c.length,u=0;u<l;u+=2)d=c[u],f=c[u+1],c[u]=d*t+f*r+a,c[u+1]=d*n+f*i+o;return e._dirty=1,e}function it(e,t,n,r,i,a,o,s,c){if(e!==s||t!==c){n=Ze(n),r=Ze(r);var l=i%360*Je,u=Xe(l),d=Ye(l),f=Math.PI,p=f*2,m=(e-s)/2,h=(t-c)/2,g=u*m+d*h,_=-d*m+u*h,v=g*g,y=_*_,b=v/(n*n)+y/(r*r);b>1&&(n=Qe(b)*n,r=Qe(b)*r);var x=n*n,S=r*r,C=(x*S-x*y-S*v)/(x*y+S*v);C<0&&(C=0);var w=(a===o?-1:1)*Qe(C),T=w*(n*_/r),E=w*-(r*g/n),D=(e+s)/2,O=(t+c)/2,k=D+(u*T-d*E),A=O+(d*T+u*E),j=(g-T)/n,M=(_-E)/r,ee=(-g-T)/n,N=(-_-E)/r,P=j*j+M*M,te=(M<0?-1:1)*Math.acos(j/Qe(P)),F=(j*N-M*ee<0?-1:1)*Math.acos((j*ee+M*N)/Qe(P*(ee*ee+N*N)));isNaN(F)&&(F=f),!o&&F>0?F-=p:o&&F<0&&(F+=p),te%=p,F%=p;var I=Math.ceil(Ze(F)/(p/4)),L=[],R=F/I,z=4/3*Ye(R/2)/(1+Xe(R/2)),B=u*n,V=d*n,H=d*-r,U=u*r,W;for(W=0;W<I;W++)i=te+W*R,g=Xe(i),_=Ye(i),j=Xe(i+=R),M=Ye(i),L.push(g-z*_,_+z*g,j+z*M,M-z*j,j,M);for(W=0;W<L.length;W+=2)g=L[W],_=L[W+1],L[W]=g*B+_*H+k,L[W+1]=g*V+_*U+A;return L[W-2]=s,L[W-1]=c,L}}function at(e){var t=(e+``).replace(qe,function(e){var t=+e;return t<1e-4&&t>-1e-4?0:t}).match(Ke)||[],n=[],r=0,i=0,a=2/3,o=t.length,s=0,c=`ERROR: malformed path: `+e,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=function(e,t,n,r){v=(n-e)/3,y=(r-t)/3,h.push(e+v,t+y,n-v,r-y,n,r)};if(!e||!isNaN(t[0])||isNaN(t[1]))return console.log(c),n;for(l=0;l<o;l++)if(x=p,isNaN(t[l])?(p=t[l].toUpperCase(),m=p!==t[l]):l--,d=+t[l+1],f=+t[l+2],m&&(d+=r,f+=i),l||(g=d,_=f),p===`M`)h&&(h.length<8?--n.length:s+=h.length,nt(h)),r=g=d,i=_=f,h=[d,f],n.push(h),l+=2,p=`L`;else if(p===`C`)h||=[0,0],m||(r=i=0),h.push(d,f,r+t[l+3]*1,i+t[l+4]*1,r+=t[l+5]*1,i+=t[l+6]*1),l+=6;else if(p===`S`)v=r,y=i,(x===`C`||x===`S`)&&(v+=r-h[h.length-4],y+=i-h[h.length-3]),m||(r=i=0),h.push(v,y,d,f,r+=t[l+3]*1,i+=t[l+4]*1),l+=4;else if(p===`Q`)v=r+(d-r)*a,y=i+(f-i)*a,m||(r=i=0),r+=t[l+3]*1,i+=t[l+4]*1,h.push(v,y,r+(d-r)*a,i+(f-i)*a,r,i),l+=4;else if(p===`T`)v=r-h[h.length-4],y=i-h[h.length-3],h.push(r+v,i+y,d+(r+v*1.5-d)*a,f+(i+y*1.5-f)*a,r=d,i=f),l+=2;else if(p===`H`)w(r,i,r=d,i),l+=1;else if(p===`V`)w(r,i,r,i=d+(m?i-r:0)),l+=1;else if(p===`L`||p===`Z`)p===`Z`&&(d=g,f=_,h.closed=!0),(p===`L`||Ze(r-d)>.5||Ze(i-f)>.5)&&(w(r,i,d,f),p===`L`&&(l+=2)),r=d,i=f;else if(p===`A`){if(S=t[l+4],C=t[l+5],v=t[l+6],y=t[l+7],u=7,S.length>1&&(S.length<3?(y=v,v=C,u--):(y=C,v=S.substr(2),u-=2),C=S.charAt(1),S=S.charAt(0)),b=it(r,i,+t[l+1],+t[l+2],+t[l+3],+S,+C,(m?r:0)+v*1,(m?i:0)+y*1),l+=u,b)for(u=0;u<b.length;u++)h.push(b[u]);r=h[h.length-2],i=h[h.length-1]}else console.log(c);return l=h.length,l<6?(n.pop(),l=0):nt(h),n.totalPoints=s+l,n}function ot(e){$e(e[0])&&(e=[e]);var t=``,n=e.length,r,i,a,o;for(i=0;i<n;i++){for(o=e[i],t+=`M`+tt(o[0])+`,`+tt(o[1])+` C`,r=o.length,a=2;a<r;a++)t+=tt(o[a++])+`,`+tt(o[a++])+` `+tt(o[a++])+`,`+tt(o[a++])+` `+tt(o[a++])+`,`+tt(o[a])+` `;o.closed&&(t+=`z`)}return t}var Z,st,ct=function(){return Z||typeof window<`u`&&(Z=window.gsap)&&Z.registerPlugin&&Z},lt=function(){Z=ct(),Z?(Z.registerEase(`_CE`,vt.create),st=1):console.warn(`Please gsap.registerPlugin(CustomEase)`)},ut=0x56bc75e2d63100000,dt=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},ft=1,pt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,mt=/[cLlsSaAhHvVtTqQ]/g,ht=function(e){var t=e.length,n=ut,r;for(r=1;r<t;r+=6)+e[r]<n&&(n=+e[r]);return n},gt=function(e,t,n){!n&&n!==0&&(n=Math.max(+e[e.length-1],+e[1]));var r=e[0]*-1,i=-n,a=e.length,o=1/(+e[a-2]+r),s=-t||(Math.abs(e[a-1]-+e[1])<.01*(e[a-2]-+e[0])?ht(e)+i:+e[a-1]+i),c;for(s=s?1/s:-o,c=0;c<a;c+=2)e[c]=(+e[c]+r)*o,e[c+1]=(+e[c+1]+i)*s},_t=function e(t,n,r,i,a,o,s,c,l,u,d){var f=(t+r)/2,p=(n+i)/2,m=(r+a)/2,h=(i+o)/2,g=(a+s)/2,_=(o+c)/2,v=(f+m)/2,y=(p+h)/2,b=(m+g)/2,x=(h+_)/2,S=(v+b)/2,C=(y+x)/2,w=s-t,T=c-n,E=Math.abs((r-s)*T-(i-c)*w),D=Math.abs((a-s)*T-(o-c)*w),O;return u||(u=[{x:t,y:n},{x:s,y:c}],d=1),u.splice(d||u.length-1,0,{x:S,y:C}),(E+D)*(E+D)>l*(w*w+T*T)&&(O=u.length,e(t,n,f,p,v,y,S,C,l,u,d),e(S,C,b,x,g,_,s,c,l,u,d+1+(u.length-O))),u},vt=function(){function e(e,t,n){st||lt(),this.id=e,ft&&this.setData(t,n)}var t=e.prototype;return t.setData=function(e,t){t||={},e||=`0,0,1,1`;var n=e.match(pt),r=1,i=[],a=[],o=t.precision||1,s=o<=1,c,l,u,d,f,p,m,h,g;if(this.data=e,(mt.test(e)||~e.indexOf(`M`)&&e.indexOf(`C`)<0)&&(n=at(e)[0]),c=n.length,c===4)n.unshift(0,0),n.push(1,1),c=8;else if((c-2)%6)throw`Invalid CustomEase`;for((+n[0]!=0||+n[c-2]!=1)&>(n,t.height,t.originY),this.segment=n,d=2;d<c;d+=6)l={x:+n[d-2],y:+n[d-1]},u={x:+n[d+4],y:+n[d+5]},i.push(l,u),_t(l.x,l.y,+n[d],+n[d+1],+n[d+2],+n[d+3],u.x,u.y,1/(o*2e5),i,i.length-1);for(c=i.length,d=0;d<c;d++)m=i[d],h=i[d-1]||m,(m.x>h.x||h.y!==m.y&&h.x===m.x||m===h)&&m.x<=1?(h.cx=m.x-h.x,h.cy=m.y-h.y,h.n=m,h.nx=m.x,s&&d>1&&Math.abs(h.cy/h.cx-i[d-2].cy/i[d-2].cx)>2&&(s=0),h.cx<r&&(h.cx?r=h.cx:(h.cx=.001,d===c-1&&(h.x-=.001,r=Math.min(r,.001),s=0)))):(i.splice(d--,1),c--);if(c=1/r+1|0,f=1/c,p=0,m=i[0],s){for(d=0;d<c;d++)g=d*f,m.nx<g&&(m=i[++p]),l=m.y+(g-m.x)/m.cx*m.cy,a[d]={x:g,cx:f,y:l,cy:0,nx:9},d&&(a[d-1].cy=l-a[d-1].y);p=i[i.length-1],a[c-1].cy=p.y-l,a[c-1].cx=p.x-a[a.length-1].x}else{for(d=0;d<c;d++)m.nx<d*f&&(m=i[++p]),a[d]=m;p<i.length-1&&(a[d-1]=i[i.length-2])}return this.ease=function(e){var t=a[e*c|0]||a[c-1];return t.nx<e&&(t=t.n),t.y+(e-t.x)/t.cx*t.cy},this.ease.custom=this,this.id&&Z&&Z.registerEase(this.id,this.ease),this},t.getSVGData=function(t){return e.getSVGData(this,t)},e.create=function(t,n,r){return new e(t,n,r).ease},e.register=function(e){Z=e,lt()},e.get=function(e){return Z.parseEase(e)},e.getSVGData=function(t,n){n||={};var r=n.width||100,i=n.height||100,a=n.x||0,o=(n.y||0)+i,s=Z.utils.toArray(n.path)[0],c,l,u,d,f,p,m,h,g,_;if(n.invert&&(i=-i,o=0),typeof t==`string`&&(t=Z.parseEase(t)),t.custom&&(t=t.custom),t instanceof e)c=ot(rt([t.segment.slice(0)],r,0,0,-i,a,o));else{for(c=[a,o],m=Math.max(5,(n.precision||1)*200),d=1/m,m+=2,h=5/m,g=dt(a+d*r),_=dt(o+t(d)*-i),l=(_-o)/(g-a),u=2;u<m;u++)f=dt(a+u*d*r),p=dt(o+t(u*d)*-i),(Math.abs((p-_)/(f-g)-l)>h||u===m-1)&&(c.push(g,_),l=(p-_)/(f-g)),g=f,_=p;c=`M`+c.join(`,`)}return s&&s.setAttribute(`d`,c),c},e}();vt.version=`3.15.0`,vt.headless=!0,ct()&&Z.registerPlugin(vt);var yt;l.registerPlugin(X,vt),vt.create(`morph-open`,`0.15, 0.85, 0.2, 1`),vt.create(`morph-close`,`0.4, 0, 0.2, 1`);var Q={fromAttribute:e=>e!==`false`&&e!==null,toAttribute:e=>e?``:null},$=class extends n{static{yt=this}constructor(...e){super(...e),this.target=``,this.open=!1,this.modal=!0,this.placement=`center`,this.expandedWidth=`22rem`,this.expandedHeight=`18rem`,this.closeOnClickOutside=!0,this.closeOnEsc=!0,this.showCloseButton=!1,this.morphLabel=!1,this.morphLabelSelector=``,this.hasBackdrop=!0,this.hideTarget=!1,this.coverTarget=!1,this.autoSize=!1,this.blurContent=!1,this._hasHeader=!1,this._hasFooter=!1,this._hasTriggerLabel=!1,this._targetEl=null,this._isAnimating=!1,this._visible=!1,this._handlingOpenChange=!1,this._zIndex=100,this._morphEls={text:null,icon:null},this._targetStylesCache=new Map,this._onTargetClick=()=>this.show(),this._onDocKeydown=e=>this._handleDocKeydown(e),this._onDocClick=e=>{!this.open||!this._visible||!this.closeOnClickOutside||e.composedPath().includes(this._panel)||this._targetEl&&e.composedPath().includes(this._targetEl)||this.hide()}}static{this._openStack=[]}connectedCallback(){super.connectedCallback(),this._resolveTarget(),document.addEventListener(`keydown`,this._onDocKeydown),document.addEventListener(`click`,this._onDocClick)}disconnectedCallback(){document.removeEventListener(`keydown`,this._onDocKeydown),document.removeEventListener(`click`,this._onDocClick),this._targetEl&&this._targetEl.removeEventListener(`click`,this._onTargetClick);let e=yt._openStack.indexOf(this);e>-1&&yt._openStack.splice(e,1),this.style.removeProperty(`z-index`),this.style.removeProperty(`--_z-index`),this.style.removeProperty(`--_backdrop-duration`),this.style.removeProperty(`--_backdrop-ease`),this._cleanupMorphElements(),this._restoreTargetContent(),super.disconnectedCallback()}updated(e){super.updated(e),e.has(`target`)&&this._resolveTarget(),e.has(`open`)&&!this._handlingOpenChange&&(this.open?this.show():this.hide())}_resolveTarget(){if(!this.target)return;let e=document.querySelector(this.target);e&&(this._targetEl&&this._targetEl!==e&&this._targetEl.removeEventListener(`click`,this._onTargetClick),this._targetEl=e,this._targetEl.addEventListener(`click`,this._onTargetClick))}show(){if(!(this._isAnimating||this._visible)){if(this._targetEl||this._resolveTarget(),!this._targetEl){console.warn(`[moni-morph-modal] cannot show: target not found`);return}this._isAnimating=!0,this._handlingOpenChange=!0,this.open=!0,this._handlingOpenChange=!1,yt._openStack.push(this),this._zIndex=1e3+yt._openStack.length,this.style.zIndex=String(this._zIndex),this.style.setProperty(`--_z-index`,String(this._zIndex)),this.style.setProperty(`--_backdrop-duration`,`0.38s`),this.style.setProperty(`--_backdrop-ease`,`cubic-bezier(0.15, 0.85, 0.2, 1)`),this._hideTargetContent(),this.updateComplete.then(async()=>{if(!this._targetEl||!this._panel||!this._inner){this._isAnimating=!1;return}this._panel.classList.add(`is-animating`),await new Promise(e=>requestAnimationFrame(e));let e=this._getTargetState(this._targetEl),t=this._panel;this._applyRect(t,e.rect),t.style.backgroundColor=e.backgroundColor,t.style.color=e.color,t.style.borderRadius=e.borderRadius,t.style.boxShadow=`none`,t.style.zIndex=String(this._zIndex),t.style.visibility=`visible`,t.style.opacity=`1`,t.style.pointerEvents=`auto`,this._backdrop&&(this._backdrop.style.zIndex=String(this._zIndex-1)),this._cleanupMorphElements();let n=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,r=this._shouldMorphLabel()&&!n,i=[],a=null,o=this.shadowRoot.querySelector(`.header-morph-wrapper`);if(r){if(this._animateLabelOpen(),a=this._resolveMorphSource(),a.text){let e=this._createMorphText(a.text.content,a.text.sourceEl);this._positionElement(e,a.text.rect),i.push(e)}if(a.icon){let e=this._createMorphIcon(a.icon.element);this._positionElement(e,a.icon.rect),i.push(e)}i.length===0&&(r=!1)}r&&o&&(o.style.opacity=`0`);let s=X.getState(t,{props:`backgroundColor,borderRadius,color,boxShadow`}),c=X.getState(i,{props:`color,fontSize,fontWeight,lineHeight`}),u;if(this.autoSize){let e=t.style.getPropertyValue(`--_panel-width`),n=t.style.getPropertyValue(`--_panel-height`),r=t.style.width,i=t.style.height;t.style.width=`auto`,t.style.height=`auto`,t.style.setProperty(`--_panel-width`,`max-content`),t.style.setProperty(`--_panel-height`,`max-content`);let a=this.shadowRoot.querySelector(`.body`),o=a?a.style.overflow:``;a&&(a.style.overflow=`visible`),u={width:this._inner.scrollWidth,height:this._inner.scrollHeight},t.style.setProperty(`--_panel-width`,e),t.style.setProperty(`--_panel-height`,n),t.style.width=r,t.style.height=i,a&&(a.style.overflow=o)}let d=this._computeFinalRect(e.rect,u);if(t.style.setProperty(`--_panel-width`,`${d.width}px`),t.style.setProperty(`--_panel-height`,`${d.height}px`),this._applyRect(t,d),t.style.backgroundColor=``,t.style.color=``,t.style.borderRadius=``,t.style.boxShadow=``,r&&a){let e=this._measureHeaderTextRect(),t=this._measureHeaderIconRect(),n=window.getComputedStyle(this._header);this._morphEls.text&&e&&(this._positionElement(this._morphEls.text,e),this._morphEls.text.style.color=n.color||`var(--on-surface)`,this._morphEls.text.style.fontSize=n.fontSize||`inherit`,this._morphEls.text.style.fontWeight=n.fontWeight||`inherit`,this._morphEls.text.style.lineHeight=n.lineHeight||`inherit`),this._morphEls.icon&&t&&(this._positionElement(this._morphEls.icon,t),this._morphEls.icon.style.color=n.color||`var(--on-surface)`)}if(X.from(s,{targets:t,duration:.38,ease:`morph-open`,zIndex:this._zIndex,onComplete:()=>{this._isAnimating=!1,this._visible=!0,this._cleanupMorphElements(),o&&(o.style.opacity=`1`)}}),i.length>0){this.blurContent&&l.set(i,{filter:`blur(16px)`});let e={targets:i,duration:.38,ease:`morph-open`,zIndex:this._zIndex+10};this.blurContent&&(e.filter=`blur(0px)`,e.clearProps=`filter`),X.from(c,e)}let f=[this.shadowRoot.querySelector(`.body`),this.shadowRoot.querySelector(`footer`),this.shadowRoot.querySelector(`.close-btn`)].filter(Boolean),p=this.blurContent?`blur(16px)`:`blur(0px)`;l.set(f,{opacity:0,y:8,filter:p}),l.fromTo(f,{opacity:0,y:8,filter:p},{opacity:1,y:0,filter:`blur(0px)`,duration:.32,delay:.08,stagger:.04,ease:`power2.out`,onComplete:()=>{l.set(f,{clearProps:`opacity,transform,filter`}),this._panel.classList.remove(`is-animating`)}})})}}showFrom(e){e&&(this._targetEl=e,this.show())}resizeTo(e,t,n=`center`){if(this.expandedWidth=e,this.expandedHeight=t,!this._visible||!this._panel||!this._targetEl)return;let r=this._computeFinalRect(this._targetEl.getBoundingClientRect()),i=this.parentElement?.closest(`.lab-canvas, [data-morph-coordinate-space]`),a=i?getComputedStyle(i).transform:`none`,o=1,s=1,c;if(i&&a!==`none`){let e=new DOMMatrix(a);o=Math.hypot(e.a,e.b)||1,s=Math.hypot(e.c,e.d)||1,c=i.getBoundingClientRect()}if(n===`top-left`){let e=this._panel.getBoundingClientRect(),t=e.left,n=e.top;c&&(t=(e.left-c.left)/o,n=(e.top-c.top)/s),r=new DOMRect(t,n,r.width,r.height)}else if(n===`center`&&c){let e=window.innerWidth/2-r.width*o/2,t=window.innerHeight/2-r.height*s/2;r=new DOMRect((e-c.left)/o,(t-c.top)/s,r.width,r.height)}this._panel.classList.add(`is-animating`),l.to(this._panel,{top:r.top,left:r.left,width:r.width,height:r.height,"--_panel-width":`${r.width}px`,"--_panel-height":`${r.height}px`,duration:.32,ease:`morph-open`,overwrite:!0,onComplete:()=>this._panel?.classList.remove(`is-animating`),onInterrupt:()=>this._panel?.classList.remove(`is-animating`)})}_ensureSolidPanelBackground(){if(!this._panel)return;let e=window.getComputedStyle(this._panel).backgroundColor;if(this._isColorTransparent(e)){let e=this._findSolidBackground(this._panel);if(e)this._panel.style.backgroundColor=e;else{let e=getComputedStyle(document.body).getPropertyValue(`--surface-container-high`).trim();this._panel.style.backgroundColor=e||`#2d2d2d`}}}hide(){if(this._isAnimating||!this._visible||!this._targetEl)return;this._isAnimating=!0,this._panel.classList.add(`is-animating`),this._ensureSolidPanelBackground(),this.style.setProperty(`--_backdrop-duration`,`0.3s`),this.style.setProperty(`--_backdrop-ease`,`cubic-bezier(0.4, 0, 0.2, 1)`);let e=[this.shadowRoot.querySelector(`.body`),this.shadowRoot.querySelector(`footer`),this.shadowRoot.querySelector(`.close-btn`)].filter(Boolean),t=this.shadowRoot.querySelector(`.header-morph-wrapper`),n=this.blurContent?`blur(12px)`:`blur(0px)`;l.fromTo(e,{opacity:1,filter:`blur(0px)`},{opacity:0,filter:n,duration:.12,ease:`power2.in`,onComplete:()=>{let n=this._panel;this._cleanupMorphElements();let r=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,i=this._shouldMorphLabel()&&!r,a=[],o=null;if(i){this._animateLabelClose(),o=this._resolveMorphSource();let e=this._measureHeaderTextRect(),t=this._measureHeaderIconRect(),n=window.getComputedStyle(this._header);if(o.text&&e){let t=this._createMorphText(o.text.content,o.text.sourceEl);this._positionElement(t,e),t.style.color=n.color||`var(--on-surface)`,t.style.fontSize=n.fontSize||`inherit`,t.style.fontWeight=n.fontWeight||`inherit`,t.style.lineHeight=n.lineHeight||`inherit`,a.push(t)}if(o.icon&&t){let e=this._createMorphIcon(o.icon.element);this._positionElement(e,t),e.style.color=n.color||`var(--on-surface)`,a.push(e)}a.length===0&&(i=!1)}i&&t&&(t.style.opacity=`0`);let s=X.getState(n,{props:`backgroundColor,borderRadius,color,boxShadow`}),c=X.getState(a,{props:`color,fontSize,fontWeight,lineHeight`}),u=this._getTargetState(this._targetEl),d;if(this.autoSize){let e=n.style.getPropertyValue(`--_panel-width`),t=n.style.getPropertyValue(`--_panel-height`),r=n.style.width,i=n.style.height;n.style.width=`auto`,n.style.height=`auto`,n.style.setProperty(`--_panel-width`,`max-content`),n.style.setProperty(`--_panel-height`,`max-content`);let a=this.shadowRoot.querySelector(`.body`),o=a?a.style.overflow:``;a&&(a.style.overflow=`visible`),d={width:this._inner.scrollWidth,height:this._inner.scrollHeight},n.style.setProperty(`--_panel-width`,e),n.style.setProperty(`--_panel-height`,t),n.style.width=r,n.style.height=i,a&&(a.style.overflow=o)}let f=this._computeFinalRect(u.rect,d);if(n.style.setProperty(`--_panel-width`,`${f.width}px`),n.style.setProperty(`--_panel-height`,`${f.height}px`),this._applyRect(n,u.rect),n.style.backgroundColor=u.backgroundColor,n.style.color=u.color,n.style.borderRadius=u.borderRadius,n.style.boxShadow=`none`,i&&o&&(this._morphEls.text&&o.text&&(this._positionElement(this._morphEls.text,o.text.rect),this._morphEls.text.style.color=window.getComputedStyle(o.text.sourceEl).color||`inherit`,this._morphEls.text.style.fontSize=window.getComputedStyle(o.text.sourceEl).fontSize||`inherit`,this._morphEls.text.style.fontWeight=window.getComputedStyle(o.text.sourceEl).fontWeight||`inherit`,this._morphEls.text.style.lineHeight=window.getComputedStyle(o.text.sourceEl).lineHeight||`inherit`),this._morphEls.icon&&o.icon&&(this._positionElement(this._morphEls.icon,o.icon.rect),this._morphEls.icon.style.color=window.getComputedStyle(o.icon.element).color||`inherit`)),X.from(s,{targets:n,duration:.3,ease:`morph-close`,zIndex:this._zIndex,onComplete:()=>{n.style.visibility=`hidden`,n.style.opacity=`0`,n.style.pointerEvents=`none`,this._visible=!1,this._handlingOpenChange=!0,this.open=!1,this._handlingOpenChange=!1,this._isAnimating=!1,this._panel.classList.remove(`is-animating`),this._panel.style.removeProperty(`--_panel-width`),this._panel.style.removeProperty(`--_panel-height`),this._cleanupMorphElements(),this._restoreTargetContent(),l.set(e,{clearProps:`opacity,transform,filter`}),t&&(t.style.opacity=`1`),this.style.removeProperty(`z-index`),this.style.removeProperty(`--_z-index`),this.style.removeProperty(`--_backdrop-duration`),this.style.removeProperty(`--_backdrop-ease`);let r=yt._openStack.indexOf(this);r>-1&&yt._openStack.splice(r,1)}}),a.length>0){this.blurContent&&l.set(a,{filter:`blur(0px)`});let e={targets:a,duration:.3,ease:`morph-close`,zIndex:this._zIndex+10};this.blurContent&&(e.filter=`blur(12px)`),X.from(c,e)}}})}toggle(){this._visible||this.open?this.hide():this.show()}_handleDocKeydown(e){e.key!==`Escape`||!this.closeOnEsc||yt._openStack[yt._openStack.length-1]===this&&(e.stopPropagation(),this.hide())}_hideTargetContent(){if(!this._targetEl)return;let e=(e,t)=>{this._targetStylesCache.has(e)||this._targetStylesCache.set(e,{opacity:e.style.opacity,color:e.style.color}),t===`opacity`&&(e.style.opacity=`0`),t===`color`&&(e.style.color=`transparent`)};if(this.hideTarget){e(this._targetEl,`opacity`);return}if(this._targetEl.tagName===`MONI-BUTTON`){let t=this._getMoniButtonParts();t.label&&e(t.label,`opacity`),t.icon&&e(t.icon,`opacity`),t.iconTrailing&&e(t.iconTrailing,`opacity`)}else{e(this._targetEl,`color`);let t=this._targetEl.querySelector(`moni-icon, svg, [class*="icon"]`);t&&e(t,`opacity`)}}_restoreTargetContent(){if(!this._targetEl)return;let e=e=>{if(this._targetStylesCache.has(e)){let t=this._targetStylesCache.get(e);e.style.opacity=t.opacity,e.style.color=t.color,this._targetStylesCache.delete(e)}};if(this.hideTarget){e(this._targetEl);return}if(this._targetEl.tagName===`MONI-BUTTON`){let t=this._getMoniButtonParts();t.label&&e(t.label),t.icon&&e(t.icon),t.iconTrailing&&e(t.iconTrailing)}else{e(this._targetEl);let t=this._targetEl.querySelector(`moni-icon, svg, [class*="icon"]`);t&&e(t)}}_onHeaderSlotChange(e){let t=e.target;this._hasHeader=t.assignedNodes({flatten:!0}).length>0}_onFooterSlotChange(e){let t=e.target;this._hasFooter=t.assignedNodes({flatten:!0}).length>0}_onTriggerLabelSlotChange(e){let t=e.target;this._hasTriggerLabel=t.assignedNodes({flatten:!0}).length>0}_getTriggerLabelNodes(){return(this.shadowRoot?.querySelector(`slot[name="trigger-label"]`))?.assignedNodes({flatten:!0})??[]}_shouldMorphLabel(){return this.morphLabel&&!!this._targetEl&&(this._hasHeader||this._hasTriggerLabel)}_cleanupMorphElements(){this._morphEls.text&&(this._morphEls.text.remove(),this._morphEls.text=null),this._morphEls.icon&&(this._morphEls.icon.remove(),this._morphEls.icon=null)}_animateLabelOpen(){}_animateLabelClose(){}_createMorphText(e,t){let n=document.createElement(`div`);n.className=`morph-text`,n.setAttribute(`data-flip-id`,`morph-text-${this.target}`),n.setAttribute(`aria-hidden`,`true`),n.textContent=e;let r=window.getComputedStyle(t);return n.style.position=`fixed`,n.style.pointerEvents=`none`,n.style.zIndex=String(this._zIndex+10),n.style.display=`inline-flex`,n.style.alignItems=r.alignItems===`normal`?`center`:r.alignItems,n.style.justifyContent=r.justifyContent===`normal`?`flex-start`:r.justifyContent,n.style.whiteSpace=`nowrap`,n.style.color=r.color||`inherit`,n.style.fontFamily=r.fontFamily||`inherit`,n.style.fontSize=r.fontSize||`inherit`,n.style.fontWeight=r.fontWeight||`inherit`,n.style.lineHeight=r.lineHeight||`inherit`,n.style.letterSpacing=r.letterSpacing||`inherit`,this.shadowRoot.appendChild(n),this._morphEls.text=n,n}_createMorphIcon(e){let t=document.createElement(`div`);if(t.className=`morph-icon`,t.setAttribute(`data-flip-id`,`morph-icon-${this.target}`),t.setAttribute(`aria-hidden`,`true`),e.tagName===`MONI-ICON`){let n=document.createElement(`span`);n.textContent=e.getAttribute(`name`)||``;let r=window.getComputedStyle(e);n.style.display=`inline-flex`,n.style.alignItems=`center`,n.style.justifyContent=`center`,n.style.fontFamily=r.fontFamily||`var(--font-icon)`,n.style.fontSize=r.fontSize||`1.125rem`,n.style.inlineSize=r.inlineSize||`1.125rem`,n.style.blockSize=r.blockSize||`1.125rem`,n.style.lineHeight=`1`,n.style.color=`inherit`,n.style.fontWeight=`normal`,n.style.fontStyle=`normal`,n.style.letterSpacing=`normal`,n.style.textTransform=`none`,n.style.whiteSpace=`nowrap`,n.style.wordWrap=`normal`,n.style.direction=`ltr`,n.style.fontFeatureSettings=`'liga'`,n.style.fontVariationSettings=`'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24`,n.style.setProperty(`-webkit-font-smoothing`,`antialiased`),t.appendChild(n)}else t.appendChild(e.cloneNode(!0));let n=window.getComputedStyle(e);return t.style.position=`fixed`,t.style.pointerEvents=`none`,t.style.zIndex=String(this._zIndex+10),t.style.display=`inline-flex`,t.style.alignItems=`center`,t.style.justifyContent=`center`,t.style.color=n.color||`inherit`,t.style.inlineSize=n.inlineSize||`1.125rem`,t.style.blockSize=n.blockSize||`1.125rem`,this.shadowRoot.appendChild(t),this._morphEls.icon=t,t}_positionElement(e,t){e.style.top=`${t.top}px`,e.style.left=`${t.left}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}_getMoniButtonParts(){let e=this._targetEl?.shadowRoot;return{label:e?.querySelector(`[part="label"]`)??null,icon:e?.querySelector(`[part="icon"]`)??null,iconTrailing:e?.querySelector(`[part="icon-trailing"]`)??null}}_resolveMorphSource(){let e={text:null,icon:null};if(!this._targetEl)return e;if(this._hasTriggerLabel){let t=this._getTriggerLabelNodes();if(t.length>0){let n=document.createElement(`div`);for(let e of t)n.appendChild(e.cloneNode(!0));n.style.position=`fixed`,n.style.visibility=`hidden`,n.style.pointerEvents=`none`,this.shadowRoot.appendChild(n);let r=this._targetEl.getBoundingClientRect();n.remove(),e.text={content:n.textContent?.trim()||``,rect:r,sourceEl:this._targetEl}}return e}if(this._targetEl.tagName===`MONI-BUTTON`){let t=this._getMoniButtonParts();if(t.label&&(e.text={content:this._targetEl.textContent?.trim()||``,rect:t.label.getBoundingClientRect(),sourceEl:t.label}),t.icon){let n=t.icon.querySelector(`moni-icon, svg`)||t.icon;e.icon={element:n,rect:n.getBoundingClientRect()}}return e}let t=this._targetEl;if(this.morphLabelSelector){let e=this._targetEl.querySelector(this.morphLabelSelector);e&&(t=e)}let n=t.textContent?.trim()||``;n&&(e.text={content:n,rect:t.getBoundingClientRect(),sourceEl:t});let r=t.querySelector(`moni-icon, svg, [class*="icon"]`);return r&&(e.icon={element:r,rect:r.getBoundingClientRect()}),e}_measureHeaderTextRect(){if(!this._header)return null;let e=(this.shadowRoot?.querySelector(`slot[name="header"]`))?.assignedNodes({flatten:!0})??[];for(let t of e){if(t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()){let e=document.createRange();return e.selectNode(t),e.getBoundingClientRect()}if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(e.tagName===`MONI-ICON`||e.tagName===`SVG`)continue;let n=Array.from(e.childNodes);for(let e of n){if(e.nodeType===Node.TEXT_NODE&&e.textContent?.trim()){let t=document.createRange();return t.selectNode(e),t.getBoundingClientRect()}if(e.nodeType===Node.ELEMENT_NODE){let t=e;if(t.tagName!==`MONI-ICON`&&t.tagName!==`SVG`&&t.textContent?.trim())return t.getBoundingClientRect()}}if(e.textContent?.trim())return e.getBoundingClientRect()}}return this._header.getBoundingClientRect()}_measureHeaderIconRect(){let e=this._measureHeaderTextRect();if(!e)return null;let t=(this.shadowRoot?.querySelector(`slot[name="header"]`))?.assignedNodes({flatten:!0})??[];for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e;if(t.tagName===`MONI-ICON`||t.tagName===`SVG`)return t.getBoundingClientRect();let n=t.querySelector(`moni-icon, svg`);if(n)return n.getBoundingClientRect()}return new DOMRect(e.left-24-12,e.top+e.height/2-12,24,24)}_findSolidBackground(e){let t=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of t){let t=window.getComputedStyle(e).backgroundColor;if(!this._isColorTransparent(t))return t}if(e.shadowRoot){let t=Array.from(e.shadowRoot.querySelectorAll(`*`));for(let e of t){let t=window.getComputedStyle(e).backgroundColor;if(!this._isColorTransparent(t))return t}}return null}_getTargetState(e){let t=e.getBoundingClientRect(),n=e;if(e.tagName===`MONI-BUTTON`){let t=e.shadowRoot?.querySelector(`.button`);t&&(n=t)}let r=window.getComputedStyle(n).backgroundColor;if(this._isColorTransparent(r)){let e=window.getComputedStyle(n,`::before`).backgroundColor;if(!this._isColorTransparent(e))r=e;else{let e=window.getComputedStyle(n,`::after`).backgroundColor;if(!this._isColorTransparent(e))r=e;else{let e=this._findSolidBackground(n);e&&(r=e)}}}this._isColorTransparent(r)&&this._panel&&(r=window.getComputedStyle(this._panel).backgroundColor);let i=window.getComputedStyle(n);return{rect:t,backgroundColor:r,color:i.color||`var(--on-surface)`,borderRadius:i.borderRadius||`1.25rem`}}_isColorTransparent(e){if(!e)return!0;let t=e.replace(/\s/g,``).toLowerCase();return t===`rgba(0,0,0,0)`||t===`transparent`||t===``||t.includes(`,0)`)||t.includes(`/0)`)}_applyRect(e,t){e.style.top=`${t.top}px`,e.style.left=`${t.left}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}_computeFinalRect(e,t){let n=window.innerWidth,r=window.innerHeight,i=this.autoSize&&t?t.width:this._parseSize(this.expandedWidth,n),a=this.autoSize&&t?t.height:this._parseSize(this.expandedHeight,r);i=Math.min(i,n-32),a=Math.min(a,r-32);let o=e.top,s=e.left;switch(this.placement){case`viewport-center`:s=n/2-i/2,o=r/2-a/2;break;case`viewport-top`:s=n/2-i/2,o=16;break;case`viewport-bottom`:s=n/2-i/2,o=r-a-16;break;case`viewport-left`:s=16,o=r/2-a/2;break;case`viewport-right`:s=n-i-16,o=r/2-a/2;break;case`viewport-top-left`:s=16,o=16;break;case`viewport-top-right`:s=n-i-16,o=16;break;case`viewport-bottom-left`:s=16,o=r-a-16;break;case`viewport-bottom-right`:s=n-i-16,o=r-a-16;break;case`center`:s=e.left+e.width/2-i/2,o=e.top+e.height/2-a/2;break;case`top`:s=e.left+e.width/2-i/2,o=this.coverTarget?e.top+e.height-a:e.top-a;break;case`top-start`:s=e.left+e.width-i,o=this.coverTarget?e.top+e.height-a:e.top-a;break;case`top-end`:s=e.left,o=this.coverTarget?e.top+e.height-a:e.top-a;break;case`bottom`:s=e.left+e.width/2-i/2,o=this.coverTarget?e.top:e.top+e.height;break;case`bottom-start`:s=e.left+e.width-i,o=this.coverTarget?e.top:e.top+e.height;break;case`bottom-end`:s=e.left,o=this.coverTarget?e.top:e.top+e.height;break;case`left`:s=this.coverTarget?e.left+e.width-i:e.left-i,o=e.top+e.height/2-a/2;break;case`left-start`:s=this.coverTarget?e.left+e.width-i:e.left-i,o=e.top+e.height-a;break;case`left-end`:s=this.coverTarget?e.left+e.width-i:e.left-i,o=e.top;break;case`right`:s=this.coverTarget?e.left:e.left+e.width,o=e.top+e.height/2-a/2;break;case`right-start`:s=this.coverTarget?e.left:e.left+e.width,o=e.top+e.height-a;break;case`right-end`:s=this.coverTarget?e.left:e.left+e.width,o=e.top}return s=Math.max(16,Math.min(s,n-i-16)),o=Math.max(16,Math.min(o,r-a-16)),new DOMRect(s,o,i,a)}_parseSize(e,t){let n=parseFloat(e);return Number.isNaN(n)?352:e.endsWith(`px`)?n:e.endsWith(`rem`)||e.endsWith(`em`)?n*16:e.endsWith(`%`)?n/100*t:e.endsWith(`vw`)?n/100*window.innerWidth:e.endsWith(`vh`)?n/100*window.innerHeight:n}static{this.styles=[a,r`
|
|
1
|
+
import{a as e,d as t,i as n,m as r,o as i,r as a,s as o,t as s}from"../chunks/decorate-D4jKxi6H.js";import{t as c}from"../chunks/query-SWT-tzvq.js";import"./moni-icon.js";import{t as l}from"../chunks/gsap-DWxn8li7.js";var u,d,f,p,m,h,g,_,v=`transform`,y=v+`Origin`,b,x=function(e){var t=e.ownerDocument||e;for(!(v in e.style)&&(`msTransform`in e.style)&&(v=`msTransform`,y=v+`Origin`);t.parentNode&&(t=t.parentNode););if(d=window,g=new N,t){u=t,f=t.documentElement,p=t.body,_=u.createElementNS(`http://www.w3.org/2000/svg`,`g`),_.style.transform=`none`;var n=t.createElement(`div`),r=t.createElement(`div`),i=t&&(t.body||t.firstElementChild);i&&i.appendChild&&(i.appendChild(n),n.appendChild(r),n.style.position=`static`,n.style.transform=`translate3d(0,0,1px)`,b=r.offsetParent!==n,i.removeChild(n))}return t},S=function(e){for(var t,n;e&&e!==p;)n=e._gsap,n&&n.uncache&&n.get(e,`x`),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),t?t.push(n):t=[n]),e=e.parentNode;return t},C=[],w=[],T=function(){return d.pageYOffset||u.scrollTop||f.scrollTop||p.scrollTop||0},E=function(){return d.pageXOffset||u.scrollLeft||f.scrollLeft||p.scrollLeft||0},D=function(e){return e.ownerSVGElement||((e.tagName+``).toLowerCase()===`svg`?e:null)},O=function e(t){if(d.getComputedStyle(t).position===`fixed`)return!0;if(t=t.parentNode,t&&t.nodeType===1)return e(t)},k=function e(t,n){if(t.parentNode&&(u||x(t))){var r=D(t),i=r?r.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`:`http://www.w3.org/1999/xhtml`,a=r?n?`rect`:`g`:`div`,o=n===2?100:0,s=n===3?100:0,c={position:`absolute`,display:`block`,pointerEvents:`none`,margin:`0`,padding:`0`},l=u.createElementNS?u.createElementNS(i.replace(/^https/,`http`),a):u.createElement(a);return n&&(r?(h||=e(t),l.setAttribute(`width`,.01),l.setAttribute(`height`,.01),l.setAttribute(`transform`,`translate(`+o+`,`+s+`)`),l.setAttribute(`fill`,`transparent`),h.appendChild(l)):(m||(m=e(t),Object.assign(m.style,c)),Object.assign(l.style,c,{width:`0.1px`,height:`0.1px`,top:s+`px`,left:o+`px`}),m.appendChild(l))),l}throw`Need document and parent.`},A=function(e){for(var t=new N,n=0;n<e.numberOfItems;n++)t.multiply(e.getItem(n).matrix);return t},j=function(e){var t=e.getCTM(),n;return t||(n=e.style[v],e.style[v]=`none`,e.appendChild(_),t=_.getCTM(),e.removeChild(_),n?e.style[v]=n:e.style.removeProperty(v.replace(/([A-Z])/g,`-$1`).toLowerCase())),t||g.clone()},M=function(e,t){var n=D(e),r=e===n,i=n?C:w,a=e.parentNode,o=a&&!n&&a.shadowRoot&&a.shadowRoot.appendChild?a.shadowRoot:a,s,c,l,u,f,p;if(e===d)return e;if(i.length||i.push(k(e,1),k(e,2),k(e,3)),s=n?h:m,n)r?(l=j(e),u=-l.e/l.a,f=-l.f/l.d,c=g):e.getBBox?(l=e.getBBox(),c=e.transform?e.transform.baseVal:{},c=c.numberOfItems?c.numberOfItems>1?A(c):c.getItem(0).matrix:g,u=c.a*l.x+c.c*l.y,f=c.b*l.x+c.d*l.y):(c=new N,u=f=0),t&&e.tagName.toLowerCase()===`g`&&(u=f=0),(r||!e.getBoundingClientRect().width?n:a).appendChild(s),s.setAttribute(`transform`,`matrix(`+c.a+`,`+c.b+`,`+c.c+`,`+c.d+`,`+(c.e+u)+`,`+(c.f+f)+`)`);else{if(u=f=0,b)for(c=e.offsetParent,l=e;(l&&=l.parentNode)&&l!==c&&l.parentNode;)(d.getComputedStyle(l)[v]+``).length>4&&(u=l.offsetLeft,f=l.offsetTop,l=0);if(p=d.getComputedStyle(e),p.position!==`absolute`&&p.position!==`fixed`)for(c=e.offsetParent;a&&a!==c;)u+=a.scrollLeft||0,f+=a.scrollTop||0,a=a.parentNode;l=s.style,l.top=e.offsetTop-f+`px`,l.left=e.offsetLeft-u+`px`,l[v]=p[v],l[y]=p[y],l.position=p.position===`fixed`?`fixed`:`absolute`,o.appendChild(s)}return s},ee=function(e,t,n,r,i,a,o){return e.a=t,e.b=n,e.c=r,e.d=i,e.e=a,e.f=o,e},N=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),ee(this,e,t,n,r,i,a)}var t=e.prototype;return t.inverse=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=e*r-t*n||1e-10;return ee(this,r/o,-t/o,-n/o,e/o,(n*a-r*i)/o,-(e*a-t*i)/o)},t.multiply=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f,s=e.a,c=e.c,l=e.b,u=e.d,d=e.e,f=e.f;return ee(this,s*t+l*r,s*n+l*i,c*t+u*r,c*n+u*i,a+d*t+f*r,o+d*n+f*i)},t.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.e,o=this.f;return t===e.a&&n===e.b&&r===e.c&&i===e.d&&a===e.e&&o===e.f},t.apply=function(e,t){t===void 0&&(t={});var n=e.x,r=e.y,i=this.a,a=this.b,o=this.c,s=this.d,c=this.e,l=this.f;return t.x=n*i+r*o+c||0,t.y=n*a+r*s+l||0,t},e}();function P(e,t,n,r){if(!e||!e.parentNode||(u||x(e)).documentElement===e)return new N;var i=S(e),a=D(e)?C:w,o=M(e,n),s=a[0].getBoundingClientRect(),c=a[1].getBoundingClientRect(),l=a[2].getBoundingClientRect(),d=o.parentNode,f=!r&&O(e),p=new N((c.left-s.left)/100,(c.top-s.top)/100,(l.left-s.left)/100,(l.top-s.top)/100,s.left+(f?0:E()),s.top+(f?0:T()));if(d.removeChild(o),i)for(s=i.length;s--;)c=i[s],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?p.inverse():p}var te=1,F,I,L,R,z,B,V,H=function(e,t){return e.actions.forEach(function(e){return e.vars[t]&&e.vars[t](e)})},U={},W=180/Math.PI,ne=Math.PI/180,G={},K={},re={},ie=function(e){return typeof e==`string`?e.split(` `).join(``).split(`,`):e},ae=ie(`onStart,onUpdate,onComplete,onReverseComplete,onInterrupt`),oe=ie(`transform,transformOrigin,width,height,position,top,left,opacity,zIndex,maxWidth,maxHeight,minWidth,minHeight`),q=function(e){return F(e)[0]||console.warn(`Element not found:`,e)},J=function(e){return Math.round(e*1e4)/1e4||0},se=function(e,t,n){return e.forEach(function(e){return e.classList[n](t)})},ce={zIndex:1,kill:1,simple:1,spin:1,clearProps:1,targets:1,toggleClass:1,onComplete:1,onUpdate:1,onInterrupt:1,onStart:1,delay:1,repeat:1,repeatDelay:1,yoyo:1,scale:1,fade:1,absolute:1,props:1,onEnter:1,onLeave:1,custom:1,paused:1,nested:1,prune:1,absoluteOnLeave:1},le={zIndex:1,simple:1,clearProps:1,scale:1,absolute:1,fitChild:1,getVars:1,props:1},ue=function(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()},de=function(e,t){var n={},r;for(r in e)t[r]||(n[r]=e[r]);return n},fe={},pe=function(e){var t=fe[e]=ie(e);return re[e]=t.concat(oe),t},me=function(e){var t=e._gsap||I.core.getCache(e);return t.gmCache===I.ticker.frame?t.gMatrix:(t.gmCache=I.ticker.frame,t.gMatrix=P(e,!0,!1,!0))},he=function e(t,n,r){r===void 0&&(r=0);for(var i=t.parentNode,a=1e3*10**r*(n?-1:1),o=n?-a*900:0;t;)o+=a,t=t.previousSibling;return i?o+e(i,n,r+1):o},ge=function(e,t,n){return e.forEach(function(e){return e.d=he(n?e.element:e.t,t)}),e.sort(function(e,t){return e.d-t.d}),e},_e=function(e,t){for(var n=e.element.style,r=e.css=e.css||[],i=t.length,a,o;i--;)a=t[i],o=n[a]||n.getPropertyValue(a),r.push(o?a:K[a]||(K[a]=ue(a)),o);return n},ve=function(e){var t=e.css,n=e.element.style,r=0;for(e.cache.uncache=1;r<t.length;r+=2)t[r+1]?n[t[r]]=t[r+1]:n.removeProperty(t[r]);!t[t.indexOf(`transform`)+1]&&n.translate&&(n.removeProperty(`translate`),n.removeProperty(`scale`),n.removeProperty(`rotate`))},ye=function(e,t){e.forEach(function(e){return e.a.cache.uncache=1}),t||e.finalStates.forEach(ve)},be=`paddingTop,paddingRight,paddingBottom,paddingLeft,gridArea,transition`.split(`,`),xe=function(e,t,n){var r=e.element,i=e.width,a=e.height,o=e.uncache,s=e.getProp,c=r.style,l=4,u,d,f;if(typeof t!=`object`&&(t=e),L&&n!==1)return L._abs.push({t:r,b:e,a:e,sd:0}),L._final.push(function(){return(e.cache.uncache=1)&&ve(e)}),r;for(d=s(`display`)===`none`,(!e.isVisible||d)&&(d&&(_e(e,[`display`]).display=t.display),e.matrix=t.matrix,e.width=i=e.width||t.width,e.height=a=e.height||t.height),_e(e,be),f=window.getComputedStyle(r);l--;)c[be[l]]=f[be[l]];if(c.gridArea=`1 / 1 / 1 / 1`,c.transition=`none`,c.position=`absolute`,c.width=i+`px`,c.height=a+`px`,c.top||=`0px`,c.left||=`0px`,o)u=new Ue(r);else if(u=de(e,G),u.position=`absolute`,e.simple){var p=r.getBoundingClientRect();u.matrix=new N(1,0,0,1,p.left+E(),p.top+T())}else u.matrix=P(r,!1,!1,!0);return u=je(u,e,!0),e.x=B(u.x,.01),e.y=B(u.y,.01),r},Se=function(e,t){return t!==!0&&(t=F(t),e=e.filter(function(e){if(t.indexOf((e.sd<0?e.b:e.a).element)!==-1)return!0;e.t._gsap.renderTransform(1),e.b.isVisible&&(e.t.style.width=e.b.width+`px`,e.t.style.height=e.b.height+`px`)})),e},Ce=function(e){return ge(e,!0).forEach(function(e){return(e.a.isVisible||e.b.isVisible)&&xe(e.sd<0?e.b:e.a,e.b,1)})},we=function(e,t){return t&&e.idLookup[Te(t).id]||e.elementStates[0]},Te=function(e,t,n,r){return e instanceof Ue?e:e instanceof Y?we(e,r):new Ue(typeof e==`string`?q(e)||console.warn(e+` not found`):e,t,n)},Ee=function(e,t){for(var n=I.getProperty(e.element,null,`native`),r=e.props={},i=t.length;i--;)r[t[i]]=(n(t[i])+``).trim();return r.zIndex&&=parseFloat(r.zIndex)||0,e},De=function(e,t){var n=e.style||e,r;for(r in t)n[r]=t[r]},Oe=function(e){var t=e.getAttribute(`data-flip-id`);return t||e.setAttribute(`data-flip-id`,t=`auto-`+te++),t},ke=function(e){return e.map(function(e){return e.element})},Ae=function(e,t,n){return e&&t.length&&n.add(e(ke(t),n,new Y(t,0,!0)),0)},je=function(e,t,n,r,i,a){var o=e.element,s=e.cache,c=e.parent,l=e.x,u=e.y,d=t.width,f=t.height,p=t.scaleX,m=t.scaleY,h=t.rotation,g=t.bounds,_=a&&V&&V(o,`transform,width,height`),v=e,y=t.matrix,b=y.e,x=y.f,S=e.bounds.width!==g.width||e.bounds.height!==g.height||e.scaleX!==p||e.scaleY!==m||e.rotation!==h,C=!S&&e.simple&&t.simple&&!i,w,T,E,D,O,k,A;return C||!c?(p=m=1,h=w=0):(O=me(c),k=O.clone().multiply(t.ctm?t.matrix.clone().multiply(t.ctm):t.matrix),h=J(Math.atan2(k.b,k.a)*W),w=J(Math.atan2(k.c,k.d)*W+h)%360,p=Math.sqrt(k.a**2+k.b**2),m=Math.sqrt(k.c**2+k.d**2)*Math.cos(w*ne),i&&(i=F(i)[0],D=I.getProperty(i),A=i.getBBox&&typeof i.getBBox==`function`&&i.getBBox(),v={scaleX:D(`scaleX`),scaleY:D(`scaleY`),width:A?A.width:Math.ceil(parseFloat(D(`width`,`px`))),height:A?A.height:parseFloat(D(`height`,`px`))}),s.rotation=h+`deg`,s.skewX=w+`deg`),n?(p*=d===v.width||!v.width?1:d/v.width,m*=f===v.height||!v.height?1:f/v.height,s.scaleX=p,s.scaleY=m):(d=B(d*p/v.scaleX,0),f=B(f*m/v.scaleY,0),o.style.width=d+`px`,o.style.height=f+`px`),r&&De(o,t.props),C||!c?(l+=b-e.matrix.e,u+=x-e.matrix.f):S||c!==t.parent?(s.x=l+`px`,s.y=u+`px`,s.renderTransform(1,s),k=P(i||o,!1,!1,!0),T=O.apply({x:k.e,y:k.f}),E=O.apply({x:b,y:x}),l+=E.x-T.x,u+=E.y-T.y):(O.e=O.f=0,E=O.apply({x:b-e.matrix.e,y:x-e.matrix.f}),l+=E.x,u+=E.y),l=B(l,.02),u=B(u,.02),a&&!(a instanceof Ue)?_&&_.revert():(s.x=l+`px`,s.y=u+`px`,s.renderTransform(1,s)),a&&(a.x=l,a.y=u,a.rotation=h,a.skewX=w,n?(a.scaleX=p,a.scaleY=m):(a.width=d,a.height=f)),a||s},Me=function(e,t){return e instanceof Y?e:new Y(e,t)},Ne=function(e,t,n){var r=e.idLookup[n],i=e.alt[n];return i.isVisible&&(!(t.getElementState(i.element)||i).isVisible||!r.isVisible)?i:r},Pe=[],Fe=`width,height,overflowX,overflowY`.split(`,`),Ie,Le=function(e){if(e!==Ie){var t=z.style,n=z.clientWidth===window.outerWidth,r=z.clientHeight===window.outerHeight,i=4;if(e&&(n||r)){for(;i--;)Pe[i]=t[Fe[i]];n&&(t.width=z.clientWidth+`px`,t.overflowY=`hidden`),r&&(t.height=z.clientHeight+`px`,t.overflowX=`hidden`),Ie=e}else if(Ie){for(;i--;)Pe[i]?t[Fe[i]]=Pe[i]:t.removeProperty(ue(Fe[i]));Ie=e}}},Re=function(e,t){for(var n=0;n<e.length;n+=3)I.set(e[n],{clearProps:!0}),e[n].setAttribute(`style`,e[n+t]),e[n]._gsap.gmCache=-1},ze=function(e,t,n,r){e instanceof Y&&t instanceof Y||console.warn(`Not a valid state object.`),n||={};var i=n,a=i.clearProps,o=i.onEnter,s=i.onLeave,c=i.absolute,l=i.absoluteOnLeave,u=i.custom,d=i.delay,f=i.paused,p=i.repeat,m=i.repeatDelay,h=i.yoyo,g=i.toggleClass,_=i.nested,v=i.zIndex,y=i.scale,b=i.fade,x=i.stagger,S=i.spin,C=i.prune,w=(`props`in n?n:e).props,T=de(n,ce),E=I.timeline({delay:d,paused:f,repeat:p,repeatDelay:m,yoyo:h,data:`isFlip`}),D=T,O=[],k=[],A=[],j=[],M=S===!0?1:S||0,ee=typeof S==`function`?S:function(){return M},N=e.interrupted||t.interrupted,te=E[r===1?`from`:`to`],F,R,z,B,V,H,U,W,ne,G,K,ie,q,J;for(R in t.idLookup)K=t.alt[R]?Ne(t,e,R):t.idLookup[R],V=K.element,G=e.idLookup[R],e.alt[R]&&V===G.element&&(e.alt[R].isVisible||!K.isVisible)&&(G=e.alt[R]),G?(H={t:V,b:G,a:K,sd:G.element===V?0:K.isVisible?1:-1},A.push(H),H.sd&&(H.sd<0&&(H.b=K,H.a=G),N&&_e(H.b,w?re[w]:oe),b&&A.push(H.swap={t:G.element,b:H.b,a:H.a,sd:-H.sd,swap:H})),V._flip=G.element._flip=L?L.timeline:E):K.isVisible&&(A.push({t:V,b:de(K,{isVisible:1}),a:K,sd:0,entering:1}),V._flip=L?L.timeline:E);if(w&&(fe[w]||pe(w)).forEach(function(e){return T[e]=function(t){return A[t].a.props[e]}}),A.finalStates=ne=[],ie=function(){ge(A),Le(!0);var t=[];for(B=0;B<A.length;B++)H=A[B],q=H.a,J=H.b,C&&!q.isDifferent(J)&&!H.entering?A.splice(B--,1):(V=H.t,_&&!(H.sd<0)&&B&&(q=H.a=q.clone({matrix:P(V,!1,!1,!0)})),J.isVisible&&q.isVisible?(H.sd<0?(_&&Re(t,1),U=new Ue(V,w,e.simple),je(U,q,y,0,0,U),U.matrix=P(V,!1,!1,!0),U.bounds=V.getBoundingClientRect(),U.css=H.b.css,H.a=q=U,b&&(V.style.opacity=N?J.opacity:q.opacity),x&&j.push(V),_&&(Re(t,2),t.push(V,V.getAttribute(`style`)))):H.sd>0&&b&&(V.style.opacity=N?q.opacity-J.opacity:`0`),je(q,J,y,w),_&&H.sd<0&&t.push(V.getAttribute(`style`))):J.isVisible!==q.isVisible&&(J.isVisible?q.isVisible||(J.css=q.css,k.push(J),A.splice(B--,1),c&&_&&je(q,J,y,w)):(q.isVisible&&O.push(q),A.splice(B--,1))),y||(V.style.maxWidth=Math.max(q.width,J.width)+`px`,V.style.maxHeight=Math.max(q.height,J.height)+`px`,V.style.minWidth=Math.min(q.width,J.width)+`px`,V.style.minHeight=Math.min(q.height,J.height)+`px`),_&&g&&V.classList.add(g)),ne.push(q);var r;if(g&&(r=ne.map(function(e){return e.element}),_&&r.forEach(function(e){return e.classList.remove(g)})),Le(!1),y?(T.scaleX=function(e){return A[e].a.scaleX},T.scaleY=function(e){return A[e].a.scaleY}):(T.width=function(e){return A[e].a.width+`px`},T.height=function(e){return A[e].a.height+`px`},T.autoRound=n.autoRound||!1),T.x=function(e){return A[e].a.x+`px`},T.y=function(e){return A[e].a.y+`px`},T.rotation=function(e){return A[e].a.rotation+(S?ee(e,W[e],W)*360:0)},T.skewX=function(e){return A[e].a.skewX},W=A.map(function(e){return e.t}),(v||v===0)&&(T.modifiers={zIndex:function(){return v}},T.zIndex=v,T.immediateRender=n.immediateRender!==!1),b&&(T.opacity=function(e){return A[e].sd<0?0:A[e].sd>0?A[e].a.opacity:`+=0`}),j.length){x=I.utils.distribute(x);var i=W.slice(j.length);T.stagger=function(e,t){return x(~j.indexOf(t)?W.indexOf(A[e].swap.t):e,t,i)}}if(ae.forEach(function(e){return n[e]&&E.eventCallback(e,n[e],n[e+`Params`])}),u&&W.length)for(R in D=de(T,ce),`scale`in u&&(u.scaleX=u.scaleY=u.scale,delete u.scale),u)F=de(u[R],le),F[R]=T[R],!(`duration`in F)&&`duration`in T&&(F.duration=T.duration),F.stagger=T.stagger,te.call(E,W,F,0),delete D[R];(W.length||k.length||O.length)&&(g&&E.add(function(){return se(r,g,E._zTime<0?`remove`:`add`)},0)&&!f&&se(r,g,`add`),W.length&&te.call(E,W,D,0)),Ae(o,O,E),Ae(s,k,E);var l=L&&L.timeline;l&&(l.add(E,0),L._final.push(function(){return ye(A,!a)})),z=E.duration(),E.call(function(){var e=E.time()>=z;e&&!l&&ye(A,!a),g&&se(r,g,e?`remove`:`add`)})},l&&(c=A.filter(function(e){return!e.sd&&!e.a.isVisible&&e.b.isVisible}).map(function(e){return e.a.element})),L){var ue;c&&(ue=L._abs).push.apply(ue,Se(A,c)),L._run.push(ie)}else c&&Ce(Se(A,c)),ie();var me=L?L.timeline:E;return me.revert=function(){return Ve(me,1,1)},me},Be=function e(t){t.vars.onInterrupt&&t.vars.onInterrupt.apply(t,t.vars.onInterruptParams||[]),t.getChildren(!0,!1,!0).forEach(e)},Ve=function(e,t,n){if(e&&e.progress()<1&&(!e.paused()||n))return t&&(Be(e),t<2&&e.progress(1),e.kill()),!0},He=function(e){for(var t=e.idLookup={},n=e.alt={},r=e.elementStates,i=r.length,a;i--;)a=r[i],t[a.id]?n[a.id]=a:t[a.id]=a},Y=function(){function e(e,t,n){if(this.props=t&&t.props,this.simple=!!(t&&t.simple),n)this.targets=ke(e),this.elementStates=e,He(this);else{this.targets=F(e);var r=t&&(t.kill===!1||t.batch&&!t.kill);L&&!r&&L._kill.push(this),this.update(r||!!L)}}var t=e.prototype;return t.update=function(e){var t=this;return this.elementStates=this.targets.map(function(e){return new Ue(e,t.props,t.simple)}),He(this),this.interrupt(e),this.recordInlineStyles(),this},t.clear=function(){return this.targets.length=this.elementStates.length=0,He(this),this},t.fit=function(e,t,n){for(var r=ge(this.elementStates.slice(0),!1,!0),i=(e||this).idLookup,a=0,o,s;a<r.length;a++)o=r[a],n&&(o.matrix=P(o.element,!1,!1,!0)),s=i[o.id],s&&je(o,s,t,!0,0,o),o.matrix=P(o.element,!1,!1,!0);return this},t.getProperty=function(e,t){var n=this.getElementState(e)||G;return(t in n?n:n.props||G)[t]},t.add=function(e){for(var t=e.targets.length,n=this.idLookup,r=this.alt,i,a,o;t--;)a=e.elementStates[t],o=n[a.id],o&&(a.element===o.element||r[a.id]&&r[a.id].element===a.element)?(i=this.elementStates.indexOf(a.element===o.element?o:r[a.id]),this.targets.splice(i,1,e.targets[t]),this.elementStates.splice(i,1,a)):(this.targets.push(e.targets[t]),this.elementStates.push(a));return e.interrupted&&(this.interrupted=!0),e.simple||(this.simple=!1),He(this),this},t.compare=function(e){var t=e.idLookup,n=this.idLookup,r=[],i=[],a=[],o=[],s=[],c=e.alt,l=this.alt,u=function(e,t,n){return(e.isVisible===t.isVisible?e.isVisible?i:r:e.isVisible?a:o).push(n)&&s.push(n)},d=function(e,t,n){return s.indexOf(n)<0&&u(e,t,n)},f,p,m,h,g,_,v,y;for(m in t)g=c[m],_=l[m],f=g?Ne(e,this,m):t[m],h=f.element,p=n[m],_?(y=p.isVisible||!_.isVisible&&h===p.element?p:_,v=g&&!f.isVisible&&!g.isVisible&&y.element===g.element?g:f,v.isVisible&&y.isVisible&&v.element!==y.element?((v.isDifferent(y)?i:r).push(v.element,y.element),s.push(v.element,y.element)):u(v,y,v.element),g&&v.element===g.element&&(g=t[m]),d(v.element!==p.element&&g?g:v,p,p.element),d(g&&g.element===_.element?g:v,_,_.element),g&&d(g,_.element===g.element?_:p,g.element)):(p?p.isDifferent(f)?u(f,p,h):r.push(h):a.push(h),g&&d(g,p,g.element));for(m in n)t[m]||(o.push(n[m].element),l[m]&&o.push(l[m].element));return{changed:i,unchanged:r,enter:a,leave:o}},t.recordInlineStyles=function(){for(var e=re[this.props]||oe,t=this.elementStates.length;t--;)_e(this.elementStates[t],e)},t.interrupt=function(e){var t=this,n=[];this.targets.forEach(function(r){var i=r._flip,a=Ve(i,+!e);e&&a&&n.indexOf(i)<0&&i.add(function(){return t.updateVisibility()}),a&&n.push(i)}),!e&&n.length&&this.updateVisibility(),this.interrupted||=!!n.length},t.updateVisibility=function(){this.elementStates.forEach(function(e){var t=e.element.getBoundingClientRect();e.isVisible=!!(t.width||t.height||t.top||t.left),e.uncache=1})},t.getElementState=function(e){return this.elementStates[this.targets.indexOf(q(e))]},t.makeAbsolute=function(){return ge(this.elementStates.slice(0),!0,!0).map(xe)},e}(),Ue=function(){function e(t,n,r){t instanceof e?Object.assign(this,t,n||{}):(this.element=t,this.update(n,r))}var t=e.prototype;return t.isDifferent=function(e){var t=this.bounds,n=e.bounds;return t.top!==n.top||t.left!==n.left||t.width!==n.width||t.height!==n.height||!this.matrix.equals(e.matrix)||this.opacity!==e.opacity||this.props&&e.props&&JSON.stringify(this.props)!==JSON.stringify(e.props)},t.clone=function(t){return new e(this,t)},t.update=function(e,t){var n=this,r=n.element,i=I.getProperty(r),a=I.core.getCache(r),o=r.getBoundingClientRect(),s=r.getBBox&&typeof r.getBBox==`function`&&r.nodeName.toLowerCase()!==`svg`&&r.getBBox(),c=t?new N(1,0,0,1,o.left+E(),o.top+T()):P(r,!1,!1,!0);a.uncache=1,n.getProp=i,n.element=r,n.id=Oe(r),n.matrix=c,n.cache=a,n.bounds=o,n.isVisible=!!(o.width||o.height||o.left||o.top),n.display=i(`display`),n.position=i(`position`),n.parent=r.parentNode,n.x=i(`x`,`px`),n.y=i(`y`,`px`),n.scaleX=a.scaleX,n.scaleY=a.scaleY,n.rotation=i(`rotation`),n.skewX=i(`skewX`),n.opacity=i(`opacity`),n.width=s?s.width:B(i(`width`,`px`),.04),n.height=s?s.height:B(i(`height`,`px`),.04),e&&Ee(n,fe[e]||pe(e)),n.ctm=r.getCTM&&r.nodeName.toLowerCase()===`svg`&&j(r).inverse(),n.simple=t||J(c.a)===1&&!J(c.b)&&!J(c.c)&&J(c.d)===1,n.uncache=0},e}(),We=function(){function e(e,t){this.vars=e,this.batch=t,this.states=[],this.timeline=t.timeline}var t=e.prototype;return t.getStateById=function(e){for(var t=this.states.length;t--;)if(this.states[t].idLookup[e])return this.states[t]},t.kill=function(){this.batch.remove(this)},e}(),Ge=function(){function e(e){this.id=e,this.actions=[],this._kill=[],this._final=[],this._abs=[],this._run=[],this.data={},this.state=new Y,this.timeline=I.timeline()}var t=e.prototype;return t.add=function(e){var t=this.actions.filter(function(t){return t.vars===e});return t.length?t[0]:(t=new We(typeof e==`function`?{animate:e}:e,this),this.actions.push(t),t)},t.remove=function(e){var t=this.actions.indexOf(e);return t>=0&&this.actions.splice(t,1),this},t.getState=function(e){var t=this,n=L,r=R;return L=this,this.state.clear(),this._kill.length=0,this.actions.forEach(function(n){n.vars.getState&&(n.states.length=0,R=n,n.state=n.vars.getState(n)),e&&n.states.forEach(function(e){return t.state.add(e)})}),R=r,L=n,this.killConflicts(),this},t.animate=function(){var e=this,t=L,n=this.timeline,r=this.actions.length,i,a;for(L=this,n.clear(),this._abs.length=this._final.length=this._run.length=0,this.actions.forEach(function(e){e.vars.animate&&e.vars.animate(e);var t=e.vars.onEnter,n=e.vars.onLeave,r=e.targets,i,a;r&&r.length&&(t||n)&&(i=new Y,e.states.forEach(function(e){return i.add(e)}),a=i.compare(X.getState(r)),a.enter.length&&t&&t(a.enter),a.leave.length&&n&&n(a.leave))}),Ce(this._abs),this._run.forEach(function(e){return e()}),a=n.duration(),i=this._final.slice(0),n.add(function(){a<=n.time()&&(i.forEach(function(e){return e()}),H(e,`onComplete`))}),L=t;r--;)this.actions[r].vars.once&&this.actions[r].kill();return H(this,`onStart`),n.restart(),this},t.loadState=function(e){e||=function(){return 0};var t=[];return this.actions.forEach(function(n){if(n.vars.loadState){var r,i=function i(a){a&&(n.targets=a),r=t.indexOf(i),~r&&(t.splice(r,1),t.length||e())};t.push(i),n.vars.loadState(i)}}),t.length||e(),this},t.setState=function(){return this.actions.forEach(function(e){return e.targets=e.vars.setState&&e.vars.setState(e)}),this},t.killConflicts=function(e){return this.state.interrupt(e),this._kill.forEach(function(t){return t.interrupt(e)}),this},t.run=function(e,t){var n=this;return this!==L&&(e||this.getState(t),this.loadState(function(){n._killed||(n.setState(),n.animate())})),this},t.clear=function(e){this.state.clear(),e||(this.actions.length=0)},t.getStateById=function(e){for(var t=this.actions.length,n;t--;)if(n=this.actions[t].getStateById(e),n)return n;return this.state.idLookup[e]&&this.state},t.kill=function(){this._killed=1,this.clear(),delete U[this.id]},e}(),X=function(){function e(){}return e.getState=function(t,n){var r=Me(t,n);return R&&R.states.push(r),n&&n.batch&&e.batch(n.batch).state.add(r),r},e.from=function(e,t){return t||={},`clearProps`in t||(t.clearProps=!0),ze(e,Me(t.targets||e.targets,{props:t.props||e.props,simple:t.simple,kill:!!t.kill}),t,-1)},e.to=function(e,t){return ze(e,Me(t.targets||e.targets,{props:t.props||e.props,simple:t.simple,kill:!!t.kill}),t,1)},e.fromTo=function(e,t,n){return ze(e,t,n)},e.fit=function(e,t,n){var r=n?de(n,le):{},i=n||r,a=i.absolute,o=i.scale,s=i.getVars,c=i.props,l=i.runBackwards,u=i.onComplete,d=i.simple,f=n&&n.fitChild&&q(n.fitChild),p=Te(t,c,d,e),m=Te(e,0,d,p),h=c?re[c]:oe,g=I.context();return c&&De(r,p.props),_e(m,h),l&&(`immediateRender`in r||(r.immediateRender=!0),r.onComplete=function(){ve(m),u&&u.apply(this,arguments)}),a&&xe(m,p),r=je(m,p,o||f,!r.duration&&c,f,r.duration||s?r:0),typeof n==`object`&&`zIndex`in n&&(r.zIndex=n.zIndex),g&&!s&&g.add(function(){return function(){return ve(m)}}),s?r:r.duration?I.to(m.element,r):null},e.makeAbsolute=function(e,t){return(e instanceof Y?e:new Y(e,t)).makeAbsolute()},e.batch=function(e){return e||=`default`,U[e]||(U[e]=new Ge(e))},e.killFlipsOf=function(e,t){(e instanceof Y?e.targets:F(e)).forEach(function(e){return e&&Ve(e._flip,t===!1?2:1)})},e.isFlipping=function(t){var n=e.getByTarget(t);return!!n&&n.isActive()},e.getByTarget=function(e){return(q(e)||G)._flip},e.getElementState=function(e,t){return new Ue(q(e),t)},e.convertCoordinates=function(e,t,n){var r=P(t,!0,!0).multiply(P(e));return n?r.apply(n):r},e.register=function(e){if(z=typeof document<`u`&&document.body,z){I=e,x(z),F=I.utils.toArray,V=I.core.getStyleSaver;var t=I.utils.snap(.1);B=function(e,n){return t(parseFloat(e)+n)}}},e}();X.version=`3.15.0`,typeof window<`u`&&window.gsap&&window.gsap.registerPlugin(X);var Ke=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,qe=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,Je=Math.PI/180;180/Math.PI;var Ye=Math.sin,Xe=Math.cos,Ze=Math.abs,Qe=Math.sqrt,$e=function(e){return typeof e==`number`},et=1e5,tt=function(e){return Math.round(e*et)/et||0},nt=function(e){return e.closed=Math.abs(e[0]-e[e.length-2])<.001&&Math.abs(e[1]-e[e.length-1])<.001};function rt(e,t,n,r,i,a,o){for(var s=e.length,c,l,u,d,f;--s>-1;)for(c=e[s],l=c.length,u=0;u<l;u+=2)d=c[u],f=c[u+1],c[u]=d*t+f*r+a,c[u+1]=d*n+f*i+o;return e._dirty=1,e}function it(e,t,n,r,i,a,o,s,c){if(e!==s||t!==c){n=Ze(n),r=Ze(r);var l=i%360*Je,u=Xe(l),d=Ye(l),f=Math.PI,p=f*2,m=(e-s)/2,h=(t-c)/2,g=u*m+d*h,_=-d*m+u*h,v=g*g,y=_*_,b=v/(n*n)+y/(r*r);b>1&&(n=Qe(b)*n,r=Qe(b)*r);var x=n*n,S=r*r,C=(x*S-x*y-S*v)/(x*y+S*v);C<0&&(C=0);var w=(a===o?-1:1)*Qe(C),T=w*(n*_/r),E=w*-(r*g/n),D=(e+s)/2,O=(t+c)/2,k=D+(u*T-d*E),A=O+(d*T+u*E),j=(g-T)/n,M=(_-E)/r,ee=(-g-T)/n,N=(-_-E)/r,P=j*j+M*M,te=(M<0?-1:1)*Math.acos(j/Qe(P)),F=(j*N-M*ee<0?-1:1)*Math.acos((j*ee+M*N)/Qe(P*(ee*ee+N*N)));isNaN(F)&&(F=f),!o&&F>0?F-=p:o&&F<0&&(F+=p),te%=p,F%=p;var I=Math.ceil(Ze(F)/(p/4)),L=[],R=F/I,z=4/3*Ye(R/2)/(1+Xe(R/2)),B=u*n,V=d*n,H=d*-r,U=u*r,W;for(W=0;W<I;W++)i=te+W*R,g=Xe(i),_=Ye(i),j=Xe(i+=R),M=Ye(i),L.push(g-z*_,_+z*g,j+z*M,M-z*j,j,M);for(W=0;W<L.length;W+=2)g=L[W],_=L[W+1],L[W]=g*B+_*H+k,L[W+1]=g*V+_*U+A;return L[W-2]=s,L[W-1]=c,L}}function at(e){var t=(e+``).replace(qe,function(e){var t=+e;return t<1e-4&&t>-1e-4?0:t}).match(Ke)||[],n=[],r=0,i=0,a=2/3,o=t.length,s=0,c=`ERROR: malformed path: `+e,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=function(e,t,n,r){v=(n-e)/3,y=(r-t)/3,h.push(e+v,t+y,n-v,r-y,n,r)};if(!e||!isNaN(t[0])||isNaN(t[1]))return console.log(c),n;for(l=0;l<o;l++)if(x=p,isNaN(t[l])?(p=t[l].toUpperCase(),m=p!==t[l]):l--,d=+t[l+1],f=+t[l+2],m&&(d+=r,f+=i),l||(g=d,_=f),p===`M`)h&&(h.length<8?--n.length:s+=h.length,nt(h)),r=g=d,i=_=f,h=[d,f],n.push(h),l+=2,p=`L`;else if(p===`C`)h||=[0,0],m||(r=i=0),h.push(d,f,r+t[l+3]*1,i+t[l+4]*1,r+=t[l+5]*1,i+=t[l+6]*1),l+=6;else if(p===`S`)v=r,y=i,(x===`C`||x===`S`)&&(v+=r-h[h.length-4],y+=i-h[h.length-3]),m||(r=i=0),h.push(v,y,d,f,r+=t[l+3]*1,i+=t[l+4]*1),l+=4;else if(p===`Q`)v=r+(d-r)*a,y=i+(f-i)*a,m||(r=i=0),r+=t[l+3]*1,i+=t[l+4]*1,h.push(v,y,r+(d-r)*a,i+(f-i)*a,r,i),l+=4;else if(p===`T`)v=r-h[h.length-4],y=i-h[h.length-3],h.push(r+v,i+y,d+(r+v*1.5-d)*a,f+(i+y*1.5-f)*a,r=d,i=f),l+=2;else if(p===`H`)w(r,i,r=d,i),l+=1;else if(p===`V`)w(r,i,r,i=d+(m?i-r:0)),l+=1;else if(p===`L`||p===`Z`)p===`Z`&&(d=g,f=_,h.closed=!0),(p===`L`||Ze(r-d)>.5||Ze(i-f)>.5)&&(w(r,i,d,f),p===`L`&&(l+=2)),r=d,i=f;else if(p===`A`){if(S=t[l+4],C=t[l+5],v=t[l+6],y=t[l+7],u=7,S.length>1&&(S.length<3?(y=v,v=C,u--):(y=C,v=S.substr(2),u-=2),C=S.charAt(1),S=S.charAt(0)),b=it(r,i,+t[l+1],+t[l+2],+t[l+3],+S,+C,(m?r:0)+v*1,(m?i:0)+y*1),l+=u,b)for(u=0;u<b.length;u++)h.push(b[u]);r=h[h.length-2],i=h[h.length-1]}else console.log(c);return l=h.length,l<6?(n.pop(),l=0):nt(h),n.totalPoints=s+l,n}function ot(e){$e(e[0])&&(e=[e]);var t=``,n=e.length,r,i,a,o;for(i=0;i<n;i++){for(o=e[i],t+=`M`+tt(o[0])+`,`+tt(o[1])+` C`,r=o.length,a=2;a<r;a++)t+=tt(o[a++])+`,`+tt(o[a++])+` `+tt(o[a++])+`,`+tt(o[a++])+` `+tt(o[a++])+`,`+tt(o[a])+` `;o.closed&&(t+=`z`)}return t}var Z,st,ct=function(){return Z||typeof window<`u`&&(Z=window.gsap)&&Z.registerPlugin&&Z},lt=function(){Z=ct(),Z?(Z.registerEase(`_CE`,vt.create),st=1):console.warn(`Please gsap.registerPlugin(CustomEase)`)},ut=0x56bc75e2d63100000,dt=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},ft=1,pt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,mt=/[cLlsSaAhHvVtTqQ]/g,ht=function(e){var t=e.length,n=ut,r;for(r=1;r<t;r+=6)+e[r]<n&&(n=+e[r]);return n},gt=function(e,t,n){!n&&n!==0&&(n=Math.max(+e[e.length-1],+e[1]));var r=e[0]*-1,i=-n,a=e.length,o=1/(+e[a-2]+r),s=-t||(Math.abs(e[a-1]-+e[1])<.01*(e[a-2]-+e[0])?ht(e)+i:+e[a-1]+i),c;for(s=s?1/s:-o,c=0;c<a;c+=2)e[c]=(+e[c]+r)*o,e[c+1]=(+e[c+1]+i)*s},_t=function e(t,n,r,i,a,o,s,c,l,u,d){var f=(t+r)/2,p=(n+i)/2,m=(r+a)/2,h=(i+o)/2,g=(a+s)/2,_=(o+c)/2,v=(f+m)/2,y=(p+h)/2,b=(m+g)/2,x=(h+_)/2,S=(v+b)/2,C=(y+x)/2,w=s-t,T=c-n,E=Math.abs((r-s)*T-(i-c)*w),D=Math.abs((a-s)*T-(o-c)*w),O;return u||(u=[{x:t,y:n},{x:s,y:c}],d=1),u.splice(d||u.length-1,0,{x:S,y:C}),(E+D)*(E+D)>l*(w*w+T*T)&&(O=u.length,e(t,n,f,p,v,y,S,C,l,u,d),e(S,C,b,x,g,_,s,c,l,u,d+1+(u.length-O))),u},vt=function(){function e(e,t,n){st||lt(),this.id=e,ft&&this.setData(t,n)}var t=e.prototype;return t.setData=function(e,t){t||={},e||=`0,0,1,1`;var n=e.match(pt),r=1,i=[],a=[],o=t.precision||1,s=o<=1,c,l,u,d,f,p,m,h,g;if(this.data=e,(mt.test(e)||~e.indexOf(`M`)&&e.indexOf(`C`)<0)&&(n=at(e)[0]),c=n.length,c===4)n.unshift(0,0),n.push(1,1),c=8;else if((c-2)%6)throw`Invalid CustomEase`;for((+n[0]!=0||+n[c-2]!=1)&>(n,t.height,t.originY),this.segment=n,d=2;d<c;d+=6)l={x:+n[d-2],y:+n[d-1]},u={x:+n[d+4],y:+n[d+5]},i.push(l,u),_t(l.x,l.y,+n[d],+n[d+1],+n[d+2],+n[d+3],u.x,u.y,1/(o*2e5),i,i.length-1);for(c=i.length,d=0;d<c;d++)m=i[d],h=i[d-1]||m,(m.x>h.x||h.y!==m.y&&h.x===m.x||m===h)&&m.x<=1?(h.cx=m.x-h.x,h.cy=m.y-h.y,h.n=m,h.nx=m.x,s&&d>1&&Math.abs(h.cy/h.cx-i[d-2].cy/i[d-2].cx)>2&&(s=0),h.cx<r&&(h.cx?r=h.cx:(h.cx=.001,d===c-1&&(h.x-=.001,r=Math.min(r,.001),s=0)))):(i.splice(d--,1),c--);if(c=1/r+1|0,f=1/c,p=0,m=i[0],s){for(d=0;d<c;d++)g=d*f,m.nx<g&&(m=i[++p]),l=m.y+(g-m.x)/m.cx*m.cy,a[d]={x:g,cx:f,y:l,cy:0,nx:9},d&&(a[d-1].cy=l-a[d-1].y);p=i[i.length-1],a[c-1].cy=p.y-l,a[c-1].cx=p.x-a[a.length-1].x}else{for(d=0;d<c;d++)m.nx<d*f&&(m=i[++p]),a[d]=m;p<i.length-1&&(a[d-1]=i[i.length-2])}return this.ease=function(e){var t=a[e*c|0]||a[c-1];return t.nx<e&&(t=t.n),t.y+(e-t.x)/t.cx*t.cy},this.ease.custom=this,this.id&&Z&&Z.registerEase(this.id,this.ease),this},t.getSVGData=function(t){return e.getSVGData(this,t)},e.create=function(t,n,r){return new e(t,n,r).ease},e.register=function(e){Z=e,lt()},e.get=function(e){return Z.parseEase(e)},e.getSVGData=function(t,n){n||={};var r=n.width||100,i=n.height||100,a=n.x||0,o=(n.y||0)+i,s=Z.utils.toArray(n.path)[0],c,l,u,d,f,p,m,h,g,_;if(n.invert&&(i=-i,o=0),typeof t==`string`&&(t=Z.parseEase(t)),t.custom&&(t=t.custom),t instanceof e)c=ot(rt([t.segment.slice(0)],r,0,0,-i,a,o));else{for(c=[a,o],m=Math.max(5,(n.precision||1)*200),d=1/m,m+=2,h=5/m,g=dt(a+d*r),_=dt(o+t(d)*-i),l=(_-o)/(g-a),u=2;u<m;u++)f=dt(a+u*d*r),p=dt(o+t(u*d)*-i),(Math.abs((p-_)/(f-g)-l)>h||u===m-1)&&(c.push(g,_),l=(p-_)/(f-g)),g=f,_=p;c=`M`+c.join(`,`)}return s&&s.setAttribute(`d`,c),c},e}();vt.version=`3.15.0`,vt.headless=!0,ct()&&Z.registerPlugin(vt);var yt;l.registerPlugin(X,vt),vt.create(`morph-open`,`0.15, 0.85, 0.2, 1`),vt.create(`morph-close`,`0.4, 0, 0.2, 1`);var Q={fromAttribute:e=>e!==`false`&&e!==null,toAttribute:e=>e?``:null},$=class extends n{static{yt=this}constructor(...e){super(...e),this.target=``,this.open=!1,this.modal=!0,this.placement=`center`,this.expandedWidth=`22rem`,this.expandedHeight=`18rem`,this.closeOnClickOutside=!0,this.closeOnEsc=!0,this.showCloseButton=!1,this.morphLabel=!1,this.morphLabelSelector=``,this.hasBackdrop=!0,this.hideTarget=!1,this.coverTarget=!1,this.autoSize=!1,this.blurContent=!1,this._hasHeader=!1,this._hasFooter=!1,this._hasTriggerLabel=!1,this._targetEl=null,this._isAnimating=!1,this._visible=!1,this._handlingOpenChange=!1,this._zIndex=100,this._morphEls={text:null,icon:null},this._targetStylesCache=new Map,this._onTargetClick=()=>this.show(),this._onDocKeydown=e=>this._handleDocKeydown(e),this._onDocClick=e=>{!this.open||!this._visible||!this.closeOnClickOutside||e.composedPath().includes(this._panel)||this._targetEl&&e.composedPath().includes(this._targetEl)||this.hide()}}static{this._openStack=[]}connectedCallback(){super.connectedCallback(),this._resolveTarget(),document.addEventListener(`keydown`,this._onDocKeydown),document.addEventListener(`click`,this._onDocClick)}disconnectedCallback(){document.removeEventListener(`keydown`,this._onDocKeydown),document.removeEventListener(`click`,this._onDocClick),this._targetEl&&this._targetEl.removeEventListener(`click`,this._onTargetClick);let e=yt._openStack.indexOf(this);e>-1&&yt._openStack.splice(e,1),this.style.removeProperty(`z-index`),this.style.removeProperty(`--_z-index`),this.style.removeProperty(`--_backdrop-duration`),this.style.removeProperty(`--_backdrop-ease`),this._cleanupMorphElements(),this._restoreTargetContent(),super.disconnectedCallback()}updated(e){super.updated(e),e.has(`target`)&&this._resolveTarget(),e.has(`open`)&&!this._handlingOpenChange&&(this.open?this.show():this.hide())}_resolveTarget(){if(!this.target)return;let e=document.querySelector(this.target);e&&(this._targetEl&&this._targetEl!==e&&this._targetEl.removeEventListener(`click`,this._onTargetClick),this._targetEl=e,this._targetEl.addEventListener(`click`,this._onTargetClick))}show(){if(!(this._isAnimating||this._visible)){if(this._targetEl||this._resolveTarget(),!this._targetEl){console.warn(`[moni-morph-modal] cannot show: target not found`);return}this._isAnimating=!0,this._handlingOpenChange=!0,this.open=!0,this._handlingOpenChange=!1,yt._openStack.push(this),this._zIndex=1e3+yt._openStack.length,this.style.zIndex=String(this._zIndex),this.style.setProperty(`--_z-index`,String(this._zIndex)),this.style.setProperty(`--_backdrop-duration`,`0.38s`),this.style.setProperty(`--_backdrop-ease`,`cubic-bezier(0.15, 0.85, 0.2, 1)`),this._hideTargetContent(),this.updateComplete.then(async()=>{if(!this._targetEl||!this._panel||!this._inner){this._isAnimating=!1;return}this._panel.classList.add(`is-animating`),await new Promise(e=>requestAnimationFrame(e));let e=this._getTargetState(this._targetEl),t=this._panel;this._applyRect(t,e.rect),t.style.backgroundColor=e.backgroundColor,t.style.color=e.color,t.style.borderRadius=e.borderRadius,t.style.boxShadow=`none`,t.style.zIndex=String(this._zIndex),t.style.visibility=`visible`,t.style.opacity=`1`,t.style.pointerEvents=`auto`,this._backdrop&&(this._backdrop.style.zIndex=String(this._zIndex-1)),this._cleanupMorphElements();let n=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,r=this._shouldMorphLabel()&&!n,i=[],a=null,o=this.shadowRoot.querySelector(`.header-morph-wrapper`);if(r){if(this._animateLabelOpen(),a=this._resolveMorphSource(),a.text){let e=this._createMorphText(a.text.content,a.text.sourceEl);this._positionElement(e,a.text.rect),i.push(e)}if(a.icon){let e=this._createMorphIcon(a.icon.element);this._positionElement(e,a.icon.rect),i.push(e)}i.length===0&&(r=!1)}r&&o&&(o.style.opacity=`0`);let s=X.getState(t,{props:`backgroundColor,borderRadius,color,boxShadow`}),c=X.getState(i,{props:`color,fontSize,fontWeight,lineHeight`}),u;if(this.autoSize){let e=t.style.getPropertyValue(`--_panel-width`),n=t.style.getPropertyValue(`--_panel-height`),r=t.style.width,i=t.style.height;t.style.width=`auto`,t.style.height=`auto`,t.style.setProperty(`--_panel-width`,`max-content`),t.style.setProperty(`--_panel-height`,`max-content`);let a=this.shadowRoot.querySelector(`.body`),o=a?a.style.overflow:``;a&&(a.style.overflow=`visible`),u={width:this._inner.scrollWidth,height:this._inner.scrollHeight},t.style.setProperty(`--_panel-width`,e),t.style.setProperty(`--_panel-height`,n),t.style.width=r,t.style.height=i,a&&(a.style.overflow=o)}let d=this._computeFinalRect(e.rect,u);if(t.style.setProperty(`--_panel-width`,`${d.width}px`),t.style.setProperty(`--_panel-height`,`${d.height}px`),this._applyRect(t,d),t.style.backgroundColor=``,t.style.color=``,t.style.borderRadius=``,t.style.boxShadow=``,r&&a){let e=this._measureHeaderTextRect(),t=this._measureHeaderIconRect(),n=window.getComputedStyle(this._header);this._morphEls.text&&e&&(this._positionElement(this._morphEls.text,e),this._morphEls.text.style.color=n.color||`var(--on-surface)`,this._morphEls.text.style.fontSize=n.fontSize||`inherit`,this._morphEls.text.style.fontWeight=n.fontWeight||`inherit`,this._morphEls.text.style.lineHeight=n.lineHeight||`inherit`),this._morphEls.icon&&t&&(this._positionElement(this._morphEls.icon,t),this._morphEls.icon.style.color=n.color||`var(--on-surface)`)}if(X.from(s,{targets:t,duration:.38,ease:`morph-open`,zIndex:this._zIndex,onComplete:()=>{this._isAnimating=!1,this._visible=!0,this._cleanupMorphElements(),o&&(o.style.opacity=`1`)}}),i.length>0){this.blurContent&&l.set(i,{filter:`blur(16px)`});let e={targets:i,duration:.38,ease:`morph-open`,zIndex:this._zIndex+10};this.blurContent&&(e.filter=`blur(0px)`,e.clearProps=`filter`),X.from(c,e)}let f=[this.shadowRoot.querySelector(`.body`),this.shadowRoot.querySelector(`footer`),this.shadowRoot.querySelector(`.close-btn`)].filter(Boolean),p=this.blurContent?`blur(16px)`:`blur(0px)`;l.set(f,{opacity:0,y:8,filter:p}),l.fromTo(f,{opacity:0,y:8,filter:p},{opacity:1,y:0,filter:`blur(0px)`,duration:.32,delay:.08,stagger:.04,ease:`power2.out`,onComplete:()=>{l.set(f,{clearProps:`opacity,transform,filter`}),this._panel.classList.remove(`is-animating`)}})})}}showFrom(e){e&&(this._targetEl=e,this.show())}resizeTo(e,t,n=`center`){if(this.expandedWidth=e,this.expandedHeight=t,!this._visible||!this._panel||!this._targetEl)return;let r=this._computeFinalRect(this._targetEl.getBoundingClientRect()),i=this.parentElement?.closest(`.lab-canvas, [data-morph-coordinate-space]`),a=i?getComputedStyle(i).transform:`none`,o=1,s=1,c;if(i&&a!==`none`){let e=new DOMMatrix(a);o=Math.hypot(e.a,e.b)||1,s=Math.hypot(e.c,e.d)||1,c=i.getBoundingClientRect()}if(n===`top-left`){let e=this._panel.getBoundingClientRect(),t=e.left,n=e.top;c&&(t=(e.left-c.left)/o,n=(e.top-c.top)/s),r=new DOMRect(t,n,r.width,r.height)}else if(n===`center`&&c){let e=window.innerWidth/2-r.width*o/2,t=window.innerHeight/2-r.height*s/2;r=new DOMRect((e-c.left)/o,(t-c.top)/s,r.width,r.height)}this._panel.classList.add(`is-animating`),l.to(this._panel,{top:r.top,left:r.left,width:r.width,height:r.height,"--_panel-width":`${r.width}px`,"--_panel-height":`${r.height}px`,duration:.32,ease:`morph-open`,overwrite:!0,onComplete:()=>this._panel?.classList.remove(`is-animating`),onInterrupt:()=>this._panel?.classList.remove(`is-animating`)})}_ensureSolidPanelBackground(){if(!this._panel)return;let e=window.getComputedStyle(this._panel).backgroundColor;if(this._isColorTransparent(e)){let e=this._findSolidBackground(this._panel);if(e)this._panel.style.backgroundColor=e;else{let e=getComputedStyle(document.body).getPropertyValue(`--surface-container-high`).trim();this._panel.style.backgroundColor=e||`#2d2d2d`}}}hide(){if(this._isAnimating||!this._visible||!this._targetEl)return;this._isAnimating=!0,this._panel.classList.add(`is-animating`),this._ensureSolidPanelBackground(),this.style.setProperty(`--_backdrop-duration`,`0.3s`),this.style.setProperty(`--_backdrop-ease`,`cubic-bezier(0.4, 0, 0.2, 1)`);let e=[this.shadowRoot.querySelector(`.body`),this.shadowRoot.querySelector(`footer`),this.shadowRoot.querySelector(`.close-btn`)].filter(Boolean),t=this.shadowRoot.querySelector(`.header-morph-wrapper`),n=this.blurContent?`blur(12px)`:`blur(0px)`;l.fromTo(e,{opacity:1,filter:`blur(0px)`},{opacity:0,filter:n,duration:.12,ease:`power2.in`,onComplete:()=>{let n=this._panel;this._cleanupMorphElements();let r=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,i=this._shouldMorphLabel()&&!r,a=[],o=null;if(i){this._animateLabelClose(),o=this._resolveMorphSource();let e=this._measureHeaderTextRect(),t=this._measureHeaderIconRect(),n=window.getComputedStyle(this._header);if(o.text&&e){let t=this._createMorphText(o.text.content,o.text.sourceEl);this._positionElement(t,e),t.style.color=n.color||`var(--on-surface)`,t.style.fontSize=n.fontSize||`inherit`,t.style.fontWeight=n.fontWeight||`inherit`,t.style.lineHeight=n.lineHeight||`inherit`,a.push(t)}if(o.icon&&t){let e=this._createMorphIcon(o.icon.element);this._positionElement(e,t),e.style.color=n.color||`var(--on-surface)`,a.push(e)}a.length===0&&(i=!1)}i&&t&&(t.style.opacity=`0`);let s=X.getState(n,{props:`backgroundColor,borderRadius,color,boxShadow`}),c=X.getState(a,{props:`color,fontSize,fontWeight,lineHeight`}),u=this._getTargetState(this._targetEl),d;if(this.autoSize){let e=n.style.getPropertyValue(`--_panel-width`),t=n.style.getPropertyValue(`--_panel-height`),r=n.style.width,i=n.style.height;n.style.width=`auto`,n.style.height=`auto`,n.style.setProperty(`--_panel-width`,`max-content`),n.style.setProperty(`--_panel-height`,`max-content`);let a=this.shadowRoot.querySelector(`.body`),o=a?a.style.overflow:``;a&&(a.style.overflow=`visible`),d={width:this._inner.scrollWidth,height:this._inner.scrollHeight},n.style.setProperty(`--_panel-width`,e),n.style.setProperty(`--_panel-height`,t),n.style.width=r,n.style.height=i,a&&(a.style.overflow=o)}let f=this._computeFinalRect(u.rect,d);if(n.style.setProperty(`--_panel-width`,`${f.width}px`),n.style.setProperty(`--_panel-height`,`${f.height}px`),this._applyRect(n,u.rect),n.style.backgroundColor=u.backgroundColor,n.style.color=u.color,n.style.borderRadius=u.borderRadius,n.style.boxShadow=`none`,i&&o&&(this._morphEls.text&&o.text&&(this._positionElement(this._morphEls.text,o.text.rect),this._morphEls.text.style.color=window.getComputedStyle(o.text.sourceEl).color||`inherit`,this._morphEls.text.style.fontSize=window.getComputedStyle(o.text.sourceEl).fontSize||`inherit`,this._morphEls.text.style.fontWeight=window.getComputedStyle(o.text.sourceEl).fontWeight||`inherit`,this._morphEls.text.style.lineHeight=window.getComputedStyle(o.text.sourceEl).lineHeight||`inherit`),this._morphEls.icon&&o.icon&&(this._positionElement(this._morphEls.icon,o.icon.rect),this._morphEls.icon.style.color=window.getComputedStyle(o.icon.element).color||`inherit`)),X.from(s,{targets:n,duration:.3,ease:`morph-close`,zIndex:this._zIndex,onComplete:()=>{n.style.visibility=`hidden`,n.style.opacity=`0`,n.style.pointerEvents=`none`,this._visible=!1,this._handlingOpenChange=!0,this.open=!1,this._handlingOpenChange=!1,this._isAnimating=!1,this._panel.classList.remove(`is-animating`),this._panel.style.removeProperty(`--_panel-width`),this._panel.style.removeProperty(`--_panel-height`),this._cleanupMorphElements(),this._restoreTargetContent(),l.set(e,{clearProps:`opacity,transform,filter`}),t&&(t.style.opacity=`1`),this.style.removeProperty(`z-index`),this.style.removeProperty(`--_z-index`),this.style.removeProperty(`--_backdrop-duration`),this.style.removeProperty(`--_backdrop-ease`);let r=yt._openStack.indexOf(this);r>-1&&yt._openStack.splice(r,1)}}),a.length>0){this.blurContent&&l.set(a,{filter:`blur(0px)`});let e={targets:a,duration:.3,ease:`morph-close`,zIndex:this._zIndex+10};this.blurContent&&(e.filter=`blur(12px)`),X.from(c,e)}}})}toggle(){this._visible||this.open?this.hide():this.show()}_handleDocKeydown(e){e.key!==`Escape`||!this.closeOnEsc||yt._openStack[yt._openStack.length-1]===this&&(e.stopPropagation(),this.hide())}_hideTargetContent(){if(!this._targetEl)return;let e=(e,t)=>{this._targetStylesCache.has(e)||this._targetStylesCache.set(e,{opacity:e.style.opacity,color:e.style.color}),t===`opacity`&&(e.style.opacity=`0`),t===`color`&&(e.style.color=`transparent`)};if(this.hideTarget){e(this._targetEl,`opacity`);return}if(this._targetEl.tagName===`MONI-BUTTON`){let t=this._getMoniButtonParts();t.label&&e(t.label,`opacity`),t.icon&&e(t.icon,`opacity`),t.iconTrailing&&e(t.iconTrailing,`opacity`)}else{e(this._targetEl,`color`);let t=this._targetEl.querySelector(`moni-icon, svg, [class*="icon"]`);t&&e(t,`opacity`)}}_restoreTargetContent(){if(!this._targetEl)return;let e=e=>{if(this._targetStylesCache.has(e)){let t=this._targetStylesCache.get(e);e.style.opacity=t.opacity,e.style.color=t.color,this._targetStylesCache.delete(e)}};if(this.hideTarget){e(this._targetEl);return}if(this._targetEl.tagName===`MONI-BUTTON`){let t=this._getMoniButtonParts();t.label&&e(t.label),t.icon&&e(t.icon),t.iconTrailing&&e(t.iconTrailing)}else{e(this._targetEl);let t=this._targetEl.querySelector(`moni-icon, svg, [class*="icon"]`);t&&e(t)}}_onHeaderSlotChange(e){let t=e.target;this._hasHeader=t.assignedNodes({flatten:!0}).length>0}_onFooterSlotChange(e){let t=e.target;this._hasFooter=t.assignedNodes({flatten:!0}).length>0}_onTriggerLabelSlotChange(e){let t=e.target;this._hasTriggerLabel=t.assignedNodes({flatten:!0}).length>0}_getTriggerLabelNodes(){return(this.shadowRoot?.querySelector(`slot[name="trigger-label"]`))?.assignedNodes({flatten:!0})??[]}_shouldMorphLabel(){return this.morphLabel&&!!this._targetEl&&(this._hasHeader||this._hasTriggerLabel)}_cleanupMorphElements(){this._morphEls.text&&(this._morphEls.text.remove(),this._morphEls.text=null),this._morphEls.icon&&(this._morphEls.icon.remove(),this._morphEls.icon=null)}_animateLabelOpen(){}_animateLabelClose(){}_createMorphText(e,t){let n=document.createElement(`div`);n.className=`morph-text`,n.setAttribute(`data-flip-id`,`morph-text-${this.target}`),n.setAttribute(`aria-hidden`,`true`),n.textContent=e;let r=window.getComputedStyle(t);return n.style.position=`fixed`,n.style.pointerEvents=`none`,n.style.zIndex=String(this._zIndex+10),n.style.display=`inline-flex`,n.style.alignItems=r.alignItems===`normal`?`center`:r.alignItems,n.style.justifyContent=r.justifyContent===`normal`?`flex-start`:r.justifyContent,n.style.whiteSpace=`nowrap`,n.style.color=r.color||`inherit`,n.style.fontFamily=r.fontFamily||`inherit`,n.style.fontSize=r.fontSize||`inherit`,n.style.fontWeight=r.fontWeight||`inherit`,n.style.lineHeight=r.lineHeight||`inherit`,n.style.letterSpacing=r.letterSpacing||`inherit`,this.shadowRoot.appendChild(n),this._morphEls.text=n,n}_createMorphIcon(e){let t=document.createElement(`div`);if(t.className=`morph-icon`,t.setAttribute(`data-flip-id`,`morph-icon-${this.target}`),t.setAttribute(`aria-hidden`,`true`),e.tagName===`MONI-ICON`){let n=document.createElement(`span`);n.textContent=e.getAttribute(`name`)||``;let r=window.getComputedStyle(e);n.style.display=`inline-flex`,n.style.alignItems=`center`,n.style.justifyContent=`center`,n.style.fontFamily=r.fontFamily||`var(--font-icon)`,n.style.fontSize=r.fontSize||`1.125rem`,n.style.inlineSize=r.inlineSize||`1.125rem`,n.style.blockSize=r.blockSize||`1.125rem`,n.style.lineHeight=`1`,n.style.color=`inherit`,n.style.fontWeight=`normal`,n.style.fontStyle=`normal`,n.style.letterSpacing=`normal`,n.style.textTransform=`none`,n.style.whiteSpace=`nowrap`,n.style.wordWrap=`normal`,n.style.direction=`ltr`,n.style.fontFeatureSettings=`'liga'`,n.style.fontVariationSettings=`'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24`,n.style.setProperty(`-webkit-font-smoothing`,`antialiased`),t.appendChild(n)}else t.appendChild(e.cloneNode(!0));let n=window.getComputedStyle(e);return t.style.position=`fixed`,t.style.pointerEvents=`none`,t.style.zIndex=String(this._zIndex+10),t.style.display=`inline-flex`,t.style.alignItems=`center`,t.style.justifyContent=`center`,t.style.color=n.color||`inherit`,t.style.inlineSize=n.inlineSize||`1.125rem`,t.style.blockSize=n.blockSize||`1.125rem`,this.shadowRoot.appendChild(t),this._morphEls.icon=t,t}_positionElement(e,t){e.style.top=`${t.top}px`,e.style.left=`${t.left}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}_getMoniButtonParts(){let e=this._targetEl?.shadowRoot;return{label:e?.querySelector(`[part="label"]`)??null,icon:e?.querySelector(`[part="icon"]`)??null,iconTrailing:e?.querySelector(`[part="icon-trailing"]`)??null}}_resolveMorphSource(){let e={text:null,icon:null};if(!this._targetEl)return e;if(this._hasTriggerLabel){let t=this._getTriggerLabelNodes();if(t.length>0){let n=document.createElement(`div`);for(let e of t)n.appendChild(e.cloneNode(!0));n.style.position=`fixed`,n.style.visibility=`hidden`,n.style.pointerEvents=`none`,this.shadowRoot.appendChild(n);let r=this._targetEl.getBoundingClientRect();n.remove(),e.text={content:n.textContent?.trim()||``,rect:r,sourceEl:this._targetEl}}return e}if(this._targetEl.tagName===`MONI-BUTTON`){let t=this._getMoniButtonParts();if(t.label&&(e.text={content:this._targetEl.textContent?.trim()||``,rect:t.label.getBoundingClientRect(),sourceEl:t.label}),t.icon){let n=t.icon.querySelector(`moni-icon, svg`)||t.icon;e.icon={element:n,rect:n.getBoundingClientRect()}}return e}let t=this._targetEl;if(this.morphLabelSelector){let e=this._targetEl.querySelector(this.morphLabelSelector);e&&(t=e)}let n=t.textContent?.trim()||``;n&&(e.text={content:n,rect:t.getBoundingClientRect(),sourceEl:t});let r=t.querySelector(`moni-icon, svg, [class*="icon"]`);return r&&(e.icon={element:r,rect:r.getBoundingClientRect()}),e}_measureHeaderTextRect(){if(!this._header)return null;let e=(this.shadowRoot?.querySelector(`slot[name="header"]`))?.assignedNodes({flatten:!0})??[];for(let t of e){if(t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()){let e=document.createRange();return e.selectNode(t),e.getBoundingClientRect()}if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(e.tagName===`MONI-ICON`||e.tagName===`SVG`)continue;let n=Array.from(e.childNodes);for(let e of n){if(e.nodeType===Node.TEXT_NODE&&e.textContent?.trim()){let t=document.createRange();return t.selectNode(e),t.getBoundingClientRect()}if(e.nodeType===Node.ELEMENT_NODE){let t=e;if(t.tagName!==`MONI-ICON`&&t.tagName!==`SVG`&&t.textContent?.trim())return t.getBoundingClientRect()}}if(e.textContent?.trim())return e.getBoundingClientRect()}}return this._header.getBoundingClientRect()}_measureHeaderIconRect(){let e=this._measureHeaderTextRect();if(!e)return null;let t=(this.shadowRoot?.querySelector(`slot[name="header"]`))?.assignedNodes({flatten:!0})??[];for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e;if(t.tagName===`MONI-ICON`||t.tagName===`SVG`)return t.getBoundingClientRect();let n=t.querySelector(`moni-icon, svg`);if(n)return n.getBoundingClientRect()}return new DOMRect(e.left-24-12,e.top+e.height/2-12,24,24)}_findSolidBackground(e){let t=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of t){let t=window.getComputedStyle(e).backgroundColor;if(!this._isColorTransparent(t))return t}if(e.shadowRoot){let t=Array.from(e.shadowRoot.querySelectorAll(`*`));for(let e of t){let t=window.getComputedStyle(e).backgroundColor;if(!this._isColorTransparent(t))return t}}return null}_getTargetState(e){let t=e.getBoundingClientRect(),n=e;if(e.tagName===`MONI-BUTTON`){let t=e.shadowRoot?.querySelector(`.button`);t&&(n=t)}let r=window.getComputedStyle(n).backgroundColor;if(this._isColorTransparent(r)){let e=window.getComputedStyle(n,`::before`).backgroundColor;if(!this._isColorTransparent(e))r=e;else{let e=window.getComputedStyle(n,`::after`).backgroundColor;if(!this._isColorTransparent(e))r=e;else{let e=this._findSolidBackground(n);e&&(r=e)}}}this._isColorTransparent(r)&&this._panel&&(r=window.getComputedStyle(this._panel).backgroundColor);let i=window.getComputedStyle(n);return{rect:t,backgroundColor:r,color:i.color||`var(--on-surface)`,borderRadius:i.borderRadius||`1.25rem`}}_isColorTransparent(e){if(!e)return!0;let t=e.replace(/\s/g,``).toLowerCase();return t===`rgba(0,0,0,0)`||t===`transparent`||t===``||t.includes(`,0)`)||t.includes(`/0)`)}_applyRect(e,t){e.style.top=`${t.top}px`,e.style.left=`${t.left}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}_computeFinalRect(e,t){let n=window.innerWidth,r=window.innerHeight,i=this.autoSize&&t?t.width:this._parseSize(this.expandedWidth,n),a=this.autoSize&&t?t.height:this._parseSize(this.expandedHeight,r);i=Math.min(i,n-32),a=Math.min(a,r-32);let o=e.top,s=e.left;switch(this.placement){case`viewport-center`:s=n/2-i/2,o=r/2-a/2;break;case`viewport-top`:s=n/2-i/2,o=16;break;case`viewport-bottom`:s=n/2-i/2,o=r-a-16;break;case`viewport-left`:s=16,o=r/2-a/2;break;case`viewport-right`:s=n-i-16,o=r/2-a/2;break;case`viewport-top-left`:s=16,o=16;break;case`viewport-top-right`:s=n-i-16,o=16;break;case`viewport-bottom-left`:s=16,o=r-a-16;break;case`viewport-bottom-right`:s=n-i-16,o=r-a-16;break;case`center`:s=e.left+e.width/2-i/2,o=e.top+e.height/2-a/2;break;case`top`:s=e.left+e.width/2-i/2,o=this.coverTarget?e.top+e.height-a:e.top-a;break;case`top-start`:s=e.left+e.width-i,o=this.coverTarget?e.top+e.height-a:e.top-a;break;case`top-end`:s=e.left,o=this.coverTarget?e.top+e.height-a:e.top-a;break;case`bottom`:s=e.left+e.width/2-i/2,o=this.coverTarget?e.top:e.top+e.height;break;case`bottom-start`:s=e.left+e.width-i,o=this.coverTarget?e.top:e.top+e.height;break;case`bottom-end`:s=e.left,o=this.coverTarget?e.top:e.top+e.height;break;case`left`:s=this.coverTarget?e.left+e.width-i:e.left-i,o=e.top+e.height/2-a/2;break;case`left-start`:s=this.coverTarget?e.left+e.width-i:e.left-i,o=e.top+e.height-a;break;case`left-end`:s=this.coverTarget?e.left+e.width-i:e.left-i,o=e.top;break;case`right`:s=this.coverTarget?e.left:e.left+e.width,o=e.top+e.height/2-a/2;break;case`right-start`:s=this.coverTarget?e.left:e.left+e.width,o=e.top+e.height-a;break;case`right-end`:s=this.coverTarget?e.left:e.left+e.width,o=e.top}return s=Math.max(16,Math.min(s,n-i-16)),o=Math.max(16,Math.min(o,r-a-16)),new DOMRect(s,o,i,a)}_parseSize(e,t){let n=parseFloat(e);return Number.isNaN(n)?352:e.endsWith(`px`)?n:e.endsWith(`rem`)||e.endsWith(`em`)?n*16:e.endsWith(`%`)?n/100*t:e.endsWith(`vw`)?n/100*window.innerWidth:e.endsWith(`vh`)?n/100*window.innerHeight:n}static{this.styles=[a,r`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,d as t,i as n,m as r,o as i,r as a,s as o,t as s}from"../chunks/decorate-
|
|
1
|
+
import{a as e,d as t,i as n,m as r,o as i,r as a,s as o,t as s}from"../chunks/decorate-D4jKxi6H.js";import"./moni-icon.js";import{t as c}from"../chunks/if-defined-DlAUOFi9.js";var l=class extends n{constructor(...e){super(...e),this.href=`#`,this.target=``,this.icon=``,this.label=``,this.active=!1,this.placement=`top`,this.variant=`rail`,this.layout=`auto`,this._isMediumScreen=!1,this._query=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(min-width: 601px)`):null,this._handleQueryChange=e=>{this._isMediumScreen=e.matches}}connectedCallback(){super.connectedCallback(),this._query&&(this._query.addEventListener(`change`,this._handleQueryChange),this._isMediumScreen=this._query.matches)}disconnectedCallback(){super.disconnectedCallback(),this._query&&this._query.removeEventListener(`change`,this._handleQueryChange)}get computedLayout(){return this.placement===`left`||this.placement===`right`?this.variant===`drawer`?`horizontal`:`vertical`:this.layout===`auto`?this._isMediumScreen?`horizontal`:`vertical`:this.layout}static{this.styles=[a,r`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
font-family: var(--font);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";var s=class extends t{constructor(...e){super(...e),this.placement=`top`,this.variant=`rail`,this.modal=!1,this.open=!0,this.layout=`auto`,this._propagateToItems=()=>{this.querySelectorAll(`moni-nav-item`).forEach(e=>{e.setAttribute(`placement`,this.placement),e.setAttribute(`variant`,this.variant),e.setAttribute(`layout`,this.layout)})}}connectedCallback(){super.connectedCallback(),this._onKeydown=this._onKeydown.bind(this),document.addEventListener(`keydown`,this._onKeydown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`keydown`,this._onKeydown)}_onKeydown(e){e.key===`Escape`&&this.modal&&this.open&&(this.open=!1)}_closeModal(){this.modal&&(this.open=!1)}updated(e){(e.has(`placement`)||e.has(`variant`)||e.has(`layout`)||e.has(`modal`)||e.has(`open`))&&this._propagateToItems()}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
/* Block so the host establishes a layout context for fixed
|
|
4
4
|
descendants. The inner <nav> still handles all positioning. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,i as r,m as i,o as a,p as o,r as s,s as c,t as l}from"../chunks/decorate-
|
|
1
|
+
import{a as e,c as t,d as n,i as r,m as i,o as a,p as o,r as s,s as c,t as l}from"../chunks/decorate-D4jKxi6H.js";var u=class extends r{constructor(...e){super(...e),this.value=0,this.max=100,this.variant=`linear`,this.size=`medium`,this.indeterminate=!1,this.mode=`determinate`,this.bufferValue=0,this.stopIndicator=!1,this.waveTransition=!1,this.label=`Progress`,this._percentage=0,this._reduceMotion=!1,this._handleMotionPreference=e=>{this._reduceMotion=e.matches}}connectedCallback(){super.connectedCallback(),!(typeof window>`u`||!window.matchMedia)&&(this._motionQuery=window.matchMedia(`(prefers-reduced-motion: reduce)`),this._reduceMotion=this._motionQuery.matches,this._motionQuery.addEventListener(`change`,this._handleMotionPreference))}disconnectedCallback(){this._motionQuery?.removeEventListener(`change`,this._handleMotionPreference),this._motionQuery=void 0,super.disconnectedCallback()}willUpdate(e){if(e.has(`value`)||e.has(`max`)){let e=Number.isFinite(this.max)&&this.max>0?this.max:100,t=Number.isFinite(this.value)?this.value:0;this._percentage=Math.min(100,Math.max(0,t/e*100))}e.has(`variant`)&&![`linear`,`circular`,`wavy`,`circular-wavy`].includes(this.variant)&&(this.variant=`linear`),e.has(`mode`)&&![`determinate`,`buffer`].includes(this.mode)&&(this.mode=`determinate`)}get _isCircular(){return this.variant===`circular`||this.variant===`circular-wavy`}get _isWavy(){return this.variant===`wavy`||this.variant===`circular-wavy`}get _isBuffer(){return!this.indeterminate&&this.mode===`buffer`}get _bufferPercentage(){let e=Number.isFinite(this.max)&&this.max>0?this.max:100,t=Number.isFinite(this.bufferValue)?this.bufferValue:0;return Math.max(this._percentage,Math.min(100,Math.max(0,t/e*100)))}_aria(){return{role:`progressbar`,label:this.label,valueNow:this.indeterminate?t:this.value,valueText:this.indeterminate?`Loading`:`${Math.round(this._percentage)}%`}}_renderLinear(){let e=this._aria(),r=this._percentage>0,i=r&&this._percentage<=2,a=r?this._percentage:0,s=this._isBuffer&&this._bufferPercentage>a,c=`M-40 7 C-35 7 -35 4 -30 4 S-25 7 -20 7 S-15 10 -10 10 S-5 7 0 7 C5 7 5 4 10 4 S15 7 20 7 S25 10 30 10 S35 7 40 7 C45 7 45 4 50 4 S55 7 60 7 S65 10 70 10 S75 7 80 7`,l=`M-40 7 C-35 7 -35 7 -30 7 S-25 7 -20 7 S-15 7 -10 7 S-5 7 0 7 C5 7 5 7 10 7 S15 7 20 7 S25 7 30 7 S35 7 40 7 C45 7 45 7 50 7 S55 7 60 7 S65 7 70 7 S75 7 80 7`;return n`
|
|
2
2
|
<div
|
|
3
3
|
class="linear progress-linear ${this._isWavy?`wavy progress-wavy`:`flat`} ${this.indeterminate?`indeterminate`:this._isBuffer?`buffer`:`determinate`}"
|
|
4
4
|
part="progress"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import{t as s}from"../chunks/query-SWT-tzvq.js";import{t as c}from"../chunks/if-defined-DlAUOFi9.js";import{t as l}from"../chunks/live-DdUrWiUp.js";var u,d=class extends t{static{u=this}static{this.formAssociated=!0}constructor(){super(),this.label=``,this.checked=!1,this.disabled=!1,this.uncheckedIcon=``,this.checkedIcon=``,this.iconContainer=`circle`,this.size=`medium`,this.name=``,this.value=``,this._internals=this.attachInternals()}updated(e){this._input&&(e.has(`checked`)&&(this._input.checked=this.checked,this._internals?.setFormValue?.(this.checked?this.value||`on`:null)),e.has(`disabled`)&&(this._input.disabled=this.disabled))}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
--_size: 1.5rem;
|
|
4
4
|
display: inline-flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";var s=class extends t{constructor(...e){super(...e),this.x=50,this.y=50,this.active=!1,this.speed=`normal`,this.color=`primary`,this._target=null,this._timeoutId=null,this._onPointerDown=e=>{if(!this._target)return;let t=this._target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;this.x=n/t.width*100,this.y=r/t.height*100,this._timeoutId&&(clearTimeout(this._timeoutId),this.active=!1),requestAnimationFrame(()=>{this.active=!0;let e=this.speed===`fast`?300:this.speed===`slow`?1200:600;this._timeoutId=setTimeout(()=>{this.active=!1,this._timeoutId=null},e)})}}connectedCallback(){super.connectedCallback(),this._target=this.parentElement,this._target&&(getComputedStyle(this._target).position===`static`&&(this._target.style.position=`relative`),this._target.addEventListener(`pointerdown`,this._onPointerDown))}disconnectedCallback(){this._target&&this._target.removeEventListener(`pointerdown`,this._onPointerDown),this._timeoutId&&clearTimeout(this._timeoutId),super.disconnectedCallback()}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: absolute;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import{t as s}from"../chunks/query-assigned-elements-BBHe1xEY.js";var c,l=class extends t{static{c=this}static{this.formAssociated=!0}static{this._deprecationWarned=!1}constructor(){super(),this.name=``,this.multi=!1,this.size=`small`,this.hideCheck=!1,this.gap=``,this.internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),c._deprecationWarned||(c._deprecationWarned=!0,console.warn(`[moni-ui] <moni-segmented-button> is deprecated since v0.3.0. Material Design 3 Expressive no longer recommends segmented buttons. Use <moni-button-group variant="connected"> instead. See m3-docs/components/segmented-buttons/overview.md § M3 Expressive update.`))}get form(){return this.internals.form}get type(){return`segmented-button`}get value(){let e=this.segments.filter(e=>e.checked).map(e=>e.value);return this.multi?e.join(`,`):e[0]||``}get segments(){return this.slottedSegments.filter(e=>e.tagName.toLowerCase()===`moni-button-segment`)}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";var s=class extends t{constructor(...e){super(...e),this.value=``,this.label=``,this.group=``,this.selected=!1,this.disabled=!1}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
font-family: var(--font);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,i as r,m as i,n as a,o,r as s,s as c,t as l}from"../chunks/decorate-
|
|
1
|
+
import{a as e,c as t,d as n,i as r,m as i,n as a,o,r as s,s as c,t as l}from"../chunks/decorate-D4jKxi6H.js";import{t as u}from"../chunks/query-SWT-tzvq.js";import{t as d}from"../chunks/event-emitter-CGhsijUg.js";import"./moni-icon.js";import{t as f}from"../chunks/if-defined-DlAUOFi9.js";import"./moni-progress.js";import{t as p}from"../chunks/class-map-EVPcxmRq.js";import"./moni-select-option.js";var m=class extends r{static{this.formAssociated=!0}constructor(){super(),this.name=``,this.label=``,this.variant=`filled`,this.size=`medium`,this.shape=`no-round`,this.disabled=!1,this.loading=!1,this.helper=``,this.errorText=``,this.error=!1,this.value=``,this.icon=``,this.trailingIcon=`arrow_drop_down`,this.searchable=!1,this.clearable=!1,this.sheet=!1,this.placeholder=``,this.positioning=`absolute`,this.placement=`auto`,this.dropdownWidth=`trigger`,this.dropdownMaxHeight=``,this._open=!1,this._searchQuery=``,this._actualPlacement=`bottom`,this._parsedOptions=[],this._activeIndex=-1,this._menuStyle=``,this._menuMaxHeight=`75vh`,this._useInlineCategories=!1,this._drilldownPath=[],this._handleOutsideClick=e=>{this._open&&!e.composedPath().includes(this)&&this._closeDropdown()},this._handlePeerOpen=e=>{let t=e.detail?.item;t&&t!==this&&this._open&&this._closeDropdown()},this._handleScroll=()=>{this._open&&(this._determineActualPlacement(),this._updateMenuPosition())},this._handleResize=()=>{this._open&&(this._determineActualPlacement(),this._updateMenuPosition())},this._internals=this.attachInternals()}static{this.styles=[s,a,i`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";var s=class extends t{constructor(...e){super(...e),this.type=`rounded`,this.name=``,this.size=`medium`,this.border=!1,this.shadow=!1,this.shapeRadius=``,this.color=`primary`,this.duration=`500ms`,this.easing=`cubic-bezier(.2, 0, 0, 1)`}static{this.styles=[i,n`
|
|
2
2
|
:host { display:inline-flex; font-family:var(--font-sans); }
|
|
3
3
|
.shape {
|
|
4
4
|
inline-size:var(--_shape-size,4rem);block-size:var(--_shape-size,4rem);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import{t as s}from"../chunks/query-SWT-tzvq.js";import"./moni-icon.js";import"./moni-button.js";var c=class extends t{constructor(...e){super(...e),this.open=!1,this.modal=!1,this.side=`right`,this.title=``,this.detached=!1,this.showBack=!1,this.noBorder=!1,this.withHandle=!1,this.hideClose=!1,this.expandedWidth=`600px`,this.maxWidth=``,this._isDragging=!1,this._startX=0,this._currentTranslationX=0,this._sheetWidth=0,this._defaultWidth=0,this._justDragged=!1}_getMaxWidthPx(){let e=this.expandedWidth||`600px`;return e.endsWith(`%`)||e.endsWith(`vw`)?window.innerWidth*(parseFloat(e)/100):e.endsWith(`px`)?parseFloat(e):600}updated(e){if(super.updated(e),e.has(`expandedWidth`)&&this.style.setProperty(`--moni-side-sheet-expanded-width`,this.expandedWidth),e.has(`maxWidth`)&&this.style.setProperty(`--moni-side-sheet-max-width`,this.maxWidth||`400px`),e.has(`open`)&&this._dialog){if(this.open)this.modal?this._dialog.open||(typeof this._dialog.showModal==`function`?this._dialog.showModal():this._dialog.open=!0):this._dialog.open||(typeof this._dialog.show==`function`?this._dialog.show():this._dialog.open=!0),this._dialog.getBoundingClientRect(),this._dialog.classList.add(`opened`);else if(this._dialog.open){this._dialog.classList.remove(`opened`);let e=t=>{t.target===this._dialog&&(t.propertyName===`transform`||t.propertyName===`opacity`)&&(this._dialog.removeEventListener(`transitionend`,e),!this.open&&this._dialog.open&&(this._dialog.classList.remove(`expanded`),this._dialog.close()))};this._dialog.addEventListener(`transitionend`,e),setTimeout(()=>{!this.open&&this._dialog.open&&(this._dialog.classList.remove(`expanded`),this._dialog.close())},350)}}}_onPointerDown(e){if(!this.withHandle)return;let t=e.target;!t.closest(`.handle`)&&!t.closest(`header`)||(this._isDragging=!0,this._startX=e.clientX,this._sheetWidth=this._dialog.getBoundingClientRect().width,this._currentTranslationX=0,this._dialog.classList.contains(`expanded`)||(this._defaultWidth=this._sheetWidth),t.setPointerCapture(e.pointerId),this._dialog.classList.add(`dragging`))}_onPointerMove(e){if(!this._isDragging)return;let t=e.clientX-this._startX,n=this._dialog.classList.contains(`expanded`),r=this._getMaxWidthPx(),i=this.side===`right`?t:-t;if(n){if(i>0){let e=this._sheetWidth-i;this._dialog.style.transform=``,this._dialog.style.width=`${Math.max(0,e)}px`}else{let e=this._sheetWidth-i*.2;this._dialog.style.width=`${Math.min(r,e)}px`}}else if(i>0)this._currentTranslationX=i,this._dialog.style.transform=`translateX(${this.side===`right`?i:-i}px)`,this._dialog.style.width=``;else{let e=this._sheetWidth-i;this._dialog.style.transform=``,this._dialog.style.width=`${Math.min(r,e)}px`}}_onPointerUp(e){if(!this._isDragging)return;e.target.releasePointerCapture(e.pointerId),this._isDragging=!1,this._dialog.classList.remove(`dragging`);let t=e.clientX-this._startX;Math.abs(t)>5&&(this._justDragged=!0,setTimeout(()=>{this._justDragged=!1},50));let n=this._dialog.classList.contains(`expanded`),r=this._getMaxWidthPx(),i=this.side===`right`?t:-t;if(n){let e=this._sheetWidth-i;if(e<this._defaultWidth-80){this._dialog.classList.remove(`expanded`),this._dialog.classList.remove(`opened`),this._dialog.style.transform=this.side===`right`?`translateX(100%)`:`translateX(-100%)`,this._dialog.style.width=``;let e=()=>{this._dialog.removeEventListener(`transitionend`,e),this._dialog.style.transform=``,this._dialog.style.width=``,this.open=!1,this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))};this._dialog.addEventListener(`transitionend`,e),setTimeout(()=>{this.open&&e()},300)}else e<(r+this._defaultWidth)/2?(this._dialog.classList.remove(`expanded`),this._dialog.style.transform=``,this._dialog.style.width=``):(this._dialog.style.transform=``,this._dialog.style.width=``)}else if(i<0)this._sheetWidth-i>(r+this._sheetWidth)/2||-i>80?(this._dialog.classList.add(`expanded`),this._dialog.style.transform=``,this._dialog.style.width=``):(this._dialog.style.transform=``,this._dialog.style.width=``);else{let e=Math.min(150,this._sheetWidth*.4);if(Math.abs(this._currentTranslationX)>e){this._dialog.classList.remove(`opened`),this._dialog.style.transform=this.side===`right`?`translateX(100%)`:`translateX(-100%)`,this._dialog.style.width=``;let e=()=>{this._dialog.removeEventListener(`transitionend`,e),this._dialog.style.transform=``,this._dialog.style.width=``,this.open=!1,this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))};this._dialog.addEventListener(`transitionend`,e),setTimeout(()=>{this.open&&e()},300)}else this._dialog.style.transform=``,this._dialog.style.width=``}}_onPointerCancel(e){this._isDragging&&(e.target.releasePointerCapture(e.pointerId),this._isDragging=!1,this._dialog.classList.remove(`dragging`),this._dialog.style.transform=``,this._dialog.style.width=``)}_onCloseClick(){this.open=!1,this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))}_onBackClick(){this.dispatchEvent(new CustomEvent(`back`,{bubbles:!0,composed:!0}))}_onDialogClick(e){if(this._justDragged){this._justDragged=!1;return}this.modal&&e.target===this._dialog&&this._onCloseClick()}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,i as r,m as i,o as a,r as o,s,t as c}from"../chunks/decorate-
|
|
1
|
+
import{a as e,c as t,d as n,i as r,m as i,o as a,r as o,s,t as c}from"../chunks/decorate-D4jKxi6H.js";import"./moni-icon.js";import{t as l}from"../chunks/if-defined-DlAUOFi9.js";var u=class extends r{constructor(...e){super(...e),this.name=``,this.min=`0`,this.max=`100`,this.step=``,this.tickInterval=null,this.insetIcon=``,this.indicatorPlacement=`top`,this.size=`medium`,this.range=!1,this.disabled=!1,this.ticks=!1,this.indicator=!1,this.isVertical=!1,this._value=`50`,this._valueEnd=`75`}get value(){return this._value}set value(e){this._value=e}get valueEnd(){return this._valueEnd}set valueEnd(e){this._valueEnd=e}_pct(e){let t=parseFloat(this.min)||0,n=parseFloat(this.max)||100;return Math.max(0,Math.min(100,((parseFloat(e)||0)-t)/(n-t)*100))}_onInput(e,t){let n=e.target;t===0?this._value=n.value:this._valueEnd=n.value,this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}_onChange(e,t){let n=e.target;t===0?this._value=n.value:this._valueEnd=n.value,this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}_renderDatalist(){if(this.tickInterval!=null&&this.tickInterval>0){let e=parseFloat(this.min)||0,t=parseFloat(this.max)||100,r=this.tickInterval,i=[];for(let n=e;n<=t;n+=r)i.push(Math.round(n*1e3)/1e3);return n`<datalist id="ticks">
|
|
2
2
|
${i.map(e=>n`<option value=${e}></option>`)}
|
|
3
3
|
</datalist>`}return this.ticks?n`<datalist id="ticks">
|
|
4
4
|
<option value=${this.min}></option>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import"./moni-icon.js";var s=class extends t{constructor(...e){super(...e),this.text=``,this.action=``,this.placement=`bottom`,this.active=!1,this.maxLines=2}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
/* Use block instead of contents so position:fixed inside
|
|
4
4
|
works relative to the viewport (its containing block). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import{t as s}from"../chunks/query-assigned-elements-BBHe1xEY.js";var c=class extends t{constructor(...e){super(...e),this.variant=`filled`,this.size=`small`,this.gap=``}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import"./moni-icon.js";var s=class extends t{constructor(...e){super(...e),this.title=``,this.description=``,this.active=!1,this.completed=!1,this.icon=``,this.index=0,this.orientation=`horizontal`}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import{t as s}from"../chunks/query-assigned-elements-BBHe1xEY.js";var c=class extends t{constructor(...e){super(...e),this.orientation=`horizontal`,this.current=0,this._onSlotChange=()=>{this._syncSteps()}}updated(e){(e.has(`current`)||e.has(`orientation`)||e.size===0)&&this._syncSteps()}_syncSteps(){Promise.resolve().then(()=>{let e=this._steps||[];e.length===0&&(e=Array.from(this.querySelectorAll(`moni-step`))),e.forEach((e,t)=>{e.index=t,e.orientation=this.orientation,e.completed=t<this.current,e.active=t===this.current})})}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
--_stepper-gap: 0.5rem;
|
|
4
4
|
display: block;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import{t as s}from"../chunks/query-SWT-tzvq.js";import"./moni-icon.js";import{t as c}from"../chunks/if-defined-DlAUOFi9.js";var l=class extends t{static{this.formAssociated=!0}constructor(){super(),this.label=``,this.checked=!1,this.disabled=!1,this.icon=!1,this.uncheckedIcon=``,this.checkedIcon=``,this.name=``,this.value=``,this._internals=this.attachInternals()}updated(e){this._input&&(e.has(`checked`)&&(this._input.checked=this.checked,this._internals?.setFormValue?.(this.checked?this.value||`on`:null)),e.has(`disabled`)&&(this._input.disabled=this.disabled))}_onChange(e){this.checked=e.target.checked,this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
font-family: var(--font);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";import"./moni-icon.js";var s=class extends t{constructor(...e){super(...e),this.active=!1,this.icon=``,this.label=``,this.href=`#`}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
font-family: var(--font);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-
|
|
1
|
+
import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-D4jKxi6H.js";var s=class extends t{constructor(...e){super(...e),this.mode=`primary`,this.scrollable=!1,this.vertical=!1,this.align=`default`,this.indicatorSize=`default`}static{this.styles=[i,n`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
font-family: var(--font);
|