@m3e/web 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.js +1161 -941
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +59 -59
- package/dist/all.min.js.map +1 -1
- package/dist/bottom-sheet.js +1 -1
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +1 -1
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/button.js +387 -317
- package/dist/button.js.map +1 -1
- package/dist/button.min.js +2 -2
- package/dist/button.min.js.map +1 -1
- package/dist/card.js +73 -73
- package/dist/card.js.map +1 -1
- package/dist/card.min.js +5 -5
- package/dist/card.min.js.map +1 -1
- package/dist/checkbox.js +5 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.min.js +1 -1
- package/dist/checkbox.min.js.map +1 -1
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-bidi.js.map +1 -1
- package/dist/core-bidi.min.js.map +1 -1
- package/dist/core-layout.js.map +1 -1
- package/dist/core-layout.min.js.map +1 -1
- package/dist/core-platform.js.map +1 -1
- package/dist/core-platform.min.js.map +1 -1
- package/dist/core.js +42 -32
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +2 -2
- package/dist/core.min.js.map +1 -1
- package/dist/css-custom-data.json +1356 -511
- package/dist/custom-elements.json +9890 -9217
- package/dist/fab.js +299 -258
- package/dist/fab.js.map +1 -1
- package/dist/fab.min.js +6 -6
- package/dist/fab.min.js.map +1 -1
- package/dist/form-field.js +10 -6
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +4 -4
- package/dist/form-field.min.js.map +1 -1
- package/dist/html-custom-data.json +152 -152
- package/dist/icon-button.js +288 -232
- package/dist/icon-button.js.map +1 -1
- package/dist/icon-button.min.js +5 -5
- package/dist/icon-button.min.js.map +1 -1
- package/dist/list.js +18 -3
- package/dist/list.js.map +1 -1
- package/dist/list.min.js +8 -8
- package/dist/list.min.js.map +1 -1
- package/dist/menu.js +23 -12
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +7 -7
- package/dist/menu.min.js.map +1 -1
- package/dist/nav-bar.js +1 -1
- package/dist/nav-bar.js.map +1 -1
- package/dist/nav-bar.min.js +1 -1
- package/dist/nav-bar.min.js.map +1 -1
- package/dist/nav-rail.js +1 -1
- package/dist/nav-rail.js.map +1 -1
- package/dist/nav-rail.min.js +4 -4
- package/dist/nav-rail.min.js.map +1 -1
- package/dist/option.js +1 -1
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/radio-group.js +4 -0
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.min.js +1 -1
- package/dist/radio-group.min.js.map +1 -1
- package/dist/slider.js +2 -2
- package/dist/slider.js.map +1 -1
- package/dist/slider.min.js +3 -3
- package/dist/slider.min.js.map +1 -1
- package/dist/snackbar.js.map +1 -1
- package/dist/snackbar.min.js.map +1 -1
- package/dist/split-button.js +1 -0
- package/dist/split-button.js.map +1 -1
- package/dist/split-button.min.js +1 -1
- package/dist/split-button.min.js.map +1 -1
- package/dist/src/bottom-sheet/BottomSheetElement.d.ts.map +1 -1
- package/dist/src/button/ButtonElement.d.ts +70 -0
- package/dist/src/button/ButtonElement.d.ts.map +1 -1
- package/dist/src/button/styles/ButtonSizeToken.d.ts.map +1 -1
- package/dist/src/button/styles/ButtonVariantToken.d.ts.map +1 -1
- package/dist/src/card/styles/CardVariantToken.d.ts.map +1 -1
- package/dist/src/checkbox/CheckboxElement.d.ts.map +1 -1
- package/dist/src/core/a11y/AriaDescriber.d.ts +3 -1
- package/dist/src/core/a11y/AriaDescriber.d.ts.map +1 -1
- package/dist/src/core/a11y/InteractivityChecker.d.ts +3 -1
- package/dist/src/core/a11y/InteractivityChecker.d.ts.map +1 -1
- package/dist/src/core/a11y/LiveAnnouncer.d.ts +3 -1
- package/dist/src/core/a11y/LiveAnnouncer.d.ts.map +1 -1
- package/dist/src/core/bidi/Directionality.d.ts +3 -1
- package/dist/src/core/bidi/Directionality.d.ts.map +1 -1
- package/dist/src/core/layout/BreakpointObserver.d.ts +3 -1
- package/dist/src/core/layout/BreakpointObserver.d.ts.map +1 -1
- package/dist/src/core/platform/Platform.d.ts +3 -1
- package/dist/src/core/platform/Platform.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/PressedController.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/FocusRingElement.d.ts +2 -0
- package/dist/src/core/shared/primitives/FocusRingElement.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/FocusRingToken.d.ts +4 -0
- package/dist/src/core/shared/primitives/FocusRingToken.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/ScrollContainerElement.d.ts.map +1 -1
- package/dist/src/fab/FabElement.d.ts +41 -0
- package/dist/src/fab/FabElement.d.ts.map +1 -1
- package/dist/src/fab/styles/FabSizeToken.d.ts.map +1 -1
- package/dist/src/fab/styles/FabVariantToken.d.ts.map +1 -1
- package/dist/src/form-field/FormFieldElement.d.ts.map +1 -1
- package/dist/src/icon-button/IconButtonElement.d.ts +56 -0
- package/dist/src/icon-button/IconButtonElement.d.ts.map +1 -1
- package/dist/src/icon-button/styles/IconButtonSizeToken.d.ts.map +1 -1
- package/dist/src/icon-button/styles/IconButtonVariantToken.d.ts.map +1 -1
- package/dist/src/list/ListItemButtonElement.d.ts +1 -0
- package/dist/src/list/ListItemButtonElement.d.ts.map +1 -1
- package/dist/src/list/ListItemElement.d.ts.map +1 -1
- package/dist/src/list/ListOptionElement.d.ts +1 -0
- package/dist/src/list/ListOptionElement.d.ts.map +1 -1
- package/dist/src/menu/MenuElement.d.ts +2 -0
- package/dist/src/menu/MenuElement.d.ts.map +1 -1
- package/dist/src/menu/MenuItemElementBase.d.ts +1 -0
- package/dist/src/menu/MenuItemElementBase.d.ts.map +1 -1
- package/dist/src/nav-rail/NavRailElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/radio-group/RadioElement.d.ts.map +1 -1
- package/dist/src/slider/SliderThumbElement.d.ts.map +1 -1
- package/dist/src/snackbar/Snackbar.d.ts +3 -1
- package/dist/src/snackbar/Snackbar.d.ts.map +1 -1
- package/dist/src/split-button/SplitButtonElement.d.ts.map +1 -1
- package/dist/src/switch/SwitchElement.d.ts.map +1 -1
- package/dist/src/tabs/TabElement.d.ts.map +1 -1
- package/dist/src/tabs/TabsElement.d.ts.map +1 -1
- package/dist/switch.js +5 -1
- package/dist/switch.js.map +1 -1
- package/dist/switch.min.js +2 -2
- package/dist/switch.min.js.map +1 -1
- package/dist/tabs.js +2 -2
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.min.js +3 -3
- package/dist/tabs.min.js.map +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +1 -1
- package/dist/tooltip.min.js.map +1 -1
- package/package.json +1 -1
package/dist/core.min.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2025 matraic
|
|
4
4
|
* See LICENSE file in the project root for full license text.
|
|
5
5
|
*/
|
|
6
|
-
import{isServer as e,nothing as t,noChange as s,unsafeCSS as i,html as r,css as n,LitElement as a}from"lit";function o(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a}function l(e,t,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(e):i?i.value:t.get(e)}function h(e,t,s,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,s):r?r.value=s:t.set(e,s),s}var c,d,p,u,m,f,v,y,g,b,x,w,$,k,E,_,S,A,C,M,L,z,W,P,T,H,F,O,D,U,N,I,R,B,q,V,j,X,Z,Y,G,K,Q,J,ee,te,se,ie,re,ne,ae,oe,le,he,ce,de,pe,ue,me,fe,ve,ye,ge,be,xe,we,$e,ke,Ee,_e,Se,Ae,Ce,Me,Le,ze,We,Pe,Te,He,Fe,Oe,De,Ue,Ne,Ie,Re,Be,qe,Ve,je;"function"==typeof SuppressedError&&SuppressedError;class Xe{constructor(e,t){c.set(this,null),d.set(this,0),p.set(this,!1),u.set(this,void 0),m.set(this,()=>{if(!l(this,p,"f"))return;const e=performance.now();l(this,u,"f").call(this,(e-l(this,d,"f"))/1e3,e/1e3),h(this,d,e,"f"),h(this,c,requestAnimationFrame(l(this,m,"f")),"f")}),h(this,u,t,"f"),e.addController(this)}hostDisconnected(){this.stop()}start(){l(this,p,"f")||(h(this,p,!0,"f"),h(this,d,performance.now(),"f"),l(this,m,"f").call(this))}stop(){l(this,p,"f")&&(h(this,p,!1,"f"),null!==l(this,c,"f")&&(cancelAnimationFrame(l(this,c,"f")),h(this,c,null,"f")))}}c=new WeakMap,d=new WeakMap,p=new WeakMap,u=new WeakMap,m=new WeakMap;class Ze{constructor(e,t){f.set(this,void 0),v.set(this,void 0),y.set(this,new Set),h(this,f,e,"f"),h(this,v,t.target,"f"),l(this,f,"f").addController(this)}get targets(){return l(this,y,"f").values()}hostConnected(){null!==l(this,v,"f")&&this.observe(l(this,v,"f")??l(this,f,"f"))}hostDisconnected(){l(this,y,"f").forEach(e=>this.unobserve(e)),l(this,y,"f").clear()}observe(e){l(this,y,"f").has(e)||(l(this,y,"f").add(e),this._observe(e))}isObserving(e){return l(this,y,"f").has(e)}unobserve(e){l(this,y,"f").delete(e)&&this._unobserve(e)}}function Ye(e,t){if(!t)return 0;const s=document.createElement("div");s.style.all="inherit",s.style.width=t,s.style.position="absolute",s.style.visibility="hidden",s.style.pointerEvents="none",e.appendChild(s);try{return parseFloat(getComputedStyle(s).width)}finally{s.remove()}}function Ge(e){const t=parseFloat(getComputedStyle(e).lineHeight);return isNaN(t)||t<=0?0:Math.round(e.scrollHeight/t)}async function Ke(e,t=200){function s(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}e.focus();const i=performance.now();for(;!s(e);){if(!e.isConnected||performance.now()-i>t)return!1;await new Promise(requestAnimationFrame),e.focus()}return!0}function Qe(){return!e&&matchMedia("(forced-colors: active)").matches}function Je(e,t,s){return e+(t-e)*s}function et(e,t,s,i){return{x:Math.pow(1-i,2)*e.x+2*(1-i)*i*t.x+Math.pow(i,2)*s.x,y:Math.pow(1-i,2)*e.y+2*(1-i)*i*t.y+Math.pow(i,2)*s.y}}function tt(e,t,s,i,r){return{x:Math.pow(1-r,3)*e.x+3*Math.pow(1-r,2)*r*t.x+3*(1-r)*Math.pow(r,2)*s.x+Math.pow(r,3)*i.x,y:Math.pow(1-r,3)*e.y+3*Math.pow(1-r,2)*r*t.y+3*(1-r)*Math.pow(r,2)*s.y+Math.pow(r,3)*i.y}}function st(e,t){const s=function(e){return(e.match(/[a-zA-Z][^a-zA-Z]*/g)||[]).map(e=>({type:e[0],nums:e.slice(1).trim().split(/[\s,]+/).filter(Boolean).map(Number)}))}(e);let i={x:0,y:0},r={x:0,y:0};const n=[];for(const e of s)if("M"===e.type)i={x:e.nums[0],y:e.nums[1]},r=i;else if("L"===e.type){const t={x:e.nums[0],y:e.nums[1]},s=t.x-i.x,r=t.y-i.y;n.push({type:"L",pts:[i,t],length:Math.hypot(s,r)}),i=t}else if("H"===e.type){const t={x:e.nums[0],y:i.y},s=t.x-i.x;n.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("V"===e.type){const t={x:i.x,y:e.nums[0]},s=t.y-i.y;n.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("Q"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]};let r=0,a=i;const o=20;for(let e=1;e<=o;e++){const n=et(i,t,s,e/o);r+=Math.hypot(n.x-a.x,n.y-a.y),a=n}n.push({type:"Q",pts:[i,t,s],length:r}),i=s}else if("C"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]},r={x:e.nums[4],y:e.nums[5]};let a=0,o=i;const l=20;for(let e=1;e<=l;e++){const n=tt(i,t,s,r,e/l);a+=Math.hypot(n.x-o.x,n.y-o.y),o=n}n.push({type:"C",pts:[i,t,s,r],length:a}),i=r}else if("Z"===e.type){const e=r.x-i.x,t=r.y-i.y;n.push({type:"L",pts:[i,r],length:Math.hypot(e,t)}),i=r}const a=n.reduce((e,t)=>e+t.length,0),o=a/(t-1),l=[];let h=0,c=0;for(let e=0;e<t;e++){const t=e*o;for(;c<n.length&&h+n[c].length<t;)h+=n[c].length,c++;const s=n[c];if(!s)break;const i=(t-h)/s.length;if("L"===s.type){const[e,t]=s.pts;l.push({x:Je(e.x,t.x,i),y:Je(e.y,t.y,i)})}else if("Q"===s.type){const[e,t,r]=s.pts;l.push(et(e,t,r,i))}else if("C"===s.type){const[e,t,r,n]=s.pts;l.push(tt(e,t,r,n,i))}}return l}function it(e,t,s){return Math.max(t,Math.min(s,e))}function rt(e,t){const s=e.length,i=new Array(s);for(let r=0;r<s;r++)i[r]=e[(r+t)%s];return i}function nt(e,t){const s=Math.min(t.length,e.length);let i=0,r=1/0;for(let n=0;n<s;n++){let a=0;for(let i=0;i<s;i++){const o=t[(i+n)%s],l=e[i],h=o.x-l.x,c=o.y-l.y;if(a+=h*h+c*c,a>=r)break}a<r&&(r=a,i=n)}return i}function at(e){let t=0;const s=e.length;for(let i=0;i<s;i++){const r=e[i],n=e[(i+1)%s];t+=r.x*n.y-n.x*r.y}return t/2}function ot(e,t){return function(e){const t=e.map(e=>{const t=function(e){let t=1/0,s=1/0,i=-1/0,r=-1/0;for(const n of e)n.x<t&&(t=n.x),n.x>i&&(i=n.x),n.y<s&&(s=n.y),n.y>r&&(r=n.y);return{minX:t,minY:s,maxX:i,maxY:r,width:i-t,height:r-s}}(e),s=e.map(e=>({x:e.x-t.minX,y:e.y-t.minY})),i=Math.max(t.width,t.height)||1,r=s.map(e=>({x:e.x/i,y:e.y/i})),n=t.width/i,a=t.height/i,o=(1-n)/2,l=(1-a)/2;return r.map(e=>({x:e.x+o,y:e.y+l}))}),s=t[0],i=Math.sign(at(s));for(let e=1;e<t.length;e++){let r=t[e];const n=Math.sign(at(r));0!==n&&n!==i&&(r=r.slice().reverse());const a=nt(s,r);t[e]=rt(r,a)}return t}(e.map(e=>st(e,t))).map(e=>function(e){const t=e.map(e=>{const t=it(100*e.x,0,100),s=it(100*e.y,0,100);return`${t.toFixed(2)}% ${s.toFixed(2)}%`});return`${t.join(", ")}`}(e))}function lt(e,t=!1){let s="";switch(e.nodeType){case Node.TEXT_NODE:s=e.nodeValue??"";break;case Node.ELEMENT_NODE:if(e instanceof HTMLSlotElement)for(const i of e.assignedNodes({flatten:!0}))s+=lt(i,t);else for(const i of e.childNodes)s+=lt(i,t)}return t&&(s=s.trim()),s}function ht(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function ct(e){return e.assignedNodes({flatten:!0}).length>0}function dt(e,t,s){const i=Object.getOwnPropertyDescriptor(e,t)??Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);if(!i)throw new Error(`Property ${String(t)} not found on target.`);const r=i.get?.bind(e),n=i.set?.bind(e);return Object.defineProperty(e,t,{configurable:!0,enumerable:i.enumerable,get:()=>s.get?s.get(()=>r?.()):r?.(),set(e){s.set?s.set(e,e=>n?.(e)):n?.(e)}}),()=>Object.defineProperty(e,t,i)}function pt(){return e||matchMedia("(prefers-reduced-motion)").matches}function ut(e,t=document){return new Promise(s=>{const i=t.querySelector(`#${e}`);i?s(i):"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",()=>s(t.querySelector(`#${e}`)),{once:!0}):s(t.querySelector(`#${e}`))})}function mt(e){const t=document?.location??null;return`url(${t?(t.pathname+t.search).split("#")[0]:""}#${e})`}function ft(e,t,s){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect();(r.top<i.top||r.bottom>i.bottom)&&e.scrollIntoView(s)}f=new WeakMap,v=new WeakMap,y=new WeakMap;class vt{constructor(e=100){g.set(this,[]),b.set(this,void 0),h(this,b,e,"f")}add(e,t=performance.now()){l(this,g,"f").push({y:e,t:t});const s=t-l(this,b,"f");for(;l(this,g,"f").length>1&&l(this,g,"f")[0].t<s;)l(this,g,"f").shift()}getVelocity(){if(l(this,g,"f").length<2)return 0;const e=l(this,g,"f")[0],t=l(this,g,"f")[l(this,g,"f").length-1],s=t.y-e.y,i=(t.t-e.t)/1e3;return i>0?s/i:0}reset(){l(this,g,"f").length=0}}g=new WeakMap,b=new WeakMap;class yt extends Ze{constructor(e,t){super(e,t),x.add(this),w.set(this,!1),$.set(this,void 0),k.set(this,e=>l(this,x,"m",z).call(this,e)),E.set(this,e=>l(this,x,"m",W).call(this,e)),_.set(this,e=>l(this,x,"m",P).call(this,e)),S.set(this,()=>h(this,w,!0,"f")),A.set(this,()=>h(this,w,!1,"f")),C.set(this,!1),M.set(this,()=>h(this,C,!0,"f")),L.set(this,()=>h(this,C,!1,"f")),h(this,$,t.callback,"f")}hostConnected(){super.hostConnected(),window?.addEventListener("keydown",l(this,M,"f"),{capture:!0,passive:!0}),window?.addEventListener("pointerdown",l(this,L,"f"),{capture:!0})}hostDisconnected(){super.hostDisconnected(),window?.removeEventListener("keydown",l(this,M,"f"),{capture:!0}),window?.removeEventListener("pointerdown",l(this,L,"f"),{capture:!0})}_observe(e){e.addEventListener("keydown",l(this,k,"f")),e.addEventListener("focusin",l(this,E,"f")),e.addEventListener("focusout",l(this,_,"f")),e.addEventListener("touchstart",l(this,S,"f")),e.addEventListener("touchend",l(this,A,"f")),e.addEventListener("touchcancel",l(this,A,"f"))}_unobserve(e){e.removeEventListener("keydown",l(this,k,"f")),e.removeEventListener("focusin",l(this,E,"f")),e.removeEventListener("focusout",l(this,_,"f")),e.removeEventListener("touchstart",l(this,S,"f")),e.removeEventListener("touchend",l(this,A,"f")),e.removeEventListener("touchcancel",l(this,A,"f"))}}w=new WeakMap,$=new WeakMap,k=new WeakMap,E=new WeakMap,_=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,M=new WeakMap,L=new WeakMap,x=new WeakSet,z=function(e){e.currentTarget.matches(":focus-within")&&l(this,x,"m",W).call(this,e)},W=function(e){if(l(this,w,"f"))return;const t=e.currentTarget;l(this,$,"f").call(this,!0,t.matches(":focus-visible")||l(this,C,"f")||Qe(),t)},P=function(e){l(this,w,"f")||l(this,$,"f").call(this,!1,!1,e.currentTarget)};class gt extends Ze{constructor(e,t){super(e,t),T.add(this),H.set(this,void 0),F.set(this,new Map),O.set(this,new Map),D.set(this,e=>l(this,T,"m",B).call(this,e)),U.set(this,e=>l(this,T,"m",q).call(this,e)),h(this,H,t.callback,"f"),this.startDelay=t.startDelay??0,this.endDelay=t.endDelay??0}clearDelays(){for(const e of this.targets)l(this,T,"m",N).call(this,e)}_observe(e){e.addEventListener("pointerenter",l(this,D,"f")),e.addEventListener("pointerleave",l(this,U,"f"))}_unobserve(e){e.removeEventListener("pointerenter",l(this,D,"f")),e.removeEventListener("pointerleave",l(this,U,"f"))}}H=new WeakMap,F=new WeakMap,O=new WeakMap,D=new WeakMap,U=new WeakMap,T=new WeakSet,N=function(e){l(this,T,"m",I).call(this,e),l(this,T,"m",R).call(this,e)},I=function(e){return!!l(this,F,"f").has(e)&&(clearTimeout(l(this,F,"f").get(e)),l(this,F,"f").delete(e))},R=function(e){return!!l(this,O,"f").has(e)&&(clearTimeout(l(this,O,"f").get(e)),l(this,O,"f").delete(e))},B=function(e){const t=e.target;l(this,T,"m",R).call(this,t),this.startDelay>0?(l(this,T,"m",I).call(this,t),l(this,F,"f").set(t,setTimeout(()=>{l(this,F,"f").delete(t),l(this,H,"f").call(this,!0,t)},this.startDelay))):l(this,H,"f").call(this,!0,t)},q=function(e){const t=e.target;l(this,T,"m",I).call(this,t)||(this.endDelay>0?(l(this,T,"m",R).call(this,t),l(this,O,"f").set(t,setTimeout(()=>{l(this,O,"f").delete(t),l(this,H,"f").call(this,!1,t)},this.endDelay))):l(this,H,"f").call(this,!1,t))};class bt extends Ze{constructor(t,s){super(t,s),V.set(this,void 0),j.set(this,void 0),X.set(this,!1),Z.set(this,void 0),Y.set(this,!0),h(this,V,t,"f"),h(this,j,s.callback,"f"),h(this,X,s.skipInitial??!1,"f"),e||(window.IntersectionObserver?h(this,Z,new IntersectionObserver((e,t)=>{l(this,j,"f").call(this,e,t),l(this,V,"f").requestUpdate()},s.init),"f"):console.warn("IntersectionController error: the browser does not support IntersectionObserver."))}async hostUpdated(){l(this,Z,"f")&&!l(this,X,"f")&&l(this,Y,"f")&&l(this,j,"f").call(this,[],l(this,Z,"f")),h(this,Y,!1,"f")}_observe(e){l(this,Z,"f")?.observe(e),h(this,Y,!0,"f"),l(this,V,"f").requestUpdate()}_unobserve(e){l(this,Z,"f")?.unobserve(e)}}V=new WeakMap,j=new WeakMap,X=new WeakMap,Z=new WeakMap,Y=new WeakMap;class xt extends Ze{constructor(e,t){super(e,t),G.add(this),K.set(this,void 0),Q.set(this,void 0),J.set(this,new Set),ee.set(this,new Map),te.set(this,e=>l(this,G,"m",ie).call(this,e)),se.set(this,e=>l(this,G,"m",re).call(this,e)),h(this,K,t.callback,"f"),h(this,Q,t.threshold??500,"f")}_observe(e){e.addEventListener("touchstart",l(this,te,"f"),{passive:!0}),e.addEventListener("touchend",l(this,se,"f")),e.addEventListener("touchcancel",l(this,se,"f"))}_unobserve(e){e.removeEventListener("touchstart",l(this,te,"f")),e.removeEventListener("touchend",l(this,se,"f")),e.removeEventListener("touchcancel",l(this,se,"f"))}}K=new WeakMap,Q=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,G=new WeakSet,ie=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,ee,"f").set(t,setTimeout(()=>{l(this,J,"f").add(t),l(this,ee,"f").delete(t),l(this,K,"f").call(this,!0,t)},l(this,Q,"f")))}},re=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,J,"f").has(t)&&(l(this,K,"f").call(this,!1,t),l(this,J,"f").delete(t)),l(this,ee,"f").has(t)&&(clearTimeout(l(this,ee,"f").get(t)),l(this,ee,"f").delete(t))}};class wt extends Ze{constructor(t,s){super(t,s),ne.set(this,void 0),ae.set(this,void 0),oe.set(this,!1),le.set(this,void 0),he.set(this,void 0),ce.set(this,!0),h(this,ne,t,"f"),h(this,ae,s.callback,"f"),h(this,oe,s.skipInitial??!1,"f"),h(this,le,s.config,"f"),e||(window.MutationObserver?h(this,he,new MutationObserver((e,t)=>{l(this,ae,"f").call(this,e,t),l(this,ne,"f").requestUpdate()}),"f"):console.warn("MutationController error: the browser does not support MutationObserver."))}async hostUpdated(){if(l(this,he,"f")&&!l(this,oe,"f")&&l(this,ce,"f")){const e=l(this,he,"f").takeRecords();e.length>0&&l(this,ae,"f").call(this,e,l(this,he,"f"))}h(this,ce,!1,"f")}hostDisconnected(){super.hostDisconnected(),l(this,he,"f")?.disconnect()}_observe(e){l(this,he,"f")?.observe(e,l(this,le,"f")),h(this,ce,!0,"f"),l(this,ne,"f").requestUpdate()}_unobserve(){l(this,he,"f")?.disconnect();for(const e of this.targets)l(this,he,"f")?.observe(e,l(this,le,"f"))}}ne=new WeakMap,ae=new WeakMap,oe=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap;class $t extends Ze{constructor(e,t){super(e,t),de.add(this),pe.set(this,void 0),ue.set(this,void 0),me.set(this,void 0),fe.set(this,new Map),ve.set(this,void 0),ye.set(this,e=>l(this,de,"m",$e).call(this,e)),ge.set(this,e=>l(this,de,"m",ke).call(this,e)),be.set(this,e=>l(this,de,"m",Ee).call(this,e)),xe.set(this,e=>l(this,de,"m",_e).call(this,e)),we.set(this,e=>l(this,de,"m",Se).call(this,e)),h(this,pe,t.capture,"f"),h(this,ue,t.callback,"f"),h(this,me,t.isPressedKey,"f"),h(this,ve,t.minPressedDuration??0,"f")}hostConnected(){document.addEventListener("pointerup",l(this,ge,"f"),{capture:l(this,pe,"f")}),document.addEventListener("touchend",l(this,be,"f"),{capture:l(this,pe,"f")}),document.addEventListener("touchcancel",l(this,be,"f"),{capture:l(this,pe,"f")}),super.hostConnected()}hostDisconnected(){document.removeEventListener("pointerup",l(this,ge,"f"),{capture:l(this,pe,"f")}),document.addEventListener("touchend",l(this,be,"f"),{capture:l(this,pe,"f")}),document.addEventListener("touchcancel",l(this,be,"f"),{capture:l(this,pe,"f")}),super.hostDisconnected(),l(this,fe,"f").clear()}_observe(e){e.addEventListener("pointerdown",l(this,ye,"f"),{capture:l(this,pe,"f")}),l(this,me,"f")&&(e.addEventListener("keydown",l(this,xe,"f"),{capture:l(this,pe,"f")}),e.addEventListener("keyup",l(this,we,"f"),{capture:l(this,pe,"f")}))}_unobserve(e){e.removeEventListener("pointerdown",l(this,ye,"f"),{capture:l(this,pe,"f")}),l(this,me,"f")&&(e.removeEventListener("keydown",l(this,xe,"f"),{capture:l(this,pe,"f")}),e.removeEventListener("keyup",l(this,we,"f"),{capture:l(this,pe,"f")}))}}pe=new WeakMap,ue=new WeakMap,me=new WeakMap,fe=new WeakMap,ve=new WeakMap,ye=new WeakMap,ge=new WeakMap,be=new WeakMap,xe=new WeakMap,we=new WeakMap,de=new WeakSet,$e=function(e){if(!("mouse"===e.pointerType&&e.button>1))for(const t of e.composedPath())if(t instanceof HTMLElement&&this.isObserving(t)){l(this,fe,"f").has(t)||(l(this,fe,"f").set(t,performance.now()),l(this,ue,"f").call(this,!0,{x:e.x,y:e.y},t));break}},ke=function(e){if("mouse"===e.pointerType&&e.button>1)return;const t=e.x,s=e.y;for(const e of l(this,fe,"f").keys()){const i=l(this,ve,"f")-(performance.now()-l(this,fe,"f").get(e));i>0?setTimeout(()=>{l(this,fe,"f").delete(e),l(this,ue,"f").call(this,!1,{x:t,y:s},e)},i):(l(this,fe,"f").delete(e),l(this,ue,"f").call(this,!1,{x:t,y:s},e))}},Ee=function(e){const t=e.touches[0]?.clientX??0,s=e.touches[0]?.clientY??0;for(const e of l(this,fe,"f").keys()){const i=l(this,ve,"f")-(performance.now()-l(this,fe,"f").get(e));i>0?setTimeout(()=>{l(this,fe,"f").delete(e),l(this,ue,"f").call(this,!1,{x:t,y:s},e)},i):(l(this,fe,"f").delete(e),l(this,ue,"f").call(this,!1,{x:t,y:s},e))}},_e=function(e){if(e.target!==e.currentTarget)return;const t=e.currentTarget;if(l(this,me,"f")?.call(this,e.key)&&(" "===e.key&&e.preventDefault(),!l(this,fe,"f").has(t))){l(this,fe,"f").set(t,performance.now());const e=t.getBoundingClientRect();l(this,ue,"f").call(this,!0,{x:e.x+e.width/2,y:e.y+e.height/2},t)}},Se=function(e){const t=e.target;if(l(this,fe,"f").has(t)&&l(this,me,"f")?.call(this,e.key)){const e=l(this,ve,"f")-(performance.now()-l(this,fe,"f").get(t)),s=t.getBoundingClientRect();e>0?setTimeout(()=>{l(this,fe,"f").delete(t),l(this,ue,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t)},e):(l(this,fe,"f").delete(t),l(this,ue,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t))}};class kt extends Ze{constructor(t,s){super(t,s),Ae.set(this,void 0),Ce.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),ze.set(this,void 0),We.set(this,!0),h(this,Ae,t,"f"),h(this,Ce,s.callback,"f"),h(this,Me,s.skipInitial??!1,"f"),h(this,Le,s.config,"f"),e||(window.ResizeObserver?h(this,ze,new ResizeObserver((e,t)=>{l(this,Ce,"f").call(this,e,t),l(this,Ae,"f").requestUpdate()}),"f"):console.warn("ResizeController error: the browser does not support ResizeObserver."))}async hostUpdated(){l(this,ze,"f")&&!l(this,Me,"f")&&l(this,We,"f")&&l(this,Ce,"f").call(this,[],l(this,ze,"f")),h(this,We,!1,"f")}_observe(e){l(this,ze,"f")?.observe(e,l(this,Le,"f")),h(this,We,!0,"f"),l(this,Ae,"f").requestUpdate()}_unobserve(e){l(this,ze,"f")?.unobserve(e)}}function Et(e){const t=Symbol("_id");return(s,i,r)=>{const n=r.value;return r.value=function(...s){clearTimeout(this[t]),this[t]=setTimeout(()=>n.apply(this,s),e)},r}}Ae=new WeakMap,Ce=new WeakMap,Me=new WeakMap,Le=new WeakMap,ze=new WeakMap,We=new WeakMap;class _t extends Ze{constructor(e,t){super(e,t),Pe.add(this),Te.set(this,void 0),He.set(this,void 0),Fe.set(this,e=>l(this,Pe,"m",Ue).call(this,e)),Oe.set(this,new Map),h(this,Te,!0===t.debounce,"f"),h(this,He,t.callback,"f")}getScrollContainers(e){return l(this,Oe,"f").get(e)}_observe(e){const t=l(this,Pe,"m",De).call(this,e);if(t.length>0){l(this,Oe,"f").set(e,t);for(const e of t)(e===document.documentElement?document:e).addEventListener("scroll",l(this,Fe,"f"),{passive:!0})}}_unobserve(e){if(l(this,Oe,"f").has(e)){for(const t of l(this,Oe,"f").get(e))(t===document.documentElement?document:t).removeEventListener("scroll",l(this,Fe,"f"));l(this,Oe,"f").delete(e)}}_debounceCallback(e){l(this,He,"f").call(this,e)}}Te=new WeakMap,He=new WeakMap,Fe=new WeakMap,Oe=new WeakMap,Pe=new WeakSet,De=function(e){const t=new Array;let s=e;for(;s;){const e=getComputedStyle(s);/(auto|scroll)/.test(e.overflow+e.overflowY+e.overflowX)&&t.push(s),s=s.parentElement}return t},Ue=function(e){const t=e.target===document?document.documentElement:e.target;l(this,Te,"f")?this._debounceCallback(t):l(this,He,"f").call(this,t)},o([Et(40)],_t.prototype,"_debounceCallback",null);class St{constructor(e){Ne.add(this),Ie.set(this,!1),Re.set(this,0),Be.set(this,0),qe.set(this,""),Ve.set(this,""),e.addController(this)}lock(){l(this,Ie,"f")||(h(this,Ie,!0,"f"),h(this,Re,window.scrollY,"f"),h(this,Be,window.scrollX,"f"),h(this,qe,document.documentElement.style.overflow,"f"),h(this,Ve,document.documentElement.style.scrollbarGutter,"f"),l(this,Ne,"m",je).call(this)&&(document.documentElement.style.scrollbarGutter="stable"),document.documentElement.style.overflow="hidden",window.scrollTo(l(this,Be,"f"),l(this,Re,"f")))}unlock(){l(this,Ie,"f")&&(h(this,Ie,!1,"f"),document.documentElement.style.overflow=l(this,qe,"f"),document.documentElement.style.scrollbarGutter=l(this,Ve,"f"),window.scrollTo(l(this,Be,"f"),l(this,Re,"f")))}hostDisconnected(){this.unlock()}}Ie=new WeakMap,Re=new WeakMap,Be=new WeakMap,qe=new WeakMap,Ve=new WeakMap,Ne=new WeakSet,je=function(){return document.documentElement.scrollHeight>document.documentElement.clientHeight};const At={fromAttribute:e=>e?e.split(/\s+/).map(e=>e.trim()).filter(Boolean):[],toAttribute:e=>e.join(" ")},Ct=1;
|
|
6
|
+
import{isServer as e,nothing as t,noChange as s,unsafeCSS as i,html as r,css as n,LitElement as a}from"lit";function o(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a}function l(e,t,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(e):i?i.value:t.get(e)}function h(e,t,s,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,s):r?r.value=s:t.set(e,s),s}var c,d,p,u,m,f,v,y,g,b,x,w,$,k,E,_,S,A,C,M,L,z,W,P,T,H,F,O,D,U,N,I,R,B,q,V,j,X,Z,Y,G,K,Q,J,ee,te,se,ie,re,ne,ae,oe,le,he,ce,de,pe,ue,me,fe,ve,ye,ge,be,xe,we,$e,ke,Ee,_e,Se,Ae,Ce,Me,Le,ze,We,Pe,Te,He,Fe,Oe,De,Ue,Ne,Ie,Re,Be,qe,Ve,je;"function"==typeof SuppressedError&&SuppressedError;class Xe{constructor(e,t){c.set(this,null),d.set(this,0),p.set(this,!1),u.set(this,void 0),m.set(this,()=>{if(!l(this,p,"f"))return;const e=performance.now();l(this,u,"f").call(this,(e-l(this,d,"f"))/1e3,e/1e3),h(this,d,e,"f"),h(this,c,requestAnimationFrame(l(this,m,"f")),"f")}),h(this,u,t,"f"),e.addController(this)}hostDisconnected(){this.stop()}start(){l(this,p,"f")||(h(this,p,!0,"f"),h(this,d,performance.now(),"f"),l(this,m,"f").call(this))}stop(){l(this,p,"f")&&(h(this,p,!1,"f"),null!==l(this,c,"f")&&(cancelAnimationFrame(l(this,c,"f")),h(this,c,null,"f")))}}c=new WeakMap,d=new WeakMap,p=new WeakMap,u=new WeakMap,m=new WeakMap;class Ze{constructor(e,t){f.set(this,void 0),v.set(this,void 0),y.set(this,new Set),h(this,f,e,"f"),h(this,v,t.target,"f"),l(this,f,"f").addController(this)}get targets(){return l(this,y,"f").values()}hostConnected(){null!==l(this,v,"f")&&this.observe(l(this,v,"f")??l(this,f,"f"))}hostDisconnected(){l(this,y,"f").forEach(e=>this.unobserve(e)),l(this,y,"f").clear()}observe(e){l(this,y,"f").has(e)||(l(this,y,"f").add(e),this._observe(e))}isObserving(e){return l(this,y,"f").has(e)}unobserve(e){l(this,y,"f").delete(e)&&this._unobserve(e)}}function Ye(e,t){if(!t)return 0;const s=document.createElement("div");s.style.all="inherit",s.style.width=t,s.style.position="absolute",s.style.visibility="hidden",s.style.pointerEvents="none",e.appendChild(s);try{return parseFloat(getComputedStyle(s).width)}finally{s.remove()}}function Ge(e){const t=parseFloat(getComputedStyle(e).lineHeight);return isNaN(t)||t<=0?0:Math.round(e.scrollHeight/t)}async function Ke(e,t=200){function s(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}e.focus();const i=performance.now();for(;!s(e);){if(!e.isConnected||performance.now()-i>t)return!1;await new Promise(requestAnimationFrame),e.focus()}return!0}function Qe(){return!e&&matchMedia("(forced-colors: active)").matches}function Je(e,t,s){return e+(t-e)*s}function et(e,t,s,i){return{x:Math.pow(1-i,2)*e.x+2*(1-i)*i*t.x+Math.pow(i,2)*s.x,y:Math.pow(1-i,2)*e.y+2*(1-i)*i*t.y+Math.pow(i,2)*s.y}}function tt(e,t,s,i,r){return{x:Math.pow(1-r,3)*e.x+3*Math.pow(1-r,2)*r*t.x+3*(1-r)*Math.pow(r,2)*s.x+Math.pow(r,3)*i.x,y:Math.pow(1-r,3)*e.y+3*Math.pow(1-r,2)*r*t.y+3*(1-r)*Math.pow(r,2)*s.y+Math.pow(r,3)*i.y}}function st(e,t){const s=function(e){return(e.match(/[a-zA-Z][^a-zA-Z]*/g)||[]).map(e=>({type:e[0],nums:e.slice(1).trim().split(/[\s,]+/).filter(Boolean).map(Number)}))}(e);let i={x:0,y:0},r={x:0,y:0};const n=[];for(const e of s)if("M"===e.type)i={x:e.nums[0],y:e.nums[1]},r=i;else if("L"===e.type){const t={x:e.nums[0],y:e.nums[1]},s=t.x-i.x,r=t.y-i.y;n.push({type:"L",pts:[i,t],length:Math.hypot(s,r)}),i=t}else if("H"===e.type){const t={x:e.nums[0],y:i.y},s=t.x-i.x;n.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("V"===e.type){const t={x:i.x,y:e.nums[0]},s=t.y-i.y;n.push({type:"L",pts:[i,t],length:Math.abs(s)}),i=t}else if("Q"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]};let r=0,a=i;const o=20;for(let e=1;e<=o;e++){const n=et(i,t,s,e/o);r+=Math.hypot(n.x-a.x,n.y-a.y),a=n}n.push({type:"Q",pts:[i,t,s],length:r}),i=s}else if("C"===e.type){const t={x:e.nums[0],y:e.nums[1]},s={x:e.nums[2],y:e.nums[3]},r={x:e.nums[4],y:e.nums[5]};let a=0,o=i;const l=20;for(let e=1;e<=l;e++){const n=tt(i,t,s,r,e/l);a+=Math.hypot(n.x-o.x,n.y-o.y),o=n}n.push({type:"C",pts:[i,t,s,r],length:a}),i=r}else if("Z"===e.type){const e=r.x-i.x,t=r.y-i.y;n.push({type:"L",pts:[i,r],length:Math.hypot(e,t)}),i=r}const a=n.reduce((e,t)=>e+t.length,0),o=a/(t-1),l=[];let h=0,c=0;for(let e=0;e<t;e++){const t=e*o;for(;c<n.length&&h+n[c].length<t;)h+=n[c].length,c++;const s=n[c];if(!s)break;const i=(t-h)/s.length;if("L"===s.type){const[e,t]=s.pts;l.push({x:Je(e.x,t.x,i),y:Je(e.y,t.y,i)})}else if("Q"===s.type){const[e,t,r]=s.pts;l.push(et(e,t,r,i))}else if("C"===s.type){const[e,t,r,n]=s.pts;l.push(tt(e,t,r,n,i))}}return l}function it(e,t,s){return Math.max(t,Math.min(s,e))}function rt(e,t){const s=e.length,i=new Array(s);for(let r=0;r<s;r++)i[r]=e[(r+t)%s];return i}function nt(e,t){const s=Math.min(t.length,e.length);let i=0,r=1/0;for(let n=0;n<s;n++){let a=0;for(let i=0;i<s;i++){const o=t[(i+n)%s],l=e[i],h=o.x-l.x,c=o.y-l.y;if(a+=h*h+c*c,a>=r)break}a<r&&(r=a,i=n)}return i}function at(e){let t=0;const s=e.length;for(let i=0;i<s;i++){const r=e[i],n=e[(i+1)%s];t+=r.x*n.y-n.x*r.y}return t/2}function ot(e,t){return function(e){const t=e.map(e=>{const t=function(e){let t=1/0,s=1/0,i=-1/0,r=-1/0;for(const n of e)n.x<t&&(t=n.x),n.x>i&&(i=n.x),n.y<s&&(s=n.y),n.y>r&&(r=n.y);return{minX:t,minY:s,maxX:i,maxY:r,width:i-t,height:r-s}}(e),s=e.map(e=>({x:e.x-t.minX,y:e.y-t.minY})),i=Math.max(t.width,t.height)||1,r=s.map(e=>({x:e.x/i,y:e.y/i})),n=t.width/i,a=t.height/i,o=(1-n)/2,l=(1-a)/2;return r.map(e=>({x:e.x+o,y:e.y+l}))}),s=t[0],i=Math.sign(at(s));for(let e=1;e<t.length;e++){let r=t[e];const n=Math.sign(at(r));0!==n&&n!==i&&(r=r.slice().reverse());const a=nt(s,r);t[e]=rt(r,a)}return t}(e.map(e=>st(e,t))).map(e=>function(e){const t=e.map(e=>{const t=it(100*e.x,0,100),s=it(100*e.y,0,100);return`${t.toFixed(2)}% ${s.toFixed(2)}%`});return`${t.join(", ")}`}(e))}function lt(e,t=!1){let s="";switch(e.nodeType){case Node.TEXT_NODE:s=e.nodeValue??"";break;case Node.ELEMENT_NODE:if(e instanceof HTMLSlotElement)for(const i of e.assignedNodes({flatten:!0}))s+=lt(i,t);else for(const i of e.childNodes)s+=lt(i,t)}return t&&(s=s.trim()),s}function ht(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function ct(e){return e.assignedNodes({flatten:!0}).length>0}function dt(e,t,s){const i=Object.getOwnPropertyDescriptor(e,t)??Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);if(!i)throw new Error(`Property ${String(t)} not found on target.`);const r=i.get?.bind(e),n=i.set?.bind(e);return Object.defineProperty(e,t,{configurable:!0,enumerable:i.enumerable,get:()=>s.get?s.get(()=>r?.()):r?.(),set(e){s.set?s.set(e,e=>n?.(e)):n?.(e)}}),()=>Object.defineProperty(e,t,i)}function pt(){return e||matchMedia("(prefers-reduced-motion)").matches}function ut(e,t=document){return new Promise(s=>{const i=t.querySelector(`#${e}`);i?s(i):"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",()=>s(t.querySelector(`#${e}`)),{once:!0}):s(t.querySelector(`#${e}`))})}function mt(e){const t=document?.location??null;return`url(${t?(t.pathname+t.search).split("#")[0]:""}#${e})`}function ft(e,t,s){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect();(r.top<i.top||r.bottom>i.bottom)&&e.scrollIntoView(s)}f=new WeakMap,v=new WeakMap,y=new WeakMap;class vt{constructor(e=100){g.set(this,[]),b.set(this,void 0),h(this,b,e,"f")}add(e,t=performance.now()){l(this,g,"f").push({y:e,t:t});const s=t-l(this,b,"f");for(;l(this,g,"f").length>1&&l(this,g,"f")[0].t<s;)l(this,g,"f").shift()}getVelocity(){if(l(this,g,"f").length<2)return 0;const e=l(this,g,"f")[0],t=l(this,g,"f")[l(this,g,"f").length-1],s=t.y-e.y,i=(t.t-e.t)/1e3;return i>0?s/i:0}reset(){l(this,g,"f").length=0}}g=new WeakMap,b=new WeakMap;class yt extends Ze{constructor(e,t){super(e,t),x.add(this),w.set(this,!1),$.set(this,void 0),k.set(this,e=>l(this,x,"m",z).call(this,e)),E.set(this,e=>l(this,x,"m",W).call(this,e)),_.set(this,e=>l(this,x,"m",P).call(this,e)),S.set(this,()=>h(this,w,!0,"f")),A.set(this,()=>h(this,w,!1,"f")),C.set(this,!1),M.set(this,()=>h(this,C,!0,"f")),L.set(this,()=>h(this,C,!1,"f")),h(this,$,t.callback,"f")}hostConnected(){super.hostConnected(),window?.addEventListener("keydown",l(this,M,"f"),{capture:!0,passive:!0}),window?.addEventListener("pointerdown",l(this,L,"f"),{capture:!0})}hostDisconnected(){super.hostDisconnected(),window?.removeEventListener("keydown",l(this,M,"f"),{capture:!0}),window?.removeEventListener("pointerdown",l(this,L,"f"),{capture:!0})}_observe(e){e.addEventListener("keydown",l(this,k,"f")),e.addEventListener("focusin",l(this,E,"f")),e.addEventListener("focusout",l(this,_,"f")),e.addEventListener("touchstart",l(this,S,"f")),e.addEventListener("touchend",l(this,A,"f")),e.addEventListener("touchcancel",l(this,A,"f"))}_unobserve(e){e.removeEventListener("keydown",l(this,k,"f")),e.removeEventListener("focusin",l(this,E,"f")),e.removeEventListener("focusout",l(this,_,"f")),e.removeEventListener("touchstart",l(this,S,"f")),e.removeEventListener("touchend",l(this,A,"f")),e.removeEventListener("touchcancel",l(this,A,"f"))}}w=new WeakMap,$=new WeakMap,k=new WeakMap,E=new WeakMap,_=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,M=new WeakMap,L=new WeakMap,x=new WeakSet,z=function(e){e.currentTarget.matches(":focus-within")&&l(this,x,"m",W).call(this,e)},W=function(e){if(l(this,w,"f"))return;const t=e.currentTarget;l(this,$,"f").call(this,!0,t.matches(":focus-visible")||l(this,C,"f")||Qe(),t)},P=function(e){l(this,w,"f")||l(this,$,"f").call(this,!1,!1,e.currentTarget)};class gt extends Ze{constructor(e,t){super(e,t),T.add(this),H.set(this,void 0),F.set(this,new Map),O.set(this,new Map),D.set(this,e=>l(this,T,"m",B).call(this,e)),U.set(this,e=>l(this,T,"m",q).call(this,e)),h(this,H,t.callback,"f"),this.startDelay=t.startDelay??0,this.endDelay=t.endDelay??0}clearDelays(){for(const e of this.targets)l(this,T,"m",N).call(this,e)}_observe(e){e.addEventListener("pointerenter",l(this,D,"f")),e.addEventListener("pointerleave",l(this,U,"f"))}_unobserve(e){e.removeEventListener("pointerenter",l(this,D,"f")),e.removeEventListener("pointerleave",l(this,U,"f"))}}H=new WeakMap,F=new WeakMap,O=new WeakMap,D=new WeakMap,U=new WeakMap,T=new WeakSet,N=function(e){l(this,T,"m",I).call(this,e),l(this,T,"m",R).call(this,e)},I=function(e){return!!l(this,F,"f").has(e)&&(clearTimeout(l(this,F,"f").get(e)),l(this,F,"f").delete(e))},R=function(e){return!!l(this,O,"f").has(e)&&(clearTimeout(l(this,O,"f").get(e)),l(this,O,"f").delete(e))},B=function(e){const t=e.target;l(this,T,"m",R).call(this,t),this.startDelay>0?(l(this,T,"m",I).call(this,t),l(this,F,"f").set(t,setTimeout(()=>{l(this,F,"f").delete(t),l(this,H,"f").call(this,!0,t)},this.startDelay))):l(this,H,"f").call(this,!0,t)},q=function(e){const t=e.target;l(this,T,"m",I).call(this,t)||(this.endDelay>0?(l(this,T,"m",R).call(this,t),l(this,O,"f").set(t,setTimeout(()=>{l(this,O,"f").delete(t),l(this,H,"f").call(this,!1,t)},this.endDelay))):l(this,H,"f").call(this,!1,t))};class bt extends Ze{constructor(t,s){super(t,s),V.set(this,void 0),j.set(this,void 0),X.set(this,!1),Z.set(this,void 0),Y.set(this,!0),h(this,V,t,"f"),h(this,j,s.callback,"f"),h(this,X,s.skipInitial??!1,"f"),e||(window.IntersectionObserver?h(this,Z,new IntersectionObserver((e,t)=>{l(this,j,"f").call(this,e,t),l(this,V,"f").requestUpdate()},s.init),"f"):console.warn("IntersectionController error: the browser does not support IntersectionObserver."))}async hostUpdated(){l(this,Z,"f")&&!l(this,X,"f")&&l(this,Y,"f")&&l(this,j,"f").call(this,[],l(this,Z,"f")),h(this,Y,!1,"f")}_observe(e){l(this,Z,"f")?.observe(e),h(this,Y,!0,"f"),l(this,V,"f").requestUpdate()}_unobserve(e){l(this,Z,"f")?.unobserve(e)}}V=new WeakMap,j=new WeakMap,X=new WeakMap,Z=new WeakMap,Y=new WeakMap;class xt extends Ze{constructor(e,t){super(e,t),G.add(this),K.set(this,void 0),Q.set(this,void 0),J.set(this,new Set),ee.set(this,new Map),te.set(this,e=>l(this,G,"m",ie).call(this,e)),se.set(this,e=>l(this,G,"m",re).call(this,e)),h(this,K,t.callback,"f"),h(this,Q,t.threshold??500,"f")}_observe(e){e.addEventListener("touchstart",l(this,te,"f"),{passive:!0}),e.addEventListener("touchend",l(this,se,"f")),e.addEventListener("touchcancel",l(this,se,"f"))}_unobserve(e){e.removeEventListener("touchstart",l(this,te,"f")),e.removeEventListener("touchend",l(this,se,"f")),e.removeEventListener("touchcancel",l(this,se,"f"))}}K=new WeakMap,Q=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,G=new WeakSet,ie=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,ee,"f").set(t,setTimeout(()=>{l(this,J,"f").add(t),l(this,ee,"f").delete(t),l(this,K,"f").call(this,!0,t)},l(this,Q,"f")))}},re=function(e){if(e.currentTarget instanceof HTMLElement&&this.isObserving(e.currentTarget)){const t=e.currentTarget;l(this,J,"f").has(t)&&(l(this,K,"f").call(this,!1,t),l(this,J,"f").delete(t)),l(this,ee,"f").has(t)&&(clearTimeout(l(this,ee,"f").get(t)),l(this,ee,"f").delete(t))}};class wt extends Ze{constructor(t,s){super(t,s),ne.set(this,void 0),ae.set(this,void 0),oe.set(this,!1),le.set(this,void 0),he.set(this,void 0),ce.set(this,!0),h(this,ne,t,"f"),h(this,ae,s.callback,"f"),h(this,oe,s.skipInitial??!1,"f"),h(this,le,s.config,"f"),e||(window.MutationObserver?h(this,he,new MutationObserver((e,t)=>{l(this,ae,"f").call(this,e,t),l(this,ne,"f").requestUpdate()}),"f"):console.warn("MutationController error: the browser does not support MutationObserver."))}async hostUpdated(){if(l(this,he,"f")&&!l(this,oe,"f")&&l(this,ce,"f")){const e=l(this,he,"f").takeRecords();e.length>0&&l(this,ae,"f").call(this,e,l(this,he,"f"))}h(this,ce,!1,"f")}hostDisconnected(){super.hostDisconnected(),l(this,he,"f")?.disconnect()}_observe(e){l(this,he,"f")?.observe(e,l(this,le,"f")),h(this,ce,!0,"f"),l(this,ne,"f").requestUpdate()}_unobserve(){l(this,he,"f")?.disconnect();for(const e of this.targets)l(this,he,"f")?.observe(e,l(this,le,"f"))}}ne=new WeakMap,ae=new WeakMap,oe=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap;class $t extends Ze{constructor(e,t){super(e,t),de.add(this),pe.set(this,void 0),ue.set(this,void 0),me.set(this,void 0),fe.set(this,new Map),ve.set(this,void 0),ye.set(this,e=>l(this,de,"m",$e).call(this,e)),ge.set(this,e=>l(this,de,"m",ke).call(this,e)),be.set(this,e=>l(this,de,"m",Ee).call(this,e)),xe.set(this,e=>l(this,de,"m",_e).call(this,e)),we.set(this,e=>l(this,de,"m",Se).call(this,e)),h(this,pe,t.capture,"f"),h(this,ue,t.callback,"f"),h(this,me,t.isPressedKey,"f"),h(this,ve,t.minPressedDuration??0,"f")}hostConnected(){document.addEventListener("pointerup",l(this,ge,"f"),{capture:l(this,pe,"f")}),document.addEventListener("touchend",l(this,be,"f"),{capture:l(this,pe,"f")}),document.addEventListener("touchcancel",l(this,be,"f"),{capture:l(this,pe,"f")}),super.hostConnected()}hostDisconnected(){document.removeEventListener("pointerup",l(this,ge,"f"),{capture:l(this,pe,"f")}),document.removeEventListener("touchend",l(this,be,"f"),{capture:l(this,pe,"f")}),document.removeEventListener("touchcancel",l(this,be,"f"),{capture:l(this,pe,"f")}),super.hostDisconnected(),l(this,fe,"f").clear()}_observe(e){e.addEventListener("pointerdown",l(this,ye,"f"),{capture:l(this,pe,"f")}),l(this,me,"f")&&(e.addEventListener("keydown",l(this,xe,"f"),{capture:l(this,pe,"f")}),e.addEventListener("keyup",l(this,we,"f"),{capture:l(this,pe,"f")}))}_unobserve(e){e.removeEventListener("pointerdown",l(this,ye,"f"),{capture:l(this,pe,"f")}),l(this,me,"f")&&(e.removeEventListener("keydown",l(this,xe,"f"),{capture:l(this,pe,"f")}),e.removeEventListener("keyup",l(this,we,"f"),{capture:l(this,pe,"f")}))}}pe=new WeakMap,ue=new WeakMap,me=new WeakMap,fe=new WeakMap,ve=new WeakMap,ye=new WeakMap,ge=new WeakMap,be=new WeakMap,xe=new WeakMap,we=new WeakMap,de=new WeakSet,$e=function(e){if(!("mouse"===e.pointerType&&e.button>1))for(const t of e.composedPath())if(t instanceof HTMLElement&&this.isObserving(t)){l(this,fe,"f").has(t)||(l(this,fe,"f").set(t,performance.now()),l(this,ue,"f").call(this,!0,{x:e.x,y:e.y},t));break}},ke=function(e){if("mouse"===e.pointerType&&e.button>1)return;const t=e.x,s=e.y;for(const i of e.composedPath())if(i instanceof HTMLElement&&l(this,fe,"f").has(i)){const e=l(this,ve,"f")-(performance.now()-l(this,fe,"f").get(i));e>0?setTimeout(()=>{l(this,fe,"f").delete(i),l(this,ue,"f").call(this,!1,{x:t,y:s},i)},e):(l(this,fe,"f").delete(i),l(this,ue,"f").call(this,!1,{x:t,y:s},i))}},Ee=function(e){const t=e.changedTouches[0]?.clientX??0,s=e.changedTouches[0]?.clientY??0;for(const i of e.composedPath())if(i instanceof HTMLElement&&l(this,fe,"f").has(i)){const e=l(this,ve,"f")-(performance.now()-l(this,fe,"f").get(i));e>0?setTimeout(()=>{l(this,fe,"f").delete(i),l(this,ue,"f").call(this,!1,{x:t,y:s},i)},e):(l(this,fe,"f").delete(i),l(this,ue,"f").call(this,!1,{x:t,y:s},i))}},_e=function(e){if(e.target!==e.currentTarget)return;const t=e.currentTarget;if(l(this,me,"f")?.call(this,e.key)&&(" "===e.key&&e.preventDefault(),!l(this,fe,"f").has(t))){l(this,fe,"f").set(t,performance.now());const e=t.getBoundingClientRect();l(this,ue,"f").call(this,!0,{x:e.x+e.width/2,y:e.y+e.height/2},t)}},Se=function(e){const t=e.target;if(l(this,fe,"f").has(t)&&l(this,me,"f")?.call(this,e.key)){const e=l(this,ve,"f")-(performance.now()-l(this,fe,"f").get(t)),s=t.getBoundingClientRect();e>0?setTimeout(()=>{l(this,fe,"f").delete(t),l(this,ue,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t)},e):(l(this,fe,"f").delete(t),l(this,ue,"f").call(this,!1,{x:s.x+s.width/2,y:s.y+s.height/2},t))}};class kt extends Ze{constructor(t,s){super(t,s),Ae.set(this,void 0),Ce.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),ze.set(this,void 0),We.set(this,!0),h(this,Ae,t,"f"),h(this,Ce,s.callback,"f"),h(this,Me,s.skipInitial??!1,"f"),h(this,Le,s.config,"f"),e||(window.ResizeObserver?h(this,ze,new ResizeObserver((e,t)=>{l(this,Ce,"f").call(this,e,t),l(this,Ae,"f").requestUpdate()}),"f"):console.warn("ResizeController error: the browser does not support ResizeObserver."))}async hostUpdated(){l(this,ze,"f")&&!l(this,Me,"f")&&l(this,We,"f")&&l(this,Ce,"f").call(this,[],l(this,ze,"f")),h(this,We,!1,"f")}_observe(e){l(this,ze,"f")?.observe(e,l(this,Le,"f")),h(this,We,!0,"f"),l(this,Ae,"f").requestUpdate()}_unobserve(e){l(this,ze,"f")?.unobserve(e)}}function Et(e){const t=Symbol("_id");return(s,i,r)=>{const n=r.value;return r.value=function(...s){clearTimeout(this[t]),this[t]=setTimeout(()=>n.apply(this,s),e)},r}}Ae=new WeakMap,Ce=new WeakMap,Me=new WeakMap,Le=new WeakMap,ze=new WeakMap,We=new WeakMap;class _t extends Ze{constructor(e,t){super(e,t),Pe.add(this),Te.set(this,void 0),He.set(this,void 0),Fe.set(this,e=>l(this,Pe,"m",Ue).call(this,e)),Oe.set(this,new Map),h(this,Te,!0===t.debounce,"f"),h(this,He,t.callback,"f")}getScrollContainers(e){return l(this,Oe,"f").get(e)}_observe(e){const t=l(this,Pe,"m",De).call(this,e);if(t.length>0){l(this,Oe,"f").set(e,t);for(const e of t)(e===document.documentElement?document:e).addEventListener("scroll",l(this,Fe,"f"),{passive:!0})}}_unobserve(e){if(l(this,Oe,"f").has(e)){for(const t of l(this,Oe,"f").get(e))(t===document.documentElement?document:t).removeEventListener("scroll",l(this,Fe,"f"));l(this,Oe,"f").delete(e)}}_debounceCallback(e){l(this,He,"f").call(this,e)}}Te=new WeakMap,He=new WeakMap,Fe=new WeakMap,Oe=new WeakMap,Pe=new WeakSet,De=function(e){const t=new Array;let s=e;for(;s;){const e=getComputedStyle(s);/(auto|scroll)/.test(e.overflow+e.overflowY+e.overflowX)&&t.push(s),s=s.parentElement}return t},Ue=function(e){const t=e.target===document?document.documentElement:e.target;l(this,Te,"f")?this._debounceCallback(t):l(this,He,"f").call(this,t)},o([Et(40)],_t.prototype,"_debounceCallback",null);class St{constructor(e){Ne.add(this),Ie.set(this,!1),Re.set(this,0),Be.set(this,0),qe.set(this,""),Ve.set(this,""),e.addController(this)}lock(){l(this,Ie,"f")||(h(this,Ie,!0,"f"),h(this,Re,window.scrollY,"f"),h(this,Be,window.scrollX,"f"),h(this,qe,document.documentElement.style.overflow,"f"),h(this,Ve,document.documentElement.style.scrollbarGutter,"f"),l(this,Ne,"m",je).call(this)&&(document.documentElement.style.scrollbarGutter="stable"),document.documentElement.style.overflow="hidden",window.scrollTo(l(this,Be,"f"),l(this,Re,"f")))}unlock(){l(this,Ie,"f")&&(h(this,Ie,!1,"f"),document.documentElement.style.overflow=l(this,qe,"f"),document.documentElement.style.scrollbarGutter=l(this,Ve,"f"),window.scrollTo(l(this,Be,"f"),l(this,Re,"f")))}hostDisconnected(){this.unlock()}}Ie=new WeakMap,Re=new WeakMap,Be=new WeakMap,qe=new WeakMap,Ve=new WeakMap,Ne=new WeakSet,je=function(){return document.documentElement.scrollHeight>document.documentElement.clientHeight};const At={fromAttribute:e=>e?e.split(/\s+/).map(e=>e.trim()).filter(Boolean):[],toAttribute:e=>e.join(" ")},Ct=1;
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
@@ -51,5 +51,5 @@ function hs(e,t){return(t,s,i)=>((e,t,s)=>(s.configurable=!0,s.enumerable=!0,Ref
|
|
|
51
51
|
* Copyright 2018 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
|
-
const ir=e=>e??Ri,rr=Symbol("renderPseudoLink");function nr(e){return Pt(e,"download","href","rel","target")}const ar=Symbol("_clickHandler");function or(e){var s,i,n,a,h;class c extends e{constructor(){super(...arguments),s.add(this),this[h]=async e=>{if(qs(this)&&this.disabledInteractive&&(e.preventDefault(),e.stopPropagation()),await new Promise(e=>e()),!e.defaultPrevented&&this.href){e.preventDefault(),e.stopImmediatePropagation();const t=document.createElement("a");t.href=this.href,t.rel=this.rel,t.target=this.target,null!=this.download&&(t.download=this.download),t.addEventListener("click",async()=>{await new Promise(e=>e()),t.remove()}),document.body.appendChild(t),t.click()}},this.href="",this.target="",this.rel=""}get download(){return this.getAttribute("download")}set download(e){const t=this.download;t!==e&&(e?this.setAttribute("download",e):this.removeAttribute("download"),this.requestUpdate("download",t))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this[ar]),this.hasAttribute("href")&&"button"===this.role&&(this.role="link")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this[ar])}[(s=new WeakSet,h=ar,rr)](){const e=Rs(this)&&this.disabled,o=qs(this)&&this.disabledInteractive;return e||o||!this.href?t:r`<a href="${this.href}" target="${ir(this.target||void 0)}" rel="${ir(this.rel||void 0)}" download="${ir(this.download||void 0)}" tabindex="-1" aria-hidden="true" @pointerdown="${l(this,s,"m",i)}" @focus="${l(this,s,"m",n)}" @blur="${l(this,s,"m",a)}"></a>`}}return i=function(e){2!==e.button?(e.preventDefault(),e.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))):e.target.removeAttribute("aria-hidden")},n=function(e){e.target.blur(),this.focus()},a=function(e){e.target.setAttribute("aria-hidden","true")},o([ls()],c.prototype,"href",void 0),o([ls()],c.prototype,"target",void 0),o([ls()],c.prototype,"rel",void 0),o([ls({reflect:!1})],c.prototype,"download",null),c}function lr(e){return Pt(e,"readOnly")}function hr(e,t=!0){class s extends e{constructor(){super(...arguments),this.readOnly=!1}update(e){super.update(e),e.has("readOnly")&&(this.ariaReadOnly=this.readOnly?"true":null)}}return o([ls({attribute:"readonly",type:Boolean,reflect:t})],s.prototype,"readOnly",void 0),s}function cr(e){return Pt(e,"required","optional")}function dr(e){class t extends e{constructor(){super(...arguments),this.required=!1}get optional(){return!this.required}update(e){super.update(e),e.has("required")&&(this.ariaRequired=`${this.required}`)}}return o([ls({type:Boolean,reflect:!0})],t.prototype,"required",void 0),t}function pr(e){return cr(e)&&oi(e)}function ur(e){return class extends e{[ai](){const e=super[ai]();if(!e&&this.required){if(cs(this)&&!this.checked)return{valueMissing:!0};if(!this.value)return{valueMissing:!0}}return e}}}function mr(e,t){return class extends e{connectedCallback(){this.role=this.role||t,super.connectedCallback()}}}function fr(e){return Pt(e,"vertical")}function vr(e){class t extends e{constructor(){super(...arguments),this.vertical=!1}update(e){super.update(e),e.has("vertical")&&(this.ariaOrientation=this.vertical?"vertical":"horizontal")}}return o([ls({type:Boolean,reflect:!0})],t.prototype,"vertical",void 0),t}var yr,gr,br,xr,wr,$r,kr,Er;class _r extends a{constructor(){super(...arguments),yr.set(this,e=>{e.defaultPrevented||this._onClick(e)})}connectedCallback(){super.connectedCallback(),this.parentElement?.addEventListener("click",l(this,yr,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.parentElement?.removeEventListener("click",l(this,yr,"f"))}render(){return r`<slot></slot>`}}yr=new WeakMap,_r.styles=n`:host { display: contents; } ::slotted(.material-icons) { font-size: inherit !important; }`;let Sr=class extends(di(a,"opening","opened","closing","closed")){constructor(){super(...arguments),gr.add(this),br.set(this,!1),xr.set(this,!1),this.open=!1}update(e){if(super.update(e),this.classList.toggle("-no-animate",!0),!l(this,br,"f"))return this.open&&(h(this,xr,!0,"f"),l(this,gr,"m",$r).call(this)),void h(this,br,!0,"f");this.toggleAttribute("inert",!this.open),this.open?(h(this,xr,!0,"f"),pt()||(l(this,gr,"m",$r).call(this),this.classList.toggle("-overflows",this.clientHeight<this.scrollHeight),l(this,gr,"m",kr).call(this)),this.classList.toggle("-closing",!1),this.classList.toggle("-opening",!0),this.dispatchEvent(new Event("opening")),l(this,gr,"m",kr).call(this),this.classList.toggle("-no-animate",!1),l(this,gr,"m",Er).call(this),pt()?(l(this,gr,"m",$r).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened"))):this.addEventListener("transitionend",()=>{this.open&&(l(this,gr,"m",$r).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened")))},{once:!0})):(this.classList.toggle("-opening",!1),this.classList.toggle("-closing",!0),this.dispatchEvent(new Event("closing")),l(this,gr,"m",Er).call(this),l(this,xr,"f")&&this.classList.toggle("-no-animate",!1),pt()?(l(this,gr,"m",kr).call(this),this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed"))):requestAnimationFrame(()=>{l(this,gr,"m",kr).call(this),this.addEventListener("transitionend",()=>{this.open||(this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed")))},{once:!0})}))}render(){return r`<slot @slotchange="${l(this,gr,"m",wr)}"></slot>`}};br=new WeakMap,xr=new WeakMap,gr=new WeakSet,wr=function(){h(this,br,!0,"f")},$r=function(){this.style.height="auto"},kr=function(){this.style.height=""},Er=function(){this.style.height=`${this.scrollHeight}px`},Sr.styles=n`:host { display: block; height: 0px; overflow: hidden; transition: ${i(`visibility var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard},\n height var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard},\n padding-top var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard},\n padding-bottom var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard}`)}; } :host(:not(.-closing):not([open])) { visibility: hidden; } :host(:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host(.-no-animate) { transition-duration: 0ms; } :host(.-opening), :host(.-closing) { overflow-y: hidden !important; } :host(.-overflows) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`,o([ls({type:Boolean,reflect:!0})],Sr.prototype,"open",void 0),Sr=o([Dt("m3e-collapsible")],Sr);const Ar=i(`var(--m3e-elevation-lift-duration, ${Is.motion.duration.short4})`),Cr=i(`var(--m3e-elevation-lift-easing, ${Is.motion.easing.standard})`),Mr=i(`var(--m3e-elevation-settle-duration, ${Is.motion.duration.short3})`),Lr=i(`var(--m3e-elevation-settle-easing, ${Is.motion.easing.standardAccelerate})`),zr=i(`var(--m3e-elevation-level, ${Is.elevation.level0})`),Wr=i(`var(--m3e-elevation-hover-level, ${Is.elevation.level0})`),Pr=i(`var(--m3e-elevation-focus-level, ${Is.elevation.level0})`),Tr=i(`var(--m3e-elevation-pressed-level, ${Is.elevation.level0})`);var Hr,Fr,Or,Dr,Ur,Nr,Ir;let Rr=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),Hr.add(this),Fr.set(this,new gt(this,{target:null,callback:e=>l(this,Hr,"m",Ur).call(this,e)})),Or.set(this,new yt(this,{target:null,callback:e=>l(this,Hr,"m",Nr).call(this,e)})),Dr.set(this,new $t(this,{target:null,callback:e=>l(this,Hr,"m",Ir).call(this,e)})),this.disabled=!1,this.level=null}attach(e){super.attach(e),l(this,Fr,"f").observe(e),l(this,Or,"f").observe(e),l(this,Dr,"f").observe(e)}detach(){this.control&&(l(this,Fr,"f").unobserve(this.control),l(this,Or,"f").unobserve(this.control),l(this,Dr,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!1)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!0))}render(){return r`<div class="shadow"></div>`}};Fr=new WeakMap,Or=new WeakMap,Dr=new WeakMap,Hr=new WeakSet,Ur=function(e){this.disabled||(this._shadow?.classList.toggle("hover",e),this._shadow?.classList.toggle("resting",!e))},Nr=function(e){this.disabled||this._shadow?.classList.toggle("focus",e)},Ir=function(e){this.disabled||this._shadow?.classList.toggle("pressed",e)},Rr.styles=n`:host { display: block; } :host, .shadow { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .shadow.resting, .shadow.focus, .shadow.pressed { will-change: box-shadow; transition: ${i(`box-shadow ${Mr} ${Lr};`)}; } .shadow.hover { will-change: box-shadow; transition: ${i(`box-shadow ${Ar} ${Cr};`)}; } .shadow { box-shadow: ${zr}; } .shadow.focus { box-shadow: ${Pr}; } .shadow.hover { box-shadow: ${Wr}; } .shadow.pressed { box-shadow: ${Tr}; } :host([level="0"]) .shadow { --m3e-elevation-level: ${Is.elevation.level0}; --m3e-elevation-hover-level: ${Is.elevation.level1}; } :host([level="1"]) .shadow { --m3e-elevation-level: ${Is.elevation.level1}; --m3e-elevation-hover-level: ${Is.elevation.level2}; } :host([level="2"]) .shadow { --m3e-elevation-level: ${Is.elevation.level2}; --m3e-elevation-hover-level: ${Is.elevation.level3}; } :host([level="3"]) .shadow { --m3e-elevation-level: ${Is.elevation.level3}; --m3e-elevation-hover-level: ${Is.elevation.level4}; } :host([level="4"]) .shadow { --m3e-elevation-level: ${Is.elevation.level4}; --m3e-elevation-hover-level: ${Is.elevation.level5}; } :host([level="5"]) .shadow { --m3e-elevation-level: ${Is.elevation.level5}; --m3e-elevation-hover-level: ${zr}; } :host([level]) .shadow { --m3e-elevation-focus-level: ${zr}; --m3e-elevation-pressed-level: ${zr}; } @media (prefers-reduced-motion) { .shadow.resting, .shadow.pressed, .shadow.focus, .shadow.hover { transition: none; } } @media (forced-colors: active) { .shadow { display: none; } }`,o([hs(".shadow")],Rr.prototype,"_shadow",void 0),o([ls({type:Boolean,reflect:!0})],Rr.prototype,"disabled",void 0),o([ls({type:Number,reflect:!0})],Rr.prototype,"level",void 0),Rr=o([Dt("m3e-elevation")],Rr);const Br=i(`var(--m3e-focus-ring-color, ${Is.color.secondary})`),qr=i(`var(--m3e-focus-ring-duration, ${Is.motion.duration.long2})`),Vr=i("var(--m3e-focus-ring-thickness, 0.1875rem)"),jr=i("var(--m3e-focus-ring-visibility, visible)"),Xr=i("var(--m3e-focus-ring-growth-factor, 2)");var Zr,Yr,Gr;let Kr=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),Zr.add(this),Yr.set(this,new yt(this,{target:null,callback:(e,t)=>l(this,Zr,"m",Gr).call(this,t)})),this.inward=!1,this.disabled=!1}show(){this._outline?.classList.toggle("visible",!0)}hide(){this._outline?.classList.toggle("visible",!1)}attach(e){super.attach(e),l(this,Yr,"f").observe(e)}detach(){this.control&&l(this,Yr,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide()}render(){return r`<div class="outline"></div>`}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};Yr=new WeakMap,Zr=new WeakSet,Gr=function(e){this.disabled||(e?this.show():this.hide())},Kr.styles=n`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; outline: none; } .outline { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; z-index: 1; outline-color: ${Br}; outline-width: ${Vr}; visibility: ${jr}; } .outline.visible { outline-style: solid; } :host(:not([inward])) .outline { outline-offset: calc(${Vr} / ${Xr}); } :host([inward]) .outline { outline-offset: calc(0px - ${Vr}); } :host(:not([inward])) .outline.visible { animation: grow-shrink ${qr}; } :host([inward]) .outline.visible { animation: shrink-grow ${qr}; } @keyframes grow-shrink { 50% { outline-width: calc(${Vr} * ${Xr}); } } @keyframes shrink-grow { 50% { outline-offset: calc(0px - calc(${Vr} * ${Xr})); outline-width: calc(${Vr} * ${Xr}); } } @media (prefers-reduced-motion) { :host(:not([inward])) .outline.visible, :host([inward]) .outline.visible { animation: none; } } @media (forced-colors: active) { .outline { outline-color: Highlight; } }`,o([hs(".outline")],Kr.prototype,"_outline",void 0),o([ls({type:Boolean,reflect:!0})],Kr.prototype,"inward",void 0),o([ls({type:Boolean,reflect:!0})],Kr.prototype,"disabled",void 0),Kr=o([Dt("m3e-focus-ring")],Kr);let Qr=class extends(us(Bs(mr(a,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return this.indeterminate?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path Required d="M240-440v-80h480v80H240Z"/></svg>`:this.checked?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>`:t}};Qr.styles=n`:host { display: inline-block; vertical-align: middle; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 0.125rem); box-sizing: border-box; flex: none; } :host(:not([checked]):not([indeterminate])) { border-width: var(--m3e-checkbox-unselected-outline-thickness, 0.125rem); border-style: solid; } :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { background-color: var(--m3e-checkbox-selected-container-color, ${Is.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${Is.color.onPrimary}); } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: var(--m3e-checkbox-unselected-outline-color, ${Is.color.onSurfaceVariant}); } :host([disabled]:not([checked]):not([indeterminate])) { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${Is.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${Is.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${Is.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); }`,Qr=o([Dt("m3e-pseudo-checkbox")],Qr);let Jr=class extends(ds(Bs(mr(a,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return r`<svg class="icon" viewBox="0 0 20 20"><mask id="cutout2"><rect width="100%" height="100%" fill="white"></rect><circle cx="10" cy="10" r="8" fill="black"></circle></mask><circle class="outer circle" cx="10" cy="10" r="10" mask="url(#cutout2)"></circle><circle class="inner circle" cx="10" cy="10" r="5"></circle></svg>`}};Jr.styles=n`:host { display: inline-block; vertical-align: middle; box-sizing: border-box; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); flex: none; } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) { color: var(--m3e-radio-unselected-icon-color, ${Is.color.onSurfaceVariant}); } :host([checked]) { color: var(--m3e-radio-selected-icon-color, ${Is.color.primary}); } :host([disabled]) { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${Is.color.onSurface}) 38%, transparent); }`,Jr=o([Dt("m3e-pseudo-radio")],Jr);const en=i(`var(--m3e-ripple-color, ${Is.color.onSurface})`),tn=i(`var(--m3e-ripple-opacity, ${Is.state.pressedStateLayerOpacity})`),sn=i(`var(--m3e-ripple-enter-duration, ${Is.motion.duration.long4})`),rn=i(`var(--m3e-ripple-exit-duration, ${Is.motion.duration.short2})`),nn=i("var(--m3e-ripple-scale-factor, 2.5)");var an,on,ln,hn,cn,dn;let pn=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),an.add(this),on.set(this,null),ln.set(this,new $t(this,{target:null,minPressedDuration:150,isPressedKey:e=>" "===e,callback:(e,{x:t,y:s})=>l(this,an,"m",dn).call(this,e,t,s)})),this.disabled=!1,this.centered=!1,this.unbounded=!1,this.radius=null}get visible(){return null!==l(this,on,"f")}show(e,t,s=!1){l(this,an,"m",hn).call(this);const i=this.getBoundingClientRect();this.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);let r=this.radius;if(!r||isNaN(r)){const s=Math.max(Math.abs(e-i.left),Math.abs(e-i.right)),n=Math.max(Math.abs(t-i.top),Math.abs(t-i.bottom));r=Math.sqrt(s*s+n*n)}const n=e-i.left,a=t-i.top;h(this,on,document.createElement("div"),"f"),l(this,on,"f").classList.add("ripple"),s&&l(this,on,"f").classList.add("persistent"),l(this,on,"f").style.left=n-r+"px",l(this,on,"f").style.top=a-r+"px",l(this,on,"f").style.width=2*r+"px",l(this,on,"f").style.height=2*r+"px",l(this,on,"f").addEventListener("animationend",()=>l(this,an,"m",cn).call(this,s),{once:!0}),l(this,on,"f").addEventListener("transitionend",()=>l(this,an,"m",hn).call(this),{once:!0}),this.shadowRoot?.appendChild(l(this,on,"f"))}hide(){l(this,on,"f")?.classList.add("exit")}attach(e){super.attach(e),l(this,ln,"f").observe(e)}detach(){this.control&&l(this,ln,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),l(this,an,"m",hn).call(this)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};var un;on=new WeakMap,ln=new WeakMap,an=new WeakSet,hn=function(){l(this,on,"f")?.remove(),h(this,on,null,"f")},cn=function(e){e?l(this,on,"f")?.classList.add("pressed"):this.hide()},dn=function(e,t,s){this.disabled||(e?this.show(t,s,!0):this.hide())},pn.styles=n`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } :host(:not([unbounded])) { overflow: hidden; } .ripple { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; transform: scale(0); border-radius: ${Is.shape.corner.full}; background-color: color-mix(in srgb, ${en} ${tn}, transparent); will-change: background-color, opacity; animation: ripple ${sn} linear; } .ripple.persistent.pressed { transform: scale(${nn}); } .ripple.exit { transition: opacity ${rn} cubic-bezier(0, 0, 0.2, 0.1); opacity: 0; } @keyframes ripple { to { transform: scale(${nn}); } } @media (prefers-reduced-motion) { .ripple { transform: scale(${nn}); animation-duration: 90ms; } .ripple.exit { transition-duration: 10ms; } } @media (forced-colors: active) { .ripple { display: none; } }`,o([ls({type:Boolean,reflect:!0})],pn.prototype,"disabled",void 0),o([ls({type:Boolean,reflect:!0})],pn.prototype,"centered",void 0),o([ls({type:Boolean,reflect:!0})],pn.prototype,"unbounded",void 0),o([ls({type:Number})],pn.prototype,"radius",void 0),pn=o([Dt("m3e-ripple")],pn);let mn=class extends a{constructor(){super(...arguments),un.set(this,()=>this._updateScroll()),this.dividers="above-below",this.thin=!1}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("scroll",l(this,un,"f"))}update(e){super.update(e),e.has("dividers")&&(this.removeEventListener("scroll",l(this,un,"f")),"none"!==this.dividers&&this.addEventListener("scroll",l(this,un,"f"),{passive:!0}))}render(){return r`<slot @slotchange="${this._updateScroll}"></slot>`}_updateScroll(){const e=("above"===this.dividers||"above-below"===this.dividers)&&this.scrollTop>0,t=("below"===this.dividers||"above-below"===this.dividers)&&this.scrollHeight-this.scrollTop-this.clientHeight>1;this.classList.toggle("-above",e),this.classList.toggle("-below",t)}};var fn,vn,yn,gn;un=new WeakMap,mn.styles=n`:host { display: block; overflow-y: auto; position: relative; box-sizing: border-box; scrollbar-color: ${Is.scrollbar.color}; border-top: var(--m3e-divider-thickness, 1px) solid transparent; border-bottom: var(--m3e-divider-thickness, 1px) solid transparent; outline: var(--m3e-focus-ring-color, ${Is.color.secondary}); outline-width: var(--m3e-focus-ring-thickness, 0.25rem); outline-offset: calc(var(--m3e-focus-ring-thickness, 0.25rem) / 2); } :host([thin]) { scrollbar-width: ${Is.scrollbar.thinWidth}; } :host(:not([thin])) { scrollbar-width: ${Is.scrollbar.width}; } :host(:not(:focus-visible).-above) { border-top-color: var(--m3e-divider-color, ${Is.color.outlineVariant}); } :host(:not(:focus-visible).-below) { border-bottom-color: var(--m3e-divider-color, ${Is.color.outlineVariant}); } :host(:focus-visible) { outline-style: solid; animation: grow-shrink var(--m3e-focus-ring-duration, ${Is.motion.duration.long2}); } @keyframes grow-shrink { 50% { outline-width: calc(var(--m3e-focus-ring-thickness, 0.25rem) * var(--m3e-focus-ring-factor, 2)); } } @media (forced-colors: active) { :host { border-top: var(--m3e-divider-thickness, 1px) solid Canvas; border-bottom: var(--m3e-divider-thickness, 1px) solid Canvas; } :host(:not(:focus-visible).-above) { border-top-color: GrayText; } :host(:not(:focus-visible).-below) { border-bottom-color: GrayText; } } @media (prefers-reduced-motion) { :host(:focus-visible) { animation: none; } }`,o([ls()],mn.prototype,"dividers",void 0),o([ls({type:Boolean,reflect:!0})],mn.prototype,"thin",void 0),o([Et(40)],mn.prototype,"_updateScroll",null),mn=o([Dt("m3e-scroll-container")],mn);let bn=class extends a{constructor(){super(...arguments),fn.add(this),vn.set(this,new Array),this.selectedIndex=null}connectedCallback(){super.connectedCallback(),this.classList.toggle("-no-animate",!0)}update(e){super.update(e),e.has("selectedIndex")&&(null===this.selectedIndex&&this.classList.toggle("-no-animate",!0),l(this,fn,"m",gn).call(this),null!==this.selectedIndex&&this.classList.contains("-no-animate")&&requestAnimationFrame(()=>{null!==this.selectedIndex&&this.classList.toggle("-no-animate",!1)}))}render(){return r`<slot @slotchange="${l(this,fn,"m",yn)}"></slot>`}};vn=new WeakMap,fn=new WeakSet,yn=function(e){const t=[...e.target.assignedElements({flatten:!0})];for(const e of l(this,vn,"f").filter(e=>!t.includes(e)))e.classList.remove("-before"),e.classList.remove("-after"),e.removeAttribute("inert");h(this,vn,t,"f"),l(this,fn,"m",gn).call(this)},gn=function(){const e=this.selectedIndex??l(this,vn,"f").length;for(let t=0;t<l(this,vn,"f").length;t++){const s=l(this,vn,"f")[t];s.classList.toggle("-before",t<e),s.classList.toggle("-after",t>e),s.toggleAttribute("inert",t!==e)}},bn.styles=n`:host { display: flex; position: relative; overflow: hidden; } ::slotted(*) { width: 100%; top: 0; transition: ${i(`inset-inline-start var(--m3e-slide-animation-duration, ${Is.motion.duration.long2}) ${Is.motion.easing.standard},\n visibility var(--m3e-slide-animation-duration, ${Is.motion.duration.long2}) ${Is.motion.easing.standard} allow-discrete`)}; } ::slotted(.-before), ::slotted(.-after) { visibility: hidden; position: absolute; } ::slotted(.-before) { inset-inline-start: -100%; } ::slotted(.-after) { inset-inline-start: 100%; } ::slotted(:not(.-before):not(.-after)) { position: relative; inset-inline-start: 0; } :host(.-no-animate) ::slotted(*) { transition: none; } @media (prefers-reduced-motion) { ::slotted(*) { transition: none; } }`,o([ls({attribute:"selected-index",type:Number,reflect:!0})],bn.prototype,"selectedIndex",void 0),bn=o([Dt("m3e-slide")],bn);const xn=i(`var(--m3e-state-layer-hover-color, ${Is.color.onSurface})`),wn=i(`var(--m3e-state-layer-hover-opacity, ${Is.state.hoverStateLayerOpacity})`),$n=i(`var(--m3e-state-layer-focus-color, ${Is.color.onSurface})`),kn=i(`var(--m3e-state-layer-focus-opacity, ${Is.state.focusStateLayerOpacity})`),En=i(`var(--m3e-state-layer-duration, ${Is.motion.duration.medium1})`),_n=i(`var(--m3e-state-layer-easing, ${Is.motion.easing.standard})`);var Sn,An,Cn,Mn,Ln;let zn=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),Sn.add(this),An.set(this,new gt(this,{target:null,callback:e=>l(this,Sn,"m",Mn).call(this,e)})),Cn.set(this,new yt(this,{target:null,callback:(e,t)=>l(this,Sn,"m",Ln).call(this,t)})),this.disabled=!1,this.disableHover=!1}show(e){this._layer?.classList.toggle(e,!0)}hide(e){this._layer?.classList.toggle(e,!1)}attach(e){super.attach(e),l(this,An,"f").observe(e),l(this,Cn,"f").observe(e)}detach(){this.control&&(l(this,An,"f").unobserve(this.control),l(this,Cn,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide("hover"),this.hide("focused")}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this.hide("hover"),this.hide("focused")),e.has("disableHover")&&this.disableHover&&this.hide("hover")}render(){return r`<div class="layer"></div>`}};An=new WeakMap,Cn=new WeakMap,Sn=new WeakSet,Mn=function(e){this.disabled||this.disableHover||(e?this.show("hover"):this.hide("hover"))},Ln=function(e){this.disabled||(e?this.show("focused"):this.hide("focused"))},zn.styles=n`:host { display: block; } :host, .layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .layer { will-change: background-color; transition: ${i(`background-color ${En} ${_n}`)}; } .layer.focused { background-color: color-mix(in srgb, ${$n} ${kn}, transparent); } .layer.hover { background-color: color-mix(in srgb, ${xn} ${wn}, transparent); } @media (prefers-reduced-motion) { .layer { transition: none; } } @media (forced-colors: active) { .layer { display: none; } }`,o([hs(".layer")],zn.prototype,"_layer",void 0),o([ls({type:Boolean,reflect:!0})],zn.prototype,"disabled",void 0),o([ls({attribute:"disable-hover",type:Boolean,reflect:!0})],zn.prototype,"disableHover",void 0),zn=o([Dt("m3e-state-layer")],zn);let Wn=class extends a{render(){return r`<span class="base"><slot></slot></span>`}};var Pn,Tn,Hn,Fn,On,Dn,Un,Nn;Wn.styles=n`:host { flex: 1 1 auto; display: inline-flex; align-items: center; flex-wrap: nowrap; min-width: 0; } .base { flex: 1 1 auto; display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`,Wn=o([Dt("m3e-text-overflow")],Wn);let In=Nn=class extends a{constructor(){super(),Pn.add(this),Tn.set(this,"m3e-text-highlight-"+Nn.__nextId++),Hn.set(this,new Array),Fn.set(this,null),this.disabled=!1,this.term="",this.caseSensitive=!1,this.isSupported&&(h(this,Fn,new CSSStyleSheet,"f"),l(this,Fn,"f").replaceSync(n`::highlight(${i(l(this,Tn,"f"))}) { background-color: var(--m3e-text-highlight-container-color, ${Is.color.secondaryContainer}); color: var(--m3e-text-highlight-color, ${Is.color.onSecondaryContainer}); text-decoration: var(--m3e-text-highlight-decoration); text-shadow: var(--m3e-text-highlight-shadow); }`.toString()))}get isSupported(){return!(e||!CSS.highlights)}get ranges(){return l(this,Hn,"f")}firstUpdated(e){super.firstUpdated(e),this.shadowRoot&&l(this,Fn,"f")&&!this.shadowRoot.adoptedStyleSheets.includes(l(this,Fn,"f"))&&this.shadowRoot.adoptedStyleSheets.push(l(this,Fn,"f"))}updated(e){super.updated(e),(e.has("term")||e.has("caseSensitive")||e.has("disabled"))&&l(this,Pn,"m",Un).call(this)}render(){return r`<slot @slotchange="${l(this,Pn,"m",Un)}"></slot>`}};Tn=new WeakMap,Hn=new WeakMap,Fn=new WeakMap,Pn=new WeakSet,On=function(e){return!/^(\\s|\\n)+$/gi.test(e.data)},Dn=function e(t,s){t instanceof HTMLSlotElement?t.assignedElements({flatten:!0}).forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,Pn,"m",On).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,Pn,"m",e).call(this,t,s)}}):t.childNodes.forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,Pn,"m",On).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,Pn,"m",e).call(this,t,s)}})},Un=function(){if(!this.isSupported||!this.isConnected)return;if(CSS.highlights.delete(l(this,Tn,"f")),l(this,Hn,"f").length=0,this.disabled)return;if(!this.term)return void this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,Hn,"f")],bubbles:!1,composed:!1}));const e=new Array;l(this,Pn,"m",Dn).call(this,this,e);const t=this.caseSensitive?this.term:this.term.toLowerCase();h(this,Hn,e.map(e=>({el:e,text:(this.caseSensitive?e.textContent:e.textContent?.toLowerCase())??""})).map(({el:e,text:s})=>{const i=new Array;let r=0;for(;r<s.length;){const e=s.indexOf(t,r);if(-1===e)break;i.push(e),r=e+t.length}return i.map(s=>{const i=new Range;return i.setStart(e,s),i.setEnd(e,s+t.length),i})}).flat(),"f"),l(this,Hn,"f").length>0&&CSS.highlights.set(l(this,Tn,"f"),new Highlight(...l(this,Hn,"f"))),this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,Hn,"f")],bubbles:!1,composed:!1}))},In.styles=n`:host { display: contents; }`,In.__nextId=0,o([ls({type:Boolean,reflect:!0})],In.prototype,"disabled",void 0),o([ls()],In.prototype,"term",void 0),o([ls({attribute:"case-sensitive",type:Boolean})],In.prototype,"caseSensitive",void 0),In=Nn=o([Dt("m3e-text-highlight")],In);export{_r as ActionElementBase,Xe as AnimationLoopController,Ot as AttachInternals,ds as Checked,us as CheckedIndeterminate,ci as ConstraintValidation,Is as DesignToken,ws as Dirty,Bs as Disabled,Zs as DisabledInteractive,di as EventAttribute,yt as FocusController,ui as Focusable,ni as FormAssociated,vi as FormSubmitter,gt as HoverController,xi as HtmlFor,bt as IntersectionController,wi as KeyboardClick,Qs as Labelled,or as LinkButton,xt as LongPressController,Sr as M3eCollapsibleElement,Rr as M3eElevationElement,Kr as M3eFocusRingElement,Qr as M3ePseudoCheckboxElement,Jr as M3ePseudoRadioElement,pn as M3eRippleElement,mn as M3eScrollContainerElement,bn as M3eSlideElement,zn as M3eStateLayerElement,In as M3eTextHighlightElement,Wn as M3eTextOverflowElement,wt as MutationController,$t as PressedController,hr as ReadOnly,dr as Required,ur as RequiredConstraintValidation,kt as ResizeController,mr as Role,_t as ScrollController,St as ScrollLockController,fs as Selected,Es as Touched,vt as VelocityTracker,vr as Vertical,gs as checkOrSelect,Ye as computeCssSize,Ge as computeLineCount,Et as debounce,ei as defaultValue,Ke as focusWhenReady,Qe as forcedColorsActive,Js as formValue,ot as generateClipPaths,lt as getTextContent,ht as guid,ct as hasAssignedNodes,Pt as hasKeys,dt as interceptProperty,Tt as internals,Ht as isAttachInternalsMixin,ps as isCheckedIndeterminateMixin,cs as isCheckedMixin,ys as isCheckedOrSelected,vs as isCheckedOrSelectedMixin,oi as isConstraintValidationMixin,bs as isDirtyMixin,qs as isDisabledInteractiveMixin,Rs as isDisabledMixin,ti as isFormAssociatedMixin,mi as isFormSubmitterMixin,yi as isHtmlForMixin,Gs as isLabelledMixin,nr as isLinkButtonMixin,lr as isReadOnlyMixin,pr as isRequiredConstraintValidationMixin,cr as isRequiredMixin,ms as isSelectedMixin,$s as isTouchedMixin,fr as isVerticalMixin,pt as prefersReducedMotion,rr as renderPseudoLink,ut as resolveElementById,mt as resolveFragmentUrl,Wt as safeStyleMap,ft as scrollIntoViewIfNeeded,At as spaceSeparatedStringConverter,Ys as updateLabels,ai as validate};
|
|
54
|
+
const ir=e=>e??Ri,rr=Symbol("renderPseudoLink");function nr(e){return Pt(e,"download","href","rel","target")}const ar=Symbol("_clickHandler");function or(e){var s,i,n,a,h;class c extends e{constructor(){super(...arguments),s.add(this),this[h]=async e=>{if(qs(this)&&this.disabledInteractive&&(e.preventDefault(),e.stopPropagation()),await new Promise(e=>e()),!e.defaultPrevented&&this.href){e.preventDefault(),e.stopImmediatePropagation();const t=document.createElement("a");t.href=this.href,t.rel=this.rel,t.target=this.target,null!=this.download&&(t.download=this.download),t.addEventListener("click",async()=>{await new Promise(e=>e()),t.remove()}),document.body.appendChild(t),t.click()}},this.href="",this.target="",this.rel=""}get download(){return this.getAttribute("download")}set download(e){const t=this.download;t!==e&&(e?this.setAttribute("download",e):this.removeAttribute("download"),this.requestUpdate("download",t))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this[ar]),this.hasAttribute("href")&&"button"===this.role&&(this.role="link")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this[ar])}[(s=new WeakSet,h=ar,rr)](){const e=Rs(this)&&this.disabled,o=qs(this)&&this.disabledInteractive;return e||o||!this.href?t:r`<a href="${this.href}" target="${ir(this.target||void 0)}" rel="${ir(this.rel||void 0)}" download="${ir(this.download||void 0)}" tabindex="-1" aria-hidden="true" @pointerdown="${l(this,s,"m",i)}" @focus="${l(this,s,"m",n)}" @blur="${l(this,s,"m",a)}"></a>`}}return i=function(e){2!==e.button?(e.preventDefault(),e.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))):e.target.removeAttribute("aria-hidden")},n=function(e){e.target.blur(),this.focus()},a=function(e){e.target.setAttribute("aria-hidden","true")},o([ls()],c.prototype,"href",void 0),o([ls()],c.prototype,"target",void 0),o([ls()],c.prototype,"rel",void 0),o([ls({reflect:!1})],c.prototype,"download",null),c}function lr(e){return Pt(e,"readOnly")}function hr(e,t=!0){class s extends e{constructor(){super(...arguments),this.readOnly=!1}update(e){super.update(e),e.has("readOnly")&&(this.ariaReadOnly=this.readOnly?"true":null)}}return o([ls({attribute:"readonly",type:Boolean,reflect:t})],s.prototype,"readOnly",void 0),s}function cr(e){return Pt(e,"required","optional")}function dr(e){class t extends e{constructor(){super(...arguments),this.required=!1}get optional(){return!this.required}update(e){super.update(e),e.has("required")&&(this.ariaRequired=`${this.required}`)}}return o([ls({type:Boolean,reflect:!0})],t.prototype,"required",void 0),t}function pr(e){return cr(e)&&oi(e)}function ur(e){return class extends e{[ai](){const e=super[ai]();if(!e&&this.required){if(cs(this)&&!this.checked)return{valueMissing:!0};if(!this.value)return{valueMissing:!0}}return e}}}function mr(e,t){return class extends e{connectedCallback(){this.role=this.role||t,super.connectedCallback()}}}function fr(e){return Pt(e,"vertical")}function vr(e){class t extends e{constructor(){super(...arguments),this.vertical=!1}update(e){super.update(e),e.has("vertical")&&(this.ariaOrientation=this.vertical?"vertical":"horizontal")}}return o([ls({type:Boolean,reflect:!0})],t.prototype,"vertical",void 0),t}var yr,gr,br,xr,wr,$r,kr,Er;class _r extends a{constructor(){super(...arguments),yr.set(this,e=>{e.defaultPrevented||this._onClick(e)})}connectedCallback(){super.connectedCallback(),this.parentElement?.addEventListener("click",l(this,yr,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.parentElement?.removeEventListener("click",l(this,yr,"f"))}render(){return r`<slot></slot>`}}yr=new WeakMap,_r.styles=n`:host { display: contents; } ::slotted(.material-icons) { font-size: inherit !important; }`;let Sr=class extends(di(a,"opening","opened","closing","closed")){constructor(){super(...arguments),gr.add(this),br.set(this,!1),xr.set(this,!1),this.open=!1}update(e){if(super.update(e),this.classList.toggle("-no-animate",!0),!l(this,br,"f"))return this.open&&(h(this,xr,!0,"f"),l(this,gr,"m",$r).call(this)),void h(this,br,!0,"f");this.toggleAttribute("inert",!this.open),this.open?(h(this,xr,!0,"f"),pt()||(l(this,gr,"m",$r).call(this),this.classList.toggle("-overflows",this.clientHeight<this.scrollHeight),l(this,gr,"m",kr).call(this)),this.classList.toggle("-closing",!1),this.classList.toggle("-opening",!0),this.dispatchEvent(new Event("opening")),l(this,gr,"m",kr).call(this),this.classList.toggle("-no-animate",!1),l(this,gr,"m",Er).call(this),pt()?(l(this,gr,"m",$r).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened"))):this.addEventListener("transitionend",()=>{this.open&&(l(this,gr,"m",$r).call(this),this.classList.toggle("-opening",!1),this.dispatchEvent(new Event("opened")))},{once:!0})):(this.classList.toggle("-opening",!1),this.classList.toggle("-closing",!0),this.dispatchEvent(new Event("closing")),l(this,gr,"m",Er).call(this),l(this,xr,"f")&&this.classList.toggle("-no-animate",!1),pt()?(l(this,gr,"m",kr).call(this),this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed"))):requestAnimationFrame(()=>{l(this,gr,"m",kr).call(this),this.addEventListener("transitionend",()=>{this.open||(this.classList.toggle("-closing",!1),this.dispatchEvent(new Event("closed")))},{once:!0})}))}render(){return r`<slot @slotchange="${l(this,gr,"m",wr)}"></slot>`}};br=new WeakMap,xr=new WeakMap,gr=new WeakSet,wr=function(){h(this,br,!0,"f")},$r=function(){this.style.height="auto"},kr=function(){this.style.height=""},Er=function(){this.style.height=`${this.scrollHeight}px`},Sr.styles=n`:host { display: block; height: 0px; overflow: hidden; transition: ${i(`visibility var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard},\n height var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard},\n padding-top var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard},\n padding-bottom var(--m3e-collapsible-animation-duration, ${Is.motion.duration.medium1})\n ${Is.motion.easing.standard}`)}; } :host(:not(.-closing):not([open])) { visibility: hidden; } :host(:not([open])) { min-height: unset !important; padding-top: 0px !important; padding-bottom: 0px !important; } :host(.-no-animate) { transition-duration: 0ms; } :host(.-opening), :host(.-closing) { overflow-y: hidden !important; } :host(.-overflows) { scrollbar-gutter: stable; } ::slotted(*) { --m3e-collapsible-animation-duration: initial; } @media (prefers-reduced-motion) { :host { transition: none; } }`,o([ls({type:Boolean,reflect:!0})],Sr.prototype,"open",void 0),Sr=o([Dt("m3e-collapsible")],Sr);const Ar=i(`var(--m3e-elevation-lift-duration, ${Is.motion.duration.short4})`),Cr=i(`var(--m3e-elevation-lift-easing, ${Is.motion.easing.standard})`),Mr=i(`var(--m3e-elevation-settle-duration, ${Is.motion.duration.short3})`),Lr=i(`var(--m3e-elevation-settle-easing, ${Is.motion.easing.standardAccelerate})`),zr=i(`var(--m3e-elevation-level, ${Is.elevation.level0})`),Wr=i(`var(--m3e-elevation-hover-level, ${Is.elevation.level0})`),Pr=i(`var(--m3e-elevation-focus-level, ${Is.elevation.level0})`),Tr=i(`var(--m3e-elevation-pressed-level, ${Is.elevation.level0})`);var Hr,Fr,Or,Dr,Ur,Nr,Ir;let Rr=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),Hr.add(this),Fr.set(this,new gt(this,{target:null,callback:e=>l(this,Hr,"m",Ur).call(this,e)})),Or.set(this,new yt(this,{target:null,callback:e=>l(this,Hr,"m",Nr).call(this,e)})),Dr.set(this,new $t(this,{target:null,callback:e=>l(this,Hr,"m",Ir).call(this,e)})),this.disabled=!1,this.level=null}attach(e){super.attach(e),l(this,Fr,"f").observe(e),l(this,Or,"f").observe(e),l(this,Dr,"f").observe(e)}detach(){this.control&&(l(this,Fr,"f").unobserve(this.control),l(this,Or,"f").unobserve(this.control),l(this,Dr,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!1)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this._shadow?.classList.toggle("hover",!1),this._shadow?.classList.toggle("focus",!1),this._shadow?.classList.toggle("pressed",!1),this._shadow?.classList.toggle("resting",!0))}render(){return r`<div class="shadow"></div>`}};Fr=new WeakMap,Or=new WeakMap,Dr=new WeakMap,Hr=new WeakSet,Ur=function(e){this.disabled||(this._shadow?.classList.toggle("hover",e),this._shadow?.classList.toggle("resting",!e))},Nr=function(e){this.disabled||this._shadow?.classList.toggle("focus",e)},Ir=function(e){this.disabled||this._shadow?.classList.toggle("pressed",e)},Rr.styles=n`:host { display: block; } :host, .shadow { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .shadow.resting, .shadow.focus, .shadow.pressed { will-change: box-shadow; transition: ${i(`box-shadow ${Mr} ${Lr};`)}; } .shadow.hover { will-change: box-shadow; transition: ${i(`box-shadow ${Ar} ${Cr};`)}; } .shadow { box-shadow: ${zr}; } .shadow.focus { box-shadow: ${Pr}; } .shadow.hover { box-shadow: ${Wr}; } .shadow.pressed { box-shadow: ${Tr}; } :host([level="0"]) .shadow { --m3e-elevation-level: ${Is.elevation.level0}; --m3e-elevation-hover-level: ${Is.elevation.level1}; } :host([level="1"]) .shadow { --m3e-elevation-level: ${Is.elevation.level1}; --m3e-elevation-hover-level: ${Is.elevation.level2}; } :host([level="2"]) .shadow { --m3e-elevation-level: ${Is.elevation.level2}; --m3e-elevation-hover-level: ${Is.elevation.level3}; } :host([level="3"]) .shadow { --m3e-elevation-level: ${Is.elevation.level3}; --m3e-elevation-hover-level: ${Is.elevation.level4}; } :host([level="4"]) .shadow { --m3e-elevation-level: ${Is.elevation.level4}; --m3e-elevation-hover-level: ${Is.elevation.level5}; } :host([level="5"]) .shadow { --m3e-elevation-level: ${Is.elevation.level5}; --m3e-elevation-hover-level: ${zr}; } :host([level]) .shadow { --m3e-elevation-focus-level: ${zr}; --m3e-elevation-pressed-level: ${zr}; } @media (prefers-reduced-motion) { .shadow.resting, .shadow.pressed, .shadow.focus, .shadow.hover { transition: none; } } @media (forced-colors: active) { .shadow { display: none; } }`,o([hs(".shadow")],Rr.prototype,"_shadow",void 0),o([ls({type:Boolean,reflect:!0})],Rr.prototype,"disabled",void 0),o([ls({type:Number,reflect:!0})],Rr.prototype,"level",void 0),Rr=o([Dt("m3e-elevation")],Rr);const Br=i(`var(--m3e-focus-ring-color, ${Is.color.secondary})`),qr=i(`var(--m3e-focus-ring-duration, ${Is.motion.duration.long2})`),Vr=i("var(--m3e-focus-ring-thickness, 3px)"),jr=i("var(--m3e-focus-ring-outward-offset, 2px)"),Xr=i("var(--m3e-focus-ring-inward-offset, 0px)"),Zr=i("var(--m3e-focus-ring-visibility, visible)"),Yr=i("var(--m3e-focus-ring-growth-factor, 2)");var Gr,Kr,Qr;let Jr=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),Gr.add(this),Kr.set(this,new yt(this,{target:null,callback:(e,t)=>l(this,Gr,"m",Qr).call(this,t)})),this.inward=!1,this.disabled=!1}show(){this._outline?.classList.toggle("visible",!0)}hide(){this._outline?.classList.toggle("visible",!1)}attach(e){super.attach(e),l(this,Kr,"f").observe(e)}detach(){this.control&&l(this,Kr,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide()}render(){return r`<div class="outline"></div>`}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};Kr=new WeakMap,Gr=new WeakSet,Qr=function(e){this.disabled||(e?this.show():this.hide())},Jr.styles=n`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; outline: none; } .outline { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; z-index: 1; outline-color: ${Br}; outline-width: ${Vr}; visibility: ${Zr}; } .outline.visible { outline-style: solid; } :host(:not([inward])) .outline { outline-offset: ${jr}; } :host([inward]) .outline { outline-offset: calc(${Xr} - ${Vr}); } :host(:not([inward])) .outline.visible { animation: grow-shrink ${qr}; } :host([inward]) .outline.visible { animation: shrink-grow ${qr}; } @keyframes grow-shrink { 50% { outline-width: calc(${Vr} * ${Yr}); } } @keyframes shrink-grow { 50% { outline-offset: calc( ${Xr} - calc(${Vr} * ${Yr}) ); outline-width: calc(${Vr} * ${Yr}); } } @media (prefers-reduced-motion) { :host(:not([inward])) .outline.visible, :host([inward]) .outline.visible { animation: none; } } @media (forced-colors: active) { .outline { outline-color: Highlight; } }`,o([hs(".outline")],Jr.prototype,"_outline",void 0),o([ls({type:Boolean,reflect:!0})],Jr.prototype,"inward",void 0),o([ls({type:Boolean,reflect:!0})],Jr.prototype,"disabled",void 0),Jr=o([Dt("m3e-focus-ring")],Jr);let en=class extends(us(Bs(mr(a,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return this.indeterminate?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path Required d="M240-440v-80h480v80H240Z"/></svg>`:this.checked?r`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>`:t}};en.styles=n`:host { display: inline-block; vertical-align: middle; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 2px); box-sizing: border-box; flex: none; } :host(:not([checked]):not([indeterminate])) { border-width: var(--m3e-checkbox-unselected-outline-thickness, 2px); border-style: solid; } :host(:not([disabled])[checked]), :host(:not([disabled])[indeterminate]) { background-color: var(--m3e-checkbox-selected-container-color, ${Is.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${Is.color.onPrimary}); } :host(:not([disabled]):not([checked]):not([indeterminate])) { border-color: var(--m3e-checkbox-unselected-outline-color, ${Is.color.onSurfaceVariant}); } :host([disabled]:not([checked]):not([indeterminate])) { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${Is.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([disabled][checked]), :host([disabled][indeterminate]) { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${Is.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${Is.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); }`,en=o([Dt("m3e-pseudo-checkbox")],en);let tn=class extends(ds(Bs(mr(a,"none")))){connectedCallback(){super.connectedCallback(),this.ariaHidden="true"}render(){return r`<svg class="icon" viewBox="0 0 20 20"><mask id="cutout2"><rect width="100%" height="100%" fill="white"></rect><circle cx="10" cy="10" r="8" fill="black"></circle></mask><circle class="outer circle" cx="10" cy="10" r="10" mask="url(#cutout2)"></circle><circle class="inner circle" cx="10" cy="10" r="5"></circle></svg>`}};tn.styles=n`:host { display: inline-block; vertical-align: middle; box-sizing: border-box; width: var(--m3e-radio-icon-size, 1.25rem); height: var(--m3e-radio-icon-size, 1.25rem); flex: none; } .circle { fill: currentColor; } :host(:not([checked])) .circle.inner { opacity: 0; } :host(:not([checked])) { color: var(--m3e-radio-unselected-icon-color, ${Is.color.onSurfaceVariant}); } :host([checked]) { color: var(--m3e-radio-selected-icon-color, ${Is.color.primary}); } :host([disabled]) { color: color-mix(in srgb, var(--m3e-radio-disabled-icon-color, ${Is.color.onSurface}) 38%, transparent); }`,tn=o([Dt("m3e-pseudo-radio")],tn);const sn=i(`var(--m3e-ripple-color, ${Is.color.onSurface})`),rn=i(`var(--m3e-ripple-opacity, ${Is.state.pressedStateLayerOpacity})`),nn=i(`var(--m3e-ripple-enter-duration, ${Is.motion.duration.long4})`),an=i(`var(--m3e-ripple-exit-duration, ${Is.motion.duration.short2})`),on=i("var(--m3e-ripple-scale-factor, 2.5)");var ln,hn,cn,dn,pn,un;let mn=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),ln.add(this),hn.set(this,null),cn.set(this,new $t(this,{target:null,minPressedDuration:150,isPressedKey:e=>" "===e,callback:(e,{x:t,y:s})=>l(this,ln,"m",un).call(this,e,t,s)})),this.disabled=!1,this.centered=!1,this.unbounded=!1,this.radius=null}get visible(){return null!==l(this,hn,"f")}show(e,t,s=!1){l(this,ln,"m",dn).call(this);const i=this.getBoundingClientRect();this.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);let r=this.radius;if(!r||isNaN(r)){const s=Math.max(Math.abs(e-i.left),Math.abs(e-i.right)),n=Math.max(Math.abs(t-i.top),Math.abs(t-i.bottom));r=Math.sqrt(s*s+n*n)}const n=e-i.left,a=t-i.top;h(this,hn,document.createElement("div"),"f"),l(this,hn,"f").classList.add("ripple"),s&&l(this,hn,"f").classList.add("persistent"),l(this,hn,"f").style.left=n-r+"px",l(this,hn,"f").style.top=a-r+"px",l(this,hn,"f").style.width=2*r+"px",l(this,hn,"f").style.height=2*r+"px",l(this,hn,"f").addEventListener("animationend",()=>l(this,ln,"m",pn).call(this,s),{once:!0}),l(this,hn,"f").addEventListener("transitionend",()=>l(this,ln,"m",dn).call(this),{once:!0}),this.shadowRoot?.appendChild(l(this,hn,"f"))}hide(){l(this,hn,"f")?.classList.add("exit")}attach(e){super.attach(e),l(this,cn,"f").observe(e)}detach(){this.control&&l(this,cn,"f").unobserve(this.control),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),l(this,ln,"m",dn).call(this)}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&this.hide()}};var fn;hn=new WeakMap,cn=new WeakMap,ln=new WeakSet,dn=function(){l(this,hn,"f")?.remove(),h(this,hn,null,"f")},pn=function(e){e?l(this,hn,"f")?.classList.add("pressed"):this.hide()},un=function(e,t,s){this.disabled||(e?this.show(t,s,!0):this.hide())},mn.styles=n`:host { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } :host(:not([unbounded])) { overflow: hidden; } .ripple { display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; transform: scale(0); border-radius: ${Is.shape.corner.full}; background-color: color-mix(in srgb, ${sn} ${rn}, transparent); will-change: background-color, opacity; animation: ripple ${nn} linear; } .ripple.persistent.pressed { transform: scale(${on}); } .ripple.exit { transition: opacity ${an} cubic-bezier(0, 0, 0.2, 0.1); opacity: 0; } @keyframes ripple { to { transform: scale(${on}); } } @media (prefers-reduced-motion) { .ripple { transform: scale(${on}); animation-duration: 90ms; } .ripple.exit { transition-duration: 10ms; } } @media (forced-colors: active) { .ripple { display: none; } }`,o([ls({type:Boolean,reflect:!0})],mn.prototype,"disabled",void 0),o([ls({type:Boolean,reflect:!0})],mn.prototype,"centered",void 0),o([ls({type:Boolean,reflect:!0})],mn.prototype,"unbounded",void 0),o([ls({type:Number})],mn.prototype,"radius",void 0),mn=o([Dt("m3e-ripple")],mn);let vn=class extends a{constructor(){super(...arguments),fn.set(this,()=>this._updateScroll()),this.dividers="above-below",this.thin=!1}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("scroll",l(this,fn,"f"))}update(e){super.update(e),e.has("dividers")&&(this.removeEventListener("scroll",l(this,fn,"f")),"none"!==this.dividers&&this.addEventListener("scroll",l(this,fn,"f"),{passive:!0}))}render(){return r`<slot @slotchange="${this._updateScroll}"></slot>`}_updateScroll(){const e=("above"===this.dividers||"above-below"===this.dividers)&&this.scrollTop>0,t=("below"===this.dividers||"above-below"===this.dividers)&&this.scrollHeight-this.scrollTop-this.clientHeight>1;this.classList.toggle("-above",e),this.classList.toggle("-below",t)}};var yn,gn,bn,xn;fn=new WeakMap,vn.styles=n`:host { display: block; overflow-y: auto; position: relative; box-sizing: border-box; scrollbar-color: ${Is.scrollbar.color}; border-top: var(--m3e-divider-thickness, 1px) solid transparent; border-bottom: var(--m3e-divider-thickness, 1px) solid transparent; outline-color: ${Br}; outline-width: ${Vr}; outline-offset: ${jr}; } :host([thin]) { scrollbar-width: ${Is.scrollbar.thinWidth}; } :host(:not([thin])) { scrollbar-width: ${Is.scrollbar.width}; } :host(:not(:focus-visible).-above) { border-top-color: var(--m3e-divider-color, ${Is.color.outlineVariant}); } :host(:not(:focus-visible).-below) { border-bottom-color: var(--m3e-divider-color, ${Is.color.outlineVariant}); } :host(:focus-visible) { outline-style: solid; animation: grow-shrink ${qr}; } @keyframes grow-shrink { 50% { outline-width: calc(${Vr} * ${Yr}); } } @media (forced-colors: active) { :host { border-top: var(--m3e-divider-thickness, 1px) solid Canvas; border-bottom: var(--m3e-divider-thickness, 1px) solid Canvas; } :host(:not(:focus-visible).-above) { border-top-color: GrayText; } :host(:not(:focus-visible).-below) { border-bottom-color: GrayText; } } @media (prefers-reduced-motion) { :host(:focus-visible) { animation: none; } }`,o([ls()],vn.prototype,"dividers",void 0),o([ls({type:Boolean,reflect:!0})],vn.prototype,"thin",void 0),o([Et(40)],vn.prototype,"_updateScroll",null),vn=o([Dt("m3e-scroll-container")],vn);let wn=class extends a{constructor(){super(...arguments),yn.add(this),gn.set(this,new Array),this.selectedIndex=null}connectedCallback(){super.connectedCallback(),this.classList.toggle("-no-animate",!0)}update(e){super.update(e),e.has("selectedIndex")&&(null===this.selectedIndex&&this.classList.toggle("-no-animate",!0),l(this,yn,"m",xn).call(this),null!==this.selectedIndex&&this.classList.contains("-no-animate")&&requestAnimationFrame(()=>{null!==this.selectedIndex&&this.classList.toggle("-no-animate",!1)}))}render(){return r`<slot @slotchange="${l(this,yn,"m",bn)}"></slot>`}};gn=new WeakMap,yn=new WeakSet,bn=function(e){const t=[...e.target.assignedElements({flatten:!0})];for(const e of l(this,gn,"f").filter(e=>!t.includes(e)))e.classList.remove("-before"),e.classList.remove("-after"),e.removeAttribute("inert");h(this,gn,t,"f"),l(this,yn,"m",xn).call(this)},xn=function(){const e=this.selectedIndex??l(this,gn,"f").length;for(let t=0;t<l(this,gn,"f").length;t++){const s=l(this,gn,"f")[t];s.classList.toggle("-before",t<e),s.classList.toggle("-after",t>e),s.toggleAttribute("inert",t!==e)}},wn.styles=n`:host { display: flex; position: relative; overflow: hidden; } ::slotted(*) { width: 100%; top: 0; transition: ${i(`inset-inline-start var(--m3e-slide-animation-duration, ${Is.motion.duration.long2}) ${Is.motion.easing.standard},\n visibility var(--m3e-slide-animation-duration, ${Is.motion.duration.long2}) ${Is.motion.easing.standard} allow-discrete`)}; } ::slotted(.-before), ::slotted(.-after) { visibility: hidden; position: absolute; } ::slotted(.-before) { inset-inline-start: -100%; } ::slotted(.-after) { inset-inline-start: 100%; } ::slotted(:not(.-before):not(.-after)) { position: relative; inset-inline-start: 0; } :host(.-no-animate) ::slotted(*) { transition: none; } @media (prefers-reduced-motion) { ::slotted(*) { transition: none; } }`,o([ls({attribute:"selected-index",type:Number,reflect:!0})],wn.prototype,"selectedIndex",void 0),wn=o([Dt("m3e-slide")],wn);const $n=i(`var(--m3e-state-layer-hover-color, ${Is.color.onSurface})`),kn=i(`var(--m3e-state-layer-hover-opacity, ${Is.state.hoverStateLayerOpacity})`),En=i(`var(--m3e-state-layer-focus-color, ${Is.color.onSurface})`),_n=i(`var(--m3e-state-layer-focus-opacity, ${Is.state.focusStateLayerOpacity})`),Sn=i(`var(--m3e-state-layer-duration, ${Is.motion.duration.medium1})`),An=i(`var(--m3e-state-layer-easing, ${Is.motion.easing.standard})`);var Cn,Mn,Ln,zn,Wn;let Pn=class extends(xi(mr(a,"none"))){constructor(){super(...arguments),Cn.add(this),Mn.set(this,new gt(this,{target:null,callback:e=>l(this,Cn,"m",zn).call(this,e)})),Ln.set(this,new yt(this,{target:null,callback:(e,t)=>l(this,Cn,"m",Wn).call(this,t)})),this.disabled=!1,this.disableHover=!1}show(e){this._layer?.classList.toggle(e,!0)}hide(e){this._layer?.classList.toggle(e,!1)}attach(e){super.attach(e),l(this,Mn,"f").observe(e),l(this,Ln,"f").observe(e)}detach(){this.control&&(l(this,Mn,"f").unobserve(this.control),l(this,Ln,"f").unobserve(this.control)),super.detach()}connectedCallback(){this.ariaHidden="true",super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.hide("hover"),this.hide("focused")}updated(e){super.updated(e),e.has("disabled")&&this.disabled&&(this.hide("hover"),this.hide("focused")),e.has("disableHover")&&this.disableHover&&this.hide("hover")}render(){return r`<div class="layer"></div>`}};Mn=new WeakMap,Ln=new WeakMap,Cn=new WeakSet,zn=function(e){this.disabled||this.disableHover||(e?this.show("hover"):this.hide("hover"))},Wn=function(e){this.disabled||(e?this.show("focused"):this.hide("focused"))},Pn.styles=n`:host { display: block; } :host, .layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: inherit; } .layer { will-change: background-color; transition: ${i(`background-color ${Sn} ${An}`)}; } .layer.focused { background-color: color-mix(in srgb, ${En} ${_n}, transparent); } .layer.hover { background-color: color-mix(in srgb, ${$n} ${kn}, transparent); } @media (prefers-reduced-motion) { .layer { transition: none; } } @media (forced-colors: active) { .layer { display: none; } }`,o([hs(".layer")],Pn.prototype,"_layer",void 0),o([ls({type:Boolean,reflect:!0})],Pn.prototype,"disabled",void 0),o([ls({attribute:"disable-hover",type:Boolean,reflect:!0})],Pn.prototype,"disableHover",void 0),Pn=o([Dt("m3e-state-layer")],Pn);let Tn=class extends a{render(){return r`<span class="base"><slot></slot></span>`}};var Hn,Fn,On,Dn,Un,Nn,In,Rn;Tn.styles=n`:host { flex: 1 1 auto; display: inline-flex; align-items: center; flex-wrap: nowrap; min-width: 0; } .base { flex: 1 1 auto; display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`,Tn=o([Dt("m3e-text-overflow")],Tn);let Bn=Rn=class extends a{constructor(){super(),Hn.add(this),Fn.set(this,"m3e-text-highlight-"+Rn.__nextId++),On.set(this,new Array),Dn.set(this,null),this.disabled=!1,this.term="",this.caseSensitive=!1,this.isSupported&&(h(this,Dn,new CSSStyleSheet,"f"),l(this,Dn,"f").replaceSync(n`::highlight(${i(l(this,Fn,"f"))}) { background-color: var(--m3e-text-highlight-container-color, ${Is.color.secondaryContainer}); color: var(--m3e-text-highlight-color, ${Is.color.onSecondaryContainer}); text-decoration: var(--m3e-text-highlight-decoration); text-shadow: var(--m3e-text-highlight-shadow); }`.toString()))}get isSupported(){return!(e||!CSS.highlights)}get ranges(){return l(this,On,"f")}firstUpdated(e){super.firstUpdated(e),this.shadowRoot&&l(this,Dn,"f")&&!this.shadowRoot.adoptedStyleSheets.includes(l(this,Dn,"f"))&&this.shadowRoot.adoptedStyleSheets.push(l(this,Dn,"f"))}updated(e){super.updated(e),(e.has("term")||e.has("caseSensitive")||e.has("disabled"))&&l(this,Hn,"m",In).call(this)}render(){return r`<slot @slotchange="${l(this,Hn,"m",In)}"></slot>`}};Fn=new WeakMap,On=new WeakMap,Dn=new WeakMap,Hn=new WeakSet,Un=function(e){return!/^(\\s|\\n)+$/gi.test(e.data)},Nn=function e(t,s){t instanceof HTMLSlotElement?t.assignedElements({flatten:!0}).forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,Hn,"m",Un).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,Hn,"m",e).call(this,t,s)}}):t.childNodes.forEach(t=>{switch(t.nodeType){case Node.TEXT_NODE:l(this,Hn,"m",Un).call(this,t)&&s.push(t);break;case Node.ELEMENT_NODE:l(this,Hn,"m",e).call(this,t,s)}})},In=function(){if(!this.isSupported||!this.isConnected)return;if(CSS.highlights.delete(l(this,Fn,"f")),l(this,On,"f").length=0,this.disabled)return;if(!this.term)return void this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,On,"f")],bubbles:!1,composed:!1}));const e=new Array;l(this,Hn,"m",Nn).call(this,this,e);const t=this.caseSensitive?this.term:this.term.toLowerCase();h(this,On,e.map(e=>({el:e,text:(this.caseSensitive?e.textContent:e.textContent?.toLowerCase())??""})).map(({el:e,text:s})=>{const i=new Array;let r=0;for(;r<s.length;){const e=s.indexOf(t,r);if(-1===e)break;i.push(e),r=e+t.length}return i.map(s=>{const i=new Range;return i.setStart(e,s),i.setEnd(e,s+t.length),i})}).flat(),"f"),l(this,On,"f").length>0&&CSS.highlights.set(l(this,Fn,"f"),new Highlight(...l(this,On,"f"))),this.dispatchEvent(new CustomEvent("highlight",{detail:[...l(this,On,"f")],bubbles:!1,composed:!1}))},Bn.styles=n`:host { display: contents; }`,Bn.__nextId=0,o([ls({type:Boolean,reflect:!0})],Bn.prototype,"disabled",void 0),o([ls()],Bn.prototype,"term",void 0),o([ls({attribute:"case-sensitive",type:Boolean})],Bn.prototype,"caseSensitive",void 0),Bn=Rn=o([Dt("m3e-text-highlight")],Bn);export{_r as ActionElementBase,Xe as AnimationLoopController,Ot as AttachInternals,ds as Checked,us as CheckedIndeterminate,ci as ConstraintValidation,Is as DesignToken,ws as Dirty,Bs as Disabled,Zs as DisabledInteractive,di as EventAttribute,yt as FocusController,ui as Focusable,ni as FormAssociated,vi as FormSubmitter,gt as HoverController,xi as HtmlFor,bt as IntersectionController,wi as KeyboardClick,Qs as Labelled,or as LinkButton,xt as LongPressController,Sr as M3eCollapsibleElement,Rr as M3eElevationElement,Jr as M3eFocusRingElement,en as M3ePseudoCheckboxElement,tn as M3ePseudoRadioElement,mn as M3eRippleElement,vn as M3eScrollContainerElement,wn as M3eSlideElement,Pn as M3eStateLayerElement,Bn as M3eTextHighlightElement,Tn as M3eTextOverflowElement,wt as MutationController,$t as PressedController,hr as ReadOnly,dr as Required,ur as RequiredConstraintValidation,kt as ResizeController,mr as Role,_t as ScrollController,St as ScrollLockController,fs as Selected,Es as Touched,vt as VelocityTracker,vr as Vertical,gs as checkOrSelect,Ye as computeCssSize,Ge as computeLineCount,Et as debounce,ei as defaultValue,Ke as focusWhenReady,Qe as forcedColorsActive,Js as formValue,ot as generateClipPaths,lt as getTextContent,ht as guid,ct as hasAssignedNodes,Pt as hasKeys,dt as interceptProperty,Tt as internals,Ht as isAttachInternalsMixin,ps as isCheckedIndeterminateMixin,cs as isCheckedMixin,ys as isCheckedOrSelected,vs as isCheckedOrSelectedMixin,oi as isConstraintValidationMixin,bs as isDirtyMixin,qs as isDisabledInteractiveMixin,Rs as isDisabledMixin,ti as isFormAssociatedMixin,mi as isFormSubmitterMixin,yi as isHtmlForMixin,Gs as isLabelledMixin,nr as isLinkButtonMixin,lr as isReadOnlyMixin,pr as isRequiredConstraintValidationMixin,cr as isRequiredMixin,ms as isSelectedMixin,$s as isTouchedMixin,fr as isVerticalMixin,pt as prefersReducedMotion,rr as renderPseudoLink,ut as resolveElementById,mt as resolveFragmentUrl,Wt as safeStyleMap,ft as scrollIntoViewIfNeeded,At as spaceSeparatedStringConverter,Ys as updateLabels,ai as validate};
|
|
55
55
|
//# sourceMappingURL=core.min.js.map
|