From 2c65dc9f6af28d372016b597922786fa57cf496b Mon Sep 17 00:00:00 2001 From: swagliquido <164777373+swagliquido@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:05:21 +0200 Subject: [PATCH 01/17] added more SRI hashes to support sha384, sha256 and sha512 --- download.html | 5 ++++- index.html | 6 ++++-- privacy-policy.html | 5 ++++- terms-of-use.html | 6 ++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/download.html b/download.html index ce7589b..bcae5f4 100644 --- a/download.html +++ b/download.html @@ -7,8 +7,11 @@ Download and Decrypt File + + integrity="sha256-CNKHgzXfrIyCiNU9EPMX6AWQs7vhYKLSR62kWuJRf9Q= sha384-F8L3xvIJS+oYZrMs1RLpNjKUXMYwtmGQInbnCpJx0VL32GrVUsIpq1OCWY+G7qzp sha512-4ukk3/c22s37Lq55whAPhGBkiRAei0II3pH9uuVzUzEhvr4JZpcs8p3PaTH5OhXylXyT6hujiDnML/SZvxMWSg=="> + +
- -

Privacy Policy

This website does not collect - any personally identifiable information (PII) from its users.

Last - updated:

-
- + + + + +
+
+ +
+
+

Privacy Policy

+

This website does not collect + any personally identifiable information (PII) from its users.

+

Last + updated:

+
+ +
+ + + \ No newline at end of file diff --git a/terms-of-use.html b/terms-of-use.html index dc539d6..95747e1 100644 --- a/terms-of-use.html +++ b/terms-of-use.html @@ -9,8 +9,8 @@ - + +
- -

Terms of Use

By accessing this website or - using the software/service provided, you agree to the following terms and - conditions:

MIT License

The software and source code available - on this website are licensed under the MIT License, reproduced below for your - convenience:

+    
+
+
+
+    
+
+ +
+
+

Terms of Use

+

By accessing this website or + using the software/service provided, you agree to the following terms and + conditions:

+

MIT License

+

The software and source code available + on this website are licensed under the MIT License, reproduced below for your + convenience:

+
 MIT License Permission is hereby granted, free of charge, to any person obtaining a copy 
 of this software and associated documentation files (the "Software"), to deal in the 
 Software without restriction, including without limitation the rights to use, copy, 
@@ -68,47 +105,74 @@
 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-            

Prohibited Uses

Users agree not to use the service to - upload, post, or otherwise transmit any content that:

    -
  • is illegal, harmful, threatening, abusive, harassing, defamatory, - vulgar, obscene, libelous, or otherwise objectionable;
  • violates - any applicable local, national, or international law;
  • infringes - the intellectual property rights of others;
  • contains software - viruses or any other computer code, files, or programs designed to - interrupt, destroy, or limit the functionality of any computer software or - hardware.
  • -

User Responsibility

Users are solely responsible for the - content they upload and must ensure that they have the legal right to upload - such content.

Content Removal

We reserve the right to remove - or disable access to any content that we deem to be in violation of these - Terms of Use or applicable law. If you believe that content on this site - infringes your rights, please notify us.

Data Privacy

Our use - of your data is governed by our Privacy Policy. Please review our Privacy - Policy to understand our practices.

Jurisdiction and Governing - Law

These Terms of Use are governed by the laws of Türkiye, and any - disputes will be resolved in the courts of Türkiye.

-

Indemnification

You agree to indemnify and hold harmless the owner - of this project from any claims, damages, or legal expenses arising from your - use of the service or your violation of these Terms of Use.

Disclaimer - of Liability

The owner of this project is not liable for any direct, - indirect, incidental, special, exemplary, or consequential damages, including - but not limited to, damages for loss of profits, goodwill, use, data, or other - intangible losses resulting from:

    -
  • the use or inability to use the service;
  • any content obtained - from the service; and
  • unauthorized access, use, or alteration of - your transmissions or content, whether based on warranty, contract, tort - (including negligence), or any other legal theory, whether or not the - owner has been informed of the possibility of such damage, and even if a - remedy set forth herein is found to have failed of its essential - purpose.
  • -

Last updated:

-

Users of this service are responsible for complying with all applicable - laws and regulations.

-
+
- +
+

Yasaklanmış Kullanımlar

+

Kullanıcılar, aşağıdaki içerikleri + yüklemek, göndermek veya başka bir şekilde iletmek için hizmeti kullanmamayı + kabul eder:

+ +

Kullanıcı Sorumluluğu

+

Kullanıcılar, yükledikleri içerikten + tek başına sorumludur ve bu tür içeriği yüklemek için yasal hakka sahip + olduklarından emin olmalıdır.

+

İçerik Kaldırma

+

Bu Kullanım + Koşullarını veya geçerli yasaları ihlal ettiğini düşündüğümüz herhangi bir + içeriği kaldırma veya erişimini engelleme hakkını saklı tutarız. Bu sitedeki + içeriğin haklarınızı ihlal ettiğini düşünüyorsanız, lütfen bize bildirin.

+

Veri Gizliliği

+

Verilerinizi kullanımımız Gizlilik Politikamız + tarafından yönetilmektedir. Uygulamalarımızı anlamak için lütfen Gizlilik + Politikamızı inceleyin.

+

Yargı Yetkisi ve Geçerli Hukuk

+

Bu + Kullanım Koşulları Türkiye yasalarına tabidir ve herhangi bir ihtilaf Türkiye + mahkemelerinde çözülecektir.

+

Tazminat

+

Bu hizmeti + kullanımınızdan veya bu Kullanım Koşullarını ihlal etmenizden kaynaklanan + herhangi bir iddia, zarar veya yasal masraflardan bu projenin sahibini tazmin + etmeyi ve sorumlu tutmamayı kabul edersiniz.

+

Sorumluluk Reddi

+

Bu projenin sahibi, doğrudan, dolaylı, arızi, özel, örnek teşkil eden veya + sonuç olarak ortaya çıkan herhangi bir zarardan, kar kaybı, itibar kaybı, + kullanım kaybı, veri kaybı veya diğer maddi olmayan kayıplardan sorumlu + değildir, bunlarla sınırlı olmamak üzere:

+ +

Son güncelleme:

+

Bu hizmeti kullanan kullanıcılar, tüm geçerli yasa ve + düzenlemelere uymaktan sorumludur.

+
+
+ + + \ No newline at end of file From 49760f8fd9504eb0b21276eb3a32297ee41e420a Mon Sep 17 00:00:00 2001 From: swagliquido <164777373+swagliquido@users.noreply.github.com> Date: Wed, 31 Jul 2024 01:25:03 +0200 Subject: [PATCH 04/17] Implemented content security policy --- dockerfile | 3 + download.html | 100 -------------- downloader.php | 77 +++++++++++ index.html | 187 -------------------------- index.php | 94 +++++++++++++ js/download.js | 1 - js/index.js | 4 +- js/languageSwitcher.js | 18 ++- mdui/mdui.esm.js | 17 --- mdui/mdui.global.js | 17 +++ privacy-policy.html | 93 ------------- privacy-policy.php | 77 +++++++++++ styles/download.css | 65 +++++++++ styles/index.css | 135 +++++++++++++++++++ styles/privacy-policy.css | 61 +++++++++ styles/terms-of-use.css | 70 ++++++++++ terms-of-use.html => terms-of-use.php | 118 +++++++--------- 17 files changed, 659 insertions(+), 478 deletions(-) delete mode 100644 download.html create mode 100644 downloader.php delete mode 100644 index.html create mode 100644 index.php delete mode 100644 mdui/mdui.esm.js create mode 100644 mdui/mdui.global.js delete mode 100644 privacy-policy.html create mode 100644 privacy-policy.php create mode 100644 styles/download.css create mode 100644 styles/index.css create mode 100644 styles/privacy-policy.css create mode 100644 styles/terms-of-use.css rename terms-of-use.html => terms-of-use.php (84%) diff --git a/dockerfile b/dockerfile index 401bf1a..32c5b69 100644 --- a/dockerfile +++ b/dockerfile @@ -1,6 +1,9 @@ # Use the official PHP image with Apache FROM php:8.3-apache +# Necessary to set headers using php such as the CSP header +RUN a2enmod headers + # Copy your PHP files to the container COPY . /var/www/html/ diff --git a/download.html b/download.html deleted file mode 100644 index 7cca932..0000000 --- a/download.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - Download and Decrypt File - - - - - - - - - -
-

LogoDownload and Decrypt File

- Decrypting file... - - -
- - - - diff --git a/downloader.php b/downloader.php new file mode 100644 index 0000000..f1cc341 --- /dev/null +++ b/downloader.php @@ -0,0 +1,77 @@ + + + + + + + + + Download and Decrypt File + + + + + + + + + + + +
+

LogoDownload and Decrypt File

+ Decrypting file... + + +
+ + + + diff --git a/index.html b/index.html deleted file mode 100644 index 8f86a34..0000000 --- a/index.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - Anon File Upload - - - - - - - - - - -

Logonon File Upload

-
- - Upload - - - -
- -
- Files are encrypted client-side and stored for 30 days. Max. file size: 2GB -
- - - - - - -
- - - - diff --git a/index.php b/index.php new file mode 100644 index 0000000..c3df333 --- /dev/null +++ b/index.php @@ -0,0 +1,94 @@ + + + + + + + + + Anon File Upload + + + + + + + + + + + +

Logonon File Upload

+
+ + Upload + + + +
+ +
+ Files are encrypted client-side and stored for 30 days. Max. file size: 2GB +
+ + + + File uploaded + successfully. Download link: + + +
+ + + + \ No newline at end of file diff --git a/js/download.js b/js/download.js index fee73ae..2ef5484 100644 --- a/js/download.js +++ b/js/download.js @@ -1,4 +1,3 @@ -import '/mdui/mdui.esm.js'; async function importKey(hexKey) { const keyBuffer = new Uint8Array(hexKey.match(/.{1,2}/g).map(byte => parseInt(byte, 16))); return window.crypto.subtle.importKey( diff --git a/js/index.js b/js/index.js index 5b49746..53f98ce 100644 --- a/js/index.js +++ b/js/index.js @@ -1,5 +1,3 @@ -import '/mdui/mdui.esm.js'; - async function generateKey() { return window.crypto.subtle.generateKey( { @@ -71,7 +69,7 @@ document.getElementById('upload-form').addEventListener('submit', async (e) => { xhr.onload = async function () { if (xhr.status === 200) { const fileName = xhr.responseText; - const downloadLink = `${window.location.origin}/download.html#${exportedKey}-${fileName}`; + const downloadLink = `${window.location.origin}/downloader.php#${exportedKey}-${fileName}`; // Display the download link on the page document.getElementById('download-link').style.display = 'block'; diff --git a/js/languageSwitcher.js b/js/languageSwitcher.js index 3bb788f..ab09cb3 100644 --- a/js/languageSwitcher.js +++ b/js/languageSwitcher.js @@ -2,10 +2,18 @@ function switchLanguage(language) { const en = document.getElementById('lang-en'); const tr = document.getElementById('lang-tr'); if (language === 'en') { - en.style.display = 'block'; - tr.style.display = 'none'; + en.className = 'block'; + tr.className = 'hidden'; } else { - en.style.display = 'none'; - tr.style.display = 'block'; + en.className = 'hidden'; + tr.className = 'block'; } -} \ No newline at end of file +} + +document.getElementById('lang-en-btn').addEventListener('click', () => { + switchLanguage('en') +}) + +document.getElementById('lang-tr-btn').addEventListener('click', () => { + switchLanguage('tr') +}) \ No newline at end of file diff --git a/mdui/mdui.esm.js b/mdui/mdui.esm.js deleted file mode 100644 index 8f65921..0000000 --- a/mdui/mdui.esm.js +++ /dev/null @@ -1,17 +0,0 @@ -function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(i={},o={}){Object.keys(o).forEach((n=>{void 0===i[n]?i[n]=o[n]:e(o[n])&&e(i[n])&&Object.keys(o[n]).length>0&&t(i[n],o[n])}))}const i={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function o(){const e="undefined"!=typeof document?document:{};return t(e,i),e}const r={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function n(){const e="undefined"!=typeof window?window:{};return t(e,r),e}const s=(e,t)=>e?.nodeName.toLowerCase()===t.toLowerCase(),a=e=>"function"==typeof e,l=e=>"string"==typeof e,c=e=>"number"==typeof e,d=e=>"boolean"==typeof e,h=e=>void 0===e,u=e=>null===e,p=e=>"undefined"!=typeof Window&&e instanceof Window,m=e=>"undefined"!=typeof Document&&e instanceof Document,f=e=>"undefined"!=typeof Element&&e instanceof Element,v=e=>!a(e)&&!p(e)&&c(e.length),g=e=>"object"==typeof e&&null!==e,b=e=>m(e)?e.documentElement:e,y=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),w=e=>e?e.replace(/^./,e[0].toLowerCase()).replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())):e,k=()=>!1,C=()=>!0,x=(e,t)=>{for(let i=0;i{const i=Object.keys(e);for(let o=0;o{this[t]=e})),this.length=e.length,this):this}}const R=(e=o())=>/complete|interactive/.test(e.readyState),I=e=>o().createElement(e),S=(e,t)=>e.appendChild(t),A=e=>e.parentNode?e.parentNode.removeChild(e):e,D=(e,t)=>{const i=I(t);return i.innerHTML=e,[].slice.call(i.childNodes)},T=(()=>{const e=function(t){if(!t)return new E;if(t instanceof E)return t;if(a(t)){const i=o();return R(i)?t.call(i,e):i.addEventListener("DOMContentLoaded",(()=>t.call(i,e)),{once:!0}),new E([i])}if(l(t)){const e=t.trim();if(e.startsWith("<")&&e.endsWith(">")){let t="div";return $({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},((i,o)=>{if(e.startsWith(`<${i}`))return t=o,!1})),new E(D(e,t))}const i=o();return new E(i.querySelectorAll(t))}return!v(t)||"undefined"!=typeof Node&&t instanceof Node?new E([t]):new E(t)};return e.fn=E.prototype,e})(),P=(e,t)=>(x(t,(t=>{e.push(t)})),e),M=e=>[...new Set(e)];T.fn.get=function(e){return void 0===e?[].slice.call(this):this[e>=0?e:e+this.length]},T.fn.add=function(e){return new E(M(P(this.get(),T(e).get())))};const _=(e,t,i)=>{const o=e.getAttribute(t);return u(o)?i:o},L=(e,t)=>{e.removeAttribute(t)},O=(e,t,i)=>{u(i)?L(e,t):e.setAttribute(t,i)};function z(e,t){return v(e)?x(e,((e,i)=>t.call(e,i,e))):$(e,t)}function B(e,t){const i=n();let o;const r=[];return z(e,((e,n)=>{o=t.call(i,n,e),null!=o&&r.push(o)})),[].concat(...r)}T.fn.each=function(e){return x(this,((t,i)=>e.call(t,i,t)))},x(["add","remove","toggle"],(e=>{T.fn[`${e}Class`]=function(t){return"remove"!==e||arguments.length?this.each(((i,o)=>{if(!f(o))return;const n=(a(t)?t.call(o,i,_(o,"class","")):t).split(" ").filter((e=>e));x(n,(t=>{o.classList[e](t)}))})):this.each(((e,t)=>{O(t,"class","")}))}})),x(["insertBefore","insertAfter"],((e,t)=>{T.fn[e]=function(e){const i=t?T(this.get().reverse()):this,o=T(e),n=[];return o.each(((e,o)=>{o.parentNode&&i.each(((i,r)=>{const s=e?r.cloneNode(!0):r,a=t?o.nextSibling:o;n.push(s),o.parentNode.insertBefore(s,a)}))})),T(t?n.reverse():n)}})),x(["before","after"],((e,t)=>{T.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,o)=>{const n=a(e[0])?[e[0].call(o,i,o.innerHTML)]:e;x(n,(e=>{let n;n=(e=>l(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?T(D(e,"div")):i&&f(e)?T(e.cloneNode(!0)):T(e),n[t?"insertAfter":"insertBefore"](o)}))}))}})),T.fn.map=function(e){return new E(B(this,((t,i)=>e.call(t,i,t))))},T.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},T.fn.is=function(e){let t=!1;if(a(e))return this.each(((i,o)=>{e.call(o,i,o)&&(t=!0)})),t;if(l(e))return this.each(((i,o)=>{m(o)||p(o)||o.matches.call(o,e)&&(t=!0)})),t;const i=T(e);return this.each(((e,o)=>{i.each(((e,i)=>{o===i&&(t=!0)}))})),t},T.fn.remove=function(e){return this.each(((t,i)=>{e&&!T(i).is(e)||A(i)}))},x(["prepend","append"],((e,t)=>{T.fn[e]=function(...e){return this.each(((i,o)=>{const n=o.childNodes,r=n.length,s=r?n[t?r-1:0]:I("div");r||S(o,s);let c=a(e[0])?[e[0].call(o,i,o.innerHTML)]:e;i&&(c=c.map((e=>l(e)?e:T(e).clone()))),T(s)[t?"after":"before"](...c),r||A(s)}))}})),x(["appendTo","prependTo"],((e,t)=>{T.fn[e]=function(e){const i=[],o=T(e).map(((e,o)=>{const n=o.childNodes,r=n.length;if(r)return n[t?0:r-1];const s=I("div");return S(o,s),i.push(s),s})),n=this[t?"insertBefore":"insertAfter"](o);return T(i).remove(),n}}));const V=(e,t)=>n().getComputedStyle(e).getPropertyValue(w(t)),N=e=>"border-box"===V(e,"box-sizing"),F=(e,t,i)=>{const o="width"===t?["Left","Right"]:["Top","Bottom"];return[0,1].reduce(((t,n,r)=>{let s=i+o[r];return"border"===i&&(s+="Width"),t+parseFloat(V(e,s)||"0")}),0)},H=(e,t)=>{if("width"===t||"height"===t){const i=e.getBoundingClientRect()[t];return N(e)?`${i}px`:i-F(e,t,"border")-F(e,t,"padding")+"px"}return V(e,t)},U=["animation-iteration-count","column-count","fill-opacity","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","line-height","opacity","order","orphans","widows","z-index","zoom"];x(["attr","prop","css"],((e,t)=>{const i=(e,i)=>0===t?_(e,i):1===t?e[i]:H(e,i);T.fn[e]=function(o,n){if(g(o))return $(o,((t,i)=>{this[e](t,i)})),this;if(1===arguments.length){const e=this[0];return f(e)?i(e,o):void 0}return this.each(((e,r)=>{((e,i,o)=>{if(!h(o))0===t?O(e,i,o):1!==t?(i=w(i),e.style.setProperty(i,c(o)?`${o}${i.startsWith("--")||U.includes(i)?"":"px"}`:o)):e[i]=o})(r,o,a(n)?n.call(r,e,i(r,o)):n)}))}})),T.fn.children=function(e){const t=[];return this.each(((i,o)=>{x(o.childNodes,(i=>{f(i)&&(e&&!T(i).is(e)||t.push(i))}))})),new E(M(t))},T.fn.slice=function(...e){return new E([].slice.apply(this,e))},T.fn.eq=function(e){const t=-1===e?this.slice(e):this.slice(e,+e+1);return new E(t)};const K=(e,t,i,o,n)=>{const r=[];let s;return e.each(((e,a)=>{for(s=a[i];s&&f(s);){if(2===t){if(o&&T(s).is(o))break;n&&!T(s).is(n)||r.push(s)}else{if(0===t){o&&!T(s).is(o)||r.push(s);break}o&&!T(s).is(o)||r.push(s)}s=s[i]}})),new E(M(r))};x(["","s","sUntil"],((e,t)=>{T.fn[`parent${e}`]=function(e,i){const o=t?T(this.get().reverse()):this;return K(o,t,"parentNode",e,i)}})),T.fn.closest=function(e){if(this.is(e))return this;const t=[];return this.parents().each(((i,o)=>{if(T(o).is(e))return t.push(o),!1})),new E(t)};const q=new WeakMap,j=e=>q.get(e)??{},W=(e,t)=>{const i=j(e),o=y(t);return o in i?i[o]:void 0},Y=(e,t)=>{const i=j(e);$(t,((e,t)=>{i[y(e)]=t})),q.set(e,i)},G=(e,t,i)=>{Y(e,{[t]:i})},X=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,J=(e,t,i)=>{if(h(i)&&1===e.nodeType&&(i=e.dataset[t],l(i)))try{i=(e=>"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:X.test(e)?JSON.parse(e):e))(i)}catch(e){}return i};T.fn.data=function(e,t){if(h(e)){if(!this.length)return;const e=this[0],t=j(e);return 1!==e.nodeType||$(e.dataset,(i=>{t[i]=J(e,i,t[i])})),t}return g(e)?this.each((function(){Y(this,e)})):2===arguments.length&&h(t)?this:h(t)?this.length?J(this[0],y(e),W(this[0],e)):void 0:this.each((function(){G(this,e,t)}))},T.fn.empty=function(){return this.each(((e,t)=>{t.innerHTML=""}))},T.fn.extend=function(e){return $(e,((e,t)=>{T.fn[e]=t})),this},T.fn.filter=function(e){if(a(e))return this.map(((t,i)=>e.call(i,t,i)?i:void 0));if(l(e))return this.map(((t,i)=>T(i).is(e)?i:void 0));const t=T(e);return this.map(((e,i)=>t.get().includes(i)?i:void 0))},T.fn.find=function(e){const t=[];return this.each(((i,o)=>{P(t,T(o.querySelectorAll(e)).get())})),new E(t)},T.fn.first=function(){return this.eq(0)};const Z=(e,t)=>e!==t&&b(e).contains(t);T.fn.has=function(e){const t=l(e)?this.find(e):T(e),{length:i}=t;return this.map((function(){for(let e=0;e{const s=i=>F(e,t.toLowerCase(),i)*r;return 2===o&&n&&(i+=s("margin")),N(e)?(0===o&&(i-=s("border")),1===o&&(i-=s("border"),i-=s("padding"))):(0===o&&(i+=s("padding")),2===o&&(i+=s("border"),i+=s("padding"))),i},ee=(e,t,i,n)=>{const r=o(),s=`client${t}`,a=`scroll${t}`,l=`offset${t}`,c=`inner${t}`;if(p(e))return 2===i?e[c]:b(r)[s];if(m(e)){const t=b(e);return Math.max(e.body[a],t[a],e.body[l],t[l],t[s])}const d=parseFloat(V(e,t.toLowerCase())||"0");return Q(e,t,d,i,n,1)};x(["Width","Height"],(e=>{x([`inner${e}`,e.toLowerCase(),`outer${e}`],((t,i)=>{T.fn[t]=function(t,o){const n=arguments.length&&(i<2||!d(t)),r=!0===t||!0===o;return n?this.each(((o,n)=>((e,t,i,o,n,r)=>{let s=a(r)?r.call(e,t,ee(e,i,o,n)):r;if(null==s)return;const c=T(e),d=i.toLowerCase();if(l(s)&&["auto","inherit",""].includes(s))return void c.css(d,s);const h=s.toString().replace(/\b[0-9.]*/,""),u=parseFloat(s);s=Q(e,i,u,o,n,-1)+(h||"px"),c.css(d,s)})(n,o,e,i,r,t))):this.length?ee(this[0],e,i,r):void 0}}))})),T.fn.hide=function(){return this.each(((e,t)=>{t.style.display="none"}))},x(["val","html","text"],((e,t)=>{const i=["value","innerHTML","textContent"][t],o=e=>{if(2===t)return B(e,(e=>b(e)[i])).join("");if(!e.length)return;const o=e[0],n=T(o);return 0===t&&n.is("select[multiple]")?B(n.find("option:checked"),(e=>e.value)):o[i]};T.fn[e]=function(e){return arguments.length?this.each(((n,r)=>{const s=T(r),l=a(e)?e.call(r,n,o(s)):e;0===t&&Array.isArray(l)?s.is("select[multiple]")?B(s.find("option"),(e=>e.selected=l.includes(e.value))):r.checked=l.includes(r.value):((e,o)=>{if(h(o)){if(0!==t)return;o=""}1===t&&f(o)&&(o=o.outerHTML),e[i]=o})(r,l)})):o(this)}})),T.fn.index=function(e){return arguments.length?l(e)?T(e).get().indexOf(this[0]):this.get().indexOf(T(e)[0]):this.eq(0).parent().children().get().indexOf(this[0])},T.fn.last=function(){return this.eq(-1)},x(["","All","Until"],((e,t)=>{T.fn[`next${e}`]=function(e,i){return K(this,t,"nextElementSibling",e,i)}})),T.fn.not=function(e){const t=this.filter(e);return this.map(((e,i)=>t.index(i)>-1?void 0:i))};const te=n().CustomEvent;class ie extends te{constructor(e,t){super(e,t),this.data=t.data,this.namespace=t.namespace}}const oe=new WeakMap;let re=1;const ne=e=>(oe.has(e)||oe.set(e,++re),oe.get(e)),se=new Map,ae=e=>{const t=ne(e);return se.get(t)||se.set(t,[]).get(t)},le=e=>{const t=e.split(".");return{type:t[0],namespace:t.slice(1).sort().join(" ")}},ce=e=>new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)"),de=(e,t,i,o)=>{const n=ae(e),r=t=>{delete n[t.id],e.removeEventListener(t.type,t.proxy,!1)};t?t.split(" ").forEach((t=>{t&&((e,t,i,o)=>{const n=le(t);return ae(e).filter((e=>e&&(!n.type||e.type===n.type)&&(!n.namespace||ce(n.namespace).test(e.namespace))&&(!i||ne(e.func)===ne(i))&&(!o||e.selector===o)))})(e,t,i,o).forEach((e=>{r(e)}))})):n.forEach((e=>{r(e)}))};function he(e,...t){return x(t,(t=>{$(t,((t,i)=>{h(i)||(e[t]=i)}))})),e}T.fn.off=function(e,t,i){return g(e)?($(e,((e,i)=>{this.off(e,t,i)})),this):((!1===t||a(t))&&(i=t,t=void 0),!1===i&&(i=k),this.each((function(){de(this,e,i,t)})))},T.fn.offsetParent=function(){const e=o();return this.map((function(){let t=this.offsetParent;for(;t&&"static"===T(t).css("position");)t=t.offsetParent;return t||e.documentElement}))};const ue=(e,t)=>parseFloat(e.css(t));T.fn.position=function(){if(!this.length)return;const e=this.eq(0);let t,i={left:0,top:0};if("fixed"===e.css("position"))t=e[0].getBoundingClientRect();else{t=e.offset();const o=e.offsetParent();i=o.offset(),i.top+=ue(o,"border-top-width"),i.left+=ue(o,"border-left-width")}return{top:t.top-i.top-ue(e,"margin-top"),left:t.left-i.left-ue(e,"margin-left")}};const pe=e=>{if(!e.getClientRects().length)return{top:0,left:0};const{top:t,left:i}=e.getBoundingClientRect(),{pageYOffset:o,pageXOffset:n}=e.ownerDocument.defaultView;return{top:t+o,left:i+n}};T.fn.offset=function(e){if(!arguments.length){if(!this.length)return;return pe(this[0])}return this.each((function(t){((e,t,i)=>{const o=T(e),n=o.css("position");"static"===n&&o.css("position","relative");const r=pe(e),s=o.css("top"),l=o.css("left");let c,d;if("absolute"!==n&&"fixed"!==n||!(s+l).includes("auto"))c=parseFloat(s),d=parseFloat(l);else{const e=o.position();c=e.top,d=e.left}const h=a(t)?t.call(e,i,he({},r)):t;o.css({top:null!=h.top?h.top-r.top+c:void 0,left:null!=h.left?h.left-r.left+d:void 0})})(this,e,t)}))},T.fn.on=function(e,t,i,o,n){if(g(e))return l(t)||(i=i||t,t=void 0),$(e,((e,o)=>{this.on(e,t,i,o,n)})),this;if(null==i&&null==o?(o=t,i=t=void 0):null==o&&(l(t)?(o=i,i=void 0):(o=i,i=t,t=void 0)),!1===o)o=k;else if(!o)return this;if(n){const e=this,i=o;o=function(n,...r){return e.off(n.type,t,o),i.call(this,n,...r)}}return this.each((function(){((e,t,i,o,n)=>{let r=!1;g(o)&&o.useCapture&&(r=!0),t.split(" ").forEach((t=>{if(!t)return;const s=le(t),a=(e,t)=>{!1===i.apply(t,null===e.detail?[e]:[e].concat(e.detail))&&(e.preventDefault(),e.stopPropagation())},l=t=>{t.namespace&&!ce(t.namespace).test(s.namespace)||(t.data=o,n?T(e).find(n).get().reverse().forEach((e=>{(e===t.target||Z(e,t.target))&&a(t,e)})):a(t,e))},c={type:s.type,namespace:s.namespace,func:i,selector:n,id:ae(e).length,proxy:l};ae(e).push(c),e.addEventListener(c.type,l,r)}))})(this,e,o,i,t)}))},T.fn.one=function(e,t,i,o){return this.on(e,t,i,o,!0)},x(["","All","Until"],((e,t)=>{T.fn[`prev${e}`]=function(e,i){const o=t?T(this.get().reverse()):this;return K(o,t,"previousElementSibling",e,i)}})),T.fn.removeAttr=function(e){const t=e.split(" ").filter((e=>e));return this.each((function(){x(t,(e=>{L(this,e)}))}))};const me=(e,t)=>{if(h(t))return(e=>{q.delete(e)})(e);((e,t)=>{const i=j(e);x(t,(e=>{const t=y(e);delete i[t]})),q.set(e,i)})(e,l(t)?t.split(" ").filter((e=>e)):t)};T.fn.removeData=function(e){return this.each(((t,i)=>{me(i,e)}))},T.fn.removeProp=function(e){return this.each(((t,i)=>{try{delete i[e]}catch(e){}}))},T.fn.replaceWith=function(e){return this.each(((t,i)=>{let o=e;a(o)?o=o.call(i,t,i.innerHTML):t&&!l(o)&&(o=T(o).clone()),T(i).before(o)})),this.remove()},T.fn.replaceAll=function(e){return T(e).map(((e,t)=>(T(t).replaceWith(e?this.clone():this),this.get())))};const fe=e=>{if(!g(e)&&!Array.isArray(e))return"";const t=[],i=(e,o)=>{let n;g(o)?$(o,((t,r)=>{n=Array.isArray(o)&&!g(r)?"":t,i(`${e}[${n}]`,r)})):(n=null==o||""===o?"=":`=${encodeURIComponent(o)}`,t.push(encodeURIComponent(e)+n))};return Array.isArray(e)?x(e,(({name:e,value:t})=>i(e,t))):$(e,i),t.join("&")},ve=new WeakMap,ge=e=>[...e.elements,...ve.get(e)||[]].sort(((e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),be=e=>{const t=[];return e.each(((e,i)=>{const o=i instanceof HTMLFormElement?ge(i):[i];T(o).each(((e,i)=>{const o=T(i),n=i.type,r=i.nodeName.toLowerCase();"fieldset"===r||!i.name||i.disabled||!["input","select","textarea","keygen","mdui-checkbox","mdui-radio-group","mdui-switch","mdui-text-field","mdui-select","mdui-slider","mdui-range-slider","mdui-segmented-button-group"].includes(r)||["submit","button","image","reset","file"].includes(n)||["radio","checkbox"].includes(n)&&!i.checked||["mdui-checkbox","mdui-switch"].includes(r)&&!i.checked||t.push({name:i.name,value:o.val()})}))})),t};T.fn.serializeArray=function(){return be(this).map((e=>Array.isArray(e.value)?e.value.map((t=>({name:e.name,value:t}))):e)).flat()},T.fn.serialize=function(){return fe(this.serializeArray())},T.fn.serializeObject=function(){const e={};return be(this).forEach((t=>{const{name:i,value:o}=t;if(e.hasOwnProperty(i)){const t=e[i];Array.isArray(t)||(e[i]=[t]),Array.isArray(o)?e[i].push(...o):e[i].push(o)}else e[i]=o})),e};const ye={};T.fn.show=function(){return this.each(((e,t)=>{"none"===t.style.display&&(t.style.display=""),"none"===H(t,"display")&&(t.style.display=(e=>{const t=o();let i,n;return ye[e]||(i=I(e),S(t.body,i),n=H(i,"display"),A(i),"none"===n&&(n="block"),ye[e]=n),ye[e]})(t.nodeName))}))},T.fn.siblings=function(e){return this.prevAll(e).add(this.nextAll(e))},T.fn.toggle=function(){return this.each(((e,t)=>{"none"===H(t,"display")?T(t).show():T(t).hide()}))},T.fn.trigger=function(e,t=null,i){const{type:o,namespace:n}=le(e),r=new ie(o,{detail:t,data:null,namespace:n,bubbles:!0,cancelable:!1,composed:!0,...i});return this.each(((e,t)=>{t.dispatchEvent(r)}))};const we="ajaxSuccess",ke="ajaxError",Ce="ajaxComplete",xe={},$e=(e,t)=>`${e}&${t}`.replace(/[&?]{1,2}/,"?"),Ee=e=>{const t=o(),i=n();let r=!1;const s={},a={},c=(e=>{const t={url:"",method:"GET",data:"",processData:!0,async:!0,cache:!0,username:"",password:"",headers:{},xhrFields:{},statusCode:{},dataType:"",contentType:"application/x-www-form-urlencoded",timeout:0,global:!0};return $(xe,((e,i)=>{["beforeSend","success","error","complete","statusCode"].includes(e)||h(i)||(t[e]=i)})),he({},t,e)})(e),d=c.method.toUpperCase();let{data:u,url:p}=c;p=p||i.location.toString();const{processData:m,async:f,cache:v,username:g,password:b,headers:y,xhrFields:w,statusCode:k,dataType:C,contentType:R,timeout:O,global:E}=c,I=(e=>["GET","HEAD"].includes(e))(d);!u||!I&&!m||l(u)||u instanceof ArrayBuffer||u instanceof Blob||u instanceof Document||u instanceof FormData||(u=fe(u)),u&&I&&(p=$e(p,u),u=null);const S=(e,i,...o)=>{let n,l;E&&T(t).trigger(e,"success"===i?a:s),i in xe&&(n=xe[i](...o)),c[i]&&(l=c[i](...o)),"beforeSend"===i&&[n,l].includes(!1)&&(r=!0)};return(()=>{let e;return new Promise(((t,o)=>{const l=e=>o(new Error(e));I&&!v&&(p=$e(p,`_=${Date.now()}`));const m=new XMLHttpRequest;let T;if(m.open(d,p,f,g,b),(R||u&&!I&&!1!==R)&&m.setRequestHeader("Content-Type",R),"json"===C&&m.setRequestHeader("Accept","application/json, text/javascript"),$(y,((e,t)=>{h(t)||m.setRequestHeader(e,t+"")})),(e=>{const t=n();return/^([\w-]+:)?\/\/([^/]+)/.test(e)&&RegExp.$2!==t.location.host})(p)||m.setRequestHeader("X-Requested-With","XMLHttpRequest"),$(w,((e,t)=>{m[e]=t})),s.xhr=a.xhr=m,s.options=a.options=c,m.onload=()=>{T&&clearTimeout(T);const i=(o=m.status)>=200&&o<300||[0,304].includes(o);var o;let n;if(i)if(e=204===m.status||"HEAD"===d?"nocontent":304===m.status?"notmodified":"success","json"===C||!C&&(m.getResponseHeader("content-type")||"").includes("json")){try{n="HEAD"===d?void 0:JSON.parse(m.responseText),a.response=n}catch(t){e="parsererror",S(ke,"error",m,e),l(e)}"parsererror"!==e&&(S(we,"success",n,e,m),t(n))}else n="HEAD"===d?void 0:"text"===m.responseType||""===m.responseType?m.responseText:m.response,a.response=n,S(we,"success",n,e,m),t(n);else e="error",S(ke,"error",m,e),l(e);x([xe.statusCode??{},k],(t=>{t[m.status]&&(i?t[m.status](n,e,m):t[m.status](m,e))})),S(Ce,"complete",m,e)},m.onerror=()=>{T&&clearTimeout(T),S(ke,"error",m,m.statusText),S(Ce,"complete",m,"error"),l(m.statusText)},m.onabort=()=>{let e="abort";T&&(e="timeout",clearTimeout(T)),S(ke,"error",m,e),S(Ce,"complete",m,e),l(e)},S("ajaxStart","beforeSend",m,c),r)return l("cancel");O>0&&(T=i.setTimeout((()=>m.abort()),O)),m.send(u)}))})()};function Re(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}T.ajax=Ee,T.ajaxSetup=e=>he(xe,e),T.contains=Z,T.data=function(e,t,i){return g(t)?(Y(e,t),t):h(i)?h(t)?j(e):W(e,t):(G(e,t,i),i)},T.each=z,T.extend=function(e,...t){return t.length?he(e,...t):($(e,((e,t)=>{this[e]=t})),this)},T.map=B,T.merge=P,T.param=fe,T.removeData=me,T.unique=M,"function"==typeof SuppressedError&&SuppressedError;const Ie=globalThis,Se=Ie.ShadowRoot&&(void 0===Ie.ShadyCSS||Ie.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ae=Symbol(),De=new WeakMap;let Te=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ae)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Se&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=De.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&De.set(t,e))}return e}toString(){return this.cssText}};const Pe=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1]),e[0]);return new Te(i,e,Ae)},Me=Se?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new Te("string"==typeof e?e:e+"",void 0,Ae))(t)})(e):e,{is:_e,defineProperty:Le,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:ze,getOwnPropertySymbols:Be,getPrototypeOf:Ve}=Object,Ne=globalThis,Fe=Ne.trustedTypes,He=Fe?Fe.emptyScript:"",Ue=Ne.reactiveElementPolyfillSupport,Ke=(e,t)=>e,qe={toAttribute(e,t){switch(t){case Boolean:e=e?He:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},je=(e,t)=>!_e(e,t),We={attribute:!0,type:String,converter:qe,reflect:!1,hasChanged:je};Symbol.metadata??=Symbol("metadata"),Ne.litPropertyMetadata??=new WeakMap;let Ye=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=We){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Le(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:n}=Oe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return o?.call(this)},set(t){const r=o?.call(this);n.call(this,t),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??We}static _$Ei(){if(this.hasOwnProperty(Ke("elementProperties")))return;const e=Ve(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ke("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ke("properties"))){const e=this.properties,t=[...ze(e),...Be(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(Me(e))}else void 0!==e&&t.push(Me(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Se)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),o=Ie.litNonce;void 0!==o&&t.setAttribute("nonce",o),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(void 0!==o&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:qe).toAttribute(t,i.type);this._$Em=e,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(e,t){const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:qe;this._$Em=o,this[o]=n.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??je)(this[e],t))return;this.P(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e)!0!==i.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],i)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}};Ye.elementStyles=[],Ye.shadowRootOptions={mode:"open"},Ye[Ke("elementProperties")]=new Map,Ye[Ke("finalized")]=new Map,Ue?.({ReactiveElement:Ye}),(Ne.reactiveElementVersions??=[]).push("2.0.4");const Ge=globalThis,Xe=Ge.trustedTypes,Je=Xe?Xe.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ze="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,et="?"+Qe,tt=`<${et}>`,it=document,ot=()=>it.createComment(""),rt=e=>null===e||"object"!=typeof e&&"function"!=typeof e,nt=Array.isArray,st="[ \t\n\f\r]",at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,ct=/>/g,dt=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ht=/'/g,ut=/"/g,pt=/^(?:script|style|textarea|title)$/i,mt=(e,...t)=>({_$litType$:1,strings:e,values:t}),ft=Symbol.for("lit-noChange"),vt=Symbol.for("lit-nothing"),gt=new WeakMap,bt=it.createTreeWalker(it,129);function yt(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Je?Je.createHTML(t):t}const wt=(e,t)=>{const i=e.length-1,o=[];let n,r=2===t?"":"",s=at;for(let t=0;t"===l[0]?(s=n??at,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?dt:'"'===l[3]?ut:ht):s===ut||s===ht?s=dt:s===lt||s===ct?s=at:(s=dt,n=void 0);const h=s===dt&&e[t+1].startsWith("/>")?" ":"";r+=s===at?i+tt:c>=0?(o.push(a),i.slice(0,c)+Ze+i.slice(c)+Qe+h):i+Qe+(-2===c?t:h)}return[yt(e,r+(e[i]||"")+(2===t?"":"")),o]};class kt{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let n=0,r=0;const s=e.length-1,a=this.parts,[l,c]=wt(e,t);if(this.el=kt.createElement(l,i),bt.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=bt.nextNode())&&a.length0){o.textContent=Xe?Xe.emptyScript:"";for(let i=0;int(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==vt&&rt(this._$AH)?this._$AA.nextSibling.data=e:this.T(it.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=kt.createElement(yt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new xt(o,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=gt.get(e.strings);return void 0===t&>.set(e.strings,t=new kt(e)),t}k(e){nt(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const n of e)o===t.length?t.push(i=new $t(this.S(ot()),this.S(ot()),this,this.options)):i=t[o],i._$AI(n),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=vt}_$AI(e,t=this,i,o){const n=this.strings;let r=!1;if(void 0===n)e=Ct(this,e,t,0),r=!rt(e)||e!==this._$AH&&e!==ft,r&&(this._$AH=e);else{const o=e;let s,a;for(e=n[0],s=0;s{const o=i?.renderBefore??t;let n=o._$litPart$;if(void 0===n){const e=i?.renderBefore??null;o._$litPart$=n=new $t(t.insertBefore(ot(),e),e,void 0,i??{})}return n._$AI(e),n})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ft}};Tt._$litElement$=!0,Tt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Tt});const Pt=globalThis.litElementPolyfillSupport;Pt?.({LitElement:Tt}),(globalThis.litElementVersions??=[]).push("4.0.6");const Mt=e=>(t,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},_t={attribute:!0,type:String,converter:qe,reflect:!1,hasChanged:je},Lt=(e=_t,t,i)=>{const{kind:o,metadata:n}=i;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),r.set(i.name,e),"accessor"===o){const{name:o}=i;return{set(i){const n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e)},init(t){return void 0!==t&&this.P(o,void 0,e),t}}}if("setter"===o){const{name:o}=i;return function(i){const n=this[o];t.call(this,i),this.requestUpdate(o,n,e)}}throw Error("Unsupported decorator location: "+o)};function Ot(e){return(t,i)=>"object"==typeof i?Lt(e,t,i):((e,t,i)=>{const o=t.hasOwnProperty(i);return t.constructor.createProperty(i,o?{...e,wrapped:!0}:e),o?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function zt(e){return Ot({...e,state:!0,attribute:!1})}function Bt(e){return(t,i)=>{const{slot:o,selector:n}=e??{},r="slot"+(o?`[name=${o}]`:":not([name])");return((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i))(t,i,{get(){const t=this.renderRoot?.querySelector(r),i=t?.assignedElements(e)??[];return void 0===n?i:i.filter((e=>e.matches(n)))}})}}const Vt=e=>e??vt,Nt=1,Ft=2,Ht=3,Ut=4,Kt=e=>(...t)=>({_$litDirective$:e,values:t});let qt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const jt="important",Wt=" !"+jt,Yt=Kt(class extends qt{constructor(e){if(super(e),1!==e.type||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(Wt);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?jt:""):i[e]=o}}return ft}});class Gt extends Tt{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i)}}class Xt{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange),R()||T((()=>{this.host.requestUpdate()}))}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hasDefaultSlot(){return[...this.host.childNodes].some((e=>e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim()||e.nodeType===e.ELEMENT_NODE&&!e.hasAttribute("slot")))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}onSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Jt=mt`${vt}`,Zt=Pe`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}:host :focus,:host :focus-visible,:host(:focus),:host(:focus-visible){outline:0}[hidden]{display:none!important}`;let Qt=class extends qt{constructor(e){if(super(e),this.it=vt,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===vt||null==e)return this._t=void 0,this.it=e;if(e===ft)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Qt.directiveName="unsafeHTML",Qt.resultType=1;class ei extends Qt{}ei.directiveName="unsafeSVG",ei.resultType=2;const ti=Kt(ei),ii=e=>void 0===e.strings,oi={},ri=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),ri(e,t);return!0},ni=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},si=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),ci(t)}};function ai(e){void 0!==this._$AN?(ni(this),this._$AM=e,si(this)):this._$AM=e}function li(e,t=!1,i=0){const o=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(o))for(let e=i;e{2==e.type&&(e._$AP??=li,e._$AQ??=ai)};class di extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),si(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ri(this,e),ni(this))}setValue(e){if(ii(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}class hi{constructor(e){this.Y=e}disconnect(){this.Y=void 0}reconnect(e){this.Y=e}deref(){return this.Y}}let ui=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((e=>this.q=e))}resume(){this.q?.(),this.Z=this.q=void 0}};const pi=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,mi=1073741823,fi=Kt(class extends di{constructor(){super(...arguments),this._$Cwt=mi,this._$Cbt=[],this._$CK=new hi(this),this._$CX=new ui}render(...e){return e.find((e=>!pi(e)))??ft}update(e,t){const i=this._$Cbt;let o=i.length;this._$Cbt=t;const n=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let e=0;ethis._$Cwt);e++){const s=t[e];if(!pi(s))return this._$Cwt=e,s;e{for(;r.get();)await r.get();const t=n.deref();if(void 0!==t){const i=t._$Cbt.indexOf(s);i>-1&&i`:(()=>{if(this.name){const[e,t]=this.name.split("--"),i=new Map([["outlined","Material Icons Outlined"],["filled","Material Icons"],["rounded","Material Icons Round"],["sharp","Material Icons Sharp"],["two-tone","Material Icons Two Tone"]]);return mt`${e}`}return this.src?mt`${fi(Ee({url:this.src}).then(ti))}`:mt``})()}};gi.styles=[Zt,vi],Re([Ot({reflect:!0})],gi.prototype,"name",void 0),Re([Ot({reflect:!0})],gi.prototype,"src",void 0),gi=Re([Mt("mdui-icon")],gi);const bi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;white-space:nowrap;vertical-align:middle;border-radius:var(--shape-corner);-webkit-user-select:none;user-select:none;width:2.5rem;height:2.5rem;background-color:rgb(var(--mdui-color-primary-container));color:rgb(var(--mdui-color-on-primary-container));font-size:var(--mdui-typescale-title-medium-size);font-weight:var(--mdui-typescale-title-medium-weight);letter-spacing:var(--mdui-typescale-title-medium-tracking);line-height:var(--mdui-typescale-title-medium-line-height)}img{width:100%;height:100%}::slotted(mdui-icon),mdui-icon{font-size:1.5em}`;let yi=class extends Gt{constructor(){super(...arguments),this.hasSlotController=new Xt(this,"[default]")}render(){return this.hasSlotController.test("[default]")?mt``:this.src?mt`${Vt(this.label)}`:this.icon?mt``:Jt}};yi.styles=[Zt,bi],Re([Ot({reflect:!0})],yi.prototype,"src",void 0),Re([Ot({reflect:!0})],yi.prototype,"fit",void 0),Re([Ot({reflect:!0})],yi.prototype,"icon",void 0),Re([Ot({reflect:!0})],yi.prototype,"label",void 0),yi=Re([Mt("mdui-avatar")],yi);const wi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--shape-corner);padding-left:.25rem;padding-right:.25rem;color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error));height:1rem;min-width:1rem;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height)}:host([variant=small]){min-width:0;padding:0;width:.375rem;height:.375rem}`;let ki=class extends Gt{constructor(){super(...arguments),this.variant="large"}render(){return"small"===this.variant?Jt:mt``}};ki.styles=[Zt,wi],Re([Ot({reflect:!0})],ki.prototype,"variant",void 0),ki=Re([Mt("mdui-badge")],ki);const Ci=e=>null!==e&&"false"!==e;class xi{constructor(e,t){this.defined=!1,(this.host=e).addController(this),this.relatedElements=t.relatedElements,this.needDomReady=t.needDomReady||!!t.relatedElements,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}isDefined(){return!!this.defined||(this.defined=(!this.needDomReady||R())&&!this.getUndefinedLocalNames().length,this.defined)}async whenDefined(){if(this.defined)return Promise.resolve();const e=o();this.needDomReady&&!R(e)&&await new Promise((t=>{e.addEventListener("DOMContentLoaded",(()=>t()),{once:!0})}));const t=this.getUndefinedLocalNames();if(t.length){const e=[];t.forEach((t=>{e.push(customElements.whenDefined(t))})),await Promise.all(e)}this.defined=!0}getScopeLocalNameSelector(){const e=this.relatedElements;return e?Array.isArray(e)?e.map((e=>`${e}:not(:defined)`)).join(","):Object.keys(e).filter((t=>!e[t])).map((e=>`${e}:not(:defined)`)).join(","):null}getGlobalLocalNameSelector(){const e=this.relatedElements;return!e||Array.isArray(e)?null:Object.keys(e).filter((t=>e[t])).map((e=>`${e}:not(:defined)`)).join(",")}getUndefinedLocalNames(){const e=this.getScopeLocalNameSelector(),t=this.getGlobalLocalNameSelector(),i=[...e?[...this.host.querySelectorAll(e)]:[],...t?[...o().querySelectorAll(t)]:[]].map((e=>e.localName));return M(i)}onSlotChange(){const e=this.getScopeLocalNameSelector();e&&this.host.querySelectorAll(e).length&&(this.defined=!1)}}function $i(e,t=!1){return(i,o)=>{const{update:n}=i;e in i&&(i.update=function(i){if(i.has(e)){const n=i.get(e),r=this[e];n!==r&&(t&&!this.hasUpdated||this[o](n,r))}n.call(this,i)})}}const Ei=e=>{class t extends e{constructor(...e){super(...e),this.scrollBehaviorDefinedController=new xi(this,{needDomReady:!0}),this.lastScrollTopThreshold=0,this.lastScrollTopNoThreshold=0,this.isParentLayout=!1,this.onListeningScroll=this.onListeningScroll.bind(this)}get scrollPaddingPosition(){throw new Error("Must implement scrollPaddingPosition getter")}async onScrollTargetChange(e,t){if(await this.scrollBehaviorDefinedController.whenDefined(),(e&&!t||!e&&t)&&this.updateContainerPadding(),!this.scrollBehavior)return;const i=this.getListening(e);i&&i.removeEventListener("scroll",this.onListeningScroll);const o=this.getListening(t);o&&(this.updateScrollTop(o),o.addEventListener("scroll",this.onListeningScroll))}async onScrollBehaviorChange(e,t){await this.scrollBehaviorDefinedController.whenDefined(),(e&&!t||!e&&t)&&this.updateContainerPadding();const i=this.getListening(this.scrollTarget);i&&(this.scrollBehavior?(this.updateScrollTop(i),i.addEventListener("scroll",this.onListeningScroll)):i.removeEventListener("scroll",this.onListeningScroll))}connectedCallback(){super.connectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.isParentLayout=s(this.parentElement,"mdui-layout"),this.updateContainerPadding()}))}disconnectedCallback(){super.disconnectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.updateContainerPadding(!1)}))}hasScrollBehavior(e){const t=this.scrollBehavior?.split(" ")??[];return Array.isArray(e)?!!t.filter((t=>e.includes(t))).length:t.includes(e)}runScrollThreshold(e,t){}runScrollNoThreshold(e,t){}updateContainerPadding(e=!0){const t=this.getContainer(this.scrollTarget);if(!t||this.isParentLayout)return;const i="top"===this.scrollPaddingPosition?"paddingTop":"paddingBottom";if(e){const e=this.getListening(this.scrollTarget)&&["fixed","absolute"].includes(T(this).css("position"))?this.offsetHeight:null;T(t).css({[i]:e})}else T(t).css({[i]:null})}onListeningScroll(){const e=this.getListening(this.scrollTarget);window.requestAnimationFrame((()=>this.onScroll(e)))}onScroll(e){const t=e.scrollY??e.scrollTop;this.lastScrollTopNoThreshold!==t&&(this.runScrollNoThreshold(t(this.scrollThreshold||0)&&(this.runScrollThreshold(t++Ri;let Si,Ai;const Di=(e,t)=>{const i=T(e),o=Ii(),n={unobserve:()=>{i.each(((e,t)=>{const i=Si.get(t),n=i.coArr.findIndex((e=>e.key===o));-1!==n&&i.coArr.splice(n,1),i.coArr.length?Si.set(t,i):(Ai.unobserve(t),Si.delete(t))}))}};return Si||(Si=new WeakMap,Ai=new ResizeObserver((e=>{e.forEach((e=>{const t=e.target,i=Si.get(t);i.entry=e,i.coArr.forEach((t=>{t.callback.call(n,e,n)}))}))}))),i.each(((e,i)=>{const r=Si.get(i)??{coArr:[]};r.coArr.length&&r.entry&&t.call(n,r.entry,n),r.coArr.push({callback:t,key:o}),Si.set(i,r),Ai.observe(i)})),n};class Ti{constructor(){this.states=[]}registerMain(e){this.$main=T(e)}unregisterMain(){this.$main=void 0}registerItem(e){const t={element:e};this.states.push(t),t.observeResize=Di(t.element,(()=>{this.updateLayout(t.element,{width:this.isNoWidth(t)?0:void 0})})),this.items=void 0,this.resort(),this.updateLayout()}unregisterItem(e){const t=this.states.findIndex((t=>t.element===e));if(t<0)return;const i=this.states[t];i.observeResize?.unobserve(),this.items=void 0,this.states.splice(t,1),this.states[t]&&this.updateLayout(this.states[t].element)}getItems(){if(!this.items){const e=this.states.map((e=>e.element));this.items=e.sort(((e,t)=>{const i=e.compareDocumentPosition(t);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}return this.items}getMain(){return this.$main?this.$main[0]:void 0}getItemsAndMain(){return[...this.getItems(),this.getMain()].filter((e=>e))}updateOrder(){this.resort(),this.updateLayout()}updateLayout(e,t){const i=e?{element:e,width:t?.width,height:t?.height}:void 0,o=i?this.states.findIndex((e=>e.element===i.element)):0;if(o<0)return;Object.assign(this.states[o],i),this.states.forEach(((e,t)=>{if(t0?this.states[t-1]:void 0,r=n?.top??0,s=n?.right??0,a=n?.bottom??0,l=n?.left??0;switch(Object.assign(e,{top:r,right:s,bottom:a,left:l}),i){case"top":case"bottom":e[i]+=e.height??e.element.offsetHeight;break;case"right":case"left":e[i]+=(this.isNoWidth(e)?0:e.width)??e.element.offsetWidth}e.height=e.width=void 0,T(e.element).css({position:"absolute",top:"bottom"===i?null:r,right:"left"===i?null:s,bottom:"top"===i?null:a,left:"right"===i?null:l})}));const n=this.states[this.states.length-1];this.$main&&this.$main.css({paddingTop:n.top,paddingRight:n.right,paddingBottom:n.bottom,paddingLeft:n.left})}resort(){const e=this.getItems();this.states.sort(((t,i)=>{const o=t.element.order??0,n=i.element.order??0;return o>n?1:oe.indexOf(i.element)?1:e.indexOf(t.element)(Pi.has(e)||Pi.set(e,new Ti),Pi.get(e));class _i extends Gt{constructor(){super(...arguments),this.isParentLayout=!1}get layoutPlacement(){throw new Error("Must implement placement getter!")}onOrderChange(){this.layoutManager?.updateOrder()}connectedCallback(){super.connectedCallback();const e=this.parentElement;this.isParentLayout=s(e,"mdui-layout"),this.isParentLayout&&(this.layoutManager=Mi(e),this.layoutManager.registerItem(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterItem(this)}}Re([Ot({type:Number,reflect:!0})],_i.prototype,"order",void 0),Re([$i("order",!0)],_i.prototype,"onOrderChange",null);const Li=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-emphasized);padding:0 1rem;height:5rem;background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]){transition-duration:var(--mdui-motion-duration-short4);bottom:-5.625rem}::slotted(:not(:first-child)){margin-left:.5rem}::slotted(mdui-fab){box-shadow:var(--mdui-elevation-level0)}:host([fab-detach]) ::slotted(mdui-fab){position:absolute;transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard);right:1rem;bottom:.75rem}:host([fab-detach][hide][scroll-behavior~=hide]) ::slotted(mdui-fab){transition-duration:var(--mdui-motion-duration-short4);bottom:1rem;box-shadow:var(--mdui-elevation-level2)}:host([fab-detach][hide][scroll-behavior~=hide][scroll-target]:not([scroll-target=''])) ::slotted(mdui-fab){bottom:6.625rem}:host([hide]) ::slotted(:not(mdui-fab)),:host([hide]:not([fab-detach])) ::slotted(mdui-fab){transform:translateY(8.75rem);transition:transform var(--mdui-motion-duration-0) var(--mdui-motion-easing-emphasized-accelerate) var(--mdui-motion-duration-short4)}::slotted(:first-child){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short1)}::slotted(:nth-child(2)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short3)}::slotted(:nth-child(3)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short4)}::slotted(:nth-child(4)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium1)}::slotted(:nth-child(5)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium2)}::slotted(:nth-child(6)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium3)}`;let Oi=class extends(Ei(_i)){constructor(){super(...arguments),this.hide=!1,this.fabDetach=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return mt``}runScrollThreshold(e){e||this.hide||this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1)}};Oi.styles=[Zt,Li],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Oi.prototype,"hide",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"fab-detach"})],Oi.prototype,"fabDetach",void 0),Re([Ot({reflect:!0,attribute:"scroll-behavior"})],Oi.prototype,"scrollBehavior",void 0),Oi=Re([Mt("mdui-bottom-app-bar")],Oi);const zi=()=>new Bi;class Bi{}const Vi=new WeakMap,Ni=Kt(class extends di{render(e){return vt}update(e,[t]){const i=t!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),vt}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.Y){const t=this.ht??globalThis;let i=Vi.get(t);void 0===i&&(i=new WeakMap,Vi.set(t,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ht,void 0),i.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?Vi.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Fi(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let i,o=0;o{const t=T(e).attr("form");return t?e.getRootNode().getElementById(t):e.closest("form")},name:e=>e.name,value:e=>e.value,defaultValue:e=>e.defaultValue,setValue:(e,t)=>e.value=t,disabled:e=>e.disabled,reportValidity:e=>!a(e.reportValidity)||e.reportValidity(),...t},this.onFormData=this.onFormData.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.onFormReset=this.onFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this)}hostConnected(){this.definedController.whenDefined().then((()=>{this.form=this.options.form(this.host),this.form&&this.attachForm(this.form)}))}hostDisconnected(){this.detachForm()}hostUpdated(){this.definedController.whenDefined().then((()=>{const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e))}))}getForm(){return this.form??null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}attachForm(e){e?(this.form=e,ve.has(this.form)?ve.get(this.form).add(this.host):ve.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.onFormData),this.form.addEventListener("submit",this.onFormSubmit),this.form.addEventListener("reset",this.onFormReset),Hi.has(this.form)||(Hi.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){this.form&&(ve.get(this.form).delete(this.host),this.form.removeEventListener("formdata",this.onFormData),this.form.removeEventListener("submit",this.onFormSubmit),this.form.removeEventListener("reset",this.onFormReset),Hi.has(this.form)&&!ve.get(this.form).size&&(this.form.reportValidity=Hi.get(this.form),Hi.delete(this.form)))}doAction(e,t){if(!this.form)return;const i=T(``}isButton(){return!this.href}}io.styles=[Zt,to],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],io.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],io.prototype,"loading",void 0),Re([Ot({reflect:!0})],io.prototype,"name",void 0),Re([Ot({reflect:!0})],io.prototype,"value",void 0),Re([Ot({reflect:!0})],io.prototype,"type",void 0),Re([Ot({reflect:!0})],io.prototype,"form",void 0),Re([Ot({reflect:!0,attribute:"formaction"})],io.prototype,"formAction",void 0),Re([Ot({reflect:!0,attribute:"formenctype"})],io.prototype,"formEnctype",void 0),Re([Ot({reflect:!0,attribute:"formmethod"})],io.prototype,"formMethod",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"formnovalidate"})],io.prototype,"formNoValidate",void 0),Re([Ot({reflect:!0,attribute:"formtarget"})],io.prototype,"formTarget",void 0);const oo=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=text]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=outlined][focus-visible]){border-color:rgb(var(--mdui-color-primary))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=tonal][hover]){box-shadow:var(--mdui-elevation-level1)}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([variant=elevated][disabled]),:host([variant=filled][disabled]),:host([variant=tonal][disabled]){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([variant=outlined][disabled]){border-color:rgba(var(--mdui-color-on-surface),12%)}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon{display:inline-flex;font-size:1.28571429em}.end-icon mdui-icon,.icon mdui-icon,::slotted([slot=end-icon]),::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([variant=filled]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([variant=tonal]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let ro=class extends io{constructor(){super(...arguments),this.variant="filled",this.fullWidth=!1,this.rippleRef=zi()}get rippleElement(){return this.rippleRef.value}render(){return mt`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderInner()}):this.disabled||this.loading?mt`${this.renderInner()}`:this.renderAnchor({className:"button",part:"button",content:this.renderInner()})}`}renderIcon(){return this.loading?this.renderLoading():mt`${this.icon?mt``:Jt}`}renderLabel(){return mt``}renderEndIcon(){return mt`${this.endIcon?mt``:Jt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}};ro.styles=[io.styles,oo],Re([Ot({reflect:!0})],ro.prototype,"variant",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"full-width"})],ro.prototype,"fullWidth",void 0),Re([Ot({reflect:!0})],ro.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],ro.prototype,"endIcon",void 0),ro=Re([Mt("mdui-button")],ro);const no=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;height:2.5rem}:host([variant=standard]){color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=filled]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined][pressed]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([variant=standard][selected]){color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]:not([selectable])),:host([variant=filled][selected]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]:not([selectable])),:host([variant=tonal][selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([variant=outlined][selected]){border:none;color:rgb(var(--mdui-color-inverse-on-surface));background-color:rgb(var(--mdui-color-inverse-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}:host([variant=filled][disabled]),:host([variant=outlined][disabled]),:host([variant=tonal][disabled]){background-color:rgba(var(--mdui-color-on-surface),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),.38)!important}:host([loading]) .button,:host([loading]) mdui-ripple{opacity:0}.button{float:left;width:100%}.icon,.selected-icon mdui-icon,::slotted(*){font-size:inherit}mdui-circular-progress{display:flex;position:absolute;top:calc(50% - 1.5rem / 2);left:calc(50% - 1.5rem / 2);width:1.5rem;height:1.5rem}:host([variant=filled]:not([disabled])) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let so=class extends io{constructor(){super(...arguments),this.variant="standard",this.selectable=!1,this.selected=!1,this.rippleRef=zi(),this.hasSlotController=new Xt(this,"[default]","selected-icon")}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.selectable&&!this.disabled&&(this.selected=!this.selected)}))}render(){return mt`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderIcon()}):this.disabled||this.loading?mt`${this.renderIcon()}`:this.renderAnchor({className:"button",part:"button",content:this.renderIcon()})} ${this.renderLoading()}`}renderIcon(){const e=()=>this.hasSlotController.test("[default]")?mt``:this.icon?mt``:Jt;return this.selected?(()=>this.hasSlotController.test("selected-icon")||this.selectedIcon?mt``:e())():e()}};so.styles=[io.styles,no],Re([Ot({reflect:!0})],so.prototype,"variant",void 0),Re([Ot({reflect:!0})],so.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"selected-icon"})],so.prototype,"selectedIcon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],so.prototype,"selectable",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],so.prototype,"selected",void 0),Re([$i("selected",!0)],so.prototype,"onSelectedChange",null),so=Re([Mt("mdui-button-icon")],so);const ao=Pe`:host{--shape-corner:var(--mdui-shape-corner-medium);position:relative;display:inline-block;overflow:hidden;border-radius:var(--shape-corner);-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([clickable]){cursor:pointer}:host([variant=elevated]){background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([variant=filled]){background-color:rgb(var(--mdui-color-surface-container-highest))}:host([variant=outlined]){background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=outlined][hover]){box-shadow:var(--mdui-elevation-level1)}:host([variant=elevated][dragged]),:host([variant=filled][dragged]),:host([variant=outlined][dragged]){box-shadow:var(--mdui-elevation-level3)}:host([disabled]){opacity:.38;cursor:default;-webkit-user-select:none;user-select:none}:host([variant=elevated][disabled]){background-color:rgb(var(--mdui-color-surface-variant));box-shadow:var(--mdui-elevation-level0)}:host([variant=filled][disabled]){background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level1)}:host([variant=outlined][disabled]){box-shadow:var(--mdui-elevation-level0);border-color:rgba(var(--mdui-color-outline),.32)}.link{position:relative;display:inline-block;width:100%;height:100%;color:inherit;font-size:inherit;letter-spacing:inherit;text-decoration:none;touch-action:manipulation;-webkit-user-drag:none}`;let lo=class extends(qi(eo(Yi(Gt)))){constructor(){super(...arguments),this.variant="elevated",this.clickable=!1,this.disabled=!1,this.rippleRef=zi()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled||!this.href&&!this.clickable}get focusElement(){return this.href&&!this.disabled?this.renderRoot.querySelector("._a"):this}get focusDisabled(){return this.rippleDisabled}render(){return mt`${this.href&&!this.disabled?this.renderAnchor({className:"link",content:mt``}):mt``}`}};lo.styles=[Zt,ao],Re([Ot({reflect:!0})],lo.prototype,"variant",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],lo.prototype,"clickable",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],lo.prototype,"disabled",void 0),lo=Re([Mt("mdui-card")],lo);const co=Kt(class extends qt{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!ii(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ft||t===vt)return t;const i=e.element,o=e.name;if(3===e.type){if(t===i[o])return ft}else if(4===e.type){if(!!t===i.hasAttribute(o))return ft}else if(1===e.type&&i.getAttribute(o)===t+"")return ft;return((e,t=oi)=>{e._$AH=t})(e),t}});function ho(e="value"){return(t,i)=>{const o=t.constructor,n=o.prototype.attributeChangedCallback;o.prototype.attributeChangedCallback=function(t,r,s){const c=o.getPropertyOptions(e);if(t===(l(c.attribute)?c.attribute:e)){const t=c.converter||qe,o=(a(t)?t:t?.fromAttribute??qe.fromAttribute)(s,c.type);this[e]!==o&&(this[i]=o)}n.call(this,t,r,s)}}}const uo=Pe`:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`,po=e=>mt`${ti(e)}`;let mo=class extends Tt{render(){return po('')}};mo.styles=uo,mo=Re([Mt("mdui-icon-check-box-outline-blank")],mo);let fo=class extends Tt{render(){return po('')}};fo.styles=uo,fo=Re([Mt("mdui-icon-check-box")],fo);let vo=class extends Tt{render(){return po('')}};vo.styles=uo,vo=Re([Mt("mdui-icon-indeterminate-check-box")],vo);const go=Pe`:host{position:relative;display:inline-flex;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}label{display:inline-flex;align-items:center;width:100%;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.125rem;height:1.125rem;margin:0 0 0 .6875rem}.icon{display:flex;position:absolute;opacity:1;transform:scale(1);color:rgb(var(--mdui-color-on-surface));font-size:1.5rem;transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.checked-icon,.indeterminate-icon{opacity:0;transform:scale(.5);transition-property:color,opacity,transform;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=indeterminate-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface));transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]) .indeterminate-icon{opacity:0;transform:scale(.5)}:host([checked]) .checked-icon{opacity:1;transform:scale(1)}:host([indeterminate]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([indeterminate]) .icon{color:rgb(var(--mdui-color-primary))}:host([indeterminate]) .checked-icon{opacity:0;transform:scale(.5)}:host([indeterminate]) .indeterminate-icon{opacity:1;transform:scale(1)}.invalid i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.invalid .icon{color:rgb(var(--mdui-color-error))}.invalid .label{color:rgb(var(--mdui-color-error))}:host([disabled]){cursor:default;pointer-events:none}:host([disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled][checked]) .unchecked-icon,:host([disabled][indeterminate]) .unchecked-icon{opacity:0}`;let bo=class extends(eo(Yi(Gt))){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.inputRef=zi(),this.rippleRef=zi(),this.formController=new Ki(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return mt``}onChange(){this.checked=this.inputRef.value.checked,this.indeterminate=!1,this.emit("change")}};bo.styles=[Zt,go],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],bo.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],bo.prototype,"checked",void 0),Re([ho("checked")],bo.prototype,"defaultChecked",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],bo.prototype,"indeterminate",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],bo.prototype,"required",void 0),Re([Ot({reflect:!0})],bo.prototype,"form",void 0),Re([Ot({reflect:!0})],bo.prototype,"name",void 0),Re([Ot({reflect:!0})],bo.prototype,"value",void 0),Re([Ot({reflect:!0,attribute:"unchecked-icon"})],bo.prototype,"uncheckedIcon",void 0),Re([Ot({reflect:!0,attribute:"checked-icon"})],bo.prototype,"checkedIcon",void 0),Re([Ot({reflect:!0,attribute:"indeterminate-icon"})],bo.prototype,"indeterminateIcon",void 0),Re([zt()],bo.prototype,"invalid",void 0),Re([$i("disabled",!0),$i("indeterminate",!0),$i("required",!0)],bo.prototype,"onDisabledChange",null),Re([$i("checked",!0)],bo.prototype,"onCheckedChange",null),bo=Re([Mt("mdui-checkbox")],bo);let yo=class extends Tt{render(){return po('')}};yo.styles=uo,yo=Re([Mt("mdui-icon-check")],yo);let wo=class extends Tt{render(){return po('')}};wo.styles=uo,wo=Re([Mt("mdui-icon-clear")],wo);const ko=Pe`:host{--shape-corner:var(--mdui-shape-corner-small);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);height:2rem;background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.button{padding-right:.4375rem;padding-left:.4375rem}:host([variant=input]) .button{padding-right:.1875rem;padding-left:.1875rem}:host([selected]) .button{padding-right:.5rem;padding-left:.5rem}:host([selected][variant=input]) .button{padding-right:.25rem;padding-left:.25rem}:host([elevated]) .button{padding-right:.5rem;padding-left:.5rem}:host([variant=assist]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([elevated]){border-width:0;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));border-width:0;--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){border-color:rgba(var(--mdui-color-on-surface),12%);color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([disabled][elevated]),:host([disabled][selected]){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([selected][hover]){box-shadow:var(--mdui-elevation-level1)}:host([elevated][hover]){color:rgb(var(--mdui-color-on-secondary-container));box-shadow:var(--mdui-elevation-level2)}:host([variant=filter][hover]),:host([variant=input][hover]),:host([variant=suggestion][hover]){color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=filter][focus-visible]),:host([variant=input][focus-visible]),:host([variant=suggestion][focus-visible]){border-color:rgb(var(--mdui-color-on-surface-variant))}:host([dragged]),:host([dragged][hover]){box-shadow:var(--mdui-elevation-level4)}.button{overflow:visible}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em;color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=assist]) .end-icon,:host([variant=assist]) .icon,:host([variant=assist]) .selected-icon{color:rgb(var(--mdui-color-primary))}:host([selected]) .end-icon,:host([selected]) .icon,:host([selected]) .selected-icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]) .end-icon,:host([disabled]) .icon,:host([disabled]) .selected-icon{opacity:.38;color:rgb(var(--mdui-color-on-surface))}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}:host([variant=input]) .has-icon .icon,:host([variant=input]) .has-icon .selected-icon,:host([variant=input]) .has-icon mdui-circular-progress{margin-left:.25rem}:host([variant=input]) .has-end-icon .end-icon{margin-right:.25rem}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}::slotted(mdui-avatar[slot=end-icon]),::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){width:1.5rem;height:1.5rem}:host([disabled]) ::slotted(mdui-avatar[slot=end-icon]),:host([disabled]) ::slotted(mdui-avatar[slot=icon]),:host([disabled]) ::slotted(mdui-avatar[slot=selected-icon]){opacity:.38}::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){margin-left:-.25rem;margin-right:-.125rem}::slotted(mdui-avatar[slot=end-icon]){margin-right:-.25rem;margin-left:-.125rem}.delete-icon{display:inline-flex;font-size:1.28571429em;transition:background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);border-radius:var(--mdui-shape-corner-full);margin-right:-.25rem;margin-left:-.25rem;padding:.25rem;color:rgb(var(--mdui-color-on-surface-variant))}.delete-icon:hover{background-color:rgba(var(--mdui-color-on-surface-variant),12%)}.has-end-icon .delete-icon{margin-left:.25rem}:host([variant=assiat]) .delete-icon{color:rgb(var(--mdui-color-primary))}:host([variant=input]) .delete-icon{margin-right:.0625rem}:host([disabled]) .delete-icon{color:rgba(var(--mdui-color-on-surface),38%)}.delete-icon .i,::slotted([slot=delete-icon]){font-size:inherit}::slotted(mdui-avatar[slot=delete-icon]){width:1.125rem;height:1.125rem}`;let Co=class extends io{constructor(){super(),this.variant="assist",this.elevated=!1,this.selectable=!1,this.selected=!1,this.deletable=!1,this.rippleRef=zi(),this.hasSlotController=new Xt(this,"icon","selected-icon","end-icon"),this.onClick=this.onClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.endIcon||this.hasSlotController.test("end-icon"),i=this.selectedIcon||["assist","filter"].includes(this.variant)||e||this.hasSlotController.test("selected-icon"),o=Fi({button:!0,"has-icon":this.loading||!this.selected&&e||this.selected&&i,"has-end-icon":t});return mt`${this.isButton()?this.renderButton({className:o,part:"button",content:this.renderInner()}):this.disabled||this.loading?mt`${this.renderInner()}`:this.renderAnchor({className:o,part:"button",content:this.renderInner()})}`}onClick(){this.disabled||this.loading||this.selectable&&(this.selected=!this.selected)}onKeyDown(e){this.disabled||this.loading||(this.selectable&&" "===e.key&&(e.preventDefault(),this.selected=!this.selected),this.deletable&&["Delete","Backspace"].includes(e.key)&&this.emit("delete"))}onDelete(e){e.stopPropagation(),this.emit("delete")}renderIcon(){if(this.loading)return this.renderLoading();const e=()=>this.icon?mt``:Jt;return this.selected?mt`${(()=>this.selectedIcon?mt``:"assist"===this.variant||"filter"===this.variant?mt``:e())()}`:mt`${e()}`}renderLabel(){return mt``}renderEndIcon(){return mt`${this.endIcon?mt``:Jt}`}renderDeleteIcon(){return this.deletable?mt`${this.deleteIcon?mt``:mt``}`:Jt}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon(),this.renderDeleteIcon()]}};Co.styles=[io.styles,ko],Re([Ot({reflect:!0})],Co.prototype,"variant",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Co.prototype,"elevated",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Co.prototype,"selectable",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Co.prototype,"selected",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Co.prototype,"deletable",void 0),Re([Ot({reflect:!0})],Co.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"selected-icon"})],Co.prototype,"selectedIcon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],Co.prototype,"endIcon",void 0),Re([Ot({reflect:!0,attribute:"delete-icon"})],Co.prototype,"deleteIcon",void 0),Re([$i("selected",!0)],Co.prototype,"onSelectedChange",null),Co=Re([Mt("mdui-chip")],Co);const xo=(e,t)=>{if(e.length!==t.length)return!1;const i=[...e].sort(),o=[...t].sort();return i.every(((e,t)=>e===o[t]))},$o=Pe`:host{display:block}`;let Eo=class extends Gt{constructor(){super(...arguments),this.accordion=!1,this.disabled=!1,this.activeKeys=[],this.isInitial=!0,this.definedController=new xi(this,{relatedElements:["mdui-collapse-item"]})}async onActiveKeysChange(){await this.definedController.whenDefined();const e=this.accordion?this.items.find((e=>this.activeKeys.includes(e.key)))?.value:this.items.filter((e=>this.activeKeys.includes(e.key))).map((e=>e.value));this.setValue(e),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),this.accordion){const e=this.value;if(e){const t=this.items.find((t=>t.value===e));this.setActiveKeys(t?[t.key]:[])}else this.setActiveKeys([])}else{const e=this.value;if(e.length){const t=this.items.filter((t=>e.includes(t.value))).map((e=>e.key));this.setActiveKeys(t)}else this.setActiveKeys([])}this.updateItems()}render(){return mt``}setActiveKeys(e){xo(this.activeKeys,e)||(this.activeKeys=e)}setValue(e){this.accordion||h(this.value)||h(e)?this.value=e:xo(this.value,e)||(this.value=e)}onClick(e){if(this.disabled)return;if(e.button)return;const t=e.target.closest("mdui-collapse-item");if(!t||t.disabled)return;const i=e.composedPath();if((!t.trigger||i.find((e=>f(e)&&T(e).is(t.trigger))))&&i.find((e=>f(e)&&e.part.contains("header")))){if(this.accordion)this.activeKeys.includes(t.key)?this.setActiveKeys([]):this.setActiveKeys([t.key]);else{const e=[...this.activeKeys];e.includes(t.key)?e.splice(e.indexOf(t.key),1):e.push(t.key),this.setActiveKeys(e)}this.isInitial=!1,this.updateItems()}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}updateItems(){this.items.forEach((e=>{e.active=this.activeKeys.includes(e.key),e.isInitial=this.isInitial}))}};Eo.styles=[Zt,$o],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Eo.prototype,"accordion",void 0),Re([Ot()],Eo.prototype,"value",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Eo.prototype,"disabled",void 0),Re([zt()],Eo.prototype,"activeKeys",void 0),Re([Bt({selector:"mdui-collapse-item",flatten:!0})],Eo.prototype,"items",void 0),Re([$i("activeKeys",!0)],Eo.prototype,"onActiveKeysChange",null),Re([$i("value")],Eo.prototype,"onValueChange",null),Eo=Re([Mt("mdui-collapse")],Eo);const Ro=Pe`:host{display:flex;flex-direction:column}.header{display:block}.body{display:block;overflow:hidden;transition:height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-emphasized)}.body.opened{overflow:visible}.body.active{transition-duration:var(--mdui-motion-duration-medium4)}`;let Io=class extends Gt{constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.state="closed",this.isInitial=!0,this.key=Ii(),this.bodyRef=zi()}onActiveChange(){this.isInitial?(this.state=this.active?"opened":"closed",this.hasUpdated&&this.updateBodyHeight()):(this.state=this.active?"open":"close",this.emit(this.state),this.updateBodyHeight())}firstUpdated(e){super.firstUpdated(e),this.updateBodyHeight()}render(){return mt`${this.header}`}onTransitionEnd(e){e.target===this.bodyRef.value&&(this.state=this.active?"opened":"closed",this.emit(this.state),this.updateBodyHeight())}updateBodyHeight(){const e=this.bodyRef.value.scrollHeight;"close"===this.state&&(T(this.bodyRef.value).height(e),this.bodyRef.value.clientLeft),T(this.bodyRef.value).height("opened"===this.state?"auto":"open"===this.state?e:0)}};function So(e,t,i){return e?t(e):i?.(e)}function Ao(e,t,i){return e?new Promise((o=>{if(i.duration===1/0)throw new Error("Promise-based animations must be finite.");c(i.duration)&&isNaN(i.duration)&&(i.duration=0),""===i.easing&&(i.easing="linear");const n=e.animate(t,i);n.addEventListener("cancel",o,{once:!0}),n.addEventListener("finish",o,{once:!0})})):Promise.resolve()}function Do(e){return e?Promise.all(e.getAnimations().map((e=>new Promise((t=>{const i=requestAnimationFrame(t);e.addEventListener("cancel",(()=>i),{once:!0}),e.addEventListener("finish",(()=>i),{once:!0}),e.cancel()}))))):Promise.resolve()}function To(e){const t=n(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&null!==e.offsetParent&&"hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||!!e.hasAttribute("tabindex")||!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i))}Io.styles=[Zt,Ro],Re([Ot({reflect:!0})],Io.prototype,"value",void 0),Re([Ot({reflect:!0})],Io.prototype,"header",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Io.prototype,"disabled",void 0),Re([Ot()],Io.prototype,"trigger",void 0),Re([zt()],Io.prototype,"active",void 0),Re([zt()],Io.prototype,"state",void 0),Re([$i("active")],Io.prototype,"onActiveChange",null),Io=Re([Mt("mdui-collapse-item")],Io);let Po=[];class Mo{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Po.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Po=Po.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Po[Po.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>To(e)))??null,end:t.reverse().find((e=>To(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}const _o=(e,t)=>{const i=`--mdui-motion-easing-${t}`;return T(e).css(i).trim()},Lo=(e,t)=>{const i=`--mdui-motion-duration-${t}`,o=T(e).css(i).trim().toLowerCase();return o.endsWith("ms")?parseFloat(o):1e3*parseFloat(o)};let Oo;const zo=e=>{if(h(document))return 0;if(void 0===Oo){const e=T("
").css({width:"100%",height:"200px"}),t=T("
").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let o=e[0].offsetWidth;i===o&&(o=t[0].clientWidth),t.remove(),Oo=i-o}return Oo},Bo=new WeakMap,Vo="mdui-lock-screen",No=(e,t)=>{const i=o();t??=i.documentElement,Bo.has(t)||Bo.set(t,new Set),Bo.get(t).add(e);const n=T(t);(e=>e.scrollHeight>e.clientHeight)(t)&&n.css("width",`calc(100% - ${zo()}px)`),n.addClass(Vo)},Fo=(e,t)=>{const i=o();t??=i.documentElement;const n=Bo.get(t);n&&(n.delete(e),0===n.size&&(Bo.delete(t),T(t).removeClass(Vo).width("")))},Ho=(e,t,i)=>{let o=e[0];for(let n=1;n{return"string"!=typeof(t=e)&&"strTag"in t?Ho(e.strings,e.values):e;var t},Ko="lit-localize-status";class qo{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}const jo=[];for(let e=0;e<256;e++)jo[e]=(e>>4&15).toString(16)+(15&e).toString(16);const Wo="",Yo="h",Go="s";function Xo(e,t){return(t?Yo:Go)+function(e){let t=0,i=8997,o=0,n=33826,r=0,s=40164,a=0,l=52210;for(let c=0;c>>16,i=65535&t,r+=o>>>16,n=65535&o,l=a+(r>>>16)&65535,s=65535&r;return jo[l>>8]+jo[255&l]+jo[s>>8]+jo[255&s]+jo[n>>8]+jo[255&n]+jo[i>>8]+jo[255&i]}("string"==typeof e?e:e.join(Wo))}const Jo=new WeakMap,Zo=new Map;function Qo(e,t,i){if(e){const o=i?.id??function(e){const t="string"==typeof e?e:e.strings;let i=Zo.get(t);return void 0===i&&(i=Xo(t,"string"!=typeof e&&!("strTag"in e)),Zo.set(t,i)),i}(t),n=e[o];if(n){if("string"==typeof n)return n;if("strTag"in n)return Ho(n.strings,t.values,n.values);{let e=Jo.get(n);return void 0===e&&(e=n.values,Jo.set(n,e)),{...n,values:e.map((e=>t.values[e]))}}}}return Uo(t)}function er(e){window.dispatchEvent(new CustomEvent(Ko,{detail:e}))}let tr,ir,or,rr,nr,sr="",ar=new qo;ar.resolve();let lr=0;const cr=e=>(function(e){if(pr)throw new Error("lit-localize can only be configured once");ur=(e,t)=>Qo(nr,e,t),pr=!0}(),sr=ir=e.sourceLocale,or=new Set(e.targetLocales),or.add(e.sourceLocale),rr=e.loadLocale,{getLocale:dr,setLocale:hr}),dr=()=>sr,hr=e=>{if(e===(tr??sr))return ar.promise;if(!or||!rr)throw new Error("Internal error");if(!or.has(e))throw new Error("Invalid locale code");lr++;const t=lr;return tr=e,ar.settled&&(ar=new qo),er({status:"loading",loadingLocale:e}),(e===ir?Promise.resolve({templates:void 0}):rr(e)).then((i=>{lr===t&&(sr=e,tr=void 0,nr=i.templates,er({status:"ready",readyLocale:e}),ar.resolve())}),(i=>{lr===t&&(er({status:"error",errorLocale:e,errorMessage:i.toString()}),ar.reject(i))})),ar.promise};let ur=Uo,pr=!1;const mr=["ar-eg","az-az","be-by","bg-bg","bn-bd","ca-es","cs-cz","da-dk","de-de","el-gr","en-gb","es-es","et-ee","fa-ir","fi-fi","fr-be","fr-ca","fr-fr","ga-ie","gl-es","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","km-kh","kmr-iq","kn-in","ko-kr","lt-lt","lv-lv","mk-mk","ml-in","mn-mn","ms-my","nb-no","ne-np","nl-be","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-rs","sv-se","ta-in","th-th","tr-tr","uk-ua","ur-pk","vi-vn","zh-cn","zh-hk","zh-tw"],fr="You must call `loadLocale` first to set up the localized template.";let vr,gr,br=!1;const yr=new Map,wr=(e,t)=>{br||(br=!0,n().addEventListener(Ko,(e=>{"ready"===e.detail.status&&yr.forEach((e=>{e.forEach((e=>e()))}))})));const i=yr.get(e)||[];i.push(t),yr.set(e,i)},kr=e=>{yr.delete(e)},Cr=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]) .action{flex-direction:column;align-items:end}:host([stacked-actions]) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;let xr=class extends Gt{constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=zi(),this.panelRef=zi(),this.bodyRef=zi(),this.hasSlotController=new Xt(this,"header","icon","headline","description","action","[default]"),this.definedController=new xi(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=_o(this,"linear"),o=_o(this,"emphasized-decelerate"),n=_o(this,"emphasized-accelerate"),r=()=>Promise.all([Do(this.overlayRef.value),Do(this.panelRef.value),...t.map((e=>Do(e)))]);if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;this.style.display="flex";const n=this.topAppBarElements??[];if(n.length){const e=n[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),No(this),await r(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const s=Lo(this,"medium4");await Promise.all([Ao(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?s:0,easing:i}),Ao(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?s:0,easing:o}),Ao(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?s:0,easing:i}),...t.map((t=>Ao(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?s:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await r();const e=Lo(this,"short4");await Promise.all([Ao(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),Ao(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:n}),Ao(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>Ao(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",Fo(this);const o=this.originalTrigger;"function"==typeof o?.focus&&setTimeout((()=>o.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Fo(this),kr(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new Mo(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),o=!!this.headline||this.hasSlotController.test("headline"),n=!!this.description||this.hasSlotController.test("description"),r=i||o||this.hasSlotController.test("header"),s=n||t;return mt`
${So(r,(()=>mt`${So(i,(()=>this.renderIcon()))} ${So(o,(()=>this.renderHeadline()))}`))} ${So(s,(()=>mt`
${So(n,(()=>this.renderDescription()))}
`))} ${So(e,(()=>mt``))}
`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return mt`${this.icon?mt``:Jt}`}renderHeadline(){return mt`${this.headline}`}renderDescription(){return mt`${this.description}`}};xr.styles=[Zt,Cr],Re([Ot({reflect:!0})],xr.prototype,"icon",void 0),Re([Ot({reflect:!0})],xr.prototype,"headline",void 0),Re([Ot({reflect:!0})],xr.prototype,"description",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],xr.prototype,"open",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],xr.prototype,"fullscreen",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"close-on-esc"})],xr.prototype,"closeOnEsc",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"close-on-overlay-click"})],xr.prototype,"closeOnOverlayClick",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"stacked-actions"})],xr.prototype,"stackedActions",void 0),Re([Bt({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],xr.prototype,"topAppBarElements",void 0),Re([$i("open")],xr.prototype,"onOpenChange",null),xr=Re([Mt("mdui-dialog")],xr);const $r=Pe`:host{display:block;height:.0625rem;background-color:rgb(var(--mdui-color-surface-variant))}:host([inset]){margin-left:1rem}:host([middle]){margin-left:1rem;margin-right:1rem}:host([vertical]){height:100%;width:.0625rem}`;let Er=class extends Gt{constructor(){super(...arguments),this.vertical=!1,this.inset=!1,this.middle=!1}render(){return mt``}};function Rr(e){return Sr(e)?(e.nodeName||"").toLowerCase():"#document"}function Ir(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Sr(e){return e instanceof Node||e instanceof Ir(e).Node}function Ar(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Ir(e).ShadowRoot)}function Dr(e){const{overflow:t,overflowX:i,overflowY:o,display:n}=function(e){return Ir(e).getComputedStyle(e)}(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(n)}function Tr(e){if("html"===Rr(e))return e;const t=e.assignedSlot||e.parentNode||Ar(e)&&e.host||function(e){var t;return null==(t=(Sr(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}(e);return Ar(t)?t.host:t}function Pr(e){const t=Tr(e);return function(e){return["html","body","#document"].includes(Rr(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:((i=t)instanceof HTMLElement||i instanceof Ir(i).HTMLElement)&&Dr(t)?t:Pr(t);var i}function Mr(e,t,i){var o;void 0===t&&(t=[]),void 0===i&&(i=!0);const n=Pr(e),r=n===(null==(o=e.ownerDocument)?void 0:o.body),s=Ir(n);return r?t.concat(s,s.visualViewport||[],Dr(n)?n:[],s.frameElement&&i?Mr(s.frameElement):[]):t.concat(n,Mr(n,[],i))}Er.styles=[Zt,$r],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Er.prototype,"vertical",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Er.prototype,"inset",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Er.prototype,"middle",void 0),Er=Re([Mt("mdui-divider")],Er);const _r=Pe`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;let Lr=class extends Gt{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=zi(),this.definedController=new xi(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=_o(this,"linear"),i=_o(this,"emphasized-decelerate"),o=_o(this,"emphasized-accelerate");if(this.open){if(e&&!this.emit("open",{cancelable:!0}))return;const o=this.panelElements.find((e=>a(e.focus)));setTimeout((()=>{o?.focus()}));const n=Lo(this,"medium4");await Do(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([Ao(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:e?n:0,easing:i}),Ao(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?n:0,easing:t})]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&a(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const e=Lo(this,"short4");await Do(this.panelRef.value),await Promise.all([Ao(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:e,easing:o}),Ao(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=Mr(this.triggerElement),this.overflowAncestors.forEach((e=>{e.addEventListener("scroll",this.onWindowScroll)}))}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((e=>{e.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter),this.observeResize=Di(this.triggerElement,(()=>{this.updatePositioner()}))}))}render(){return mt``}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(e){if(this.disabled||!this.open)return;const t=e.composedPath();t.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&t.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(e){!this.disabled&&this.open&&("Escape"!==e.key?"Tab"===e.key&&(!this.hasTrigger("focus")&&a(this.triggerElement?.focus)&&e.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!this.open)}onPanelClick(e){this.disabled||this.stayOpenOnClick||!T(e.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(e){!this.disabled&&this.hasTrigger("contextmenu")&&(e.preventDefault(),this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const e=T(this.panelRef.value),t=T(window),i=this.panelElements,o=Math.max(...i?.map((e=>e.offsetWidth))??[]),n=i?.map((e=>e.offsetHeight)).reduce(((e,t)=>e+t),0),r=this.triggerElement.getBoundingClientRect(),s=this.openOnPointer?{top:this.pointerOffsetY+r.top,left:this.pointerOffsetX+r.left,width:0,height:0}:r;let a,l,c,d,h=this.placement;if("auto"===h){const e=t.width(),i=t.height();let r,a;r=i-s.top-s.height>n+8?"bottom":s.top>n+8?"top":e-s.left-s.width>o+8?"right":s.left>o+8?"left":"bottom",a=["top","bottom"].includes(r)?e-s.left>o+8?"start":s.left+s.width/2>o/2+8&&e-s.left-s.width/2>o/2+8?void 0:s.left+s.width>o+8?"end":"start":i-s.top>n+8?"start":s.top+s.height/2>n/2+8&&i-s.top-s.height/2>n/2+8?void 0:s.top+s.height>n+8?"end":"start",h=a?[r,a].join("-"):r}const[u,p]=h.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":l="bottom",c=s.top-n;break;case"bottom":l="top",c=s.top+s.height;break;default:switch(l="center",p){case"start":c=s.top;break;case"end":c=s.top+s.height-n;break;default:c=s.top+s.height/2-n/2}}switch(u){case"left":a="right",d=s.left-o;break;case"right":a="left",d=s.left+s.width;break;default:switch(a="center",p){case"start":d=s.left;break;case"end":d=s.left+s.width-o;break;default:d=s.left+s.width/2-o/2}}e.css({top:c,left:d,transformOrigin:[a,l].join(" ")})}};Lr.styles=[Zt,_r],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Lr.prototype,"open",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Lr.prototype,"disabled",void 0),Re([Ot({reflect:!0})],Lr.prototype,"trigger",void 0),Re([Ot({reflect:!0})],Lr.prototype,"placement",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"stay-open-on-click"})],Lr.prototype,"stayOpenOnClick",void 0),Re([Ot({type:Number,reflect:!0,attribute:"open-delay"})],Lr.prototype,"openDelay",void 0),Re([Ot({type:Number,reflect:!0,attribute:"close-delay"})],Lr.prototype,"closeDelay",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"open-on-pointer"})],Lr.prototype,"openOnPointer",void 0),Re([Bt({slot:"trigger",flatten:!0})],Lr.prototype,"triggerElements",void 0),Re([Bt({flatten:!0})],Lr.prototype,"panelElements",void 0),Re([$i("placement",!0),$i("openOnPointer",!0)],Lr.prototype,"onPositionChange",null),Re([$i("open")],Lr.prototype,"onOpenChange",null),Lr=Re([Mt("mdui-dropdown")],Lr);const Or=(e=0)=>new Promise((t=>setTimeout(t,e))),zr=Pe`:host{--shape-corner-small:var(--mdui-shape-corner-small);--shape-corner-normal:var(--mdui-shape-corner-large);--shape-corner-large:var(--mdui-shape-corner-extra-large);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner-normal);cursor:pointer;-webkit-tap-highlight-color:transparent;transition-property:box-shadow;transition-timing-function:var(--mdui-motion-easing-emphasized);transition-duration:var(--mdui-motion-duration-medium4);width:3.5rem;height:3.5rem;box-shadow:var(--mdui-elevation-level3);font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{padding:0 1rem}:host([size=small]) .button{padding:0 .5rem}:host([size=large]) .button{padding:0 1.875rem}:host([lowered]){box-shadow:var(--mdui-elevation-level1)}:host([focus-visible]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][focus-visible]){box-shadow:var(--mdui-elevation-level1)}:host([pressed]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][pressed]){box-shadow:var(--mdui-elevation-level1)}:host([hover]){box-shadow:var(--mdui-elevation-level4)}:host([lowered][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=primary]){color:rgb(var(--mdui-color-on-primary-container));background-color:rgb(var(--mdui-color-primary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-primary-container - )}:host([variant=surface]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-high));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=surface][lowered]){background-color:rgb(var(--mdui-color-surface-container-low))}:host([variant=secondary]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([variant=tertiary]){color:rgb(var(--mdui-color-on-tertiary-container));background-color:rgb(var(--mdui-color-tertiary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-tertiary-container - )}:host([size=small]){border-radius:var(--shape-corner-small);width:2.5rem;height:2.5rem}:host([size=large]){border-radius:var(--shape-corner-large);width:6rem;height:6rem}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),12%);box-shadow:var(--mdui-elevation-level0)}:host([extended]){width:auto}.label{display:inline-flex;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short2);padding-left:.25rem;padding-right:.25rem}.has-icon .label{margin-left:.5rem}:host([size=small]) .has-icon .label{margin-left:.25rem}:host([size=large]) .has-icon .label{margin-left:1rem}:host(:not([extended])) .label{opacity:0;transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([size=large]) .label{font-size:1.5em}.icon{display:inline-flex;font-size:1.71428571em}:host([size=large]) .icon{font-size:2.57142857em}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.5rem;height:1.5rem}:host([size=large]) mdui-circular-progress{width:2.25rem;height:2.25rem}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;let Br=class extends io{constructor(){super(...arguments),this.variant="primary",this.size="normal",this.extended=!1,this.rippleRef=zi(),this.hasSlotController=new Xt(this,"icon"),this.definedController=new xi(this,{relatedElements:[""]})}get rippleElement(){return this.rippleRef.value}async onExtendedChange(){const e=this.hasUpdated;this.extended?this.style.width=`${this.scrollWidth}px`:this.style.width="",await this.definedController.whenDefined(),await this.updateComplete,this.extended&&!e&&(this.style.width=`${this.scrollWidth}px`),e||(await Or(),this.style.transitionProperty="box-shadow, width, bottom, transform")}render(){const e=Fi({button:!0,"has-icon":this.icon||this.hasSlotController.test("icon")});return mt`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.disabled||this.loading?mt`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}renderLabel(){return mt``}renderIcon(){return this.loading?this.renderLoading():mt`${this.icon?mt``:Jt}`}renderInner(){return[this.renderIcon(),this.renderLabel()]}};Br.styles=[io.styles,zr],Re([Ot({reflect:!0})],Br.prototype,"variant",void 0),Re([Ot({reflect:!0})],Br.prototype,"size",void 0),Re([Ot({reflect:!0})],Br.prototype,"icon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Br.prototype,"extended",void 0),Re([$i("extended")],Br.prototype,"onExtendedChange",null),Br=Re([Mt("mdui-fab")],Br);const Vr=Pe`:host{position:relative;display:flex;flex:1 1 auto;overflow:hidden}:host([full-height]){height:100%}`;let Nr=class extends Gt{constructor(){super(...arguments),this.fullHeight=!1}render(){return mt``}};Nr.styles=[Zt,Vr],Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"full-height"})],Nr.prototype,"fullHeight",void 0),Nr=Re([Mt("mdui-layout")],Nr);const Fr=Pe`:host{display:flex;z-index:1}`;let Hr=class extends _i{constructor(){super(...arguments),this.placement="top"}get layoutPlacement(){return this.placement}onPlacementChange(){this.layoutManager?.updateLayout(this)}render(){return mt``}};Hr.styles=[Zt,Fr],Re([Ot({reflect:!0})],Hr.prototype,"placement",void 0),Re([$i("placement",!0)],Hr.prototype,"onPlacementChange",null),Hr=Re([Mt("mdui-layout-item")],Hr);const Ur=Pe`:host{flex:1 0 auto;max-width:100%;overflow:auto}`;let Kr=class extends Gt{connectedCallback(){super.connectedCallback();const e=this.parentElement;s(e,"mdui-layout")&&(this.layoutManager=Mi(e),this.layoutManager.registerMain(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterMain()}render(){return mt``}};Kr.styles=[Zt,Ur],Kr=Re([Mt("mdui-layout-main")],Kr);const qr=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);position:relative;display:inline-block;width:100%;overflow:hidden;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container-highest));height:.25rem}.determinate,.indeterminate{background-color:rgb(var(--mdui-color-primary))}.determinate{height:100%;transition:width var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate::before{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate 2s var(--mdui-motion-easing-linear) infinite;content:' '}.indeterminate::after{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate-short 2s var(--mdui-motion-easing-linear) infinite;content:' '}@keyframes mdui-comp-progress-indeterminate{0%{left:0;width:0}50%{left:30%;width:70%}75%{left:100%;width:0}}@keyframes mdui-comp-progress-indeterminate-short{0%{left:0;width:0}50%{left:0;width:0}75%{left:0;width:25%}100%{left:100%;width:0}}`;let jr=class extends Gt{constructor(){super(...arguments),this.max=1}render(){if(!h(this.value)){const e=this.value;return mt`
`}return mt`
`}};jr.styles=[Zt,qr],Re([Ot({type:Number,reflect:!0})],jr.prototype,"max",void 0),Re([Ot({type:Number})],jr.prototype,"value",void 0),jr=Re([Mt("mdui-linear-progress")],jr);const Wr=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--shape-corner-rounded:var(--mdui-shape-corner-extra-large);position:relative;display:block;border-radius:var(--shape-corner);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([rounded]),:host([rounded]) mdui-ripple{border-radius:var(--shape-corner-rounded)}:host([active]){background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([disabled]){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;color:inherit;-webkit-tap-highlight-color:transparent}:host([disabled]) .container{cursor:default;opacity:.38}:host([nonclickable]:not([href])) .container{cursor:auto;-webkit-user-select:auto;user-select:auto}.preset{display:flex;align-items:center;padding:.5rem 1.5rem .5rem 1rem;min-height:3.5rem}:host([alignment=start]) .preset{align-items:flex-start}:host([alignment=end]) .preset{align-items:flex-end}.body{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;min-width:0}.headline{display:block;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([active]) .headline{color:rgb(var(--mdui-color-on-secondary-container))}.description{display:none;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([disabled]) .description,:host([focused]) .description,:host([hover]) .description,:host([pressed]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description .description{display:block}:host([description-line='1']) .description,:host([headline-line='1']) .headline{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([description-line='2']) .description,:host([description-line='3']) .description,:host([headline-line='2']) .headline,:host([headline-line='3']) .headline{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}:host([description-line='2']) .description,:host([headline-line='2']) .headline{-webkit-line-clamp:2}:host([description-line='3']) .description,:host([headline-line='3']) .headline{-webkit-line-clamp:3}.end-icon,.icon{display:flex;flex:0 0 auto;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]) .end-icon,:host([disabled]) .icon,:host([focused]) .end-icon,:host([focused]) .icon,:host([hover]) .end-icon,:host([hover]) .icon,:host([pressed]) .end-icon,:host([pressed]) .icon{color:rgb(var(--mdui-color-on-surface))}:host([active]) .end-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}.end-icon mdui-icon,.icon mdui-icon,.is-end-icon ::slotted([slot=end-icon]),.is-icon ::slotted([slot=icon]){font-size:1.5rem}.has-icon .icon{margin-right:1rem}.has-icon ::slotted(mdui-checkbox[slot=icon]),.has-icon ::slotted(mdui-radio[slot=icon]){margin-left:-.5rem}.has-end-icon .end-icon{margin-left:1rem}.has-end-icon ::slotted(mdui-checkbox[slot=end-icon]),.has-end-icon ::slotted(mdui-radio[slot=end-icon]){margin-right:-.5rem}`;let Yr=class extends(qi(eo(Yi(Gt)))){constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.nonclickable=!1,this.rounded=!1,this.alignment="center",this.rippleRef=zi(),this.itemRef=zi(),this.hasSlotController=new Xt(this,"[default]","description","icon","end-icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.focusDisabled}get focusElement(){return this.href&&!this.disabled?this.itemRef.value:this}get focusDisabled(){return this.href?this.disabled:this.disabled||this.nonclickable}render(){const e=Fi({container:!0,preset:!this.hasSlotController.test("custom"),"has-icon":this.icon||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon"),"has-description":this.description||this.hasSlotController.test("description"),"is-icon":s(this.iconElements[0],"mdui-icon"),"is-end-icon":(t=this.endIconElements[0],t?.nodeName.toLowerCase()??"").startsWith("mdui-icon-")});var t;return mt`${this.href&&!this.disabled?this.renderAnchor({className:e,content:this.renderInner(),part:"container",refDirective:Ni(this.itemRef)}):mt`
${this.renderInner()}
`}`}renderInner(){const e=this.hasSlotController.test("[default]");return mt`${this.icon?mt``:Jt}
${e?mt``:mt`
${this.headline}
`}${this.description}
${this.endIcon?mt``:Jt}
`}};Yr.styles=[Zt,Wr],Re([Ot({reflect:!0})],Yr.prototype,"headline",void 0),Re([Ot({type:Number,reflect:!0,attribute:"headline-line"})],Yr.prototype,"headlineLine",void 0),Re([Ot({reflect:!0})],Yr.prototype,"description",void 0),Re([Ot({type:Number,reflect:!0,attribute:"description-line"})],Yr.prototype,"descriptionLine",void 0),Re([Ot({reflect:!0})],Yr.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],Yr.prototype,"endIcon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Yr.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Yr.prototype,"active",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Yr.prototype,"nonclickable",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Yr.prototype,"rounded",void 0),Re([Ot({reflect:!0})],Yr.prototype,"alignment",void 0),Re([Bt({slot:"icon",flatten:!0})],Yr.prototype,"iconElements",void 0),Re([Bt({slot:"end-icon",flatten:!0})],Yr.prototype,"endIconElements",void 0),Yr=Re([Mt("mdui-list-item")],Yr);const Gr=Pe`:host{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);padding-left:1rem;padding-right:1.5rem;height:3.5rem;line-height:3.5rem}`;let Xr=class extends Gt{render(){return mt``}};Xr.styles=[Zt,Gr],Xr=Re([Mt("mdui-list-subheader")],Xr);const Jr=Pe`:host{display:block;padding:.5rem 0}::slotted(mdui-divider[middle]){margin-left:1rem;margin-right:1.5rem}`;let Zr=class extends Gt{render(){return mt``}};Zr.styles=[Zt,Jr],Zr=Re([Mt("mdui-list")],Zr);let Qr=class extends Tt{render(){return po('')}};Qr.styles=uo,Qr=Re([Mt("mdui-icon-arrow-right")],Qr);const en=Pe`:host{position:relative;display:block}:host([selected]){background-color:rgba(var(--mdui-color-primary),12%)}:host([disabled]){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host([disabled]) .container{cursor:default;opacity:.38}.preset{display:flex;align-items:center;text-decoration:none;height:3rem;padding:0 .75rem}.preset.dense{height:2rem}.label-container{flex:1 1 100%;min-width:0}.label{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.end-icon,.end-text,.icon,.selected-icon{display:none;flex:0 0 auto;color:rgb(var(--mdui-color-on-surface-variant))}.has-end-icon .end-icon,.has-end-text .end-text,.has-icon .icon,.has-icon .selected-icon{display:flex}.end-icon,.icon,.selected-icon{font-size:1.5rem}.end-icon::slotted(mdui-avatar),.icon::slotted(mdui-avatar),.selected-icon::slotted(mdui-avatar){width:1.5rem;height:1.5rem}.dense .end-icon,.dense .icon,.dense .selected-icon{font-size:1.125rem}.dense .end-icon::slotted(mdui-avatar),.dense .icon::slotted(mdui-avatar),.dense .selected-icon::slotted(mdui-avatar){width:1.125rem;height:1.125rem}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}.end-text{font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon,.selected-icon{margin-right:.75rem}.end-icon,.end-text{margin-left:.75rem}.arrow-right{color:rgb(var(--mdui-color-on-surface))}.submenu{--shape-corner:var(--mdui-shape-corner-extra-small);display:block;position:absolute;z-index:1;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.submenu::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let tn=class extends(qi(eo(Yi(Gt)))){constructor(){super(),this.disabled=!1,this.submenuOpen=!1,this.selected=!1,this.dense=!1,this.focusable=!1,this.key=Ii(),this.rippleRef=zi(),this.containerRef=zi(),this.submenuRef=zi(),this.hasSlotController=new Xt(this,"[default]","icon","end-icon","end-text","submenu","custom"),this.definedController=new xi(this,{relatedElements:[""]}),this.onOuterClick=this.onOuterClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get focusDisabled(){return this.disabled||!this.focusable}get focusElement(){return this.href&&!this.disabled?this.containerRef.value:this}get rippleDisabled(){return this.disabled}get rippleElement(){return this.rippleRef.value}get hasSubmenu(){return this.hasSlotController.test("submenu")}async onOpenChange(){const e=this.hasUpdated;if(!this.submenuOpen&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=_o(this,"linear"),i=_o(this,"emphasized-decelerate"),o=_o(this,"emphasized-accelerate");if(this.submenuOpen){if(e&&!this.emit("submenu-open",{cancelable:!0}))return;const o=Lo(this,"medium4");await Do(this.submenuRef.value),this.submenuRef.value.hidden=!1,this.updateSubmenuPositioner(),await Promise.all([Ao(this.submenuRef.value,[{transform:"scaleY(0.45)"},{transform:"scaleY(1)"}],{duration:e?o:0,easing:i}),Ao(this.submenuRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?o:0,easing:t})]),e&&this.emit("submenu-opened")}else{if(!this.emit("submenu-close",{cancelable:!0}))return;const e=Lo(this,"short4");await Do(this.submenuRef.value),await Promise.all([Ao(this.submenuRef.value,[{transform:"scaleY(1)"},{transform:"scaleY(0.45)"}],{duration:e,easing:o}),Ao(this.submenuRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.submenuRef.value&&(this.submenuRef.value.hidden=!0),this.emit("submenu-closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onOuterClick)}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOuterClick)}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave)}))}render(){const e=this.hasSubmenu,t=this.hasSlotController.test("custom"),i=this.hasSlotController.test("end-icon"),o=!this.endIcon&&e&&!i,n=this.endIcon||e||i,r=!h(this.icon)||"single"===this.selects||"multiple"===this.selects||this.hasSlotController.test("icon"),s=!!this.endText||this.hasSlotController.test("end-text"),a=Fi({container:!0,dense:this.dense,preset:!t,"has-icon":r,"has-end-text":s,"has-end-icon":n});return mt`${this.href&&!this.disabled?this.renderAnchor({part:"container",className:a,content:this.renderInner(o,r),refDirective:Ni(this.containerRef),tabIndex:this.focusable?0:-1}):mt`
${this.renderInner(o,r)}
`} ${So(e,(()=>mt``))}`}onOuterClick(e){this.disabled||!this.submenuOpen||this===e.target||T.contains(this,e.target)||(this.submenuOpen=!1)}hasTrigger(e){return!!this.submenuTrigger&&this.submenuTrigger.split(" ").includes(e)}onFocus(){!this.disabled&&!this.submenuOpen&&this.hasTrigger("focus")&&this.hasSubmenu&&(this.submenuOpen=!0)}onBlur(){!this.disabled&&this.submenuOpen&&this.hasTrigger("focus")&&this.hasSubmenu&&(this.submenuOpen=!1)}onClick(e){this.disabled||e.button||this.hasTrigger("click")&&e.target===this&&this.hasSubmenu&&(this.submenuOpen&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.submenuOpen=!this.submenuOpen))}onKeydown(e){!this.disabled&&this.hasSubmenu&&(this.submenuOpen||"Enter"!==e.key||(e.stopPropagation(),this.submenuOpen=!0),this.submenuOpen&&"Escape"===e.key&&(e.stopPropagation(),this.submenuOpen=!1))}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&this.hasSubmenu&&(window.clearTimeout(this.submenuCloseTimeout),this.submenuOpenDelay?this.submenuOpenTimeout=window.setTimeout((()=>{this.submenuOpen=!0}),this.submenuOpenDelay):this.submenuOpen=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&this.hasSubmenu&&(window.clearTimeout(this.submenuOpenTimeout),this.submenuCloseTimeout=window.setTimeout((()=>{this.submenuOpen=!1}),this.submenuCloseDelay||50))}updateSubmenuPositioner(){const e=T(window),t=T(this.submenuRef.value),i=this.getBoundingClientRect(),o=t.innerWidth(),n=t.innerHeight();let r="bottom",s="right";e.height()-i.top>n+8?r="bottom":i.top+i.height>n+8&&(r="top"),e.width()-i.left-i.width>o+8?s="right":i.left>o+8&&(s="left"),T(this.submenuRef.value).css({top:"bottom"===r?0:i.height-n,left:"right"===s?i.width:-o,transformOrigin:["right"===s?0:"100%","bottom"===r?0:"100%"].join(" ")})}renderInner(e,t){return mt`${this.selected?mt`${this.selectedIcon?mt``:mt``}`:mt`${t?mt``:Jt}`}
${this.endText}${e?mt``:mt`${this.endIcon?mt``:Jt}`}
`}};tn.styles=[Zt,en],Re([Ot({reflect:!0})],tn.prototype,"value",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],tn.prototype,"disabled",void 0),Re([Ot({reflect:!0})],tn.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],tn.prototype,"endIcon",void 0),Re([Ot({reflect:!0,attribute:"end-text"})],tn.prototype,"endText",void 0),Re([Ot({reflect:!0,attribute:"selected-icon"})],tn.prototype,"selectedIcon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"submenu-open"})],tn.prototype,"submenuOpen",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],tn.prototype,"selected",void 0),Re([zt()],tn.prototype,"dense",void 0),Re([zt()],tn.prototype,"selects",void 0),Re([zt()],tn.prototype,"submenuTrigger",void 0),Re([zt()],tn.prototype,"submenuOpenDelay",void 0),Re([zt()],tn.prototype,"submenuCloseDelay",void 0),Re([zt()],tn.prototype,"focusable",void 0),Re([$i("submenuOpen")],tn.prototype,"onOpenChange",null),tn=Re([Mt("mdui-menu-item")],tn);const on=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;let rn=class extends Gt{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new xi(this,{relatedElements:["mdui-menu-item"]})}get items(){return T(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((e=>!e.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!T(this).parent().length}get lastActiveItem(){const e=this.lastActiveItems.length?this.lastActiveItems.length-1:0;return this.lastActiveItems[e]}set lastActiveItem(e){const t=this.lastActiveItems.length?this.lastActiveItems.length-1:0;this.lastActiveItems[t]=e}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((e=>{e.dense=this.dense,e.selects=this.selects,e.submenuTrigger=this.submenuTrigger,e.submenuOpenDelay=this.submenuOpenDelay,e.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value)),t=this.isMultiple?e:e[0]||void 0;this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const e=(this.isSingle||l(this.value)?[this.value]:this.value).filter((e=>e));if(e.length)if(this.isSingle){const t=this.itemsEnabled.find((t=>t.value===e[0]));this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(e){this.lastActiveItem&&this.focusOne(this.lastActiveItem,e)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((e=>e.focusable))})),this.addEventListener("submenu-open",(e=>{const t=T(e.target),i=t.children("mdui-menu-item:not([disabled])").get(),o=t.parents("mdui-menu-item").length+1;i.length&&(this.lastActiveItems[o]=i[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[o]))})),this.addEventListener("submenu-close",(e=>{const t=T(e.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===t&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[t-1]&&this.focusOne(this.lastActiveItems[t-1]))}))}render(){return mt``}setSelectedKeys(e){xo(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle||h(this.value)||h(e)?this.value=e:xo(this.value,e)||(this.value=e)}getSiblingsItems(e,t=!1){return T(e).parent().children("mdui-menu-item"+(t?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((e=>{e.focusable=e.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((e=>{e.focusable=this.selectedKeys.includes(e.key)}));else if(this.isMultiple){const e=this.items.find((e=>e.focusable));e?.key&&this.selectedKeys.includes(e.key)||this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).forEach(((e,t)=>e.focusable=!t))}}else this.itemsEnabled.forEach(((e,t)=>{e.focusable=!t}))}updateSelected(){this.items.forEach((e=>{e.selected=this.selectedKeys.includes(e.key)}))}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(e){this.items.forEach((t=>t.focusable=t.key===e.key)),await Or()}focusOne(e,t){e.focus(t)}async onClick(e){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(e.button)return;const t=e.target.closest("mdui-menu-item");t&&!t.disabled&&(this.lastActiveItem=t,this.isSelectable&&t.value&&this.selectOne(t),await this.focusableOne(t),this.focusOne(t))}async onKeyDown(e){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const t=e.target;if("Enter"===e.key&&(e.preventDefault(),t.click())," "===e.key&&(e.preventDefault(),this.isSelectable&&t.value&&(this.selectOne(t),await this.focusableOne(t),this.focusOne(t))),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const i=this.getSiblingsItems(t,!0),o=i.find((e=>e.focusable));let n=o?i.indexOf(o):0;if(i.length>0)return e.preventDefault(),"ArrowDown"===e.key?n++:"ArrowUp"===e.key?n--:"Home"===e.key?n=0:"End"===e.key&&(n=i.length-1),n<0&&(n=i.length-1),n>i.length-1&&(n=0),this.lastActiveItem=i[n],await this.focusableOne(i[n]),void this.focusOne(i[n])}}};rn.styles=[Zt,on],Re([Ot({reflect:!0})],rn.prototype,"selects",void 0),Re([Ot()],rn.prototype,"value",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],rn.prototype,"dense",void 0),Re([Ot({reflect:!0,attribute:"submenu-trigger"})],rn.prototype,"submenuTrigger",void 0),Re([Ot({type:Number,reflect:!0,attribute:"submenu-open-delay"})],rn.prototype,"submenuOpenDelay",void 0),Re([Ot({type:Number,reflect:!0,attribute:"submenu-close-delay"})],rn.prototype,"submenuCloseDelay",void 0),Re([zt()],rn.prototype,"selectedKeys",void 0),Re([Bt({flatten:!0,selector:"mdui-menu-item"})],rn.prototype,"childrenItems",void 0),Re([$i("dense"),$i("selects"),$i("submenuTrigger"),$i("submenuOpenDelay"),$i("submenuCloseDelay")],rn.prototype,"onSlotChange",null),Re([$i("selects",!0)],rn.prototype,"onSelectsChange",null),Re([$i("selectedKeys",!0)],rn.prototype,"onSelectedKeysChange",null),Re([$i("value")],rn.prototype,"onValueChange",null),rn=Re([Mt("mdui-menu")],rn);const nn=Pe`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;flex:1;overflow:hidden;min-width:3rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;padding-top:.75rem;padding-bottom:.75rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;left:50%;transform:translateX(-50%);width:4rem;height:2rem;margin-top:.75rem;border-radius:var(--mdui-shape-corner-full)}mdui-ripple:not(.initial){transition:margin-top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host(:not([active])) mdui-ripple.label-visibility-selected,mdui-ripple.label-visibility-unlabeled{margin-top:1.5rem}.container.label-visibility-unlabeled,:host(:not([active])) .container.label-visibility-selected{padding-top:1.5rem;padding-bottom:0}.container.label-visibility-unlabeled .label,:host(:not([active])) .container.label-visibility-selected .label{opacity:0}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:4rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;let sn=class extends(qi(eo(Yi(Gt)))){constructor(){super(...arguments),this.isInitial=!0,this.active=!1,this.disabled=!1,this.key=Ii(),this.rippleRef=zi(),this.hasSlotController=new Xt(this,"active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=Fi({"label-visibility-selected":"selected"===this.labelVisibility,"label-visibility-labeled":"labeled"===this.labelVisibility,"label-visibility-unlabeled":"unlabeled"===this.labelVisibility,initial:this.isInitial}),t=Fi([{container:!0,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")},e]);return mt`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner()}):mt`
${this.renderInner()}
`}`}renderInner(){return mt`
${this.activeIcon?mt``:Jt}${this.icon?mt``:Jt}
`}};sn.styles=[Zt,nn],Re([Ot({reflect:!0})],sn.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"active-icon"})],sn.prototype,"activeIcon",void 0),Re([Ot({reflect:!0})],sn.prototype,"value",void 0),Re([zt()],sn.prototype,"labelVisibility",void 0),Re([zt()],sn.prototype,"isInitial",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],sn.prototype,"active",void 0),Re([zt()],sn.prototype,"disabled",void 0),sn=Re([Mt("mdui-navigation-bar-item")],sn);const an=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;overflow:hidden;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition-property:transform;transition-duration:var(--mdui-motion-duration-long2);transition-timing-function:var(--mdui-motion-easing-emphasized);height:5rem;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]){transform:translateY(5.625rem);transition-duration:var(--mdui-motion-duration-short4)}`;let ln=class extends(Ei(_i)){constructor(){super(...arguments),this.hide=!1,this.labelVisibility="auto",this.activeKey=0,this.isInitial=!0,this.definedController=new xi(this,{relatedElements:["mdui-navigation-bar-item"]})}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find((e=>e.key===this.activeKey));this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find((e=>e.value===this.value));this.activeKey=e?.key??0,this.updateItems()}async onLabelVisibilityChange(){await this.definedController.whenDefined(),this.updateItems()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return mt``}runScrollThreshold(e){e||this.hide||this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1)}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-bar-item");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateItems())}updateItems(){const e=this.items,t="auto"===this.labelVisibility?e.length<=3?"labeled":"selected":this.labelVisibility;e.forEach((e=>{e.active=this.activeKey===e.key,e.labelVisibility=t,e.isInitial=this.isInitial}))}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}};ln.styles=[Zt,an],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ln.prototype,"hide",void 0),Re([Ot({reflect:!0,attribute:"label-visibility"})],ln.prototype,"labelVisibility",void 0),Re([Ot({reflect:!0})],ln.prototype,"value",void 0),Re([Ot({reflect:!0,attribute:"scroll-behavior"})],ln.prototype,"scrollBehavior",void 0),Re([zt()],ln.prototype,"activeKey",void 0),Re([Bt({selector:"mdui-navigation-bar-item",flatten:!0})],ln.prototype,"items",void 0),Re([$i("activeKey",!0)],ln.prototype,"onActiveKeyChange",null),Re([$i("value")],ln.prototype,"onValueChange",null),Re([$i("labelVisibility",!0)],ln.prototype,"onLabelVisibilityChange",null),ln=Re([Mt("mdui-navigation-bar")],ln);const cn=e=>{const t=n(),i=o(),r=t.getComputedStyle(i.documentElement),s=f(e)?T(e).innerWidth():c(e)?e:T(t).innerWidth(),a=e=>{const t=r.getPropertyValue(`--mdui-breakpoint-${e}`).toLowerCase();return parseFloat(t)};return{up:e=>s>=a(e),down:e=>s{switch(e){case"xs":return"sm";case"sm":return"md";case"md":return"lg";case"lg":return"xl";case"xl":return"xxl"}})(e))},not(e){return!this.only(e)},between(e,t){return this.up(e)&&this.down(t)}}},dn=Pe`:host{--shape-corner:var(--mdui-shape-corner-large);--z-index:2200;display:none;position:fixed;top:0;bottom:0;left:0;z-index:1;width:22.5rem}:host([placement=right]){left:initial;right:0}:host([mobile]),:host([modal]){top:0!important;right:0;bottom:0!important;width:initial;z-index:var(--z-index)}:host([placement=right][mobile]),:host([placement=right][modal]){left:0}:host([contained]){position:absolute}.overlay{position:absolute;inset:0;z-index:inherit;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{display:block;position:absolute;top:0;bottom:0;left:0;width:100%;overflow:auto;z-index:inherit;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level0)}:host([mobile]) .panel,:host([modal]) .panel{border-radius:0 var(--shape-corner) var(--shape-corner) 0;max-width:80%;width:22.5rem;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([placement=right]) .panel{left:initial;right:0}:host([placement=right][mobile]) .panel,:host([placement=right][modal]) .panel{border-radius:var(--shape-corner) 0 0 var(--shape-corner)}`;let hn=class extends _i{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.placement="left",this.contained=!1,this.mobile=!1,this.overlayRef=zi(),this.panelRef=zi(),this.definedController=new xi(this,{needDomReady:!0})}get layoutPlacement(){return this.placement}get lockTarget(){return this.contained||this.isParentLayout?this.parentElement:document.documentElement}get isModal(){return this.mobile||this.modal}async onContainedChange(){await this.definedController.whenDefined(),this.observeResize?.unobserve(),this.observeResize=Di(this.contained?this.parentElement:document.documentElement,(()=>{const e=this.contained?this.parentElement:void 0;this.mobile=cn(e).down("md"),this.isParentLayout&&this.layoutManager.updateLayout(this,{width:this.isModal?0:void 0})}))}onPlacementChange(){this.isParentLayout&&this.layoutManager.updateLayout(this)}async onMobileChange(){!this.open||this.isParentLayout||this.contained||(await this.definedController.whenDefined(),this.isModal?(No(this,this.lockTarget),await this.getLockTargetAnimate(!1,0)):(Fo(this,this.lockTarget),await this.getLockTargetAnimate(!0,0)))}async onOpenChange(){let e=this.panelRef.value,t=this.overlayRef.value;const i="right"===this.placement,o=_o(this,"linear"),n=_o(this,"emphasized"),r=(e,t)=>{T(this.layoutManager.getItemsAndMain()).css("transition",u(e)?null:`all ${e}ms ${t}`)},s=async()=>{const i=[];if(this.isModal?i.push(t,e):this.isParentLayout||i.push(this.lockTarget),this.isParentLayout){const e=this.layoutManager.getItemsAndMain(),t=e.indexOf(this);i.push(...e.slice(t))}this.isModal||i.includes(this)||i.push(this),await Promise.all(i.map((e=>Do(e))))};if(this.open){const a=this.hasUpdated;if(a||(await this.updateComplete,e=this.panelRef.value,t=this.overlayRef.value),a&&!this.emit("open",{cancelable:!0}))return;await this.definedController.whenDefined(),this.style.display="block",this.originalTrigger=document.activeElement,this.isModal&&(this.modalHelper.activate(),this.contained||No(this,this.lockTarget)),await s(),requestAnimationFrame((()=>{const t=this.querySelector("[autofocus]");t?t.focus({preventScroll:!0}):e.focus({preventScroll:!0})}));const l=Lo(this,"long2"),c=[];if(this.isModal?c.push(Ao(t,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:a?l:0,easing:o})):this.isParentLayout||c.push(this.getLockTargetAnimate(!0,a?l:0)),this.isParentLayout&&a&&(r(l,n),this.layoutManager.updateLayout(this)),c.push(Ao(this.isModal?e:this,[{transform:`translateX(${i?"":"-"}100%)`},{transform:"translateX(0)"}],{duration:a?l:0,easing:n})),await Promise.all(c),!this.open)return;this.isParentLayout&&a&&r(null),a&&this.emit("opened")}else if(this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;await this.definedController.whenDefined(),this.isModal&&this.modalHelper.deactivate(),await s();const l=Lo(this,"short4"),c=[];if(this.isModal?c.push(Ao(t,[{opacity:1},{opacity:0}],{duration:l,easing:o})):this.isParentLayout||c.push(this.getLockTargetAnimate(!1,l)),this.isParentLayout&&(r(l,n),this.layoutManager.updateLayout(this,{width:0})),c.push(Ao(this.isModal?e:this,[{transform:"translateX(0)"},{transform:`translateX(${i?"":"-"}100%)`}],{duration:l,easing:n})),await Promise.all(c),this.open)return;this.isParentLayout&&r(null),this.style.display="none",this.isModal&&!this.contained&&Fo(this,this.lockTarget);const d=this.originalTrigger;a(d?.focus)&&setTimeout((()=>d.focus())),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new Mo(this)}disconnectedCallback(){super.disconnectedCallback(),Fo(this,this.lockTarget),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&this.isModal&&(e.stopPropagation(),this.open=!1)}))}render(){return mt`${So(this.isModal,(()=>mt`
`))}`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}getLockTargetAnimate(e,t){const i="right"===this.placement?"paddingRight":"paddingLeft",o=T(this.panelRef.value).innerWidth()+"px";return Ao(this.lockTarget,[{[i]:e?0:o},{[i]:e?o:0}],{duration:t,easing:_o(this,"emphasized"),fill:"forwards"})}};hn.styles=[Zt,dn],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],hn.prototype,"open",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],hn.prototype,"modal",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"close-on-esc"})],hn.prototype,"closeOnEsc",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"close-on-overlay-click"})],hn.prototype,"closeOnOverlayClick",void 0),Re([Ot({reflect:!0})],hn.prototype,"placement",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],hn.prototype,"contained",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],hn.prototype,"mobile",void 0),Re([$i("contained")],hn.prototype,"onContainedChange",null),Re([$i("placement",!0)],hn.prototype,"onPlacementChange",null),Re([$i("mobile",!0),$i("modal",!0)],hn.prototype,"onMobileChange",null),Re([$i("open")],hn.prototype,"onOpenChange",null),hn=Re([Mt("mdui-navigation-drawer")],hn);const un=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;border-radius:0 var(--shape-corner) var(--shape-corner) 0;z-index:var(--z-index);width:5rem;background-color:rgb(var(--mdui-color-surface));padding:.375rem .75rem}:host([contained]){position:absolute}:host([divider]){border-right:.0625rem solid rgb(var(--mdui-color-surface-variant));width:5.0625rem}:host([placement=right]){left:initial;right:0;border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host([placement=right][divider]){border-right:none;border-left:.0625rem solid rgb(var(--mdui-color-surface-variant))}.bottom,.items,.top{display:flex;flex-direction:column;align-items:center;width:100%}.top{margin-bottom:1.75rem}.bottom{margin-top:1.75rem}::slotted([slot=bottom]),::slotted([slot=top]),::slotted(mdui-navigation-rail-item){margin-top:.375rem;margin-bottom:.375rem}:host([alignment=start]) .top-spacer{flex-grow:0}:host([alignment=start]) .bottom-spacer{flex-grow:1}:host([alignment=end]) .top-spacer{flex-grow:1}:host([alignment=end]) .bottom-spacer{flex-grow:0}:host([alignment=center]){justify-content:center}:host([alignment=center]) .bottom,:host([alignment=center]) .top{position:absolute}:host([alignment=center]) .top{top:.375rem}:host([alignment=center]) .bottom{bottom:.375rem}`;let pn=class extends _i{constructor(){super(...arguments),this.placement="left",this.alignment="start",this.contained=!1,this.divider=!1,this.activeKey=0,this.hasSlotController=new Xt(this,"top","bottom"),this.definedController=new xi(this,{relatedElements:["mdui-navigation-rail-item"]}),this.isInitial=!0}get layoutPlacement(){return this.placement}get parentTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isRight(){return"right"===this.placement}get paddingValue(){return["fixed","absolute"].includes(T(this).css("position"))?this.offsetWidth:void 0}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find((e=>e.key===this.activeKey));this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find((e=>e.value===this.value));this.activeKey=e?.key??0,this.updateItems()}async onContainedChange(){this.isParentLayout||(await this.definedController.whenDefined(),T(document.body).css({paddingLeft:this.contained||this.isRight?null:this.paddingValue,paddingRight:this.contained||!this.isRight?null:this.paddingValue}),T(this.parentElement).css({paddingLeft:this.contained&&!this.isRight?this.paddingValue:null,paddingRight:this.contained&&this.isRight?this.paddingValue:null}))}async onPlacementChange(){await this.definedController.whenDefined(),this.layoutManager?.updateLayout(this),this.items.forEach((e=>{e.placement=this.placement})),this.isParentLayout||T(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}connectedCallback(){super.connectedCallback(),this.isParentLayout||this.definedController.whenDefined().then((()=>{T(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}))}disconnectedCallback(){super.disconnectedCallback(),!this.isParentLayout&&this.definedController.isDefined()&&T(this.parentTarget).css({paddingLeft:this.isRight?void 0:null,paddingRight:this.isRight?null:void 0})}render(){const e=this.hasSlotController.test("top"),t=this.hasSlotController.test("bottom");return mt`${So(e,(()=>mt``))} ${So(t,(()=>mt``))}`}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-rail-item");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateItems())}updateItems(){this.items.forEach((e=>{e.active=this.activeKey===e.key,e.placement=this.placement,e.isInitial=this.isInitial}))}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}};pn.styles=[Zt,un],Re([Ot({reflect:!0})],pn.prototype,"value",void 0),Re([Ot({reflect:!0})],pn.prototype,"placement",void 0),Re([Ot({reflect:!0})],pn.prototype,"alignment",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],pn.prototype,"contained",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],pn.prototype,"divider",void 0),Re([zt()],pn.prototype,"activeKey",void 0),Re([Bt({selector:"mdui-navigation-rail-item",flatten:!0})],pn.prototype,"items",void 0),Re([$i("activeKey",!0)],pn.prototype,"onActiveKeyChange",null),Re([$i("value")],pn.prototype,"onValueChange",null),Re([$i("contained",!0)],pn.prototype,"onContainedChange",null),Re([$i("placement",!0)],pn.prototype,"onPlacementChange",null),pn=Re([Mt("mdui-navigation-rail")],pn);const mn=Pe`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;width:100%;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:3.5rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;width:3.5rem;height:2rem;border-radius:var(--mdui-shape-corner-full)}.container:not(.has-label)+mdui-ripple{height:3.5rem}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.placement-right::slotted([slot=badge]){transform:translate(-50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.placement-right::slotted([slot=badge][variant=small]){transform:translate(-.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active-icon]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:3.5rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) :not(.has-label) .indicator{height:3.5rem}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;let fn=class extends(qi(eo(Yi(Gt)))){constructor(){super(...arguments),this.active=!1,this.isInitial=!0,this.placement="left",this.disabled=!1,this.key=Ii(),this.rippleRef=zi(),this.hasSlotController=new Xt(this,"[default]","active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=this.hasSlotController.test("[default]"),t=Fi({container:!0,"has-label":e,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon"),initial:this.isInitial});return mt`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner(e)}):mt`
${this.renderInner(e)}
`}`}renderInner(e){return mt`
${this.activeIcon?mt``:Jt}${this.icon?mt``:Jt}
${e?mt``:vt}`}};fn.styles=[Zt,mn],Re([Ot({reflect:!0})],fn.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"active-icon"})],fn.prototype,"activeIcon",void 0),Re([Ot({reflect:!0})],fn.prototype,"value",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],fn.prototype,"active",void 0),Re([zt()],fn.prototype,"isInitial",void 0),Re([zt()],fn.prototype,"placement",void 0),Re([zt()],fn.prototype,"disabled",void 0),fn=Re([Mt("mdui-navigation-rail-item")],fn);let vn=class extends Tt{render(){return po('')}};vn.styles=uo,vn=Re([Mt("mdui-icon-circle")],vn);let gn=class extends Tt{render(){return po('')}};gn.styles=uo,gn=Re([Mt("mdui-icon-radio-button-unchecked")],gn);const bn=Pe`:host{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon{display:flex;position:absolute;font-size:1.5rem}:not(.initial) .icon{transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.unchecked-icon{transition-property:color;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .unchecked-icon,:host([hover]) .unchecked-icon,:host([pressed]) .unchecked-icon{color:rgb(var(--mdui-color-on-surface))}.checked-icon{opacity:0;transform:scale(.2);transition-property:color,opacity,transform;color:rgb(var(--mdui-color-primary))}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface))}.label:not(.initial){transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]) .checked-icon{opacity:1;transform:scale(.5)}i.invalid{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}i.invalid .icon{color:rgb(var(--mdui-color-error))}.label.invalid{color:rgb(var(--mdui-color-error))}:host([disabled]),:host([group-disabled]){cursor:default;pointer-events:none}:host([disabled]) .icon,:host([group-disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]) .label,:host([group-disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}`;let yn=class extends(eo(Yi(Gt))){constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.invalid=!1,this.groupDisabled=!1,this.focusable=!0,this.isInitial=!0,this.rippleRef=zi()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()}get focusElement(){return this}get focusDisabled(){return this.isDisabled()||!this.focusable}onCheckedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.isDisabled()||(this.checked=!0)}))}render(){const e=Gi({invalid:this.invalid,initial:this.isInitial});return mt`${this.uncheckedIcon?mt``:mt``}${this.checkedIcon?mt``:mt``}`}isDisabled(){return this.disabled||this.groupDisabled}};yn.styles=[Zt,bn],Re([Ot({reflect:!0})],yn.prototype,"value",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],yn.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],yn.prototype,"checked",void 0),Re([Ot({reflect:!0,attribute:"unchecked-icon"})],yn.prototype,"uncheckedIcon",void 0),Re([Ot({reflect:!0,attribute:"checked-icon"})],yn.prototype,"checkedIcon",void 0),Re([zt()],yn.prototype,"invalid",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"group-disabled"})],yn.prototype,"groupDisabled",void 0),Re([zt()],yn.prototype,"focusable",void 0),Re([zt()],yn.prototype,"isInitial",void 0),Re([$i("checked",!0)],yn.prototype,"onCheckedChange",null),yn=Re([Mt("mdui-radio")],yn);const wn=Pe`:host{display:inline-block}fieldset{border:none;padding:0;margin:0;min-width:0}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}`;let kn=class extends Gt{constructor(){super(...arguments),this.disabled=!1,this.name="",this.value="",this.defaultValue="",this.required=!1,this.invalid=!1,this.isInitial=!0,this.inputRef=zi(),this.formController=new Ki(this),this.definedController=new xi(this,{relatedElements:["mdui-radio"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return T(this).find("mdui-radio").get()}get itemsEnabled(){return T(this).find("mdui-radio:not([disabled])").get()}async onValueChange(){this.isInitial=!1,await this.definedController.whenDefined(),this.emit("input"),this.emit("change"),this.updateItems(),this.updateRadioFocusable(),await this.updateComplete;const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return mt`
`}updateRadioFocusable(){const e=this.items,t=e.find((e=>e.checked));t?e.forEach((e=>{e.focusable=e===t})):this.itemsEnabled.forEach(((e,t)=>{e.focusable=!t}))}async onClick(e){await this.definedController.whenDefined();const t=e.target.closest("mdui-radio");t&&!t.disabled&&(this.value=t.value,await this.updateComplete,t.focus())}async onKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;e.preventDefault(),await this.definedController.whenDefined();const t=this.itemsEnabled,i=t.find((e=>e.checked))??t[0],o=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=t.indexOf(i)+o;n<0&&(n=t.length-1),n>t.length-1&&(n=0),this.value=t[n].value,await this.updateComplete,t[n].focus()}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(),this.updateRadioFocusable()}onCheckedChange(e){e.stopPropagation()}updateItems(){this.items.forEach((e=>{e.checked=e.value===this.value,e.invalid=this.invalid,e.groupDisabled=this.disabled,e.isInitial=this.isInitial}))}};function*Cn(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}kn.styles=[Zt,wn],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],kn.prototype,"disabled",void 0),Re([Ot({reflect:!0})],kn.prototype,"form",void 0),Re([Ot({reflect:!0})],kn.prototype,"name",void 0),Re([Ot({reflect:!0})],kn.prototype,"value",void 0),Re([ho()],kn.prototype,"defaultValue",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],kn.prototype,"required",void 0),Re([zt()],kn.prototype,"invalid",void 0),Re([$i("value",!0)],kn.prototype,"onValueChange",null),Re([$i("invalid",!0),$i("disabled")],kn.prototype,"onInvalidChange",null),kn=Re([Mt("mdui-radio-group")],kn);const xn=Pe`:host{position:relative;display:block;width:100%;-webkit-tap-highlight-color:transparent;height:2.5rem;padding:0 1.25rem}label{position:relative;display:block;width:100%;height:100%}input[type=range]{position:absolute;inset:0;z-index:4;height:100%;cursor:pointer;opacity:0;appearance:none;width:calc(100% + 20rem * 2 / 16);margin:0 -1.25rem;padding:0 .75rem}:host([disabled]) input[type=range]{cursor:not-allowed}.track-active,.track-inactive{position:absolute;top:50%;height:.25rem;margin-top:-.125rem}.track-inactive{left:-.125rem;right:-.125rem;border-radius:var(--mdui-shape-corner-full);background-color:rgb(var(--mdui-color-surface-container-highest))}.invalid .track-inactive{background-color:rgba(var(--mdui-color-error),.12)}:host([disabled]) .track-inactive{background-color:rgba(var(--mdui-color-on-surface),.12)}.track-active{background-color:rgb(var(--mdui-color-primary))}.invalid .track-active{background-color:rgb(var(--mdui-color-error))}:host([disabled]) .track-active{background-color:rgba(var(--mdui-color-on-surface),.38)}.handle{position:absolute;top:50%;transform:translate(-50%);cursor:pointer;z-index:2;width:2.5rem;height:2.5rem;margin-top:-1.25rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.invalid .handle{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.handle .elevation,.handle::before{position:absolute;display:block;content:' ';left:.625rem;top:.625rem;width:1.25rem;height:1.25rem;border-radius:var(--mdui-shape-corner-full)}.handle .elevation{background-color:rgb(var(--mdui-color-primary));box-shadow:var(--mdui-elevation-level1)}.invalid .handle .elevation{background-color:rgb(var(--mdui-color-error))}:host([disabled]) .handle .elevation{background-color:rgba(var(--mdui-color-on-surface),.38);box-shadow:var(--mdui-elevation-level0)}.handle::before{background-color:rgb(var(--mdui-color-background))}.handle mdui-ripple{border-radius:var(--mdui-shape-corner-full)}.label{position:absolute;left:50%;transform:translateX(-50%) scale(0);transform-origin:center bottom;display:flex;align-items:center;justify-content:center;cursor:default;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform var(--mdui-motion-duration-short2) var(--mdui-motion-easing-standard);bottom:2.5rem;min-width:1.75rem;height:1.75rem;padding:.375rem .5rem;border-radius:var(--mdui-shape-corner-full);color:rgb(var(--mdui-color-on-primary));font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height);background-color:rgb(var(--mdui-color-primary))}.invalid .label{color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error))}.label::after{content:' ';position:absolute;z-index:-1;transform:rotate(45deg);width:.875rem;height:.875rem;bottom:-.125rem;background-color:rgb(var(--mdui-color-primary))}.invalid .label::after{background-color:rgb(var(--mdui-color-error))}.label-visible{transform:translateX(-50%) scale(1);transition:transform var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.tickmark{position:absolute;top:50%;transform:translate(-50%);width:.125rem;height:.125rem;margin-top:-.0625rem;border-radius:var(--mdui-shape-corner-full);background-color:rgba(var(--mdui-color-on-surface-variant),.38)}.invalid .tickmark{background-color:rgba(var(--mdui-color-error),.38)}.tickmark.active{background-color:rgba(var(--mdui-color-on-primary),.38)}.invalid .tickmark.active{background-color:rgba(var(--mdui-color-on-error),.38)}:host([disabled]) .tickmark{background-color:rgba(var(--mdui-color-on-surface),.38)}`;class $n extends(eo(Yi(Gt))){constructor(){super(...arguments),this.min=0,this.max=100,this.step=1,this.tickmarks=!1,this.nolabel=!1,this.disabled=!1,this.name="",this.invalid=!1,this.labelVisible=!1,this.inputRef=zi(),this.trackActiveRef=zi(),this.labelFormatter=e=>e.toString()}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}onDisabledChange(){this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}fixValue(e){const{min:t,max:i,step:o}=this;e=Math.min(Math.max(e,t),i);let n=t+Math.round((e-t)/o)*o;return n>i&&(n-=o),n}getCandidateValues(){return Array.from({length:this.max-this.min+1},((e,t)=>t+this.min)).filter((e=>!((e-this.min)%this.step)))}renderLabel(e){return So(!this.nolabel,(()=>mt`
${this.labelFormatter(e)}
`))}onChange(){this.emit("change")}}$n.styles=[Zt,xn],Re([Ot({type:Number,reflect:!0})],$n.prototype,"min",void 0),Re([Ot({type:Number,reflect:!0})],$n.prototype,"max",void 0),Re([Ot({type:Number,reflect:!0})],$n.prototype,"step",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],$n.prototype,"tickmarks",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],$n.prototype,"nolabel",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],$n.prototype,"disabled",void 0),Re([Ot({reflect:!0})],$n.prototype,"form",void 0),Re([Ot({reflect:!0})],$n.prototype,"name",void 0),Re([zt()],$n.prototype,"invalid",void 0),Re([zt()],$n.prototype,"labelVisible",void 0),Re([Ot({attribute:!1})],$n.prototype,"labelFormatter",void 0),Re([$i("disabled",!0)],$n.prototype,"onDisabledChange",null);let En=class extends $n{constructor(){super(...arguments),this.defaultValue=[],this.currentHandle="start",this.rippleStartRef=zi(),this.rippleEndRef=zi(),this.handleStartRef=zi(),this.handleEndRef=zi(),this.formController=new Ki(this),this._value=[],this.getRippleIndex=()=>this.hoverHandle?"start"===this.hoverHandle?0:1:"start"===this.currentHandle?0:1}get value(){return this._value}set value(e){const t=[...this._value];this._value=[this.fixValue(e[0]),this.fixValue(e[1])],this.requestUpdate("value",t),this.updateComplete.then((()=>{this.updateStyle();const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}))}get rippleElement(){return[this.rippleStartRef.value,this.rippleEndRef.value]}connectedCallback(){super.connectedCallback(),this.value.length||(this.value=[this.min,this.max]),this.value[0]=this.fixValue(this.value[0]),this.value[1]=this.fixValue(this.value[1]),this.defaultValue.length||(this.defaultValue=[...this.value])}firstUpdated(e){super.firstUpdated(e);const t=e=>{const t=T(this),i=parseFloat(t.css("padding-left")),o=parseFloat(t.css("padding-right")),n=(e.offsetX-i)/(this.clientWidth-i-o);return(this.max-this.min)*n+this.min>(this.value[1]-this.value[0])/2+this.value[0]?"end":"start"},i=()=>{this.disabled||(this.labelVisible=!0)},o=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",i),this.addEventListener("mousedown",i),this.addEventListener("touchend",o),this.addEventListener("mouseup",o),this.addEventListener("pointerdown",(e=>{this.currentHandle=t(e)})),this.addEventListener("pointermove",(e=>{const i=t(e);this.hoverHandle!==i&&(this.endHover(e),this.hoverHandle=i,this.startHover(e))})),this.updateStyle()}render(){return mt``}updateStyle(){const e=e=>(e-this.min)/(this.max-this.min)*100,t=e(this.value[0]),i=e(this.value[1]);this.trackActiveRef.value.style.width=i-t+"%",this.trackActiveRef.value.style.left=`${t}%`,this.handleStartRef.value.style.left=`${t}%`,this.handleEndRef.value.style.left=`${i}%`}onInput(){const e="start"===this.currentHandle,t=parseFloat(this.inputRef.value.value),i=this.value[0],o=this.value[1],n=()=>{this.updateStyle()};e?t<=o?(this.value=[t,o],n()):i!==o&&(this.value=[o,o],n()):t>=i?(this.value=[i,t],n()):i!==o&&(this.value=[i,i],n())}};En.styles=[$n.styles],Re([ho()],En.prototype,"defaultValue",void 0),Re([zt()],En.prototype,"currentHandle",void 0),Re([Ot({type:Array,attribute:!1})],En.prototype,"value",null),En=Re([Mt("mdui-range-slider")],En);const Rn=Pe`:host{position:relative;display:inline-flex;flex-grow:1;flex-shrink:0;float:left;height:100%;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;border:.0625rem solid rgb(var(--mdui-color-outline))}.button{width:100%;padding:0 .75rem}:host([invalid]){color:rgb(var(--mdui-color-error));border-color:rgb(var(--mdui-color-error))}:host([invalid]) .button{background-color:rgb(var(--mdui-color-error-container))}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([disabled]),:host([group-disabled]){cursor:default;pointer-events:none;color:rgba(var(--mdui-color-on-surface),38%);border-color:rgba(var(--mdui-color-on-surface),12%)}:host([loading]){cursor:default;pointer-events:none}:host(:not(.mdui-segmented-button-first)){margin-left:-.0625rem}:host(.mdui-segmented-button-first){border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host(.mdui-segmented-button-last){border-radius:0 var(--shape-corner) var(--shape-corner) 0}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}mdui-circular-progress{width:1.125rem;height:1.125rem}:host([disabled]) mdui-circular-progress{opacity:.38}.label{display:inline-flex}.has-icon .label{padding-left:.5rem}.has-end-icon .label{padding-right:.5rem}`;let In=class extends io{constructor(){super(...arguments),this.selected=!1,this.invalid=!1,this.groupDisabled=!1,this.key=Ii(),this.rippleRef=zi(),this.hasSlotController=new Xt(this,"[default]","icon","end-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()||this.loading}get focusDisabled(){return this.isDisabled()||this.loading}render(){const e=Fi({button:!0,"has-icon":this.icon||this.selected||this.loading||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon")});return mt`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.isDisabled()||this.loading?mt`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}isDisabled(){return this.disabled||this.groupDisabled}renderIcon(){return this.loading?this.renderLoading():this.selected?mt`${this.selectedIcon?mt``:mt``}`:mt`${this.icon?mt``:Jt}`}renderLabel(){return this.hasSlotController.test("[default]")?mt``:Jt}renderEndIcon(){return mt`${this.endIcon?mt``:Jt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}};In.styles=[io.styles,Rn],Re([Ot({reflect:!0})],In.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],In.prototype,"endIcon",void 0),Re([Ot({reflect:!0,attribute:"selected-icon"})],In.prototype,"selectedIcon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],In.prototype,"selected",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],In.prototype,"invalid",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"group-disabled"})],In.prototype,"groupDisabled",void 0),In=Re([Mt("mdui-segmented-button")],In);const Sn=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;vertical-align:middle;height:2.5rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([full-width]){display:flex;flex-wrap:nowrap}input,select{position:absolute;width:100%;height:100%;padding:0;opacity:0;pointer-events:none}`;let An=class extends Gt{constructor(){super(...arguments),this.fullWidth=!1,this.disabled=!1,this.required=!1,this.name="",this.value="",this.defaultValue="",this.selectedKeys=[],this.invalid=!1,this.isInitial=!0,this.inputRef=zi(),this.formController=new Ki(this),this.definedController=new xi(this,{relatedElements:["mdui-segmented-button"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return T(this).find("mdui-segmented-button").get()}get itemsEnabled(){return T(this).find("mdui-segmented-button:not([disabled])").get()}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value)),t=this.isMultiple?e:e[0]||"";this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateItems();const e=(this.isSingle||l(this.value)?[this.value]:this.value).filter((e=>e));if(e.length)if(this.isSingle){const t=this.itemsEnabled.find((t=>t.value===e[0]));this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.setSelectedKeys([]);if(this.updateItems(),!this.isInitial){const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}connectedCallback(){super.connectedCallback(),this.value=this.isMultiple&&l(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue="multiple"===this.selects?[]:""}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return mt`${So(this.isSelectable&&this.isSingle,(()=>mt``))}${So(this.isSelectable&&this.isMultiple,(()=>mt``))}`}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateItems()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const t=e.target.closest("mdui-segmented-button");t&&!t.disabled&&this.isSelectable&&t.value&&this.selectOne(t)}async onInputKeyDown(e){if(["Enter"," "].includes(e.key)){if(e.preventDefault(),await this.definedController.whenDefined(),this.isSingle){const t=e.target;t.checked=!t.checked,this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus()}this.isMultiple&&(this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus())}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(!0)}setSelectedKeys(e){xo(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle?this.value=e:xo(this.value,e)||(this.value=e)}updateItems(e=!1){const t=this.items;t.forEach(((i,o)=>{i.invalid=this.invalid,i.groupDisabled=this.disabled,i.selected=this.selectedKeys.includes(i.key),e&&(i.classList.toggle("mdui-segmented-button-first",0===o),i.classList.toggle("mdui-segmented-button-last",o===t.length-1))}))}};An.styles=[Zt,Sn],Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"full-width"})],An.prototype,"fullWidth",void 0),Re([Ot({reflect:!0})],An.prototype,"selects",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],An.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],An.prototype,"required",void 0),Re([Ot({reflect:!0})],An.prototype,"form",void 0),Re([Ot({reflect:!0})],An.prototype,"name",void 0),Re([Ot()],An.prototype,"value",void 0),Re([ho()],An.prototype,"defaultValue",void 0),Re([zt()],An.prototype,"selectedKeys",void 0),Re([zt()],An.prototype,"invalid",void 0),Re([$i("selects",!0)],An.prototype,"onSelectsChange",null),Re([$i("selectedKeys",!0)],An.prototype,"onSelectedKeysChange",null),Re([$i("value")],An.prototype,"onValueChange",null),Re([$i("invalid",!0),$i("disabled")],An.prototype,"onInvalidChange",null),An=Re([Mt("mdui-segmented-button-group")],An);const Dn=new WeakMap;let Tn=0;const Pn=new Map,Mn=new WeakSet,_n=()=>new Promise((e=>requestAnimationFrame(e))),Ln=(e,t)=>{const i=e-t;return 0===i?void 0:i},On=(e,t)=>{const i=e/t;return 1===i?void 0:i},zn={left:(e,t)=>{const i=Ln(e,t);return{value:i,transform:null==i||isNaN(i)?void 0:`translateX(${i}px)`}},top:(e,t)=>{const i=Ln(e,t);return{value:i,transform:null==i||isNaN(i)?void 0:`translateY(${i}px)`}},width:(e,t)=>{let i;0===t&&(t=1,i={width:"1px"});const o=On(e,t);return{value:o,overrideFrom:i,transform:null==o||isNaN(o)?void 0:`scaleX(${o})`}},height:(e,t)=>{let i;0===t&&(t=1,i={height:"1px"});const o=On(e,t);return{value:o,overrideFrom:i,transform:null==o||isNaN(o)?void 0:`scaleY(${o})`}}},Bn={duration:333,easing:"ease-in-out"},Vn=["left","top","width","height","opacity","color","background"],Nn=new WeakMap,Fn=Kt(class extends di{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,2===e.type)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return vt}getController(){return Dn.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[t]){const i=void 0===this.u;return i&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((e=>this.t=!0)),this.element=e.element,Nn.set(this.element,this)),this.optionsOrCallback=t,(i||"function"!=typeof t)&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();void 0!==t&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=Vn,this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((o=>{const n=t[o]??(zn[o]?void 0:i[o]),r=Number(n);e[o]=isNaN(r)?n+"":r})),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((e,t)=>{if(Array.isArray(e)){if(Array.isArray(t)&&t.length===e.length&&e.every(((e,i)=>e===t[i])))return!1}else if(t===e)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await _n;const t=this.O(),i=this.j(this.options.keyframeOptions,t),o=this.m();if(void 0!==this.A){const{from:i,to:n}=this.N(this.A,o,t);this.log("measured",[this.A,o,i,n]),e=this.calculateKeyframes(i,n)}else{const i=Pn.get(this.options.inId);if(i){Pn.delete(this.options.inId);const{from:n,to:r}=this.N(i,o,t);e=this.calculateKeyframes(n,r),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,Tn++,e.forEach((e=>e.zIndex=Tn))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){void 0!==this.P&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h)return;if(void 0!==this.options.id&&Pn.set(this.options.id,this.A),void 0===this.options.out)return;if(this.prepare(),await _n(),this.i?.isConnected){const e=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,e),this.options.stabilizeOut){const e=this.m();this.log("stabilizing out");const t=this.A.left-e.left,i=this.A.top-e.top;!("static"===getComputedStyle(this.element).position)||0===t&&0===i||(this.element.style.position="relative"),0!==t&&(this.element.style.left=t+"px"),0!==i&&(this.element.style.top=i+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t?.parentNode){const i=Nn.get(t);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=Mn.has(this.u);return e||this.u.updateComplete.then((()=>{Mn.add(this.u)})),e}j(e,t=this.O()){const i={...Bn};return t.forEach((e=>Object.assign(i,e.options.keyframeOptions))),Object.assign(i,e),i}N(e,t,i){e={...e},t={...t};const o=i.map((e=>e.animatingProperties)).filter((e=>void 0!==e));let n=1,r=1;return o.length>0&&(o.forEach((e=>{e.width&&(n/=e.width),e.height&&(r/=e.height)})),void 0!==e.left&&void 0!==t.left&&(e.left=n*e.left,t.left=n*t.left),void 0!==e.top&&void 0!==t.top&&(e.top=r*e.top,t.top=r*t.top)),{from:e,to:t}}calculateKeyframes(e,t,i=!1){const o={},n={};let r=!1;const s={};for(const i in t){const a=e[i],l=t[i];if(i in zn){const e=zn[i];if(void 0===a||void 0===l)continue;const t=e(a,l);void 0!==t.transform&&(s[i]=t.value,r=!0,o.transform=`${o.transform??""} ${t.transform}`,void 0!==t.overrideFrom&&Object.assign(o,t.overrideFrom))}else a!==l&&void 0!==a&&void 0!==l&&(r=!0,o[i]=a,n[i]=l)}return o.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=s,r?[o,n]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),void 0!==e)){this.log("animate",[e,t]),i=!0,this.webAnimation=this.element.animate(e,t);const o=this.getController();o?.add(this);try{await this.webAnimation.finished}catch(e){}o?.remove(this)}return this.didFinish(i),i}isAnimating(){return"running"===this.webAnimation?.playState||this.webAnimation?.pending}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}});let Hn=class extends Tt{render(){return po('')}};Hn.styles=uo,Hn=Re([Mt("mdui-icon-cancel--outlined")],Hn);let Un=class extends Tt{render(){return po('')}};Un.styles=uo,Un=Re([Mt("mdui-icon-error")],Un);let Kn=class extends Tt{render(){return po('')}};Kn.styles=uo,Kn=Re([Mt("mdui-icon-visibility-off")],Kn);let qn=class extends Tt{render(){return po('')}};qn.styles=uo,qn=Re([Mt("mdui-icon-visibility")],qn);const jn=Pe`:host{display:inline-block;width:100%}:host([disabled]){pointer-events:none}:host([type=hidden]){display:none}.container{position:relative;display:flex;align-items:center;height:100%;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);padding:0 1rem}.container.has-icon{padding-left:.75rem}.container.has-end-icon,.container.has-error-icon{padding-right:.75rem}:host([variant=filled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));border-radius:var(--mdui-shape-corner-extra-small) var(--mdui-shape-corner-extra-small) 0 0}:host([variant=filled]) .container.invalid,:host([variant=filled]) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-error))}:host([variant=filled]:hover) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .container.invalid,:host([variant=filled]:hover) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .container,:host([variant=filled][focused]) .container{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-primary))}:host([variant=filled][focused-style]) .container.invalid,:host([variant=filled][focused-style]) .container.invalid-style,:host([variant=filled][focused]) .container.invalid,:host([variant=filled][focused]) .container.invalid-style{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-error))}:host([variant=filled][disabled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),4%)}:host([variant=outlined]) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-outline));border-radius:var(--mdui-shape-corner-extra-small)}:host([variant=outlined]) .container.invalid,:host([variant=outlined]) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-error))}:host([variant=outlined]:hover) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-surface))}:host([variant=outlined]:hover) .container.invalid,:host([variant=outlined]:hover) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-error-container))}:host([variant=outlined][focused-style]) .container,:host([variant=outlined][focused]) .container{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-primary))}:host([variant=outlined][focused-style]) .container.invalid,:host([variant=outlined][focused-style]) .container.invalid-style,:host([variant=outlined][focused]) .container.invalid,:host([variant=outlined][focused]) .container.invalid-style{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-error))}:host([variant=outlined][disabled]) .container{box-shadow:inset 0 0 0 .125rem rgba(var(--mdui-color-on-surface),12%)}.icon,.prefix,.right-icon,.suffix{display:flex;-webkit-user-select:none;user-select:none;color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]) .icon,:host([disabled]) .prefix,:host([disabled]) .right-icon,:host([disabled]) .suffix{color:rgba(var(--mdui-color-on-surface),38%)}.invalid .right-icon,.invalid .suffix,.invalid-style .right-icon,.invalid-style .suffix{color:rgb(var(--mdui-color-error))}:host(:hover) .invalid .right-icon,:host(:hover) .invalid .suffix,:host(:hover) .invalid-style .right-icon,:host(:hover) .invalid-style .suffix{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style]) .invalid .right-icon,:host([focused-style]) .invalid .suffix,:host([focused-style]) .invalid-style .right-icon,:host([focused-style]) .invalid-style .suffix,:host([focused]) .invalid .right-icon,:host([focused]) .invalid .suffix,:host([focused]) .invalid-style .right-icon,:host([focused]) .invalid-style .suffix{color:rgb(var(--mdui-color-error))}.icon,.right-icon{font-size:1.5rem}.icon mdui-button-icon,.right-icon mdui-button-icon,::slotted(mdui-button-icon[slot]){margin-left:-.5rem;margin-right:-.5rem}.icon .i,.right-icon .i,::slotted([slot$=icon]){font-size:inherit}.has-icon .icon{margin-right:1rem}.has-end-icon .end-icon,.right-icon:not(.end-icon){margin-left:1rem}.prefix,.suffix{display:none;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([variant=filled][label]) .prefix,:host([variant=filled][label]) .suffix{padding-top:1rem}.has-value .prefix,.has-value .suffix,:host([focused-style]) .prefix,:host([focused-style]) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{display:flex}.has-prefix .prefix{padding-right:.125rem}.has-suffix .suffix{padding-left:.125rem}.input-container{width:100%;height:100%}.label{position:absolute;pointer-events:none;max-width:calc(100% - 1rem);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;top:1rem;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}.invalid .label,.invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=outlined]) .label{padding:0 .25rem;margin:0 -.25rem}:host([variant=outlined]:hover) .label{color:rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .invalid .label,:host([variant=filled]:hover) .invalid-style .label,:host([variant=outlined]:hover) .invalid .label,:host([variant=outlined]:hover) .invalid-style .label{color:rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label{color:rgb(var(--mdui-color-primary))}:host([variant=filled]) .has-value .label,:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=filled][type=date]) .label,:host([variant=filled][type=datetime-local]) .label,:host([variant=filled][type=month]) .label,:host([variant=filled][type=time]) .label,:host([variant=filled][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:.25rem}:host([variant=outlined]) .has-value .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label,:host([variant=outlined][type=date]) .label,:host([variant=outlined][type=datetime-local]) .label,:host([variant=outlined][type=month]) .label,:host([variant=outlined][type=time]) .label,:host([variant=outlined][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:-.5rem;left:.75rem;background-color:rgb(var(--mdui-color-background))}:host([variant=filled][focused-style]) .invalid .label,:host([variant=filled][focused-style]) .invalid-style .label,:host([variant=filled][focused]) .invalid .label,:host([variant=filled][focused]) .invalid-style .label,:host([variant=outlined][focused-style]) .invalid .label,:host([variant=outlined][focused-style]) .invalid-style .label,:host([variant=outlined][focused]) .invalid .label,:host([variant=outlined][focused]) .invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=filled][disabled]) .label,:host([variant=outlined][disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}.input{display:flex;flex-wrap:wrap;width:100%;height:100%;min-height:100%;border:none;outline:0;background:0 0;appearance:none;resize:none;cursor:inherit;font-family:inherit;padding:1rem 0;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height);color:rgb(var(--mdui-color-on-surface));caret-color:rgb(var(--mdui-color-primary))}.input.hide-input{opacity:0;height:0;min-height:0;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}.invalid .input,.invalid-style .input{caret-color:rgb(var(--mdui-color-error))}:host([disabled]) .input{color:rgba(var(--mdui-color-on-surface),38%)}:host([end-aligned]) .input{text-align:right}:host([variant=filled]) .label+.input{padding:1.5rem 0 .5rem 0}.supporting{display:flex;justify-content:space-between;padding:.25rem 1rem;color:rgb(var(--mdui-color-on-surface-variant))}.supporting.invalid,.supporting.invalid-style{color:rgb(var(--mdui-color-error))}.helper{display:block;opacity:1;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([disabled]) .helper{color:rgba(var(--mdui-color-on-surface),38%)}:host([helper-on-focus]) .helper{opacity:0}:host([helper-on-focus][focused-style]) .helper,:host([helper-on-focus][focused]) .helper{opacity:1}.error{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}.counter{flex-wrap:nowrap;padding-left:1rem;font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}::-ms-reveal{display:none}.is-firefox .input[type=date],.is-firefox .input[type=datetime-local],.is-firefox .input[type=time]{clip-path:inset(0 2em 0 0)}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;display:none}.input[type=number]{-moz-appearance:textfield}.input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}`;let Wn=class extends(Yi(Gt)){constructor(){super(...arguments),this.variant="filled",this.type="text",this.name="",this.value="",this.defaultValue="",this.helperOnFocus=!1,this.clearable=!1,this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.autosize=!1,this.counter=!1,this.togglePassword=!1,this.spellcheck=!1,this.invalid=!1,this.invalidStyle=!1,this.focusedStyle=!1,this.isPasswordVisible=!1,this.hasValue=!1,this.error="",this.inputRef=zi(),this.formController=new Ki(this),this.hasSlotController=new Xt(this,"icon","end-icon","helper","input"),this.readonlyButClearable=!1}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get valueAsNumber(){return this.inputRef.value?.valueAsNumber??parseFloat(this.value)}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}get isFocusedStyle(){return this.focused||this.focusedStyle}get isTextarea(){return this.rows&&this.rows>1||this.autosize}onDisabledChange(){this.inputRef.value.disabled=this.disabled,this.invalid=!this.inputRef.value.checkValidity()}async onValueChange(){if(this.hasValue=!["",null].includes(this.value),this.hasUpdated){await this.updateComplete;const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}onRowsChange(){this.setTextareaHeight()}async onMaxRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=T(this.inputRef.value);e.css("max-height",parseFloat(e.css("line-height"))*(this.maxRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}async onMinRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=T(this.inputRef.value);e.css("min-height",parseFloat(e.css("line-height"))*(this.minRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve(),kr(this)}select(){this.inputRef.value.select()}setSelectionRange(e,t,i="none"){this.inputRef.value.setSelectionRange(e,t,i)}setRangeText(e,t,i,o="preserve"){this.inputRef.value.setRangeText(e,t,i,o),this.value!==this.inputRef.value.value&&(this.value=this.inputRef.value.value,this.setTextareaHeight(),this.emit("input"),this.emit("change"))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.setCustomValidityInternal(e),kr(this)}firstUpdated(e){super.firstUpdated(e),this.setTextareaHeight(),this.observeResize=Di(this.inputRef.value,(()=>this.setTextareaHeight()))}render(){const e=!!this.icon||this.hasSlotController.test("icon"),t=!!this.endIcon||this.hasSlotController.test("end-icon"),i=this.invalid||this.invalidStyle,o=!!this.prefix||this.hasSlotController.test("prefix"),n=!!this.suffix||this.hasSlotController.test("suffix"),r=!!this.helper||this.hasSlotController.test("helper"),s=i&&!(!this.error&&!this.inputRef.value.validationMessage),a=this.counter&&!!this.maxlength,l=this.hasSlotController.test("input"),c={invalid:this.invalid,"invalid-style":this.invalidStyle},d=Gi({container:!0,"has-value":this.hasValue,"has-icon":e,"has-end-icon":t,"has-error-icon":i,"has-prefix":o,"has-suffix":n,"is-firefox":navigator.userAgent.includes("Firefox"),...c});return mt`
${this.renderPrefix()}
${this.renderLabel()} ${this.isTextarea?this.renderTextArea(l):this.renderInput(l)} ${So(l,(()=>mt``))}
${this.renderClearButton()}${this.renderTogglePasswordButton()} ${this.renderSuffix(i)}
${So(s||r||a,(()=>mt`
${this.renderHelper(s,r)} ${this.renderCounter(a)}
`))}`}setCustomValidityInternal(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity(),this.requestUpdate()}onChange(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("change")}onClear(e){this.value="",this.emit("clear"),this.emit("input"),this.emit("change"),this.focus(),e.stopPropagation()}onInput(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("input")}onInvalid(e){e.preventDefault()}onKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||this.formController.submit()}))}onTextAreaKeyUp(){if(this.pattern){const e=new RegExp(this.pattern);this.value&&!this.value.match(e)?(this.setCustomValidityInternal(this.getPatternErrorMsg()),wr(this,(()=>{this.setCustomValidityInternal(this.getPatternErrorMsg())}))):(this.setCustomValidityInternal(""),kr(this))}}onTogglePassword(){this.isPasswordVisible=!this.isPasswordVisible}getPatternErrorMsg(){return ur("Please match the requested format.",{id:"components.textField.patternError"})}setTextareaHeight(){this.autosize?(this.inputRef.value.style.height="auto",this.inputRef.value.style.height=`${this.inputRef.value.scrollHeight}px`):this.inputRef.value.style.height=void 0}renderLabel(){return this.label?mt``:Jt}renderPrefix(){return mt`${this.icon?mt``:Jt}${this.prefix}`}renderSuffix(e){return mt`${this.suffix}${e?mt`${this.errorIcon?mt``:mt``}`:mt`${this.endIcon?mt``:Jt}`}`}renderClearButton(){return So(this.clearable&&!this.disabled&&(!this.readonly||this.readonlyButClearable)&&("number"==typeof this.value||this.value.length>0),(()=>mt`${this.clearIcon?mt``:mt``}`))}renderTogglePasswordButton(){return So("password"===this.type&&this.togglePassword&&!this.disabled,(()=>mt`${this.isPasswordVisible?mt`${this.showPasswordIcon?mt``:mt``}`:mt`${this.hidePasswordIcon?mt``:mt``}`}`))}renderInput(e){return mt``}renderTextArea(e){return mt``}renderHelper(e,t){return e?mt`
${this.error||this.inputRef.value.validationMessage}
`:t?mt`${this.helper}`:mt``}renderCounter(e){return e?mt`
${this.value.length}/${this.maxlength}
`:Jt}};Wn.styles=[Zt,jn],Re([Ot({reflect:!0})],Wn.prototype,"variant",void 0),Re([Ot({reflect:!0})],Wn.prototype,"type",void 0),Re([Ot({reflect:!0})],Wn.prototype,"name",void 0),Re([Ot()],Wn.prototype,"value",void 0),Re([ho()],Wn.prototype,"defaultValue",void 0),Re([Ot({reflect:!0})],Wn.prototype,"label",void 0),Re([Ot({reflect:!0})],Wn.prototype,"placeholder",void 0),Re([Ot({reflect:!0})],Wn.prototype,"helper",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"helper-on-focus"})],Wn.prototype,"helperOnFocus",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"clearable",void 0),Re([Ot({reflect:!0,attribute:"clear-icon"})],Wn.prototype,"clearIcon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"end-aligned"})],Wn.prototype,"endAligned",void 0),Re([Ot({reflect:!0})],Wn.prototype,"prefix",void 0),Re([Ot({reflect:!0})],Wn.prototype,"suffix",void 0),Re([Ot({reflect:!0})],Wn.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],Wn.prototype,"endIcon",void 0),Re([Ot({reflect:!0,attribute:"error-icon"})],Wn.prototype,"errorIcon",void 0),Re([Ot({reflect:!0})],Wn.prototype,"form",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"readonly",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"required",void 0),Re([Ot({type:Number,reflect:!0})],Wn.prototype,"rows",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"autosize",void 0),Re([Ot({type:Number,reflect:!0,attribute:"min-rows"})],Wn.prototype,"minRows",void 0),Re([Ot({type:Number,reflect:!0,attribute:"max-rows"})],Wn.prototype,"maxRows",void 0),Re([Ot({type:Number,reflect:!0})],Wn.prototype,"minlength",void 0),Re([Ot({type:Number,reflect:!0})],Wn.prototype,"maxlength",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"counter",void 0),Re([Ot({type:Number,reflect:!0})],Wn.prototype,"min",void 0),Re([Ot({type:Number,reflect:!0})],Wn.prototype,"max",void 0),Re([Ot({type:Number,reflect:!0})],Wn.prototype,"step",void 0),Re([Ot({reflect:!0})],Wn.prototype,"pattern",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"toggle-password"})],Wn.prototype,"togglePassword",void 0),Re([Ot({reflect:!0,attribute:"show-password-icon"})],Wn.prototype,"showPasswordIcon",void 0),Re([Ot({reflect:!0,attribute:"hide-password-icon"})],Wn.prototype,"hidePasswordIcon",void 0),Re([Ot({reflect:!0})],Wn.prototype,"autocapitalize",void 0),Re([Ot({reflect:!0})],Wn.prototype,"autocorrect",void 0),Re([Ot({reflect:!0})],Wn.prototype,"autocomplete",void 0),Re([Ot({reflect:!0})],Wn.prototype,"enterkeyhint",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Wn.prototype,"spellcheck",void 0),Re([Ot({reflect:!0})],Wn.prototype,"inputmode",void 0),Re([zt()],Wn.prototype,"invalid",void 0),Re([zt()],Wn.prototype,"invalidStyle",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"focused-style"})],Wn.prototype,"focusedStyle",void 0),Re([zt()],Wn.prototype,"isPasswordVisible",void 0),Re([zt()],Wn.prototype,"hasValue",void 0),Re([zt()],Wn.prototype,"error",void 0),Re([$i("disabled",!0)],Wn.prototype,"onDisabledChange",null),Re([$i("value")],Wn.prototype,"onValueChange",null),Re([$i("rows",!0)],Wn.prototype,"onRowsChange",null),Re([$i("maxRows")],Wn.prototype,"onMaxRowsChange",null),Re([$i("minRows")],Wn.prototype,"onMinRowsChange",null),Wn=Re([Mt("mdui-text-field")],Wn);const Yn=Pe`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;let Gn=class extends(Yi(Gt)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=zi(),this.textFieldRef=zi(),this.hiddenInputRef=zi(),this.formController=new Ki(this),this.hasSlotController=new Xt(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new xi(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&l(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const e=this.hiddenInputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.hiddenInputRef.value.setCustomValidity(e),this.invalid=!this.hiddenInputRef.value.checkValidity()}firstUpdated(e){super.firstUpdated(e),this.observeResize=Di(this.textFieldRef.value,(()=>this.resizeMenu()))}render(){const e=this.multiple?!!this.value.length:!!this.value;return mt`${this.multiple?mt``:mt``}`${e}:text-field__${e}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${e=>e.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${Cn(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(e=>this.hasSlotController.test(e)?mt``:vt))} ${So(this.multiple&&this.value.length,(()=>mt`
${Cn(this.value,(e=>mt``${e}:chip__${e}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(e)}">${this.getMenuItemLabelByValue(e)}`))}
`))}
`}getMenuItemLabelByValue(e){return this.menuItems.length&&this.menuItems.find((t=>t.value===e))?.textContent?.trim()||e}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(e){const t=e.target;this.value=this.multiple?t.value.map((e=>e??"")):t.value??"",await this.updateComplete;const i=this.formController.getForm();i&&Ui.get(i)?.has(this)?(this.invalid=!1,Ui.get(i).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(e){const t=[...this.value];t.includes(e)&&t.splice(t.indexOf(e),1),this.value=t}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(e){"Enter"===e.key&&(e.preventDefault(),this.textFieldRef.value.click())}};Gn.styles=[Zt,Yn],Re([Ot({reflect:!0})],Gn.prototype,"variant",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Gn.prototype,"multiple",void 0),Re([Ot({reflect:!0})],Gn.prototype,"name",void 0),Re([Ot()],Gn.prototype,"value",void 0),Re([ho()],Gn.prototype,"defaultValue",void 0),Re([Ot({reflect:!0})],Gn.prototype,"label",void 0),Re([Ot({reflect:!0})],Gn.prototype,"placeholder",void 0),Re([Ot({reflect:!0})],Gn.prototype,"helper",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Gn.prototype,"clearable",void 0),Re([Ot({reflect:!0,attribute:"clear-icon"})],Gn.prototype,"clearIcon",void 0),Re([Ot({reflect:!0})],Gn.prototype,"placement",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"end-aligned"})],Gn.prototype,"endAligned",void 0),Re([Ot({reflect:!0})],Gn.prototype,"prefix",void 0),Re([Ot({reflect:!0})],Gn.prototype,"suffix",void 0),Re([Ot({reflect:!0})],Gn.prototype,"icon",void 0),Re([Ot({reflect:!0,attribute:"end-icon"})],Gn.prototype,"endIcon",void 0),Re([Ot({reflect:!0,attribute:"error-icon"})],Gn.prototype,"errorIcon",void 0),Re([Ot({reflect:!0})],Gn.prototype,"form",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Gn.prototype,"readonly",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Gn.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Gn.prototype,"required",void 0),Re([zt()],Gn.prototype,"invalid",void 0),Re([Bt({flatten:!0,selector:"mdui-menu-item"})],Gn.prototype,"menuItems",void 0),Gn=Re([Mt("mdui-select")],Gn);const Xn=Pe`.track-active{left:-.125rem;border-radius:var(--mdui-shape-corner-full) 0 0 var(--mdui-shape-corner-full)}`;let Jn=class extends $n{constructor(){super(...arguments),this.value=0,this.defaultValue=0,this.rippleRef=zi(),this.handleRef=zi(),this.formController=new Ki(this)}get rippleElement(){return this.rippleRef.value}async onValueChange(){this.value=this.fixValue(this.value);const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):(await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()),this.updateStyle()}connectedCallback(){super.connectedCallback(),this.value=this.fixValue(this.value)}firstUpdated(e){super.firstUpdated(e);const t=()=>{this.disabled||(this.labelVisible=!0)},i=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",t),this.addEventListener("mousedown",t),this.addEventListener("touchend",i),this.addEventListener("mouseup",i),this.updateStyle()}render(){return mt``}updateStyle(){const e=(this.value-this.min)/(this.max-this.min)*100;this.trackActiveRef.value.style.width=`${e}%`,this.handleRef.value.style.left=`${e}%`}onInput(){this.value=parseFloat(this.inputRef.value.value),this.updateStyle()}};Jn.styles=[$n.styles,Xn],Re([Ot({type:Number})],Jn.prototype,"value",void 0),Re([ho()],Jn.prototype,"defaultValue",void 0),Re([$i("value",!0)],Jn.prototype,"onValueChange",null),Jn=Re([Mt("mdui-slider")],Jn);const Zn=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-small);--z-index:2400;position:fixed;z-index:var(--z-index);display:none;align-items:center;flex-wrap:wrap;border-radius:var(--shape-corner);min-width:20rem;max-width:36rem;padding:.25rem 0;box-shadow:var(--mdui-elevation-level3);background-color:rgb(var(--mdui-color-inverse-surface));color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([placement^=top]){transform-origin:top;top:1rem}:host([placement^=bottom]){transform-origin:bottom;bottom:1rem}:host([placement=bottom-start]),:host([placement=top-start]){left:1rem}:host([placement=bottom-end]),:host([placement=top-end]){right:1rem}.message{display:block;margin:.625rem 1rem}:host([message-line='1']) .message{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([message-line='2']) .message{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.action-group{display:flex;align-items:center;margin-left:auto;padding-right:.5rem}.action,.close-button{display:inline-flex;align-items:center;justify-content:center}.action{color:rgb(var(--mdui-color-inverse-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.action mdui-button,::slotted(mdui-button[slot=action][variant=outlined]),::slotted(mdui-button[slot=action][variant=text]){color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-primary)}.action mdui-button::part(button){padding:0 .5rem}.close-button{margin:0 -.25rem 0 .25rem;font-size:1.5rem;color:rgb(var(--mdui-color-inverse-on-surface))}.close-button mdui-button-icon,::slotted(mdui-button-icon[slot=close-button][variant=outlined]),::slotted(mdui-button-icon[slot=close-button][variant=standard]){font-size:inherit;color:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}.close-button .i,::slotted([slot=close-icon]){font-size:inherit}`;let Qn=class extends Gt{constructor(){super(),this.open=!1,this.placement="bottom",this.actionLoading=!1,this.closeable=!1,this.autoCloseDelay=5e3,this.closeOnOutsideClick=!1,this.onDocumentClick=this.onDocumentClick.bind(this)}async onOpenChange(){const e=cn().down("sm"),t=["top","bottom"].includes(this.placement),i=_o(this,"linear"),o=_o(this,"emphasized-decelerate"),n=Array.from(this.renderRoot.querySelectorAll(".message, .action-group")),r=e?{left:"1rem",right:"1rem",minWidth:0}:t?{left:"50%"}:{};if(this.open){const s=this.hasUpdated;if(s||await this.updateComplete,s&&!this.emit("open",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),this.autoCloseDelay&&(this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.autoCloseDelay)),this.style.display="flex",await Promise.all([Do(this),...n.map((e=>Do(e)))]);const a=Lo(this,"medium4"),l=i=>{const o=`scaleY(${"start"===i?0:1})`;return e?{transform:o}:{transform:[o,t?"translateX(-50%)":""].filter((e=>e)).join(" ")}};return await Promise.all([Ao(this,[{...l("start"),...r},{...l("end"),...r}],{duration:s?a:0,easing:o,fill:"forwards"}),Ao(this,[{opacity:0},{opacity:1,offset:.5},{opacity:1}],{duration:s?a:0,easing:i,fill:"forwards"}),...n.map((e=>Ao(e,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:s?a:0,easing:i})))]),void(s&&this.emit("opened"))}if(!this.open&&this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),await Promise.all([Do(this),...n.map((e=>Do(e)))]);const o=Lo(this,"short4"),s=i=>{const o={opacity:"start"===i?1:0};return!e&&t&&Object.assign(o,{transform:"translateX(-50%)"}),o};return await Promise.all([Ao(this,[{...s("start"),...r},{...s("end"),...r}],{duration:o,easing:i,fill:"forwards"}),...n.map((e=>Ao(e,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:o,easing:i})))]),this.style.display="none",void this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick)}render(){return mt`
${this.action?mt`${this.action}`:Jt}${So(this.closeable,(()=>mt`${this.closeIcon?mt``:mt``}`))}
`}onDocumentClick(e){if(!this.open||!this.closeOnOutsideClick)return;const t=e.target;this.contains(t)||this===t||(this.open=!1)}onActionClick(e){e.stopPropagation(),this.emit("action-click")}onCloseClick(){this.open=!1}};Qn.styles=[Zt,Zn],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Qn.prototype,"open",void 0),Re([Ot({reflect:!0})],Qn.prototype,"placement",void 0),Re([Ot({reflect:!0,attribute:"action"})],Qn.prototype,"action",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"action-loading"})],Qn.prototype,"actionLoading",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],Qn.prototype,"closeable",void 0),Re([Ot({reflect:!0,attribute:"close-icon"})],Qn.prototype,"closeIcon",void 0),Re([Ot({type:Number,reflect:!0,attribute:"message-line"})],Qn.prototype,"messageLine",void 0),Re([Ot({type:Number,reflect:!0,attribute:"auto-close-delay"})],Qn.prototype,"autoCloseDelay",void 0),Re([Ot({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:Ci})],Qn.prototype,"closeOnOutsideClick",void 0),Re([$i("open")],Qn.prototype,"onOpenChange",null),Qn=Re([Mt("mdui-snackbar")],Qn);const es=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);--shape-corner-thumb:var(--mdui-shape-corner-full);position:relative;display:inline-block;cursor:pointer;-webkit-tap-highlight-color:transparent;height:2.5rem}:host([disabled]){cursor:default;pointer-events:none}label{display:inline-flex;align-items:center;width:100%;height:100%;white-space:nowrap;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}.track{position:relative;display:flex;align-items:center;border-radius:var(--shape-corner);transition-property:background-color,border-width;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:2rem;width:3.25rem;border:.125rem solid rgb(var(--mdui-color-outline));background-color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]) .track{background-color:rgb(var(--mdui-color-primary));border-width:0}.invalid .track{background-color:rgb(var(--mdui-color-error-container));border-color:rgb(var(--mdui-color-error))}:host([disabled]) .track{background-color:rgba(var(--mdui-color-surface-container-highest),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled][checked]) .track{background-color:rgba(var(--mdui-color-on-surface),.12)}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}mdui-ripple{border-radius:50%;transition-property:left,top;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);width:2.5rem;height:2.5rem}.thumb{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:var(--shape-corner-thumb);transition-property:width,height,left,background-color;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:1rem;width:1rem;left:.375rem;background-color:rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.thumb mdui-ripple{left:-.75rem;top:-.75rem}.has-unchecked-icon .thumb{height:1.5rem;width:1.5rem;left:.125rem}.has-unchecked-icon .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([focus-visible]) .thumb,:host([hover]) .thumb,:host([pressed]) .thumb{background-color:rgb(var(--mdui-color-on-surface-variant))}:host([checked]) .thumb{height:1.5rem;width:1.5rem;left:1.5rem;background-color:rgb(var(--mdui-color-on-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]) .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([pressed]) .thumb{height:1.75rem;width:1.75rem;left:0}:host([pressed]) .thumb mdui-ripple{left:-.375rem;top:-.375rem}:host([pressed][checked]) .thumb{left:1.375rem}:host([focus-visible][checked]) .thumb,:host([hover][checked]) .thumb,:host([pressed][checked]) .thumb{background-color:rgb(var(--mdui-color-primary-container))}.invalid .thumb{background-color:rgb(var(--mdui-color-error));--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([focus-visible]) .invalid .thumb,:host([hover]) .invalid .thumb,:host([pressed]) .invalid .thumb{background-color:rgb(var(--mdui-color-error))}:host([disabled]) .thumb{background-color:rgba(var(--mdui-color-on-surface),.38)}:host([disabled][checked]) .thumb{background-color:rgb(var(--mdui-color-surface))}.checked-icon,.unchecked-icon{display:flex;position:absolute;transition-property:opacity,transform;font-size:1rem}.unchecked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]) .unchecked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([disabled]) .unchecked-icon{color:rgba(var(--mdui-color-surface-container-highest),.38)}.checked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-on-primary-container))}:host([checked]) .checked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3)}.invalid .checked-icon{color:rgb(var(--mdui-color-error-container))}:host([disabled]) .checked-icon{color:rgba(var(--mdui-color-on-surface),.38)}.checked-icon .i,.unchecked-icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){font-size:inherit;color:inherit}`;let ts=class extends(eo(Yi(Gt))){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.rippleRef=zi(),this.inputRef=zi(),this.formController=new Ki(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new Xt(this,"unchecked-icon")}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&Ui.get(e)?.has(this)?(this.invalid=!1,Ui.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return mt``}onChange(){this.checked=this.inputRef.value.checked,this.emit("change")}};ts.styles=[Zt,es],Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ts.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ts.prototype,"checked",void 0),Re([ho("checked")],ts.prototype,"defaultChecked",void 0),Re([Ot({reflect:!0,attribute:"unchecked-icon"})],ts.prototype,"uncheckedIcon",void 0),Re([Ot({reflect:!0,attribute:"checked-icon"})],ts.prototype,"checkedIcon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ts.prototype,"required",void 0),Re([Ot({reflect:!0})],ts.prototype,"form",void 0),Re([Ot({reflect:!0})],ts.prototype,"name",void 0),Re([Ot({reflect:!0})],ts.prototype,"value",void 0),Re([zt()],ts.prototype,"invalid",void 0),Re([$i("disabled",!0),$i("required",!0)],ts.prototype,"onDisabledChange",null),Re([$i("checked",!0)],ts.prototype,"onCheckedChange",null),ts=Re([Mt("mdui-switch")],ts);const is=Pe`:host{position:relative;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.container{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:100%}.preset{flex-direction:column;min-height:3rem;padding:.625rem 1rem}:host([inline]) .preset{flex-direction:row}.icon-container,.label-container{position:relative;display:flex;align-items:center;justify-content:center}.icon-container ::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.icon-container ::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.label-container ::slotted([slot=badge]){position:absolute;left:100%;bottom:100%;transform:translate(-.75rem,.625rem)}.label-container ::slotted([slot=badge][variant=small]){transform:translate(-.375rem,.375rem)}.icon,.label{display:flex;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .icon,:host([focused]) .label,:host([hover]) .icon,:host([hover]) .label,:host([pressed]) .icon,:host([pressed]) .label{color:rgb(var(--mdui-color-on-surface))}:host([active]) .icon,:host([active]) .label{color:rgb(var(--mdui-color-primary))}:host([active]) .variant-secondary .icon,:host([active]) .variant-secondary .label{color:rgb(var(--mdui-color-on-surface))}.icon{font-size:1.5rem}.label{font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit;color:inherit}`;let os=class extends(eo(Yi(Gt))){constructor(){super(...arguments),this.inline=!1,this.active=!1,this.variant="primary",this.key=Ii(),this.rippleRef=zi(),this.hasSlotController=new Xt(this,"icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return!1}get focusElement(){return this}get focusDisabled(){return!1}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.hasSlotController.test("custom"),i=()=>mt``;return mt`
${So(e||this.icon,i)}${this.icon?mt``:Jt}
${So(!e,i)}
`}};os.styles=[Zt,is],Re([Ot({reflect:!0})],os.prototype,"value",void 0),Re([Ot({reflect:!0})],os.prototype,"icon",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],os.prototype,"inline",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],os.prototype,"active",void 0),Re([zt()],os.prototype,"variant",void 0),os=Re([Mt("mdui-tab")],os);const rs=Pe`:host{display:block;overflow-y:auto;flex:1 1 auto}:host(:not([active])){display:none}`;let ns=class extends Gt{constructor(){super(...arguments),this.active=!1}render(){return mt``}};ns.styles=[Zt,rs],Re([Ot({reflect:!0})],ns.prototype,"value",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ns.prototype,"active",void 0),ns=Re([Mt("mdui-tab-panel")],ns);const ss=Pe`:host{position:relative;display:flex}:host([placement^=top]){flex-direction:column}:host([placement^=bottom]){flex-direction:column-reverse}:host([placement^=left]){flex-direction:row}:host([placement^=right]){flex-direction:row-reverse}.container{position:relative;display:flex;flex:0 0 auto;overflow-x:auto;background-color:rgb(var(--mdui-color-surface))}:host([placement^=bottom]) .container,:host([placement^=top]) .container{flex-direction:row}:host([placement^=left]) .container,:host([placement^=right]) .container{flex-direction:column}:host([placement$='-start']) .container{justify-content:flex-start}:host([placement=bottom]) .container,:host([placement=left]) .container,:host([placement=right]) .container,:host([placement=top]) .container{justify-content:center}:host([placement$='-end']) .container{justify-content:flex-end}.container::after{content:' ';position:absolute;background-color:rgb(var(--mdui-color-surface-variant))}:host([placement^=bottom]) .container::after,:host([placement^=top]) .container::after{left:0;width:100%;height:.0625rem}:host([placement^=top]) .container::after{bottom:0}:host([placement^=bottom]) .container::after{top:0}:host([placement^=left]) .container::after,:host([placement^=right]) .container::after{top:0;height:100%;width:.0625rem}:host([placement^=left]) .container::after{right:0}:host([placement^=right]) .container::after{left:0}.indicator{position:absolute;z-index:1;background-color:rgb(var(--mdui-color-primary))}.container:not(.initial) .indicator{transition-duration:var(--mdui-motion-duration-medium2);transition-timing-function:var(--mdui-motion-easing-standard-decelerate)}:host([placement^=bottom]) .indicator,:host([placement^=top]) .indicator{transition-property:transform,left,width}:host([placement^=left]) .indicator,:host([placement^=right]) .indicator{transition-property:transform,top,height}:host([placement^=top]) .indicator{bottom:0}:host([placement^=bottom]) .indicator{top:0}:host([placement^=left]) .indicator{right:0}:host([placement^=right]) .indicator{left:0}:host([placement^=bottom][variant=primary]) .indicator,:host([placement^=top][variant=primary]) .indicator{height:.1875rem}:host([placement^=bottom][variant=secondary]) .indicator,:host([placement^=top][variant=secondary]) .indicator{height:.125rem}:host([placement^=left][variant=primary]) .indicator,:host([placement^=right][variant=primary]) .indicator{width:.1875rem}:host([placement^=left][variant=secondary]) .indicator,:host([placement^=right][variant=secondary]) .indicator{width:.125rem}:host([placement^=top][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-top-right-radius:.1875rem}:host([placement^=bottom][variant=primary]) .indicator{border-bottom-right-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=left][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=right][variant=primary]) .indicator{border-top-right-radius:.1875rem;border-bottom-right-radius:.1875rem}:host([full-width]) ::slotted(mdui-tab){flex:1}`;let as=class extends Gt{constructor(){super(...arguments),this.variant="primary",this.placement="top-start",this.fullWidth=!1,this.activeKey=0,this.isInitial=!0,this.containerRef=zi(),this.indicatorRef=zi(),this.definedController=new xi(this,{relatedElements:["mdui-tab","mdui-tab-panel"]})}async onActiveKeyChange(){await this.definedController.whenDefined(),this.value=this.tabs.find((e=>e.key===this.activeKey))?.value,this.updateActive(),this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.tabs.find((e=>e.value===this.value));this.activeKey=e?.key??0}async onIndicatorChange(){await this.updateComplete,this.updateIndicator()}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.observeResize=Di(this.containerRef.value,(()=>this.updateIndicator()))}render(){return mt`
`}async onSlotChange(){await this.definedController.whenDefined(),this.updateActive()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const t=e.target.closest("mdui-tab");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateActive())}updateActive(){this.activeTab=this.tabs.map((e=>(e.active=this.activeKey===e.key,e))).find((e=>e.active)),this.panels.forEach((e=>e.active=e.value===this.activeTab?.value)),this.updateIndicator()}updateIndicator(){const e=this.activeTab,t=T(this.indicatorRef.value),i=this.placement.startsWith("left")||this.placement.startsWith("right");if(!e)return void t.css({transform:i?"scaleY(0)":"scaleX(0)"});const o=T(e),n=e.offsetTop,r=e.offsetLeft,s=i?{transform:"scaleY(1)",width:"",left:""}:{transform:"scaleX(1)",height:"",top:""};let a={};if("primary"===this.variant){const t=o.find(':scope > [slot="custom"]'),s=t.length?t.get():T(e.renderRoot).find('slot[name="custom"]').children().get();if(i){const e=Math.min(...s.map((e=>e.offsetTop)))+n;a={top:e,height:Math.max(...s.map((e=>e.offsetTop+e.offsetHeight)))+n-e}}else{const e=Math.min(...s.map((e=>e.offsetLeft)))+r;a={left:e,width:Math.max(...s.map((e=>e.offsetLeft+e.offsetWidth)))+r-e}}}"secondary"===this.variant&&(a=i?{top:n,height:e.offsetHeight}:{left:r,width:e.offsetWidth}),t.css({...s,...a})}};as.styles=[Zt,ss],Re([Ot({reflect:!0})],as.prototype,"variant",void 0),Re([Ot({reflect:!0})],as.prototype,"value",void 0),Re([Ot({reflect:!0})],as.prototype,"placement",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci,attribute:"full-width"})],as.prototype,"fullWidth",void 0),Re([zt()],as.prototype,"activeKey",void 0),Re([zt()],as.prototype,"isInitial",void 0),Re([Bt({selector:"mdui-tab",flatten:!0})],as.prototype,"tabs",void 0),Re([Bt({selector:"mdui-tab-panel",slot:"panel",flatten:!0})],as.prototype,"panels",void 0),Re([$i("activeKey",!0)],as.prototype,"onActiveKeyChange",null),Re([$i("value")],as.prototype,"onValueChange",null),Re([$i("variant",!0),$i("placement",!0),$i("fullWidth",!0)],as.prototype,"onIndicatorChange",null),as=Re([Mt("mdui-tabs")],as);class ls{constructor(e,t){this.isHover=!1,this.uniqueID=Ii(),this.enterEventName=`mouseenter.${this.uniqueID}.hoverController`,this.leaveEventName=`mouseleave.${this.uniqueID}.hoverController`,this.mouseEnterItems=[],this.mouseLeaveItems=[],(this.host=e).addController(this),this.elementRef=t}hostConnected(){this.host.updateComplete.then((()=>{T(this.elementRef.value).on(this.enterEventName,(()=>{this.isHover=!0;for(let e=this.mouseEnterItems.length-1;e>=0;e--){const t=this.mouseEnterItems[e];t.callback(),t.one&&this.mouseEnterItems.splice(e,1)}})).on(this.leaveEventName,(()=>{this.isHover=!1;for(let e=this.mouseLeaveItems.length-1;e>=0;e--){const t=this.mouseLeaveItems[e];t.callback(),t.one&&this.mouseLeaveItems.splice(e,1)}}))}))}hostDisconnected(){T(this.elementRef.value).off(this.enterEventName).off(this.leaveEventName)}onMouseEnter(e,t=!1){this.mouseEnterItems.push({callback:e,one:t})}onMouseLeave(e,t=!1){this.mouseLeaveItems.push({callback:e,one:t})}}const cs=Pe`:host{--shape-corner-plain:var(--mdui-shape-corner-extra-small);--shape-corner-rich:var(--mdui-shape-corner-medium);--z-index:2500;display:contents}.popup{position:fixed;display:flex;flex-direction:column;z-index:var(--z-index);border-radius:var(--shape-corner-plain);background-color:rgb(var(--mdui-color-inverse-surface));padding:0 .5rem;min-width:1.75rem;max-width:20rem}:host([variant=rich]) .popup{border-radius:var(--shape-corner-rich);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);padding:.75rem 1rem .5rem 1rem}.headline{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.content{display:flex;padding:.25rem 0;color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([variant=rich]) .content{color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}.action{display:flex;justify-content:flex-start;padding-top:.5rem}.action ::slotted(:not(:last-child)){margin-right:.5rem}`;let ds=class extends Gt{constructor(){super(),this.variant="plain",this.placement="auto",this.openDelay=150,this.closeDelay=150,this.trigger="hover focus",this.disabled=!1,this.open=!1,this.popupRef=zi(),this.hasSlotController=new Xt(this,"headline","action"),this.hoverController=new ls(this,this.popupRef),this.definedController=new xi(this,{needDomReady:!0}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get target(){return[...this.children].find((e=>"style"!==e.tagName.toLowerCase()&&"content"!==e.getAttribute("slot")))}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated,t=Lo(this,"short4"),i=_o(this,"standard");if(this.open){if(await this.definedController.whenDefined(),T(`mdui-tooltip[variant="${this.variant}"]`).filter(((e,t)=>t!==this)).prop("open",!1),e||await this.updateComplete,e&&!this.emit("open",{cancelable:!0}))return;return await Do(this.popupRef.value),this.popupRef.value.hidden=!1,this.updatePositioner(),await Ao(this.popupRef.value,[{transform:"scale(0)"},{transform:"scale(1)"}],{duration:e?t:0,easing:i}),void(e&&this.emit("opened"))}if(!this.open&&e){if(!this.emit("close",{cancelable:!0}))return;await Do(this.popupRef.value),await Ao(this.popupRef.value,[{transform:"scale(1)"},{transform:"scale(0)"}],{duration:t,easing:i}),this.popupRef.value.hidden=!0,this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors=Mr(this.target),this.overflowAncestors.forEach((e=>{e.addEventListener("scroll",this.onWindowScroll)}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors?.forEach((e=>{e.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{const e=this.target;e.addEventListener("focus",this.onFocus),e.addEventListener("blur",this.onBlur),e.addEventListener("pointerdown",this.onClick),e.addEventListener("keydown",this.onKeydown),e.addEventListener("mouseenter",this.onMouseEnter),e.addEventListener("mouseleave",this.onMouseLeave),this.observeResize=Di(e,(()=>{this.updatePositioner()}))}))}render(){const e=this.isRich()&&(this.headline||this.hasSlotController.test("headline")),t=this.isRich()&&this.hasSlotController.test("action");return mt``}isRich(){return"rich"===this.variant}requestClose(){this.hoverController.isHover?this.hoverController.onMouseLeave((()=>{this.hasTrigger("hover")?this.hoverTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50):this.open=!1}),!0):this.open=!1}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onBlur(){!this.disabled&&this.open&&this.hasTrigger("focus")&&this.requestClose()}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.open=!this.open)}onKeydown(e){!this.disabled&&this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose())}onMouseEnter(){this.disabled||this.open||!this.hasTrigger("hover")||(this.openDelay?(window.clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay)):this.open=!0)}onMouseLeave(){window.clearTimeout(this.hoverTimeout),!this.disabled&&this.open&&this.hasTrigger("hover")&&(this.hoverTimeout=window.setTimeout((()=>{this.requestClose()}),this.closeDelay||50))}onDocumentClick(e){!this.disabled&&this.open&&(e.composedPath().includes(this)||this.requestClose())}onWindowScroll(){window.requestAnimationFrame((()=>this.updatePositioner()))}updatePositioner(){const e=T(this.popupRef.value),t=this.isRich()?0:4,i=this.target.getBoundingClientRect(),o=i.top,n=i.left,r=i.height,s=i.width,a=this.popupRef.value.offsetHeight,l=this.popupRef.value.offsetWidth,c=l+t+4,d=a+t+4;let h,u,p,m,f=this.placement;if("auto"===f){const e=T(window),t=o>d,i=e.height()-o-r>d,a=n>c,l=e.width()-n-s>c;this.isRich()?(f="bottom-right",i&&l?f="bottom-right":i&&a?f="bottom-left":t&&l?f="top-right":t&&a?f="top-left":i?f="bottom":t?f="top":l?f="right":a&&(f="left")):(f="top",t?f="top":i?f="bottom":a?f="left":l&&(f="right"))}const[v,g]=f.split("-");switch(v){case"top":u="bottom",p=o-a-t;break;case"bottom":u="top",p=o+r+t;break;default:switch(u="center",g){case"start":p=o;break;case"end":p=o+r-a;break;default:p=o+r/2-a/2}}switch(v){case"left":h="right",m=n-l-t;break;case"right":h="left",m=n+s+t;break;default:switch(h="center",g){case"start":m=n;break;case"end":m=n+s-l;break;case"left":h="right",m=n-l-t;break;case"right":h="left",m=n+s+t;break;default:m=n+s/2-l/2}}e.css({top:p,left:m,transformOrigin:[h,u].join(" ")})}};ds.styles=[Zt,cs],Re([Ot({reflect:!0})],ds.prototype,"variant",void 0),Re([Ot({reflect:!0})],ds.prototype,"placement",void 0),Re([Ot({type:Number,reflect:!0,attribute:"open-delay"})],ds.prototype,"openDelay",void 0),Re([Ot({type:Number,reflect:!0,attribute:"close-delay"})],ds.prototype,"closeDelay",void 0),Re([Ot({reflect:!0})],ds.prototype,"headline",void 0),Re([Ot({reflect:!0})],ds.prototype,"content",void 0),Re([Ot({reflect:!0})],ds.prototype,"trigger",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ds.prototype,"disabled",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ds.prototype,"open",void 0),Re([$i("placement",!0),$i("content",!0)],ds.prototype,"onPositionChange",null),Re([$i("open")],ds.prototype,"onOpenChange",null),ds=Re([Mt("mdui-tooltip")],ds);const hs=Pe`:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;let us=class extends Gt{constructor(){super(...arguments),this.variant="small",this.shrink=!1,this.hasSlotController=new Xt(this,"label-large"),this.labelLargeRef=zi(),this.defaultSlotRef=zi()}render(){const e=this.hasSlotController.test("label-large"),t=Gi({shrink:this.shrink,"variant-center-aligned":"center-aligned"===this.variant,"variant-small":"small"===this.variant,"variant-medium":"medium"===this.variant,"variant-large":"large"===this.variant});return mt`${e?mt``:mt`
`}`}onSlotChange(e){e||(this.labelLargeRef.value.innerHTML=(e=>{const t=this.defaultSlotRef.value.assignedNodes({flatten:!0});let i="";return[...t].forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(i+=e.outerHTML),e.nodeType===Node.TEXT_NODE&&(i+=e.textContent)})),i})())}};us.styles=[Zt,hs],Re([zt()],us.prototype,"variant",void 0),Re([zt()],us.prototype,"shrink",void 0),us=Re([Mt("mdui-top-app-bar-title")],us);const ps=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]){top:-7.625rem}:host([hide][variant=large]){top:-10.125rem}:host([shrink][variant=large]),:host([shrink][variant=medium]){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;let ms=class extends(Ei(_i)){constructor(){super(...arguments),this.variant="small",this.hide=!1,this.shrink=!1,this.scrolling=!1}get scrollPaddingPosition(){return"top"}get layoutPlacement(){return"top"}async onVariantChange(){this.hasUpdated?this.addEventListener("transitionend",(async()=>{await this.scrollBehaviorDefinedController.whenDefined(),this.updateContainerPadding()}),{once:!0}):await this.updateComplete,this.titleElements.forEach((e=>{e.variant=this.variant}))}async onShrinkChange(){this.hasUpdated||await this.updateComplete,this.titleElements.forEach((e=>{e.shrink=this.shrink}))}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return mt``}runScrollNoThreshold(e,t){this.hasScrollBehavior("shrink")&&e&&t<8&&(this.shrink=!1)}runScrollThreshold(e,t){this.hasScrollBehavior("elevate")&&(this.scrolling=!!t),this.hasScrollBehavior("shrink")&&(e||(this.shrink=!0)),this.hasScrollBehavior("hide")&&(e||this.hide||this.emit("hide",{cancelable:!0})&&(this.hide=!0),e&&this.hide&&this.emit("show",{cancelable:!0})&&(this.hide=!1))}};function fs(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}ms.styles=[Zt,ps],Re([Ot({reflect:!0})],ms.prototype,"variant",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ms.prototype,"hide",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ms.prototype,"shrink",void 0),Re([Ot({reflect:!0,attribute:"scroll-behavior"})],ms.prototype,"scrollBehavior",void 0),Re([Ot({type:Boolean,reflect:!0,converter:Ci})],ms.prototype,"scrolling",void 0),Re([Bt({selector:"mdui-top-app-bar-title",flatten:!0})],ms.prototype,"titleElements",void 0),Re([$i("variant")],ms.prototype,"onVariantChange",null),Re([$i("shrink")],ms.prototype,"onShrinkChange",null),ms=Re([Mt("mdui-top-app-bar")],ms);const vs={};function gs(e,t){if(h(vs[e])&&(vs[e]=[]),h(t))return vs[e];vs[e].push(t)}function bs(e){h(vs[e])||vs[e].length&&vs[e].shift()()}const ys={onClick:C},ws="mdui.functions.dialog.";let ks;const Cs=e=>{const t=new xr,i=T(t),o=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions"],n=["onOpen","onOpened","onClose","onClosed","onOverlayClick"];return Object.entries(e).forEach((([e,r])=>{if(o.includes(e))t[e]=r;else if(n.includes(e)){const o=w(e.slice(2));i.on(o,(()=>{r.call(t,t)}))}})),e.body&&i.append(e.body),e.actions&&e.actions.forEach((e=>{const o=Object.assign({},ys,e);T(`${o.text}`).appendTo(i).on("click",(function(){const e=o.onClick.call(t,t);fs(e)?(this.loading=!0,e.then((()=>{t.open=!1})).finally((()=>{this.loading=!1}))):!1!==e&&(t.open=!1)}))})),i.appendTo("body").on("closed",(()=>{i.remove(),e.queue&&(ks=void 0,bs(ws+e.queue))})),e.queue?ks?gs(ws+e.queue,(()=>{t.open=!0,ks=t})):(setTimeout((()=>{t.open=!0})),ks=t):setTimeout((()=>{t.open=!0})),t},xs=()=>ur("OK",{id:"functions.alert.confirmText"}),$s=e=>{const t=Object.assign({},{confirmText:xs(),onConfirm:C},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((o,n)=>{let r=!1;const s=Cs({...Object.fromEntries(i.filter((e=>!h(t[e]))).map((e=>[e,t[e]]))),actions:[{text:t.confirmText,onClick:e=>{const i=t.onConfirm.call(e,e);return fs(i)?i.then((()=>{r=!0})):!1!==i&&(r=!0),i}}]});e.confirmText||wr(s,(()=>{T(s).find('[slot="action"]').text(xs())})),T(s).on("close",(()=>{r?o():n(),kr(s)}))}))},Es=()=>ur("OK",{id:"functions.confirm.confirmText"}),Rs=()=>ur("Cancel",{id:"functions.confirm.cancelText"}),Is=e=>{const t=Object.assign({},{confirmText:Es(),cancelText:Rs(),onConfirm:C,onCancel:C},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((o,n)=>{let r=!1;const s=Cs({...Object.fromEntries(i.filter((e=>!h(t[e]))).map((e=>[e,t[e]]))),actions:[{text:t.cancelText,onClick:e=>t.onCancel.call(e,e)},{text:t.confirmText,onClick:e=>{const i=t.onConfirm.call(e,e);return fs(i)?i.then((()=>{r=!0})):!1!==i&&(r=!0),i}}]});e.confirmText||wr(s,(()=>{T(s).find('[slot="action"]').last().text(Es())})),e.cancelText||wr(s,(()=>{T(s).find('[slot="action"]').first().text(Rs())})),T(s).on("close",(()=>{r?o():n(),kr(s)}))}))};function Ss(e){return e<0?-1:0===e?0:1}function As(e,t,i){return(1-i)*e+i*t}function Ds(e,t,i){return it?t:i}function Ts(e){return(e%=360)<0&&(e+=360),e}function Ps(e){return(e%=360)<0&&(e+=360),e}function Ms(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function _s(e,t){return[e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2]]}const Ls=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],Os=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],zs=[95.047,100,108.883];function Bs(e,t,i){return(255<<24|(255&e)<<16|(255&t)<<8|255&i)>>>0}function Vs(e){return Bs(Ys(e[0]),Ys(e[1]),Ys(e[2]))}function Ns(e){return e>>16&255}function Fs(e){return e>>8&255}function Hs(e){return 255&e}function Us(e,t,i){const o=Os,n=o[0][0]*e+o[0][1]*t+o[0][2]*i,r=o[1][0]*e+o[1][1]*t+o[1][2]*i,s=o[2][0]*e+o[2][1]*t+o[2][2]*i;return Bs(Ys(n),Ys(r),Ys(s))}function Ks(e){const t=function(e){return _s([Ws(Ns(e)),Ws(Fs(e)),Ws(Hs(e))],Ls)}(e)[1];return 116*Gs(t/100)-16}function qs(e){return 100*Xs((e+16)/116)}function js(e){return 116*Gs(e/100)-16}function Ws(e){const t=e/255;return t<=.040449936?t/12.92*100:100*Math.pow((t+.055)/1.055,2.4)}function Ys(e){const t=e/100;let i=0;return i=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,0,255,(o=Math.round(255*i))<0?0:o>255?255:o;var o}function Gs(e){return e>216/24389?Math.pow(e,1/3):(24389/27*e+16)/116}function Xs(e){const t=e*e*e;return t>216/24389?t:(116*e-16)/(24389/27)}class Js{static make(e=function(){return zs}(),t=200/Math.PI*qs(50)/100,i=50,o=2,n=!1){const r=e,s=.401288*r[0]+.650173*r[1]+-.051461*r[2],a=-.250268*r[0]+1.204414*r[1]+.045854*r[2],l=-.002079*r[0]+.048952*r[1]+.953127*r[2],c=.8+o/10,d=c>=.9?As(.59,.69,10*(c-.9)):As(.525,.59,10*(c-.8));let h=n?1:c*(1-1/3.6*Math.exp((-t-42)/92));h=h>1?1:h<0?0:h;const u=c,p=[h*(100/s)+1-h,h*(100/a)+1-h,h*(100/l)+1-h],m=1/(5*t+1),f=m*m*m*m,v=1-f,g=f*t+.1*v*v*Math.cbrt(5*t),b=qs(i)/e[1],y=1.48+Math.sqrt(b),w=.725/Math.pow(b,.2),k=w,C=[Math.pow(g*p[0]*s/100,.42),Math.pow(g*p[1]*a/100,.42),Math.pow(g*p[2]*l/100,.42)],R=[400*C[0]/(C[0]+27.13),400*C[1]/(C[1]+27.13),400*C[2]/(C[2]+27.13)];return new Js(b,(2*R[0]+R[1]+.05*R[2])*w,w,k,d,u,p,g,Math.pow(g,.25),y)}constructor(e,t,i,o,n,r,s,a,l,c){this.n=e,this.aw=t,this.nbb=i,this.ncb=o,this.c=n,this.nc=r,this.rgbD=s,this.fl=a,this.fLRoot=l,this.z=c}}Js.DEFAULT=Js.make();class Zs{constructor(e,t,i,o,n,r,s,a,l){this.hue=e,this.chroma=t,this.j=i,this.q=o,this.m=n,this.s=r,this.jstar=s,this.astar=a,this.bstar=l}distance(e){const t=this.jstar-e.jstar,i=this.astar-e.astar,o=this.bstar-e.bstar,n=Math.sqrt(t*t+i*i+o*o);return 1.41*Math.pow(n,.63)}static fromInt(e){return Zs.fromIntInViewingConditions(e,Js.DEFAULT)}static fromIntInViewingConditions(e,t){const i=(65280&e)>>8,o=255&e,n=Ws((16711680&e)>>16),r=Ws(i),s=Ws(o),a=.41233895*n+.35762064*r+.18051042*s,l=.2126*n+.7152*r+.0722*s,c=.01932141*n+.11916382*r+.95034478*s,d=.401288*a+.650173*l-.051461*c,h=-.250268*a+1.204414*l+.045854*c,u=-.002079*a+.048952*l+.953127*c,p=t.rgbD[0]*d,m=t.rgbD[1]*h,f=t.rgbD[2]*u,v=Math.pow(t.fl*Math.abs(p)/100,.42),g=Math.pow(t.fl*Math.abs(m)/100,.42),b=Math.pow(t.fl*Math.abs(f)/100,.42),y=400*Ss(p)*v/(v+27.13),w=400*Ss(m)*g/(g+27.13),k=400*Ss(f)*b/(b+27.13),C=(11*y+-12*w+k)/11,R=(y+w-2*k)/9,x=(20*y+20*w+21*k)/20,$=(40*y+20*w+k)/20,T=180*Math.atan2(R,C)/Math.PI,O=T<0?T+360:T>=360?T-360:T,E=O*Math.PI/180,I=$*t.nbb,S=100*Math.pow(I/t.aw,t.c*t.z),A=4/t.c*Math.sqrt(S/100)*(t.aw+4)*t.fLRoot,M=O<20.14?O+360:O,P=5e4/13*(.25*(Math.cos(M*Math.PI/180+2)+3.8))*t.nc*t.ncb*Math.sqrt(C*C+R*R)/(x+.305),D=Math.pow(P,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),L=D*Math.sqrt(S/100),_=L*t.fLRoot,z=50*Math.sqrt(D*t.c/(t.aw+4)),B=(1+100*.007)*S/(1+.007*S),V=1/.0228*Math.log(1+.0228*_),N=V*Math.cos(E),F=V*Math.sin(E);return new Zs(O,L,S,A,_,z,B,N,F)}static fromJch(e,t,i){return Zs.fromJchInViewingConditions(e,t,i,Js.DEFAULT)}static fromJchInViewingConditions(e,t,i,o){const n=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,r=t*o.fLRoot,s=t/Math.sqrt(e/100),a=50*Math.sqrt(s*o.c/(o.aw+4)),l=i*Math.PI/180,c=(1+100*.007)*e/(1+.007*e),d=1/.0228*Math.log(1+.0228*r),h=d*Math.cos(l),u=d*Math.sin(l);return new Zs(i,t,e,n,r,a,c,h,u)}static fromUcs(e,t,i){return Zs.fromUcsInViewingConditions(e,t,i,Js.DEFAULT)}static fromUcsInViewingConditions(e,t,i,o){const n=t,r=i,s=Math.sqrt(n*n+r*r),a=(Math.exp(.0228*s)-1)/.0228/o.fLRoot;let l=Math.atan2(r,n)*(180/Math.PI);l<0&&(l+=360);const c=e/(1-.007*(e-100));return Zs.fromJchInViewingConditions(c,a,l,o)}toInt(){return this.viewed(Js.DEFAULT)}viewed(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),i=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,n=.25*(Math.cos(o+2)+3.8),r=e.aw*Math.pow(this.j/100,1/e.c/e.z),s=n*(5e4/13)*e.nc*e.ncb,a=r/e.nbb,l=Math.sin(o),c=Math.cos(o),d=23*(a+.305)*i/(23*s+11*i*c+108*i*l),h=d*c,u=d*l,p=(460*a+451*h+288*u)/1403,m=(460*a-891*h-261*u)/1403,f=(460*a-220*h-6300*u)/1403,v=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Ss(p)*(100/e.fl)*Math.pow(v,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Ss(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),k=Ss(f)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],R=y/e.rgbD[1],x=k/e.rgbD[2];return Us(1.86206786*C-1.01125463*R+.14918677*x,.38752654*C+.62144744*R-.00897398*x,-.0158415*C-.03412294*R+1.04996444*x)}static fromXyzInViewingConditions(e,t,i,o){const n=.401288*e+.650173*t-.051461*i,r=-.250268*e+1.204414*t+.045854*i,s=-.002079*e+.048952*t+.953127*i,a=o.rgbD[0]*n,l=o.rgbD[1]*r,c=o.rgbD[2]*s,d=Math.pow(o.fl*Math.abs(a)/100,.42),h=Math.pow(o.fl*Math.abs(l)/100,.42),u=Math.pow(o.fl*Math.abs(c)/100,.42),p=400*Ss(a)*d/(d+27.13),m=400*Ss(l)*h/(h+27.13),f=400*Ss(c)*u/(u+27.13),v=(11*p+-12*m+f)/11,g=(p+m-2*f)/9,b=(20*p+20*m+21*f)/20,y=(40*p+20*m+f)/20,w=180*Math.atan2(g,v)/Math.PI,k=w<0?w+360:w>=360?w-360:w,C=k*Math.PI/180,R=y*o.nbb,x=100*Math.pow(R/o.aw,o.c*o.z),$=4/o.c*Math.sqrt(x/100)*(o.aw+4)*o.fLRoot,T=k<20.14?k+360:k,O=5e4/13*(1/4*(Math.cos(T*Math.PI/180+2)+3.8))*o.nc*o.ncb*Math.sqrt(v*v+g*g)/(b+.305),E=Math.pow(O,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),I=E*Math.sqrt(x/100),S=I*o.fLRoot,A=50*Math.sqrt(E*o.c/(o.aw+4)),M=(1+100*.007)*x/(1+.007*x),P=Math.log(1+.0228*S)/.0228,D=P*Math.cos(C),L=P*Math.sin(C);return new Zs(k,I,x,$,S,A,M,D,L)}xyzInViewingConditions(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),i=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,n=.25*(Math.cos(o+2)+3.8),r=e.aw*Math.pow(this.j/100,1/e.c/e.z),s=n*(5e4/13)*e.nc*e.ncb,a=r/e.nbb,l=Math.sin(o),c=Math.cos(o),d=23*(a+.305)*i/(23*s+11*i*c+108*i*l),h=d*c,u=d*l,p=(460*a+451*h+288*u)/1403,m=(460*a-891*h-261*u)/1403,f=(460*a-220*h-6300*u)/1403,v=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Ss(p)*(100/e.fl)*Math.pow(v,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Ss(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),k=Ss(f)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],R=y/e.rgbD[1],x=k/e.rgbD[2];return[1.86206786*C-1.01125463*R+.14918677*x,.38752654*C+.62144744*R-.00897398*x,-.0158415*C-.03412294*R+1.04996444*x]}}class Qs{static sanitizeRadians(e){return(e+8*Math.PI)%(2*Math.PI)}static trueDelinearized(e){const t=e/100;let i=0;return i=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,255*i}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return 400*Ss(e)*t/(t+27.13)}static hueOf(e){const t=_s(e,Qs.SCALED_DISCOUNT_FROM_LINRGB),i=Qs.chromaticAdaptation(t[0]),o=Qs.chromaticAdaptation(t[1]),n=Qs.chromaticAdaptation(t[2]),r=(11*i+-12*o+n)/11,s=(i+o-2*n)/9;return Math.atan2(s,r)}static areInCyclicOrder(e,t,i){return Qs.sanitizeRadians(t-e)100.01||y[1]>100.01||y[2]>100.01?0:Vs(y);o-=(R-i)*o/(2*R)}return 0}static solveToInt(e,t,i){if(t<1e-4||i<1e-4||i>99.9999)return function(e){const t=Ys(qs(e));return Bs(t,t,t)}(i);const o=(e=Ps(e))/180*Math.PI,n=qs(i),r=Qs.findResultByJ(o,t,n);return 0!==r?r:Vs(Qs.bisectToLimit(n,o))}static solveToCam(e,t,i){return Zs.fromInt(Qs.solveToInt(e,t,i))}}Qs.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],Qs.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],Qs.Y_FROM_LINRGB=[.2126,.7152,.0722],Qs.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];class ea{static from(e,t,i){return new ea(Qs.solveToInt(e,t,i))}static fromInt(e){return new ea(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(Qs.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(Qs.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(Qs.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const t=Zs.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Ks(e),this.argb=e}setInternalState(e){const t=Zs.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Ks(e),this.argb=e}inViewingConditions(e){const t=Zs.fromInt(this.toInt()).xyzInViewingConditions(e),i=Zs.fromXyzInViewingConditions(t[0],t[1],t[2],Js.make());return ea.from(i.hue,i.chroma,js(t[1]))}}class ta{static harmonize(e,t){const i=ea.fromInt(e),o=ea.fromInt(t),n=Ms(i.hue,o.hue),r=Math.min(.5*n,15),s=Ps(i.hue+r*(a=i.hue,Ps(o.hue-a)<=180?1:-1));var a;return ea.from(s,i.chroma,i.tone).toInt()}static hctHue(e,t,i){const o=ta.cam16Ucs(e,t,i),n=Zs.fromInt(o),r=Zs.fromInt(e);return ea.from(n.hue,r.chroma,Ks(e)).toInt()}static cam16Ucs(e,t,i){const o=Zs.fromInt(e),n=Zs.fromInt(t),r=o.jstar,s=o.astar,a=o.bstar,l=r+(n.jstar-r)*i,c=s+(n.astar-s)*i,d=a+(n.bstar-a)*i;return Zs.fromUcs(l,c,d).toInt()}}class ia{static ratioOfTones(e,t){return e=Ds(0,100,e),t=Ds(0,100,t),ia.ratioOfYs(qs(e),qs(t))}static ratioOfYs(e,t){const i=e>t?e:t;return(i+5)/((i===t?e:t)+5)}static lighter(e,t){if(e<0||e>100)return-1;const i=qs(e),o=t*(i+5)-5,n=ia.ratioOfYs(o,i),r=Math.abs(n-t);if(n.04)return-1;const s=js(o)+.4;return s<0||s>100?-1:s}static darker(e,t){if(e<0||e>100)return-1;const i=qs(e),o=(i+5)/t-5,n=ia.ratioOfYs(i,o),r=Math.abs(n-t);if(n.04)return-1;const s=js(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(e,t){const i=ia.lighter(e,t);return i<0?100:i}static darkerUnsafe(e,t){const i=ia.darker(e,t);return i<0?0:i}}class oa{static isDisliked(e){const t=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,i=Math.round(e.chroma)>16,o=Math.round(e.tone)<65;return t&&i&&o}static fixIfDisliked(e){return oa.isDisliked(e)?ea.from(e.hue,e.chroma,70):e}}class ra{static fromPalette(e){return new ra(e.name??"",e.palette,e.tone,e.isBackground??!1,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}constructor(e,t,i,o,n,r,s,a){if(this.name=e,this.palette=t,this.tone=i,this.isBackground=o,this.background=n,this.secondBackground=r,this.contrastCurve=s,this.toneDeltaPair=a,this.hctCache=new Map,!n&&r)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!n&&s)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(n&&!s)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){const t=this.hctCache.get(e);if(null!=t)return t;const i=this.getTone(e),o=this.palette(e).getHct(i);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,o),o}getTone(e){const t=e.contrastLevel<0;if(this.toneDeltaPair){const i=this.toneDeltaPair(e),o=i.roleA,n=i.roleB,r=i.delta,s=i.polarity,a=i.stayTogether,l=this.background(e).getTone(e),c="nearer"===s||"lighter"===s&&!e.isDark||"darker"===s&&e.isDark,d=c?o:n,h=c?n:o,u=this.name===d.name,p=e.isDark?1:-1,m=d.contrastCurve.get(e.contrastLevel),f=h.contrastCurve.get(e.contrastLevel),v=d.tone(e);let g=ia.ratioOfTones(l,v)>=m?v:ra.foregroundTone(l,m);const b=h.tone(e);let y=ia.ratioOfTones(l,b)>=f?b:ra.foregroundTone(l,f);return t&&(g=ra.foregroundTone(l,m),y=ra.foregroundTone(l,f)),(y-g)*p>=r||(y=Ds(0,100,g+r*p),(y-g)*p>=r||(g=Ds(0,100,y-r*p))),50<=g&&g<60?p>0?(g=60,y=Math.max(y,g+r*p)):(g=49,y=Math.min(y,g+r*p)):50<=y&&y<60&&(a?p>0?(g=60,y=Math.max(y,g+r*p)):(g=49,y=Math.min(y,g+r*p)):y=p>0?60:49),u?g:y}{let i=this.tone(e);if(null==this.background)return i;const o=this.background(e).getTone(e),n=this.contrastCurve.get(e.contrastLevel);if(ia.ratioOfTones(o,i)>=n||(i=ra.foregroundTone(o,n)),t&&(i=ra.foregroundTone(o,n)),this.isBackground&&50<=i&&i<60&&(i=ia.ratioOfTones(49,o)>=n?49:60),this.secondBackground){const[t,o]=[this.background,this.secondBackground],[r,s]=[t(e).getTone(e),o(e).getTone(e)],[a,l]=[Math.max(r,s),Math.min(r,s)];if(ia.ratioOfTones(a,i)>=n&&ia.ratioOfTones(l,i)>=n)return i;const c=ia.lighter(a,n),d=ia.darker(l,n),h=[];return-1!==c&&h.push(c),-1!==d&&h.push(d),ra.tonePrefersLightForeground(r)||ra.tonePrefersLightForeground(s)?c<0?100:c:1===h.length?h[0]:d<0?0:d}return i}}static foregroundTone(e,t){const i=ia.lighterUnsafe(e,t),o=ia.darkerUnsafe(e,t),n=ia.ratioOfTones(i,e),r=ia.ratioOfTones(o,e);if(ra.tonePrefersLightForeground(e)){const e=Math.abs(n-r)<.1&&n=t||n>=r||e?i:o}return r>=t||r>=n?o:i}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return ra.tonePrefersLightForeground(e)&&!ra.toneAllowsLightForeground(e)?49:e}}class na{static fromInt(e){const t=ea.fromInt(e);return na.fromHct(t)}static fromHct(e){return new na(e.hue,e.chroma,e)}static fromHueAndChroma(e,t){const i=new sa(e,t).create();return new na(e,t,i)}constructor(e,t,i){this.hue=e,this.chroma=t,this.keyColor=i,this.cache=new Map}tone(e){let t=this.cache.get(e);return void 0===t&&(t=ea.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}getHct(e){return ea.fromInt(this.tone(e))}}class sa{constructor(e,t){this.hue=e,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,t=100;for(;e=this.requestedChroma-.01)if(Math.abs(e-50)e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),ua.secondaryPaletteKeyColor=ra.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),ua.tertiaryPaletteKeyColor=ra.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),ua.neutralPaletteKeyColor=ra.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),ua.neutralVariantPaletteKeyColor=ra.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),ua.background=ra.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),ua.onBackground=ra.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>ua.background,contrastCurve:new aa(3,3,4.5,7)}),ua.surface=ra.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),ua.surfaceDim=ra.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new aa(87,87,80,75).get(e.contrastLevel),isBackground:!0}),ua.surfaceBright=ra.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new aa(24,24,29,34).get(e.contrastLevel):98,isBackground:!0}),ua.surfaceContainerLowest=ra.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new aa(4,4,2,0).get(e.contrastLevel):100,isBackground:!0}),ua.surfaceContainerLow=ra.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new aa(10,10,11,12).get(e.contrastLevel):new aa(96,96,96,95).get(e.contrastLevel),isBackground:!0}),ua.surfaceContainer=ra.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new aa(12,12,16,20).get(e.contrastLevel):new aa(94,94,92,90).get(e.contrastLevel),isBackground:!0}),ua.surfaceContainerHigh=ra.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new aa(17,17,21,25).get(e.contrastLevel):new aa(92,92,88,85).get(e.contrastLevel),isBackground:!0}),ua.surfaceContainerHighest=ra.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new aa(22,22,26,30).get(e.contrastLevel):new aa(90,90,84,80).get(e.contrastLevel),isBackground:!0}),ua.onSurface=ra.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>ua.highestSurface(e),contrastCurve:new aa(4.5,7,11,21)}),ua.surfaceVariant=ra.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),ua.onSurfaceVariant=ra.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>ua.highestSurface(e),contrastCurve:new aa(3,4.5,7,11)}),ua.inverseSurface=ra.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),ua.inverseOnSurface=ra.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>ua.inverseSurface,contrastCurve:new aa(4.5,7,11,21)}),ua.outline=ra.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>ua.highestSurface(e),contrastCurve:new aa(1.5,3,4.5,7)}),ua.outlineVariant=ra.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5)}),ua.shadow=ra.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0}),ua.scrim=ra.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0}),ua.surfaceTint=ra.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),ua.primary=ra.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>ha(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(3,4.5,7,7),toneDeltaPair:e=>new la(ua.primaryContainer,ua.primary,10,"nearer",!1)}),ua.onPrimary=ra.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>ha(e)?e.isDark?10:90:e.isDark?20:100,background:e=>ua.primary,contrastCurve:new aa(4.5,7,11,21)}),ua.primaryContainer=ra.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>da(e)?e.sourceColorHct.tone:ha(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.primaryContainer,ua.primary,10,"nearer",!1)}),ua.onPrimaryContainer=ra.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>da(e)?ra.foregroundTone(ua.primaryContainer.tone(e),4.5):ha(e)?e.isDark?0:100:e.isDark?90:30,background:e=>ua.primaryContainer,contrastCurve:new aa(3,4.5,7,11)}),ua.inversePrimary=ra.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>ua.inverseSurface,contrastCurve:new aa(3,4.5,7,7)}),ua.secondary=ra.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(3,4.5,7,7),toneDeltaPair:e=>new la(ua.secondaryContainer,ua.secondary,10,"nearer",!1)}),ua.onSecondary=ra.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>ha(e)?e.isDark?10:100:e.isDark?20:100,background:e=>ua.secondary,contrastCurve:new aa(4.5,7,11,21)}),ua.secondaryContainer=ra.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;return ha(e)?e.isDark?30:85:da(e)?function(e,t,i,o){let n=i,r=ea.from(e,t,i);if(r.chromas.chroma)break;if(Math.abs(s.chroma-t)<.4)break;Math.abs(s.chroma-t)ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.secondaryContainer,ua.secondary,10,"nearer",!1)}),ua.onSecondaryContainer=ra.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>ha(e)?e.isDark?90:10:da(e)?ra.foregroundTone(ua.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>ua.secondaryContainer,contrastCurve:new aa(3,4.5,7,11)}),ua.tertiary=ra.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(3,4.5,7,7),toneDeltaPair:e=>new la(ua.tertiaryContainer,ua.tertiary,10,"nearer",!1)}),ua.onTertiary=ra.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?e.isDark?10:90:e.isDark?20:100,background:e=>ua.tertiary,contrastCurve:new aa(4.5,7,11,21)}),ua.tertiaryContainer=ra.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(ha(e))return e.isDark?60:49;if(!da(e))return e.isDark?30:90;const t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return oa.fixIfDisliked(t).tone},isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.tertiaryContainer,ua.tertiary,10,"nearer",!1)}),ua.onTertiaryContainer=ra.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?e.isDark?0:100:da(e)?ra.foregroundTone(ua.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>ua.tertiaryContainer,contrastCurve:new aa(3,4.5,7,11)}),ua.error=ra.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(3,4.5,7,7),toneDeltaPair:e=>new la(ua.errorContainer,ua.error,10,"nearer",!1)}),ua.onError=ra.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>ua.error,contrastCurve:new aa(4.5,7,11,21)}),ua.errorContainer=ra.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.errorContainer,ua.error,10,"nearer",!1)}),ua.onErrorContainer=ra.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>ha(e)?e.isDark?90:10:e.isDark?90:30,background:e=>ua.errorContainer,contrastCurve:new aa(3,4.5,7,11)}),ua.primaryFixed=ra.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>ha(e)?40:90,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.primaryFixed,ua.primaryFixedDim,10,"lighter",!0)}),ua.primaryFixedDim=ra.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>ha(e)?30:80,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.primaryFixed,ua.primaryFixedDim,10,"lighter",!0)}),ua.onPrimaryFixed=ra.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>ha(e)?100:10,background:e=>ua.primaryFixedDim,secondBackground:e=>ua.primaryFixed,contrastCurve:new aa(4.5,7,11,21)}),ua.onPrimaryFixedVariant=ra.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>ha(e)?90:30,background:e=>ua.primaryFixedDim,secondBackground:e=>ua.primaryFixed,contrastCurve:new aa(3,4.5,7,11)}),ua.secondaryFixed=ra.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>ha(e)?80:90,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.secondaryFixed,ua.secondaryFixedDim,10,"lighter",!0)}),ua.secondaryFixedDim=ra.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>ha(e)?70:80,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.secondaryFixed,ua.secondaryFixedDim,10,"lighter",!0)}),ua.onSecondaryFixed=ra.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>ua.secondaryFixedDim,secondBackground:e=>ua.secondaryFixed,contrastCurve:new aa(4.5,7,11,21)}),ua.onSecondaryFixedVariant=ra.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>ha(e)?25:30,background:e=>ua.secondaryFixedDim,secondBackground:e=>ua.secondaryFixed,contrastCurve:new aa(3,4.5,7,11)}),ua.tertiaryFixed=ra.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?40:90,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.tertiaryFixed,ua.tertiaryFixedDim,10,"lighter",!0)}),ua.tertiaryFixedDim=ra.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?30:80,isBackground:!0,background:e=>ua.highestSurface(e),contrastCurve:new aa(1,1,3,4.5),toneDeltaPair:e=>new la(ua.tertiaryFixed,ua.tertiaryFixedDim,10,"lighter",!0)}),ua.onTertiaryFixed=ra.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?100:10,background:e=>ua.tertiaryFixedDim,secondBackground:e=>ua.tertiaryFixed,contrastCurve:new aa(4.5,7,11,21)}),ua.onTertiaryFixedVariant=ra.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>ha(e)?90:30,background:e=>ua.tertiaryFixedDim,secondBackground:e=>ua.tertiaryFixed,contrastCurve:new aa(3,4.5,7,11)});class pa{static of(e){return new pa(e,!1)}static contentOf(e){return new pa(e,!0)}static fromColors(e){return pa.createPaletteFromColors(!1,e)}static contentFromColors(e){return pa.createPaletteFromColors(!0,e)}static createPaletteFromColors(e,t){const i=new pa(t.primary,e);if(t.secondary){const o=new pa(t.secondary,e);i.a2=o.a1}if(t.tertiary){const o=new pa(t.tertiary,e);i.a3=o.a1}if(t.error){const o=new pa(t.error,e);i.error=o.a1}if(t.neutral){const o=new pa(t.neutral,e);i.n1=o.n1}if(t.neutralVariant){const o=new pa(t.neutralVariant,e);i.n2=o.n2}return i}constructor(e,t){const i=ea.fromInt(e),o=i.hue,n=i.chroma;t?(this.a1=na.fromHueAndChroma(o,n),this.a2=na.fromHueAndChroma(o,n/3),this.a3=na.fromHueAndChroma(o+60,n/2),this.n1=na.fromHueAndChroma(o,Math.min(n/12,4)),this.n2=na.fromHueAndChroma(o,Math.min(n/6,8))):(this.a1=na.fromHueAndChroma(o,Math.max(48,n)),this.a2=na.fromHueAndChroma(o,16),this.a3=na.fromHueAndChroma(o+60,24),this.n1=na.fromHueAndChroma(o,4),this.n2=na.fromHueAndChroma(o,8)),this.error=na.fromHueAndChroma(25,84)}}class ma{fromInt(e){return function(e){const t=Ws(Ns(e)),i=Ws(Fs(e)),o=Ws(Hs(e)),n=Ls,r=n[0][0]*t+n[0][1]*i+n[0][2]*o,s=n[1][0]*t+n[1][1]*i+n[1][2]*o,a=n[2][0]*t+n[2][1]*i+n[2][2]*o,l=s/zs[1],c=a/zs[2],d=Gs(r/zs[0]),h=Gs(l);return[116*h-16,500*(d-h),200*(h-Gs(c))]}(e)}toInt(e){return function(e,t,i){const o=zs,n=(e+16)/116,r=n-i/200,s=Xs(t/500+n),a=Xs(n),l=Xs(r);return Us(s*o[0],a*o[1],l*o[2])}(e[0],e[1],e[2])}distance(e,t){const i=e[0]-t[0],o=e[1]-t[1],n=e[2]-t[2];return i*i+o*o+n*n}}class fa{static quantize(e,t,i){const o=new Map,n=new Array,r=new Array,s=new ma;let a=0;for(let t=0;t0&&(c=Math.min(c,t.length));const d=new Array;for(let e=0;e0)for(let e=0;e=4*a)continue;const t=s.distance(i,d[e]);t3&&(t++,u[e]=h)}if(0===t&&0!==e)break;const i=new Array(c).fill(0),o=new Array(c).fill(0),r=new Array(c).fill(0);for(let e=0;e>24&255)<255||t.set(o,(t.get(o)??0)+1)}return t}}const ba=33,ya=35937,wa="red",ka="green",Ca="blue";class xa{constructor(e=[],t=[],i=[],o=[],n=[],r=[]){this.weights=e,this.momentsR=t,this.momentsG=i,this.momentsB=o,this.moments=n,this.cubes=r}quantize(e,t){this.constructHistogram(e),this.computeMoments();const i=this.createBoxes(t);return this.createResult(i.resultCount)}constructHistogram(e){this.weights=Array.from({length:ya}).fill(0),this.momentsR=Array.from({length:ya}).fill(0),this.momentsG=Array.from({length:ya}).fill(0),this.momentsB=Array.from({length:ya}).fill(0),this.moments=Array.from({length:ya}).fill(0);const t=ga.quantize(e);for(const[e,i]of t.entries()){const t=Ns(e),o=Fs(e),n=Hs(e),r=3,s=1+(t>>r),a=1+(o>>r),l=1+(n>>r),c=this.getIndex(s,a,l);this.weights[c]=(this.weights[c]??0)+i,this.momentsR[c]+=i*t,this.momentsG[c]+=i*o,this.momentsB[c]+=i*n,this.moments[c]+=i*(t*t+o*o+n*n)}}computeMoments(){for(let e=1;e<33;e++){const t=Array.from({length:33}).fill(0),i=Array.from({length:33}).fill(0),o=Array.from({length:33}).fill(0),n=Array.from({length:33}).fill(0),r=Array.from({length:33}).fill(0);for(let s=1;s<33;s++){let a=0,l=0,c=0,d=0,h=0;for(let u=1;u<33;u++){const p=this.getIndex(e,s,u);a+=this.weights[p],l+=this.momentsR[p],c+=this.momentsG[p],d+=this.momentsB[p],h+=this.moments[p],t[u]+=a,i[u]+=l,o[u]+=c,n[u]+=d,r[u]+=h;const m=this.getIndex(e-1,s,u);this.weights[p]=this.weights[m]+t[u],this.momentsR[p]=this.momentsR[m]+i[u],this.momentsG[p]=this.momentsG[m]+o[u],this.momentsB[p]=this.momentsB[m]+n[u],this.moments[p]=this.moments[m]+r[u]}}}}createBoxes(e){this.cubes=Array.from({length:e}).fill(0).map((()=>new $a));const t=Array.from({length:e}).fill(0);this.cubes[0].r0=0,this.cubes[0].g0=0,this.cubes[0].b0=0,this.cubes[0].r1=32,this.cubes[0].g1=32,this.cubes[0].b1=32;let i=e,o=0;for(let n=1;n1?this.variance(this.cubes[o]):0,t[n]=this.cubes[n].vol>1?this.variance(this.cubes[n]):0):(t[o]=0,n--),o=0;let e=t[0];for(let i=1;i<=n;i++)t[i]>e&&(e=t[i],o=i);if(e<=0){i=n+1;break}}return new Ea(e,i)}createResult(e){const t=[];for(let i=0;i0){const i=255<<24|(255&Math.round(this.volume(e,this.momentsR)/o))<<16|(255&Math.round(this.volume(e,this.momentsG)/o))<<8|255&Math.round(this.volume(e,this.momentsB)/o);t.push(i)}}return t}variance(e){const t=this.volume(e,this.momentsR),i=this.volume(e,this.momentsG),o=this.volume(e,this.momentsB);return this.moments[this.getIndex(e.r1,e.g1,e.b1)]-this.moments[this.getIndex(e.r1,e.g1,e.b0)]-this.moments[this.getIndex(e.r1,e.g0,e.b1)]+this.moments[this.getIndex(e.r1,e.g0,e.b0)]-this.moments[this.getIndex(e.r0,e.g1,e.b1)]+this.moments[this.getIndex(e.r0,e.g1,e.b0)]+this.moments[this.getIndex(e.r0,e.g0,e.b1)]-this.moments[this.getIndex(e.r0,e.g0,e.b0)]-(t*t+i*i+o*o)/this.volume(e,this.weights)}cut(e,t){const i=this.volume(e,this.momentsR),o=this.volume(e,this.momentsG),n=this.volume(e,this.momentsB),r=this.volume(e,this.weights),s=this.maximize(e,wa,e.r0+1,e.r1,i,o,n,r),a=this.maximize(e,ka,e.g0+1,e.g1,i,o,n,r),l=this.maximize(e,Ca,e.b0+1,e.b1,i,o,n,r);let c;const d=s.maximum,h=a.maximum,u=l.maximum;if(d>=h&&d>=u){if(s.cutLocation<0)return!1;c=wa}else c=h>=d&&h>=u?ka:Ca;switch(t.r1=e.r1,t.g1=e.g1,t.b1=e.b1,c){case wa:e.r1=s.cutLocation,t.r0=e.r1,t.g0=e.g0,t.b0=e.b0;break;case ka:e.g1=a.cutLocation,t.r0=e.r0,t.g0=e.g1,t.b0=e.b0;break;case Ca:e.b1=l.cutLocation,t.r0=e.r0,t.g0=e.g0,t.b0=e.b1;break;default:throw new Error("unexpected direction "+c)}return e.vol=(e.r1-e.r0)*(e.g1-e.g0)*(e.b1-e.b0),t.vol=(t.r1-t.r0)*(t.g1-t.g0)*(t.b1-t.b0),!0}maximize(e,t,i,o,n,r,s,a){const l=this.bottom(e,t,this.momentsR),c=this.bottom(e,t,this.momentsG),d=this.bottom(e,t,this.momentsB),h=this.bottom(e,t,this.weights);let u=0,p=-1,m=0,f=0,v=0,g=0;for(let b=i;bu&&(u=y,p=b))}return new Ra(p,u)}volume(e,t){return t[this.getIndex(e.r1,e.g1,e.b1)]-t[this.getIndex(e.r1,e.g1,e.b0)]-t[this.getIndex(e.r1,e.g0,e.b1)]+t[this.getIndex(e.r1,e.g0,e.b0)]-t[this.getIndex(e.r0,e.g1,e.b1)]+t[this.getIndex(e.r0,e.g1,e.b0)]+t[this.getIndex(e.r0,e.g0,e.b1)]-t[this.getIndex(e.r0,e.g0,e.b0)]}bottom(e,t,i){switch(t){case wa:return-i[this.getIndex(e.r0,e.g1,e.b1)]+i[this.getIndex(e.r0,e.g1,e.b0)]+i[this.getIndex(e.r0,e.g0,e.b1)]-i[this.getIndex(e.r0,e.g0,e.b0)];case ka:return-i[this.getIndex(e.r1,e.g0,e.b1)]+i[this.getIndex(e.r1,e.g0,e.b0)]+i[this.getIndex(e.r0,e.g0,e.b1)]-i[this.getIndex(e.r0,e.g0,e.b0)];case Ca:return-i[this.getIndex(e.r1,e.g1,e.b0)]+i[this.getIndex(e.r1,e.g0,e.b0)]+i[this.getIndex(e.r0,e.g1,e.b0)]-i[this.getIndex(e.r0,e.g0,e.b0)];default:throw new Error("unexpected direction $direction")}}top(e,t,i,o){switch(t){case wa:return o[this.getIndex(i,e.g1,e.b1)]-o[this.getIndex(i,e.g1,e.b0)]-o[this.getIndex(i,e.g0,e.b1)]+o[this.getIndex(i,e.g0,e.b0)];case ka:return o[this.getIndex(e.r1,i,e.b1)]-o[this.getIndex(e.r1,i,e.b0)]-o[this.getIndex(e.r0,i,e.b1)]+o[this.getIndex(e.r0,i,e.b0)];case Ca:return o[this.getIndex(e.r1,e.g1,i)]-o[this.getIndex(e.r1,e.g0,i)]-o[this.getIndex(e.r0,e.g1,i)]+o[this.getIndex(e.r0,e.g0,i)];default:throw new Error("unexpected direction $direction")}}getIndex(e,t,i){return(e<<10)+(e<<6)+e+(t<<5)+t+i}}class $a{constructor(e=0,t=0,i=0,o=0,n=0,r=0,s=0){this.r0=e,this.r1=t,this.g0=i,this.g1=o,this.b0=n,this.b1=r,this.vol=s}}class Ea{constructor(e,t){this.requestedCount=e,this.resultCount=t}}class Ra{constructor(e,t){this.cutLocation=e,this.maximum=t}}class Ia{static quantize(e,t){const i=(new xa).quantize(e,t);return fa.quantize(e,i,t)}}class Sa{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(e){return Sa.lightFromCorePalette(pa.of(e))}static dark(e){return Sa.darkFromCorePalette(pa.of(e))}static lightContent(e){return Sa.lightFromCorePalette(pa.contentOf(e))}static darkContent(e){return Sa.darkFromCorePalette(pa.contentOf(e))}static lightFromCorePalette(e){return new Sa({primary:e.a1.tone(40),onPrimary:e.a1.tone(100),primaryContainer:e.a1.tone(90),onPrimaryContainer:e.a1.tone(10),secondary:e.a2.tone(40),onSecondary:e.a2.tone(100),secondaryContainer:e.a2.tone(90),onSecondaryContainer:e.a2.tone(10),tertiary:e.a3.tone(40),onTertiary:e.a3.tone(100),tertiaryContainer:e.a3.tone(90),onTertiaryContainer:e.a3.tone(10),error:e.error.tone(40),onError:e.error.tone(100),errorContainer:e.error.tone(90),onErrorContainer:e.error.tone(10),background:e.n1.tone(99),onBackground:e.n1.tone(10),surface:e.n1.tone(99),onSurface:e.n1.tone(10),surfaceVariant:e.n2.tone(90),onSurfaceVariant:e.n2.tone(30),outline:e.n2.tone(50),outlineVariant:e.n2.tone(80),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(20),inverseOnSurface:e.n1.tone(95),inversePrimary:e.a1.tone(80)})}static darkFromCorePalette(e){return new Sa({primary:e.a1.tone(80),onPrimary:e.a1.tone(20),primaryContainer:e.a1.tone(30),onPrimaryContainer:e.a1.tone(90),secondary:e.a2.tone(80),onSecondary:e.a2.tone(20),secondaryContainer:e.a2.tone(30),onSecondaryContainer:e.a2.tone(90),tertiary:e.a3.tone(80),onTertiary:e.a3.tone(20),tertiaryContainer:e.a3.tone(30),onTertiaryContainer:e.a3.tone(90),error:e.error.tone(80),onError:e.error.tone(20),errorContainer:e.error.tone(30),onErrorContainer:e.error.tone(80),background:e.n1.tone(10),onBackground:e.n1.tone(90),surface:e.n1.tone(10),onSurface:e.n1.tone(90),surfaceVariant:e.n2.tone(30),onSurfaceVariant:e.n2.tone(80),outline:e.n2.tone(60),outlineVariant:e.n2.tone(30),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(90),inverseOnSurface:e.n1.tone(20),inversePrimary:e.a1.tone(40)})}constructor(e){this.props=e}toJSON(){return{...this.props}}}const Aa={desired:4,fallbackColorARGB:4282549748,filter:!0};function Da(e,t){return e.score>t.score?-1:e.score=15;e--){d.length=0;for(const{hct:t}of c)if(d.find((i=>Ms(t.hue,i.hue)=i)break;if(d.length>=i)break}const h=[];0===d.length&&h.push(o);for(const e of d)h.push(e.toInt());return h}}function Pa(e){const t=3===(e=e.replace("#","")).length,i=6===e.length,o=8===e.length;if(!t&&!i&&!o)throw new Error("unexpected hex "+e);let n=0,r=0,s=0;return t?(n=Ma(e.slice(0,1).repeat(2)),r=Ma(e.slice(1,2).repeat(2)),s=Ma(e.slice(2,3).repeat(2))):i?(n=Ma(e.slice(0,2)),r=Ma(e.slice(2,4)),s=Ma(e.slice(4,6))):o&&(n=Ma(e.slice(2,4)),r=Ma(e.slice(4,6)),s=Ma(e.slice(6,8))),(255<<24|(255&n)<<16|(255&r)<<8|255&s)>>>0}function Ma(e){return parseInt(e,16)}Ta.TARGET_CHROMA=48,Ta.WEIGHT_PROPORTION=.7,Ta.WEIGHT_CHROMA_ABOVE=.3,Ta.WEIGHT_CHROMA_BELOW=.1,Ta.CUTOFF_CHROMA=5,Ta.CUTOFF_EXCITED_PROPORTION=.01;const _a=async e=>{const t=T(e),i=await async function(e){const t=await new Promise(((t,i)=>{const o=document.createElement("canvas"),n=o.getContext("2d");if(!n)return void i(new Error("Could not get canvas context"));const r=()=>{o.width=e.width,o.height=e.height,n.drawImage(e,0,0);let i=[0,0,e.width,e.height];const r=e.dataset.area;r&&/^\d+(\s*,\s*\d+){3}$/.test(r)&&(i=r.split(/\s*,\s*/).map((e=>parseInt(e,10))));const[s,a,l,c]=i;t(n.getImageData(s,a,l,c).data)};e.complete?r():(e.onload=r,e.onerror=()=>{i(new Error("Image load failed"))})})),i=[];for(let e=0;e{if(!vr)throw new Error(fr);return vr()},Oa=(e=document.documentElement)=>{const t=T(e)[0],i=["light","dark","auto"];return Array.from(t.classList).find((e=>i.map((e=>"mdui-theme-"+e)).includes(e)))?.slice(11)??"light"},za=e=>{(e=>{const t=n(),i=cr({sourceLocale:"en-us",targetLocales:mr,loadLocale:e});vr=i.getLocale,gr=i.setLocale,t.addEventListener(Ko,(e=>{t.dispatchEvent(new CustomEvent("mdui-localize-status",{detail:e.detail}))}))})(e)},Ba=()=>ur("OK",{id:"functions.prompt.confirmText"}),Va=()=>ur("Cancel",{id:"functions.prompt.cancelText"}),Na=e=>{const t=Object.assign({},{confirmText:Ba(),cancelText:Va(),onConfirm:C,onCancel:C,validator:C,textFieldOptions:{}},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"],o=new Wn;return Object.entries(t.textFieldOptions).forEach((([e,t])=>{o[e]=t})),new Promise(((n,r)=>{let s=!1;const a=Cs({...Object.fromEntries(i.filter((e=>!h(t[e]))).map((e=>[e,t[e]]))),body:o,actions:[{text:t.cancelText,onClick:e=>t.onCancel.call(e,o.value,e)},{text:t.confirmText,onClick:e=>{if(o.setCustomValidity(""),!o.reportValidity())return!1;const i=t.validator.call(o,o.value);return d(i)&&!i?(o.setCustomValidity(" "),!1):l(i)?(o.setCustomValidity(i),!1):fs(i)?new Promise(((e,t)=>{i.then(e).catch((e=>{o.setCustomValidity(e),t(e)}))})):(()=>{const i=t.onConfirm.call(e,o.value,e);return fs(i)?i.then((()=>{s=!0})):!1!==i&&(s=!0),i})()}}]});e.confirmText||wr(a,(()=>{T(a).find('[slot="action"]').last().text(Ba())})),e.cancelText||wr(a,(()=>{T(a).find('[slot="action"]').first().text(Va())})),T(a).on("close",(()=>{s?n(o.value):r(),kr(a)}))}))},Fa=["light","dark"],Ha="mdui-custom-color-scheme-";let Ua=0;const Ka=e=>{const t=T(e);let i=t.get().map((e=>Array.from(e.classList))).flat();i=M(i).filter((e=>e.startsWith(Ha))),t.removeClass(i.join(" "));const o=i.filter((e=>0===T(`.${e}`).length));T(o.map((e=>`#${e}`)).join(",")).remove()},qa=(e,t)=>{const i=o(),n=T(t?.target||i.documentElement),r={light:Sa.light(e).toJSON(),dark:Sa.dark(e).toJSON()},s=pa.of(e);Object.assign(r.light,{"surface-dim":s.n1.tone(87),"surface-bright":s.n1.tone(98),"surface-container-lowest":s.n1.tone(100),"surface-container-low":s.n1.tone(96),"surface-container":s.n1.tone(94),"surface-container-high":s.n1.tone(92),"surface-container-highest":s.n1.tone(90),"surface-tint-color":r.light.primary}),Object.assign(r.dark,{"surface-dim":s.n1.tone(6),"surface-bright":s.n1.tone(24),"surface-container-lowest":s.n1.tone(4),"surface-container-low":s.n1.tone(10),"surface-container":s.n1.tone(12),"surface-container-high":s.n1.tone(17),"surface-container-highest":s.n1.tone(22),"surface-tint-color":r.dark.primary}),(t?.customColors||[]).map((t=>{const i=w(t.name),o=function(e,t){let i=t.value;const o=i,n=e;t.blend&&(i=ta.harmonize(o,n));const r=pa.of(i).a1;return{color:t,value:i,light:{color:r.tone(40),onColor:r.tone(100),colorContainer:r.tone(90),onColorContainer:r.tone(10)},dark:{color:r.tone(80),onColor:r.tone(20),colorContainer:r.tone(30),onColorContainer:r.tone(90)}}}(e,{name:i,value:Pa(t.value),blend:!0});Fa.forEach((e=>{r[e][i]=o[e].color,r[e][`on-${i}`]=o[e].onColor,r[e][`${i}-container`]=o[e].colorContainer,r[e][`on-${i}-container`]=o[e].onColorContainer}))}));const a=(e,t)=>Object.entries(r[e]).map((([e,i])=>t(w(e),(e=>[Ns(e),Fs(e),Hs(e)].join(", "))(i)))).join(""),l=Ha+`${e}-${Ua++}`,c=`.${l} {\n ${a("light",((e,t)=>`--mdui-color-${e}-light: ${t};`))}\n ${a("dark",((e,t)=>`--mdui-color-${e}-dark: ${t};`))}\n ${a("light",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-light);`))}\n\n color: rgb(var(--mdui-color-on-background));\n background-color: rgb(var(--mdui-color-background));\n}\n\n.mdui-theme-dark .${l},\n.mdui-theme-dark.${l} {\n ${a("dark",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-dark);`))}\n}\n\n@media (prefers-color-scheme: dark) {\n .mdui-theme-auto .${l},\n .mdui-theme-auto.${l} {\n ${a("dark",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-dark);`))}\n }\n}`;Ka(n),T(i.head).append(``),n.addClass(l)},ja=(e=document.documentElement)=>{Ka(e)},Wa=(e,t)=>{const i=Pa(e);qa(i,t)},Ya=e=>{if(!gr)throw new Error(fr);return gr(e)},Ga=(e,t=document.documentElement)=>{const i=T(t),o="mdui-theme-";i.removeClass(["light","dark","auto"].map((e=>o+e)).join(" ")).addClass(o+e)},Xa="mdui.functions.snackbar.";let Ja;const Za=e=>{const t=new Qn,i=T(t);return Object.entries(e).forEach((([o,n])=>{if("message"===o)t.innerHTML=n;else if(["onClick","onActionClick","onOpen","onOpened","onClose","onClosed"].includes(o)){const r=w(o.slice(2));i.on(r,(()=>{if("onActionClick"===o){const i=(e.onActionClick??C).call(t,t);fs(i)?(t.actionLoading=!0,i.then((()=>{t.open=!1})).finally((()=>{t.actionLoading=!1}))):!1!==i&&(t.open=!1)}else n.call(t,t)}))}else t[o]=n})),i.appendTo("body").on("closed",(()=>{i.remove(),e.queue&&(Ja=void 0,bs(Xa+e.queue))})),e.queue?Ja?gs(Xa+e.queue,(()=>{t.open=!0,Ja=t})):(setTimeout((()=>{t.open=!0})),Ja=t):setTimeout((()=>{t.open=!0})),t},Qa=(e,t=0)=>{const i=n();let o,r;return function(...n){return void 0===o&&(o=i.setTimeout((()=>{r=e.apply(this,n),o=void 0}),t)),r}};export{T as $,yi as Avatar,ki as Badge,Oi as BottomAppBar,ro as Button,so as ButtonIcon,lo as Card,bo as Checkbox,Co as Chip,Ji as CircularProgress,Eo as Collapse,Io as CollapseItem,xr as Dialog,Er as Divider,Lr as Dropdown,Br as Fab,gi as Icon,Nr as Layout,Hr as LayoutItem,Kr as LayoutMain,jr as LinearProgress,Zr as List,Yr as ListItem,Xr as ListSubheader,rn as Menu,tn as MenuItem,ln as NavigationBar,sn as NavigationBarItem,hn as NavigationDrawer,pn as NavigationRail,fn as NavigationRailItem,yn as Radio,kn as RadioGroup,En as RangeSlider,Qi as Ripple,In as SegmentedButton,An as SegmentedButtonGroup,Gn as Select,Jn as Slider,Qn as Snackbar,ts as Switch,os as Tab,ns as TabPanel,as as Tabs,Wn as TextField,ds as Tooltip,ms as TopAppBar,us as TopAppBarTitle,$s as alert,cn as breakpoint,Is as confirm,Cs as dialog,_a as getColorFromImage,La as getLocale,Oa as getTheme,za as loadLocale,Di as observeResize,Na as prompt,ja as removeColorScheme,Wa as setColorScheme,Ya as setLocale,Ga as setTheme,Za as snackbar,Qa as throttle}; \ No newline at end of file diff --git a/mdui/mdui.global.js b/mdui/mdui.global.js new file mode 100644 index 0000000..a158ab2 --- /dev/null +++ b/mdui/mdui.global.js @@ -0,0 +1,17 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).mdui={})}(this,(function(e){"use strict";function t(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e={},o={}){Object.keys(o).forEach((r=>{void 0===e[r]?e[r]=o[r]:t(o[r])&&t(e[r])&&Object.keys(o[r]).length>0&&i(e[r],o[r])}))}const o={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){const e="undefined"!=typeof document?document:{};return i(e,o),e}const n={document:o,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function s(){const e="undefined"!=typeof window?window:{};return i(e,n),e}const a=(e,t)=>e?.nodeName.toLowerCase()===t.toLowerCase(),l=e=>"function"==typeof e,c=e=>"string"==typeof e,d=e=>"number"==typeof e,h=e=>"boolean"==typeof e,u=e=>void 0===e,p=e=>null===e,m=e=>"undefined"!=typeof Window&&e instanceof Window,f=e=>"undefined"!=typeof Document&&e instanceof Document,v=e=>"undefined"!=typeof Element&&e instanceof Element,g=e=>!l(e)&&!m(e)&&d(e.length),b=e=>"object"==typeof e&&null!==e,y=e=>f(e)?e.documentElement:e,w=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),k=e=>e?e.replace(/^./,e[0].toLowerCase()).replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())):e,C=()=>!1,x=()=>!0,$=(e,t)=>{for(let i=0;i{const i=Object.keys(e);for(let o=0;o{this[t]=e})),this.length=e.length,this):this}}const S=(e=r())=>/complete|interactive/.test(e.readyState),E=e=>r().createElement(e),T=(e,t)=>e.appendChild(t),A=e=>e.parentNode?e.parentNode.removeChild(e):e,D=(e,t)=>{const i=E(t);return i.innerHTML=e,[].slice.call(i.childNodes)},M=(()=>{const e=function(t){if(!t)return new I;if(t instanceof I)return t;if(l(t)){const i=r();return S(i)?t.call(i,e):i.addEventListener("DOMContentLoaded",(()=>t.call(i,e)),{once:!0}),new I([i])}if(c(t)){const e=t.trim();if(e.startsWith("<")&&e.endsWith(">")){let t="div";return R({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},((i,o)=>{if(e.startsWith(`<${i}`))return t=o,!1})),new I(D(e,t))}const i=r();return new I(i.querySelectorAll(t))}return!g(t)||(i=t,"undefined"!=typeof Node&&i instanceof Node)?new I([t]):new I(t);var i};return e.fn=I.prototype,e})(),P=(e,t)=>($(t,(t=>{e.push(t)})),e),L=e=>[...new Set(e)];M.fn.get=function(e){return void 0===e?[].slice.call(this):this[e>=0?e:e+this.length]},M.fn.add=function(e){return new I(L(P(this.get(),M(e).get())))};const _=(e,t,i)=>{const o=e.getAttribute(t);return p(o)?i:o},B=(e,t)=>{e.removeAttribute(t)},O=(e,t,i)=>{p(i)?B(e,t):e.setAttribute(t,i)};M.fn.each=function(e){return $(this,((t,i)=>e.call(t,i,t)))},$(["add","remove","toggle"],(e=>{M.fn[`${e}Class`]=function(t){return"remove"!==e||arguments.length?this.each(((i,o)=>{if(!v(o))return;const r=(l(t)?t.call(o,i,_(o,"class","")):t).split(" ").filter((e=>e));$(r,(t=>{o.classList[e](t)}))})):this.each(((e,t)=>{O(t,"class","")}))}})),$(["insertBefore","insertAfter"],((e,t)=>{M.fn[e]=function(e){const i=t?M(this.get().reverse()):this,o=M(e),r=[];return o.each(((e,o)=>{o.parentNode&&i.each(((i,n)=>{const s=e?n.cloneNode(!0):n,a=t?o.nextSibling:o;r.push(s),o.parentNode.insertBefore(s,a)}))})),M(t?r.reverse():r)}}));function z(e,t){return g(e)?$(e,((e,i)=>t.call(e,i,e))):R(e,t)}function N(e,t){const i=s();let o;const r=[];return z(e,((e,n)=>{o=t.call(i,n,e),null!=o&&r.push(o)})),[].concat(...r)}$(["before","after"],((e,t)=>{M.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,o)=>{const r=l(e[0])?[e[0].call(o,i,o.innerHTML)]:e;$(r,(e=>{let r;r=(e=>c(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?M(D(e,"div")):i&&v(e)?M(e.cloneNode(!0)):M(e),r[t?"insertAfter":"insertBefore"](o)}))}))}})),M.fn.map=function(e){return new I(N(this,((t,i)=>e.call(t,i,t))))},M.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},M.fn.is=function(e){let t=!1;if(l(e))return this.each(((i,o)=>{e.call(o,i,o)&&(t=!0)})),t;if(c(e))return this.each(((i,o)=>{f(o)||m(o)||o.matches.call(o,e)&&(t=!0)})),t;const i=M(e);return this.each(((e,o)=>{i.each(((e,i)=>{o===i&&(t=!0)}))})),t},M.fn.remove=function(e){return this.each(((t,i)=>{e&&!M(i).is(e)||A(i)}))},$(["prepend","append"],((e,t)=>{M.fn[e]=function(...e){return this.each(((i,o)=>{const r=o.childNodes,n=r.length,s=n?r[t?n-1:0]:E("div");n||T(o,s);let a=l(e[0])?[e[0].call(o,i,o.innerHTML)]:e;i&&(a=a.map((e=>c(e)?e:M(e).clone()))),M(s)[t?"after":"before"](...a),n||A(s)}))}})),$(["appendTo","prependTo"],((e,t)=>{M.fn[e]=function(e){const i=[],o=M(e).map(((e,o)=>{const r=o.childNodes,n=r.length;if(n)return r[t?0:n-1];const s=E("div");return T(o,s),i.push(s),s})),r=this[t?"insertBefore":"insertAfter"](o);return M(i).remove(),r}}));const F=(e,t)=>s().getComputedStyle(e).getPropertyValue(k(t)),V=e=>"border-box"===F(e,"box-sizing"),H=(e,t,i)=>{const o="width"===t?["Left","Right"]:["Top","Bottom"];return[0,1].reduce(((t,r,n)=>{let s=i+o[n];return"border"===i&&(s+="Width"),t+parseFloat(F(e,s)||"0")}),0)},U=(e,t)=>{if("width"===t||"height"===t){const i=e.getBoundingClientRect()[t];return V(e)?`${i}px`:i-H(e,t,"border")-H(e,t,"padding")+"px"}return F(e,t)},K=["animation-iteration-count","column-count","fill-opacity","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","line-height","opacity","order","orphans","widows","z-index","zoom"];$(["attr","prop","css"],((e,t)=>{const i=(e,i)=>0===t?_(e,i):1===t?e[i]:U(e,i);M.fn[e]=function(o,r){if(b(o))return R(o,((t,i)=>{this[e](t,i)})),this;if(1===arguments.length){const e=this[0];return v(e)?i(e,o):void 0}return this.each(((e,n)=>{((e,i,o)=>{if(u(o))return;if(0===t)return O(e,i,o);if(1===t)return void(e[i]=o);i=k(i),e.style.setProperty(i,d(o)?`${o}${i.startsWith("--")||K.includes(i)?"":"px"}`:o)})(n,o,l(r)?r.call(n,e,i(n,o)):r)}))}})),M.fn.children=function(e){const t=[];return this.each(((i,o)=>{$(o.childNodes,(i=>{v(i)&&(e&&!M(i).is(e)||t.push(i))}))})),new I(L(t))},M.fn.slice=function(...e){return new I([].slice.apply(this,e))},M.fn.eq=function(e){const t=-1===e?this.slice(e):this.slice(e,+e+1);return new I(t)};const q=(e,t,i,o,r)=>{const n=[];let s;return e.each(((e,a)=>{for(s=a[i];s&&v(s);){if(2===t){if(o&&M(s).is(o))break;r&&!M(s).is(r)||n.push(s)}else{if(0===t){o&&!M(s).is(o)||n.push(s);break}o&&!M(s).is(o)||n.push(s)}s=s[i]}})),new I(L(n))};$(["","s","sUntil"],((e,t)=>{M.fn[`parent${e}`]=function(e,i){const o=t?M(this.get().reverse()):this;return q(o,t,"parentNode",e,i)}})),M.fn.closest=function(e){if(this.is(e))return this;const t=[];return this.parents().each(((i,o)=>{if(M(o).is(e))return t.push(o),!1})),new I(t)};const j=new WeakMap,W=e=>j.get(e)??{},G=(e,t)=>{const i=W(e),o=w(t);return o in i?i[o]:void 0},Y=(e,t)=>{const i=W(e);R(t,((e,t)=>{i[w(e)]=t})),j.set(e,i)},X=(e,t,i)=>{Y(e,{[t]:i})},J=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,Z=(e,t,i)=>{if(u(i)&&1===e.nodeType&&(i=e.dataset[t],c(i)))try{i=(e=>"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:J.test(e)?JSON.parse(e):e))(i)}catch(e){}return i};M.fn.data=function(e,t){if(u(e)){if(!this.length)return;const e=this[0],t=W(e);return 1!==e.nodeType||R(e.dataset,(i=>{t[i]=Z(e,i,t[i])})),t}return b(e)?this.each((function(){Y(this,e)})):2===arguments.length&&u(t)?this:u(t)?this.length?Z(this[0],w(e),G(this[0],e)):void 0:this.each((function(){X(this,e,t)}))},M.fn.empty=function(){return this.each(((e,t)=>{t.innerHTML=""}))},M.fn.extend=function(e){return R(e,((e,t)=>{M.fn[e]=t})),this},M.fn.filter=function(e){if(l(e))return this.map(((t,i)=>e.call(i,t,i)?i:void 0));if(c(e))return this.map(((t,i)=>M(i).is(e)?i:void 0));const t=M(e);return this.map(((e,i)=>t.get().includes(i)?i:void 0))},M.fn.find=function(e){const t=[];return this.each(((i,o)=>{P(t,M(o.querySelectorAll(e)).get())})),new I(t)},M.fn.first=function(){return this.eq(0)};const Q=(e,t)=>e!==t&&y(e).contains(t);M.fn.has=function(e){const t=c(e)?this.find(e):M(e),{length:i}=t;return this.map((function(){for(let e=0;e{const s=i=>H(e,t.toLowerCase(),i)*n;return 2===o&&r&&(i+=s("margin")),V(e)?(0===o&&(i-=s("border")),1===o&&(i-=s("border"),i-=s("padding"))):(0===o&&(i+=s("padding")),2===o&&(i+=s("border"),i+=s("padding"))),i},te=(e,t,i,o)=>{const n=r(),s=`client${t}`,a=`scroll${t}`,l=`offset${t}`,c=`inner${t}`;if(m(e))return 2===i?e[c]:y(n)[s];if(f(e)){const t=y(e);return Math.max(e.body[a],t[a],e.body[l],t[l],t[s])}const d=parseFloat(F(e,t.toLowerCase())||"0");return ee(e,t,d,i,o,1)};$(["Width","Height"],(e=>{$([`inner${e}`,e.toLowerCase(),`outer${e}`],((t,i)=>{M.fn[t]=function(t,o){const r=arguments.length&&(i<2||!h(t)),n=!0===t||!0===o;return r?this.each(((o,r)=>((e,t,i,o,r,n)=>{let s=l(n)?n.call(e,t,te(e,i,o,r)):n;if(null==s)return;const a=M(e),d=i.toLowerCase();if(c(s)&&["auto","inherit",""].includes(s))return void a.css(d,s);const h=s.toString().replace(/\b[0-9.]*/,""),u=parseFloat(s);s=ee(e,i,u,o,r,-1)+(h||"px"),a.css(d,s)})(r,o,e,i,n,t))):this.length?te(this[0],e,i,n):void 0}}))})),M.fn.hide=function(){return this.each(((e,t)=>{t.style.display="none"}))},$(["val","html","text"],((e,t)=>{const i=["value","innerHTML","textContent"][t],o=e=>{if(2===t)return N(e,(e=>y(e)[i])).join("");if(!e.length)return;const o=e[0],r=M(o);return 0===t&&r.is("select[multiple]")?N(r.find("option:checked"),(e=>e.value)):o[i]};M.fn[e]=function(e){return arguments.length?this.each(((r,n)=>{const s=M(n),a=l(e)?e.call(n,r,o(s)):e;0===t&&Array.isArray(a)?s.is("select[multiple]")?N(s.find("option"),(e=>e.selected=a.includes(e.value))):n.checked=a.includes(n.value):((e,o)=>{if(u(o)){if(0!==t)return;o=""}1===t&&v(o)&&(o=o.outerHTML),e[i]=o})(n,a)})):o(this)}})),M.fn.index=function(e){return arguments.length?c(e)?M(e).get().indexOf(this[0]):this.get().indexOf(M(e)[0]):this.eq(0).parent().children().get().indexOf(this[0])},M.fn.last=function(){return this.eq(-1)},$(["","All","Until"],((e,t)=>{M.fn[`next${e}`]=function(e,i){return q(this,t,"nextElementSibling",e,i)}})),M.fn.not=function(e){const t=this.filter(e);return this.map(((e,i)=>t.index(i)>-1?void 0:i))};const ie=s().CustomEvent;class oe extends ie{constructor(e,t){super(e,t),this.data=t.data,this.namespace=t.namespace}}const re=new WeakMap;let ne=1;const se=e=>(re.has(e)||re.set(e,++ne),re.get(e)),ae=new Map,le=e=>{const t=se(e);return ae.get(t)||ae.set(t,[]).get(t)},ce=e=>{const t=e.split(".");return{type:t[0],namespace:t.slice(1).sort().join(" ")}},de=e=>new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)"),he=(e,t,i,o)=>{const r=le(e),n=t=>{delete r[t.id],e.removeEventListener(t.type,t.proxy,!1)};t?t.split(" ").forEach((t=>{t&&((e,t,i,o)=>{const r=ce(t);return le(e).filter((e=>e&&(!r.type||e.type===r.type)&&(!r.namespace||de(r.namespace).test(e.namespace))&&(!i||se(e.func)===se(i))&&(!o||e.selector===o)))})(e,t,i,o).forEach((e=>{n(e)}))})):r.forEach((e=>{n(e)}))};function ue(e,...t){return $(t,(t=>{R(t,((t,i)=>{u(i)||(e[t]=i)}))})),e}M.fn.off=function(e,t,i){return b(e)?(R(e,((e,i)=>{this.off(e,t,i)})),this):((!1===t||l(t))&&(i=t,t=void 0),!1===i&&(i=C),this.each((function(){he(this,e,i,t)})))},M.fn.offsetParent=function(){const e=r();return this.map((function(){let t=this.offsetParent;for(;t&&"static"===M(t).css("position");)t=t.offsetParent;return t||e.documentElement}))};const pe=(e,t)=>parseFloat(e.css(t));M.fn.position=function(){if(!this.length)return;const e=this.eq(0);let t,i={left:0,top:0};if("fixed"===e.css("position"))t=e[0].getBoundingClientRect();else{t=e.offset();const o=e.offsetParent();i=o.offset(),i.top+=pe(o,"border-top-width"),i.left+=pe(o,"border-left-width")}return{top:t.top-i.top-pe(e,"margin-top"),left:t.left-i.left-pe(e,"margin-left")}};const me=e=>{if(!e.getClientRects().length)return{top:0,left:0};const{top:t,left:i}=e.getBoundingClientRect(),{pageYOffset:o,pageXOffset:r}=e.ownerDocument.defaultView;return{top:t+o,left:i+r}};M.fn.offset=function(e){if(!arguments.length){if(!this.length)return;return me(this[0])}return this.each((function(t){((e,t,i)=>{const o=M(e),r=o.css("position");"static"===r&&o.css("position","relative");const n=me(e),s=o.css("top"),a=o.css("left");let c,d;if("absolute"!==r&&"fixed"!==r||!(s+a).includes("auto"))c=parseFloat(s),d=parseFloat(a);else{const e=o.position();c=e.top,d=e.left}const h=l(t)?t.call(e,i,ue({},n)):t;o.css({top:null!=h.top?h.top-n.top+c:void 0,left:null!=h.left?h.left-n.left+d:void 0})})(this,e,t)}))},M.fn.on=function(e,t,i,o,r){if(b(e))return c(t)||(i=i||t,t=void 0),R(e,((e,o)=>{this.on(e,t,i,o,r)})),this;if(null==i&&null==o?(o=t,i=t=void 0):null==o&&(c(t)?(o=i,i=void 0):(o=i,i=t,t=void 0)),!1===o)o=C;else if(!o)return this;if(r){const e=this,i=o;o=function(r,...n){return e.off(r.type,t,o),i.call(this,r,...n)}}return this.each((function(){((e,t,i,o,r)=>{let n=!1;b(o)&&o.useCapture&&(n=!0),t.split(" ").forEach((t=>{if(!t)return;const s=ce(t),a=(e,t)=>{!1===i.apply(t,null===e.detail?[e]:[e].concat(e.detail))&&(e.preventDefault(),e.stopPropagation())},l=t=>{t.namespace&&!de(t.namespace).test(s.namespace)||(t.data=o,r?M(e).find(r).get().reverse().forEach((e=>{(e===t.target||Q(e,t.target))&&a(t,e)})):a(t,e))},c={type:s.type,namespace:s.namespace,func:i,selector:r,id:le(e).length,proxy:l};le(e).push(c),e.addEventListener(c.type,l,n)}))})(this,e,o,i,t)}))},M.fn.one=function(e,t,i,o){return this.on(e,t,i,o,!0)},$(["","All","Until"],((e,t)=>{M.fn[`prev${e}`]=function(e,i){const o=t?M(this.get().reverse()):this;return q(o,t,"previousElementSibling",e,i)}})),M.fn.removeAttr=function(e){const t=e.split(" ").filter((e=>e));return this.each((function(){$(t,(e=>{B(this,e)}))}))};const fe=(e,t)=>{if(u(t))return(e=>{j.delete(e)})(e);((e,t)=>{const i=W(e);$(t,(e=>{const t=w(e);delete i[t]})),j.set(e,i)})(e,c(t)?t.split(" ").filter((e=>e)):t)};M.fn.removeData=function(e){return this.each(((t,i)=>{fe(i,e)}))},M.fn.removeProp=function(e){return this.each(((t,i)=>{try{delete i[e]}catch(e){}}))},M.fn.replaceWith=function(e){return this.each(((t,i)=>{let o=e;l(o)?o=o.call(i,t,i.innerHTML):t&&!c(o)&&(o=M(o).clone()),M(i).before(o)})),this.remove()},M.fn.replaceAll=function(e){return M(e).map(((e,t)=>(M(t).replaceWith(e?this.clone():this),this.get())))};const ve=e=>{if(!b(e)&&!Array.isArray(e))return"";const t=[],i=(e,o)=>{let r;b(o)?R(o,((t,n)=>{r=Array.isArray(o)&&!b(n)?"":t,i(`${e}[${r}]`,n)})):(r=null==o||""===o?"=":`=${encodeURIComponent(o)}`,t.push(encodeURIComponent(e)+r))};return Array.isArray(e)?$(e,(({name:e,value:t})=>i(e,t))):R(e,i),t.join("&")},ge=new WeakMap,be=e=>[...[...e.elements],...ge.get(e)||[]].sort(((e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),ye=e=>{const t=[];return e.each(((e,i)=>{const o=i instanceof HTMLFormElement?be(i):[i];M(o).each(((e,i)=>{const o=M(i),r=i.type,n=i.nodeName.toLowerCase();"fieldset"===n||!i.name||i.disabled||!["input","select","textarea","keygen","mdui-checkbox","mdui-radio-group","mdui-switch","mdui-text-field","mdui-select","mdui-slider","mdui-range-slider","mdui-segmented-button-group"].includes(n)||["submit","button","image","reset","file"].includes(r)||["radio","checkbox"].includes(r)&&!i.checked||["mdui-checkbox","mdui-switch"].includes(n)&&!i.checked||t.push({name:i.name,value:o.val()})}))})),t};M.fn.serializeArray=function(){return ye(this).map((e=>Array.isArray(e.value)?e.value.map((t=>({name:e.name,value:t}))):e)).flat()},M.fn.serialize=function(){return ve(this.serializeArray())},M.fn.serializeObject=function(){const e={};return ye(this).forEach((t=>{const{name:i,value:o}=t;if(e.hasOwnProperty(i)){const t=e[i];Array.isArray(t)||(e[i]=[t]),Array.isArray(o)?e[i].push(...o):e[i].push(o)}else e[i]=o})),e};const we={};M.fn.show=function(){return this.each(((e,t)=>{"none"===t.style.display&&(t.style.display=""),"none"===U(t,"display")&&(t.style.display=(e=>{const t=r();let i,o;return we[e]||(i=E(e),T(t.body,i),o=U(i,"display"),A(i),"none"===o&&(o="block"),we[e]=o),we[e]})(t.nodeName))}))},M.fn.siblings=function(e){return this.prevAll(e).add(this.nextAll(e))},M.fn.toggle=function(){return this.each(((e,t)=>{"none"===U(t,"display")?M(t).show():M(t).hide()}))},M.fn.trigger=function(e,t=null,i){const{type:o,namespace:r}=ce(e),n=new oe(o,{detail:t,data:null,namespace:r,bubbles:!0,cancelable:!1,composed:!0,...i});return this.each(((e,t)=>{t.dispatchEvent(n)}))};const ke="ajaxSuccess",Ce="ajaxError",xe="ajaxComplete",$e={},Re=(e,t)=>`${e}&${t}`.replace(/[&?]{1,2}/,"?"),Ie=e=>{const t=r(),i=s();let o=!1;const n={},a={},l=(e=>{const t={url:"",method:"GET",data:"",processData:!0,async:!0,cache:!0,username:"",password:"",headers:{},xhrFields:{},statusCode:{},dataType:"",contentType:"application/x-www-form-urlencoded",timeout:0,global:!0};return R($e,((e,i)=>{["beforeSend","success","error","complete","statusCode"].includes(e)||u(i)||(t[e]=i)})),ue({},t,e)})(e),d=l.method.toUpperCase();let{data:h,url:p}=l;p=p||i.location.toString();const{processData:m,async:f,cache:v,username:g,password:b,headers:y,xhrFields:w,statusCode:k,dataType:C,contentType:x,timeout:I,global:S}=l,E=(e=>["GET","HEAD"].includes(e))(d);!h||!E&&!m||c(h)||h instanceof ArrayBuffer||h instanceof Blob||h instanceof Document||h instanceof FormData||(h=ve(h)),h&&E&&(p=Re(p,h),h=null);const T=(e,i,...r)=>{let s,c;S&&M(t).trigger(e,"success"===i?a:n),i in $e&&(s=$e[i](...r)),l[i]&&(c=l[i](...r)),"beforeSend"===i&&[s,c].includes(!1)&&(o=!0)};return(()=>{let e;return new Promise(((t,r)=>{const c=e=>r(new Error(e));E&&!v&&(p=Re(p,`_=${Date.now()}`));const m=new XMLHttpRequest;let S;if(m.open(d,p,f,g,b),(x||h&&!E&&!1!==x)&&m.setRequestHeader("Content-Type",x),"json"===C&&m.setRequestHeader("Accept","application/json, text/javascript"),R(y,((e,t)=>{u(t)||m.setRequestHeader(e,t+"")})),(e=>{const t=s();return/^([\w-]+:)?\/\/([^/]+)/.test(e)&&RegExp.$2!==t.location.host})(p)||m.setRequestHeader("X-Requested-With","XMLHttpRequest"),R(w,((e,t)=>{m[e]=t})),n.xhr=a.xhr=m,n.options=a.options=l,m.onload=()=>{S&&clearTimeout(S);const i=(o=m.status)>=200&&o<300||[0,304].includes(o);var o;let r;if(i)if(e=204===m.status||"HEAD"===d?"nocontent":304===m.status?"notmodified":"success","json"===C||!C&&(m.getResponseHeader("content-type")||"").includes("json")){try{r="HEAD"===d?void 0:JSON.parse(m.responseText),a.response=r}catch(t){e="parsererror",T(Ce,"error",m,e),c(e)}"parsererror"!==e&&(T(ke,"success",r,e,m),t(r))}else r="HEAD"===d?void 0:"text"===m.responseType||""===m.responseType?m.responseText:m.response,a.response=r,T(ke,"success",r,e,m),t(r);else e="error",T(Ce,"error",m,e),c(e);$([$e.statusCode??{},k],(t=>{t[m.status]&&(i?t[m.status](r,e,m):t[m.status](m,e))})),T(xe,"complete",m,e)},m.onerror=()=>{S&&clearTimeout(S),T(Ce,"error",m,m.statusText),T(xe,"complete",m,"error"),c(m.statusText)},m.onabort=()=>{let e="abort";S&&(e="timeout",clearTimeout(S)),T(Ce,"error",m,e),T(xe,"complete",m,e),c(e)},T("ajaxStart","beforeSend",m,l),o)return c("cancel");I>0&&(S=i.setTimeout((()=>m.abort()),I)),m.send(h)}))})()};M.ajax=Ie;function Se(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s}M.ajaxSetup=e=>ue($e,e),M.contains=Q,M.data=function(e,t,i){return b(t)?(Y(e,t),t):u(i)?u(t)?W(e):G(e,t):(X(e,t,i),i)},M.each=z,M.extend=function(e,...t){return t.length?ue(e,...t):(R(e,((e,t)=>{this[e]=t})),this)},M.map=N,M.merge=P,M.param=ve,M.removeData=fe,M.unique=L,"function"==typeof SuppressedError&&SuppressedError;const Ee=globalThis,Te=Ee.ShadowRoot&&(void 0===Ee.ShadyCSS||Ee.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ae=Symbol(),De=new WeakMap;let Me=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ae)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Te&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=De.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&De.set(t,e))}return e}toString(){return this.cssText}};const Pe=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1]),e[0]);return new Me(i,e,Ae)},Le=Te?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new Me("string"==typeof e?e:e+"",void 0,Ae))(t)})(e):e,{is:_e,defineProperty:Be,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:ze,getOwnPropertySymbols:Ne,getPrototypeOf:Fe}=Object,Ve=globalThis,He=Ve.trustedTypes,Ue=He?He.emptyScript:"",Ke=Ve.reactiveElementPolyfillSupport,qe=(e,t)=>e,je={toAttribute(e,t){switch(t){case Boolean:e=e?Ue:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},We=(e,t)=>!_e(e,t),Ge={attribute:!0,type:String,converter:je,reflect:!1,hasChanged:We};Symbol.metadata??=Symbol("metadata"),Ve.litPropertyMetadata??=new WeakMap;let Ye=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ge){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Be(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:r}=Oe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return o?.call(this)},set(t){const n=o?.call(this);r.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ge}static _$Ei(){if(this.hasOwnProperty(qe("elementProperties")))return;const e=Fe(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qe("properties"))){const e=this.properties,t=[...ze(e),...Ne(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(Le(e))}else void 0!==e&&t.push(Le(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Te)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),o=Ee.litNonce;void 0!==o&&t.setAttribute("nonce",o),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:je).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:je;this._$Em=o,this[o]=r.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??We)(this[e],t))return;this.P(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e)!0!==i.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],i)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}};Ye.elementStyles=[],Ye.shadowRootOptions={mode:"open"},Ye[qe("elementProperties")]=new Map,Ye[qe("finalized")]=new Map,Ke?.({ReactiveElement:Ye}),(Ve.reactiveElementVersions??=[]).push("2.0.4");const Xe=globalThis,Je=Xe.trustedTypes,Ze=Je?Je.createPolicy("lit-html",{createHTML:e=>e}):void 0,Qe="$lit$",et=`lit$${Math.random().toFixed(9).slice(2)}$`,tt="?"+et,it=`<${tt}>`,ot=document,rt=()=>ot.createComment(""),nt=e=>null===e||"object"!=typeof e&&"function"!=typeof e,st=Array.isArray,at="[ \t\n\f\r]",lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,dt=/>/g,ht=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,pt=/"/g,mt=/^(?:script|style|textarea|title)$/i,ft=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),vt=Symbol.for("lit-noChange"),gt=Symbol.for("lit-nothing"),bt=new WeakMap,yt=ot.createTreeWalker(ot,129);function wt(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Ze?Ze.createHTML(t):t}const kt=(e,t)=>{const i=e.length-1,o=[];let r,n=2===t?"":"",s=lt;for(let t=0;t"===l[0]?(s=r??lt,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?ht:'"'===l[3]?pt:ut):s===pt||s===ut?s=ht:s===ct||s===dt?s=lt:(s=ht,r=void 0);const h=s===ht&&e[t+1].startsWith("/>")?" ":"";n+=s===lt?i+it:c>=0?(o.push(a),i.slice(0,c)+Qe+i.slice(c)+et+h):i+et+(-2===c?t:h)}return[wt(e,n+(e[i]||"")+(2===t?"":"")),o]};class Ct{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let r=0,n=0;const s=e.length-1,a=this.parts,[l,c]=kt(e,t);if(this.el=Ct.createElement(l,i),yt.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=yt.nextNode())&&a.length0){o.textContent=Je?Je.emptyScript:"";for(let i=0;ist(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==gt&&nt(this._$AH)?this._$AA.nextSibling.data=e:this.T(ot.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Ct.createElement(wt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new $t(o,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=bt.get(e.strings);return void 0===t&&bt.set(e.strings,t=new Ct(e)),t}k(e){st(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const r of e)o===t.length?t.push(i=new Rt(this.S(rt()),this.S(rt()),this,this.options)):i=t[o],i._$AI(r),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=gt}_$AI(e,t=this,i,o){const r=this.strings;let n=!1;if(void 0===r)e=xt(this,e,t,0),n=!nt(e)||e!==this._$AH&&e!==vt,n&&(this._$AH=e);else{const o=e;let s,a;for(e=r[0],s=0;s{const o=i?.renderBefore??t;let r=o._$litPart$;if(void 0===r){const e=i?.renderBefore??null;o._$litPart$=r=new Rt(t.insertBefore(rt(),e),e,void 0,i??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};Mt._$litElement$=!0,Mt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Mt});const Pt=globalThis.litElementPolyfillSupport;Pt?.({LitElement:Mt}),(globalThis.litElementVersions??=[]).push("4.0.6");const Lt=e=>(t,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},_t={attribute:!0,type:String,converter:je,reflect:!1,hasChanged:We},Bt=(e=_t,t,i)=>{const{kind:o,metadata:r}=i;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(i.name,e),"accessor"===o){const{name:o}=i;return{set(i){const r=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,r,e)},init(t){return void 0!==t&&this.P(o,void 0,e),t}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];t.call(this,i),this.requestUpdate(o,r,e)}}throw Error("Unsupported decorator location: "+o)};function Ot(e){return(t,i)=>"object"==typeof i?Bt(e,t,i):((e,t,i)=>{const o=t.hasOwnProperty(i);return t.constructor.createProperty(i,o?{...e,wrapped:!0}:e),o?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function zt(e){return Ot({...e,state:!0,attribute:!1})}function Nt(e){return(t,i)=>{const{slot:o,selector:r}=e??{},n="slot"+(o?`[name=${o}]`:":not([name])");return((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i))(t,i,{get(){const t=this.renderRoot?.querySelector(n),i=t?.assignedElements(e)??[];return void 0===r?i:i.filter((e=>e.matches(r)))}})}}const Ft=e=>e??gt,Vt=1,Ht=2,Ut=3,Kt=4,qt=e=>(...t)=>({_$litDirective$:e,values:t});let jt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const Wt="important",Gt=" !"+Wt,Yt=qt(class extends jt{constructor(e){if(super(e),e.type!==Vt||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(Gt);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?Wt:""):i[e]=o}}return vt}});class Xt extends Mt{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i)}}class Jt{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange),S()||M((()=>{this.host.requestUpdate()}))}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hasDefaultSlot(){return[...this.host.childNodes].some((e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}onSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Zt=ft`${gt}`,Qt=Pe`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}:host :focus,:host :focus-visible,:host(:focus),:host(:focus-visible){outline:0}[hidden]{display:none!important}`;let ei=class extends jt{constructor(e){if(super(e),this.it=gt,e.type!==Ht)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===gt||null==e)return this._t=void 0,this.it=e;if(e===vt)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ei.directiveName="unsafeHTML",ei.resultType=1;class ti extends ei{}ti.directiveName="unsafeSVG",ti.resultType=2;const ii=qt(ti),oi=e=>void 0===e.strings,ri={},ni=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),ni(e,t);return!0},si=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},ai=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),di(t)}};function li(e){void 0!==this._$AN?(si(this),this._$AM=e,ai(this)):this._$AM=e}function ci(e,t=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(o))for(let e=i;e{e.type==Ht&&(e._$AP??=ci,e._$AQ??=li)};class hi extends jt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),ai(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ni(this,e),si(this))}setValue(e){if(oi(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}class ui{constructor(e){this.Y=e}disconnect(){this.Y=void 0}reconnect(e){this.Y=e}deref(){return this.Y}}let pi=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((e=>this.q=e))}resume(){this.q?.(),this.Z=this.q=void 0}};const mi=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,fi=1073741823;const vi=qt(class extends hi{constructor(){super(...arguments),this._$Cwt=fi,this._$Cbt=[],this._$CK=new ui(this),this._$CX=new pi}render(...e){return e.find((e=>!mi(e)))??vt}update(e,t){const i=this._$Cbt;let o=i.length;this._$Cbt=t;const r=this._$CK,n=this._$CX;this.isConnected||this.disconnected();for(let e=0;ethis._$Cwt);e++){const s=t[e];if(!mi(s))return this._$Cwt=e,s;e{for(;n.get();)await n.get();const t=r.deref();if(void 0!==t){const i=t._$Cbt.indexOf(s);i>-1&&i`:(()=>{if(this.name){const[e,t]=this.name.split("--"),i=new Map([["outlined","Material Icons Outlined"],["filled","Material Icons"],["rounded","Material Icons Round"],["sharp","Material Icons Sharp"],["two-tone","Material Icons Two Tone"]]);return ft`${e}`}return this.src?ft`${vi(Ie({url:this.src}).then(ii))}`:ft``})()}},e.Icon.styles=[Qt,gi],Se([Ot({reflect:!0})],e.Icon.prototype,"name",void 0),Se([Ot({reflect:!0})],e.Icon.prototype,"src",void 0),e.Icon=Se([Lt("mdui-icon")],e.Icon);const bi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;white-space:nowrap;vertical-align:middle;border-radius:var(--shape-corner);-webkit-user-select:none;user-select:none;width:2.5rem;height:2.5rem;background-color:rgb(var(--mdui-color-primary-container));color:rgb(var(--mdui-color-on-primary-container));font-size:var(--mdui-typescale-title-medium-size);font-weight:var(--mdui-typescale-title-medium-weight);letter-spacing:var(--mdui-typescale-title-medium-tracking);line-height:var(--mdui-typescale-title-medium-line-height)}img{width:100%;height:100%}::slotted(mdui-icon),mdui-icon{font-size:1.5em}`;e.Avatar=class extends Xt{constructor(){super(...arguments),this.hasSlotController=new Jt(this,"[default]")}render(){return this.hasSlotController.test("[default]")?ft``:this.src?ft`${Ft(this.label)}`:this.icon?ft``:Zt}},e.Avatar.styles=[Qt,bi],Se([Ot({reflect:!0})],e.Avatar.prototype,"src",void 0),Se([Ot({reflect:!0})],e.Avatar.prototype,"fit",void 0),Se([Ot({reflect:!0})],e.Avatar.prototype,"icon",void 0),Se([Ot({reflect:!0})],e.Avatar.prototype,"label",void 0),e.Avatar=Se([Lt("mdui-avatar")],e.Avatar);const yi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--shape-corner);padding-left:.25rem;padding-right:.25rem;color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error));height:1rem;min-width:1rem;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height)}:host([variant=small]){min-width:0;padding:0;width:.375rem;height:.375rem}`;e.Badge=class extends Xt{constructor(){super(...arguments),this.variant="large"}render(){return"small"===this.variant?Zt:ft``}},e.Badge.styles=[Qt,yi],Se([Ot({reflect:!0})],e.Badge.prototype,"variant",void 0),e.Badge=Se([Lt("mdui-badge")],e.Badge);const wi=e=>null!==e&&"false"!==e;class ki{constructor(e,t){this.defined=!1,(this.host=e).addController(this),this.relatedElements=t.relatedElements,this.needDomReady=t.needDomReady||!!t.relatedElements,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}isDefined(){return!!this.defined||(this.defined=(!this.needDomReady||S())&&!this.getUndefinedLocalNames().length,this.defined)}async whenDefined(){if(this.defined)return Promise.resolve();const e=r();this.needDomReady&&!S(e)&&await new Promise((t=>{e.addEventListener("DOMContentLoaded",(()=>t()),{once:!0})}));const t=this.getUndefinedLocalNames();if(t.length){const e=[];t.forEach((t=>{e.push(customElements.whenDefined(t))})),await Promise.all(e)}this.defined=!0}getScopeLocalNameSelector(){const e=this.relatedElements;return e?Array.isArray(e)?e.map((e=>`${e}:not(:defined)`)).join(","):Object.keys(e).filter((t=>!e[t])).map((e=>`${e}:not(:defined)`)).join(","):null}getGlobalLocalNameSelector(){const e=this.relatedElements;return!e||Array.isArray(e)?null:Object.keys(e).filter((t=>e[t])).map((e=>`${e}:not(:defined)`)).join(",")}getUndefinedLocalNames(){const e=this.getScopeLocalNameSelector(),t=this.getGlobalLocalNameSelector(),i=[...e?[...this.host.querySelectorAll(e)]:[],...t?[...r().querySelectorAll(t)]:[]].map((e=>e.localName));return L(i)}onSlotChange(){const e=this.getScopeLocalNameSelector();if(e){this.host.querySelectorAll(e).length&&(this.defined=!1)}}}function Ci(e,t=!1){return(i,o)=>{const{update:r}=i;e in i&&(i.update=function(i){if(i.has(e)){const r=i.get(e),n=this[e];r!==n&&(t&&!this.hasUpdated||this[o](r,n))}r.call(this,i)})}}const xi=e=>{class t extends e{constructor(...e){super(...e),this.scrollBehaviorDefinedController=new ki(this,{needDomReady:!0}),this.lastScrollTopThreshold=0,this.lastScrollTopNoThreshold=0,this.isParentLayout=!1,this.onListeningScroll=this.onListeningScroll.bind(this)}get scrollPaddingPosition(){throw new Error("Must implement scrollPaddingPosition getter")}async onScrollTargetChange(e,t){if(await this.scrollBehaviorDefinedController.whenDefined(),(e&&!t||!e&&t)&&this.updateContainerPadding(),!this.scrollBehavior)return;const i=this.getListening(e);i&&i.removeEventListener("scroll",this.onListeningScroll);const o=this.getListening(t);o&&(this.updateScrollTop(o),o.addEventListener("scroll",this.onListeningScroll))}async onScrollBehaviorChange(e,t){await this.scrollBehaviorDefinedController.whenDefined(),(e&&!t||!e&&t)&&this.updateContainerPadding();const i=this.getListening(this.scrollTarget);i&&(this.scrollBehavior?(this.updateScrollTop(i),i.addEventListener("scroll",this.onListeningScroll)):i.removeEventListener("scroll",this.onListeningScroll))}connectedCallback(){super.connectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.isParentLayout=a(this.parentElement,"mdui-layout"),this.updateContainerPadding()}))}disconnectedCallback(){super.disconnectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.updateContainerPadding(!1)}))}hasScrollBehavior(e){const t=this.scrollBehavior?.split(" ")??[];return Array.isArray(e)?!!t.filter((t=>e.includes(t))).length:t.includes(e)}runScrollThreshold(e,t){}runScrollNoThreshold(e,t){}updateContainerPadding(e=!0){const t=this.getContainer(this.scrollTarget);if(!t||this.isParentLayout)return;const i="top"===this.scrollPaddingPosition?"paddingTop":"paddingBottom";if(e){const e=this.getListening(this.scrollTarget)&&["fixed","absolute"].includes(M(this).css("position"))?this.offsetHeight:null;M(t).css({[i]:e})}else M(t).css({[i]:null})}onListeningScroll(){const e=this.getListening(this.scrollTarget);window.requestAnimationFrame((()=>this.onScroll(e)))}onScroll(e){const t=e.scrollY??e.scrollTop;this.lastScrollTopNoThreshold!==t&&(this.runScrollNoThreshold(t(this.scrollThreshold||0)&&(this.runScrollThreshold(t++$i;let Ii,Si;const Ei=(e,t)=>{const i=M(e),o=Ri(),r={unobserve:()=>{i.each(((e,t)=>{const i=Ii.get(t),r=i.coArr.findIndex((e=>e.key===o));-1!==r&&i.coArr.splice(r,1),i.coArr.length?Ii.set(t,i):(Si.unobserve(t),Ii.delete(t))}))}};return Ii||(Ii=new WeakMap,Si=new ResizeObserver((e=>{e.forEach((e=>{const t=e.target,i=Ii.get(t);i.entry=e,i.coArr.forEach((t=>{t.callback.call(r,e,r)}))}))}))),i.each(((e,i)=>{const n=Ii.get(i)??{coArr:[]};n.coArr.length&&n.entry&&t.call(r,n.entry,r),n.coArr.push({callback:t,key:o}),Ii.set(i,n),Si.observe(i)})),r};class Ti{constructor(){this.states=[]}registerMain(e){this.$main=M(e)}unregisterMain(){this.$main=void 0}registerItem(e){const t={element:e};this.states.push(t),t.observeResize=Ei(t.element,(()=>{this.updateLayout(t.element,{width:this.isNoWidth(t)?0:void 0})})),this.items=void 0,this.resort(),this.updateLayout()}unregisterItem(e){const t=this.states.findIndex((t=>t.element===e));if(t<0)return;const i=this.states[t];i.observeResize?.unobserve(),this.items=void 0,this.states.splice(t,1),this.states[t]&&this.updateLayout(this.states[t].element)}getItems(){if(!this.items){const e=this.states.map((e=>e.element));this.items=e.sort(((e,t)=>{const i=e.compareDocumentPosition(t);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}return this.items}getMain(){return this.$main?this.$main[0]:void 0}getItemsAndMain(){return[...this.getItems(),this.getMain()].filter((e=>e))}updateOrder(){this.resort(),this.updateLayout()}updateLayout(e,t){const i=e?{element:e,width:t?.width,height:t?.height}:void 0,o=i?this.states.findIndex((e=>e.element===i.element)):0;if(o<0)return;Object.assign(this.states[o],i),this.states.forEach(((e,t)=>{if(t0?this.states[t-1]:void 0,n=r?.top??0,s=r?.right??0,a=r?.bottom??0,l=r?.left??0;switch(Object.assign(e,{top:n,right:s,bottom:a,left:l}),i){case"top":case"bottom":e[i]+=e.height??e.element.offsetHeight;break;case"right":case"left":e[i]+=(this.isNoWidth(e)?0:e.width)??e.element.offsetWidth}e.height=e.width=void 0,M(e.element).css({position:"absolute",top:"bottom"===i?null:n,right:"left"===i?null:s,bottom:"top"===i?null:a,left:"right"===i?null:l})}));const r=this.states[this.states.length-1];this.$main&&this.$main.css({paddingTop:r.top,paddingRight:r.right,paddingBottom:r.bottom,paddingLeft:r.left})}resort(){const e=this.getItems();this.states.sort(((t,i)=>{const o=t.element.order??0,r=i.element.order??0;return o>r?1:oe.indexOf(i.element)?1:e.indexOf(t.element)(Ai.has(e)||Ai.set(e,new Ti),Ai.get(e));class Mi extends Xt{constructor(){super(...arguments),this.isParentLayout=!1}get layoutPlacement(){throw new Error("Must implement placement getter!")}onOrderChange(){this.layoutManager?.updateOrder()}connectedCallback(){super.connectedCallback();const e=this.parentElement;this.isParentLayout=a(e,"mdui-layout"),this.isParentLayout&&(this.layoutManager=Di(e),this.layoutManager.registerItem(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterItem(this)}}Se([Ot({type:Number,reflect:!0})],Mi.prototype,"order",void 0),Se([Ci("order",!0)],Mi.prototype,"onOrderChange",null);const Pi=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-emphasized);padding:0 1rem;height:5rem;background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]){transition-duration:var(--mdui-motion-duration-short4);bottom:-5.625rem}::slotted(:not(:first-child)){margin-left:.5rem}::slotted(mdui-fab){box-shadow:var(--mdui-elevation-level0)}:host([fab-detach]) ::slotted(mdui-fab){position:absolute;transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard);right:1rem;bottom:.75rem}:host([fab-detach][hide][scroll-behavior~=hide]) ::slotted(mdui-fab){transition-duration:var(--mdui-motion-duration-short4);bottom:1rem;box-shadow:var(--mdui-elevation-level2)}:host([fab-detach][hide][scroll-behavior~=hide][scroll-target]:not([scroll-target=''])) ::slotted(mdui-fab){bottom:6.625rem}:host([hide]) ::slotted(:not(mdui-fab)),:host([hide]:not([fab-detach])) ::slotted(mdui-fab){transform:translateY(8.75rem);transition:transform var(--mdui-motion-duration-0) var(--mdui-motion-easing-emphasized-accelerate) var(--mdui-motion-duration-short4)}::slotted(:first-child){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short1)}::slotted(:nth-child(2)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short3)}::slotted(:nth-child(3)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short4)}::slotted(:nth-child(4)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium1)}::slotted(:nth-child(5)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium2)}::slotted(:nth-child(6)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium3)}`;e.BottomAppBar=class extends(xi(Mi)){constructor(){super(...arguments),this.hide=!1,this.fabDetach=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return ft``}runScrollThreshold(e){if(!e&&!this.hide){this.emit("hide",{cancelable:!0})&&(this.hide=!0)}if(e&&this.hide){this.emit("show",{cancelable:!0})&&(this.hide=!1)}}},e.BottomAppBar.styles=[Qt,Pi],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.BottomAppBar.prototype,"hide",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"fab-detach"})],e.BottomAppBar.prototype,"fabDetach",void 0),Se([Ot({reflect:!0,attribute:"scroll-behavior"})],e.BottomAppBar.prototype,"scrollBehavior",void 0),e.BottomAppBar=Se([Lt("mdui-bottom-app-bar")],e.BottomAppBar);const Li=()=>new _i;class _i{}const Bi=new WeakMap,Oi=qt(class extends hi{render(e){return gt}update(e,[t]){const i=t!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),gt}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.Y){const t=this.ht??globalThis;let i=Bi.get(t);void 0===i&&(i=new WeakMap,Bi.set(t,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ht,void 0),i.set(this.Y,e),void 0!==e&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){return"function"==typeof this.Y?Bi.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function zi(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let i,o=0;o{const t=M(e).attr("form");if(t){return e.getRootNode().getElementById(t)}return e.closest("form")},name:e=>e.name,value:e=>e.value,defaultValue:e=>e.defaultValue,setValue:(e,t)=>e.value=t,disabled:e=>e.disabled,reportValidity:e=>!l(e.reportValidity)||e.reportValidity(),...t},this.onFormData=this.onFormData.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.onFormReset=this.onFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this)}hostConnected(){this.definedController.whenDefined().then((()=>{this.form=this.options.form(this.host),this.form&&this.attachForm(this.form)}))}hostDisconnected(){this.detachForm()}hostUpdated(){this.definedController.whenDefined().then((()=>{const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e))}))}getForm(){return this.form??null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}attachForm(e){e?(this.form=e,ge.has(this.form)?ge.get(this.form).add(this.host):ge.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.onFormData),this.form.addEventListener("submit",this.onFormSubmit),this.form.addEventListener("reset",this.onFormReset),Ni.has(this.form)||(Ni.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){this.form&&(ge.get(this.form).delete(this.host),this.form.removeEventListener("formdata",this.onFormData),this.form.removeEventListener("submit",this.onFormSubmit),this.form.removeEventListener("reset",this.onFormReset),Ni.has(this.form)&&!ge.get(this.form).size&&(this.form.reportValidity=Ni.get(this.form),Ni.delete(this.form)))}doAction(e,t){if(!this.form)return;const i=M(``}isButton(){return!this.href}}Ji.styles=[Qt,Xi],Se([Ot({type:Boolean,reflect:!0,converter:wi})],Ji.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],Ji.prototype,"loading",void 0),Se([Ot({reflect:!0})],Ji.prototype,"name",void 0),Se([Ot({reflect:!0})],Ji.prototype,"value",void 0),Se([Ot({reflect:!0})],Ji.prototype,"type",void 0),Se([Ot({reflect:!0})],Ji.prototype,"form",void 0),Se([Ot({reflect:!0,attribute:"formaction"})],Ji.prototype,"formAction",void 0),Se([Ot({reflect:!0,attribute:"formenctype"})],Ji.prototype,"formEnctype",void 0),Se([Ot({reflect:!0,attribute:"formmethod"})],Ji.prototype,"formMethod",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"formnovalidate"})],Ji.prototype,"formNoValidate",void 0),Se([Ot({reflect:!0,attribute:"formtarget"})],Ji.prototype,"formTarget",void 0);const Zi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-secondary-container + )}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=text]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=outlined][focus-visible]){border-color:rgb(var(--mdui-color-primary))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=tonal][hover]){box-shadow:var(--mdui-elevation-level1)}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([variant=elevated][disabled]),:host([variant=filled][disabled]),:host([variant=tonal][disabled]){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([variant=outlined][disabled]){border-color:rgba(var(--mdui-color-on-surface),12%)}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon{display:inline-flex;font-size:1.28571429em}.end-icon mdui-icon,.icon mdui-icon,::slotted([slot=end-icon]),::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([variant=filled]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([variant=tonal]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;e.Button=class extends Ji{constructor(){super(...arguments),this.variant="filled",this.fullWidth=!1,this.rippleRef=Li()}get rippleElement(){return this.rippleRef.value}render(){return ft`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderInner()}):this.disabled||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:"button",part:"button",content:this.renderInner()})}`}renderIcon(){return this.loading?this.renderLoading():ft`${this.icon?ft``:Zt}`}renderLabel(){return ft``}renderEndIcon(){return ft`${this.endIcon?ft``:Zt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}},e.Button.styles=[Ji.styles,Zi],Se([Ot({reflect:!0})],e.Button.prototype,"variant",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"full-width"})],e.Button.prototype,"fullWidth",void 0),Se([Ot({reflect:!0})],e.Button.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.Button.prototype,"endIcon",void 0),e.Button=Se([Lt("mdui-button")],e.Button);const Qi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;height:2.5rem}:host([variant=standard]){color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=filled]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined][pressed]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([variant=standard][selected]){color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]:not([selectable])),:host([variant=filled][selected]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]:not([selectable])),:host([variant=tonal][selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-secondary-container + )}:host([variant=outlined][selected]){border:none;color:rgb(var(--mdui-color-inverse-on-surface));background-color:rgb(var(--mdui-color-inverse-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}:host([variant=filled][disabled]),:host([variant=outlined][disabled]),:host([variant=tonal][disabled]){background-color:rgba(var(--mdui-color-on-surface),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),.38)!important}:host([loading]) .button,:host([loading]) mdui-ripple{opacity:0}.button{float:left;width:100%}.icon,.selected-icon mdui-icon,::slotted(*){font-size:inherit}mdui-circular-progress{display:flex;position:absolute;top:calc(50% - 1.5rem / 2);left:calc(50% - 1.5rem / 2);width:1.5rem;height:1.5rem}:host([variant=filled]:not([disabled])) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;e.ButtonIcon=class extends Ji{constructor(){super(...arguments),this.variant="standard",this.selectable=!1,this.selected=!1,this.rippleRef=Li(),this.hasSlotController=new Jt(this,"[default]","selected-icon")}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.selectable&&!this.disabled&&(this.selected=!this.selected)}))}render(){return ft`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderIcon()}):this.disabled||this.loading?ft`${this.renderIcon()}`:this.renderAnchor({className:"button",part:"button",content:this.renderIcon()})} ${this.renderLoading()}`}renderIcon(){const e=()=>this.hasSlotController.test("[default]")?ft``:this.icon?ft``:Zt;return this.selected?(()=>this.hasSlotController.test("selected-icon")||this.selectedIcon?ft``:e())():e()}},e.ButtonIcon.styles=[Ji.styles,Qi],Se([Ot({reflect:!0})],e.ButtonIcon.prototype,"variant",void 0),Se([Ot({reflect:!0})],e.ButtonIcon.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"selected-icon"})],e.ButtonIcon.prototype,"selectedIcon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.ButtonIcon.prototype,"selectable",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.ButtonIcon.prototype,"selected",void 0),Se([Ci("selected",!0)],e.ButtonIcon.prototype,"onSelectedChange",null),e.ButtonIcon=Se([Lt("mdui-button-icon")],e.ButtonIcon);const eo=Pe`:host{--shape-corner:var(--mdui-shape-corner-medium);position:relative;display:inline-block;overflow:hidden;border-radius:var(--shape-corner);-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([clickable]){cursor:pointer}:host([variant=elevated]){background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([variant=filled]){background-color:rgb(var(--mdui-color-surface-container-highest))}:host([variant=outlined]){background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=outlined][hover]){box-shadow:var(--mdui-elevation-level1)}:host([variant=elevated][dragged]),:host([variant=filled][dragged]),:host([variant=outlined][dragged]){box-shadow:var(--mdui-elevation-level3)}:host([disabled]){opacity:.38;cursor:default;-webkit-user-select:none;user-select:none}:host([variant=elevated][disabled]){background-color:rgb(var(--mdui-color-surface-variant));box-shadow:var(--mdui-elevation-level0)}:host([variant=filled][disabled]){background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level1)}:host([variant=outlined][disabled]){box-shadow:var(--mdui-elevation-level0);border-color:rgba(var(--mdui-color-outline),.32)}.link{position:relative;display:inline-block;width:100%;height:100%;color:inherit;font-size:inherit;letter-spacing:inherit;text-decoration:none;touch-action:manipulation;-webkit-user-drag:none}`;e.Card=class extends(Hi(Yi(qi(Xt)))){constructor(){super(...arguments),this.variant="elevated",this.clickable=!1,this.disabled=!1,this.rippleRef=Li()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled||!this.href&&!this.clickable}get focusElement(){return this.href&&!this.disabled?this.renderRoot.querySelector("._a"):this}get focusDisabled(){return this.rippleDisabled}render(){return ft`${this.href&&!this.disabled?this.renderAnchor({className:"link",content:ft``}):ft``}`}},e.Card.styles=[Qt,eo],Se([Ot({reflect:!0})],e.Card.prototype,"variant",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Card.prototype,"clickable",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Card.prototype,"disabled",void 0),e.Card=Se([Lt("mdui-card")],e.Card);const to=qt(class extends jt{constructor(e){if(super(e),e.type!==Ut&&e.type!==Vt&&e.type!==Kt)throw Error("The `live` directive is not allowed on child or event bindings");if(!oi(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===vt||t===gt)return t;const i=e.element,o=e.name;if(e.type===Ut){if(t===i[o])return vt}else if(e.type===Kt){if(!!t===i.hasAttribute(o))return vt}else if(e.type===Vt&&i.getAttribute(o)===t+"")return vt;return((e,t=ri)=>{e._$AH=t})(e),t}});function io(e="value"){return(t,i)=>{const o=t.constructor,r=o.prototype.attributeChangedCallback;o.prototype.attributeChangedCallback=function(t,n,s){const a=o.getPropertyOptions(e);if(t===(c(a.attribute)?a.attribute:e)){const t=a.converter||je,o=(l(t)?t:t?.fromAttribute??je.fromAttribute)(s,a.type);this[e]!==o&&(this[i]=o)}r.call(this,t,n,s)}}}const oo=Pe`:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`,ro=e=>ft`${ii(e)}`;let no=class extends Mt{render(){return ro('')}};no.styles=oo,no=Se([Lt("mdui-icon-check-box-outline-blank")],no);let so=class extends Mt{render(){return ro('')}};so.styles=oo,so=Se([Lt("mdui-icon-check-box")],so);let ao=class extends Mt{render(){return ro('')}};ao.styles=oo,ao=Se([Lt("mdui-icon-indeterminate-check-box")],ao);const lo=Pe`:host{position:relative;display:inline-flex;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}label{display:inline-flex;align-items:center;width:100%;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.125rem;height:1.125rem;margin:0 0 0 .6875rem}.icon{display:flex;position:absolute;opacity:1;transform:scale(1);color:rgb(var(--mdui-color-on-surface));font-size:1.5rem;transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.checked-icon,.indeterminate-icon{opacity:0;transform:scale(.5);transition-property:color,opacity,transform;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=indeterminate-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface));transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]) .indeterminate-icon{opacity:0;transform:scale(.5)}:host([checked]) .checked-icon{opacity:1;transform:scale(1)}:host([indeterminate]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([indeterminate]) .icon{color:rgb(var(--mdui-color-primary))}:host([indeterminate]) .checked-icon{opacity:0;transform:scale(.5)}:host([indeterminate]) .indeterminate-icon{opacity:1;transform:scale(1)}.invalid i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.invalid .icon{color:rgb(var(--mdui-color-error))}.invalid .label{color:rgb(var(--mdui-color-error))}:host([disabled]){cursor:default;pointer-events:none}:host([disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled][checked]) .unchecked-icon,:host([disabled][indeterminate]) .unchecked-icon{opacity:0}`;e.Checkbox=class extends(Yi(qi(Xt))){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.inputRef=Li(),this.rippleRef=Li(),this.formController=new Vi(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft``}onChange(){this.checked=this.inputRef.value.checked,this.indeterminate=!1,this.emit("change")}},e.Checkbox.styles=[Qt,lo],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Checkbox.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Checkbox.prototype,"checked",void 0),Se([io("checked")],e.Checkbox.prototype,"defaultChecked",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Checkbox.prototype,"indeterminate",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Checkbox.prototype,"required",void 0),Se([Ot({reflect:!0})],e.Checkbox.prototype,"form",void 0),Se([Ot({reflect:!0})],e.Checkbox.prototype,"name",void 0),Se([Ot({reflect:!0})],e.Checkbox.prototype,"value",void 0),Se([Ot({reflect:!0,attribute:"unchecked-icon"})],e.Checkbox.prototype,"uncheckedIcon",void 0),Se([Ot({reflect:!0,attribute:"checked-icon"})],e.Checkbox.prototype,"checkedIcon",void 0),Se([Ot({reflect:!0,attribute:"indeterminate-icon"})],e.Checkbox.prototype,"indeterminateIcon",void 0),Se([zt()],e.Checkbox.prototype,"invalid",void 0),Se([Ci("disabled",!0),Ci("indeterminate",!0),Ci("required",!0)],e.Checkbox.prototype,"onDisabledChange",null),Se([Ci("checked",!0)],e.Checkbox.prototype,"onCheckedChange",null),e.Checkbox=Se([Lt("mdui-checkbox")],e.Checkbox);let co=class extends Mt{render(){return ro('')}};co.styles=oo,co=Se([Lt("mdui-icon-check")],co);let ho=class extends Mt{render(){return ro('')}};ho.styles=oo,ho=Se([Lt("mdui-icon-clear")],ho);const uo=Pe`:host{--shape-corner:var(--mdui-shape-corner-small);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);height:2rem;background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.button{padding-right:.4375rem;padding-left:.4375rem}:host([variant=input]) .button{padding-right:.1875rem;padding-left:.1875rem}:host([selected]) .button{padding-right:.5rem;padding-left:.5rem}:host([selected][variant=input]) .button{padding-right:.25rem;padding-left:.25rem}:host([elevated]) .button{padding-right:.5rem;padding-left:.5rem}:host([variant=assist]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([elevated]){border-width:0;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));border-width:0;--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-secondary-container + )}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){border-color:rgba(var(--mdui-color-on-surface),12%);color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([disabled][elevated]),:host([disabled][selected]){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([selected][hover]){box-shadow:var(--mdui-elevation-level1)}:host([elevated][hover]){color:rgb(var(--mdui-color-on-secondary-container));box-shadow:var(--mdui-elevation-level2)}:host([variant=filter][hover]),:host([variant=input][hover]),:host([variant=suggestion][hover]){color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=filter][focus-visible]),:host([variant=input][focus-visible]),:host([variant=suggestion][focus-visible]){border-color:rgb(var(--mdui-color-on-surface-variant))}:host([dragged]),:host([dragged][hover]){box-shadow:var(--mdui-elevation-level4)}.button{overflow:visible}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em;color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=assist]) .end-icon,:host([variant=assist]) .icon,:host([variant=assist]) .selected-icon{color:rgb(var(--mdui-color-primary))}:host([selected]) .end-icon,:host([selected]) .icon,:host([selected]) .selected-icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]) .end-icon,:host([disabled]) .icon,:host([disabled]) .selected-icon{opacity:.38;color:rgb(var(--mdui-color-on-surface))}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}:host([variant=input]) .has-icon .icon,:host([variant=input]) .has-icon .selected-icon,:host([variant=input]) .has-icon mdui-circular-progress{margin-left:.25rem}:host([variant=input]) .has-end-icon .end-icon{margin-right:.25rem}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}::slotted(mdui-avatar[slot=end-icon]),::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){width:1.5rem;height:1.5rem}:host([disabled]) ::slotted(mdui-avatar[slot=end-icon]),:host([disabled]) ::slotted(mdui-avatar[slot=icon]),:host([disabled]) ::slotted(mdui-avatar[slot=selected-icon]){opacity:.38}::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){margin-left:-.25rem;margin-right:-.125rem}::slotted(mdui-avatar[slot=end-icon]){margin-right:-.25rem;margin-left:-.125rem}.delete-icon{display:inline-flex;font-size:1.28571429em;transition:background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);border-radius:var(--mdui-shape-corner-full);margin-right:-.25rem;margin-left:-.25rem;padding:.25rem;color:rgb(var(--mdui-color-on-surface-variant))}.delete-icon:hover{background-color:rgba(var(--mdui-color-on-surface-variant),12%)}.has-end-icon .delete-icon{margin-left:.25rem}:host([variant=assiat]) .delete-icon{color:rgb(var(--mdui-color-primary))}:host([variant=input]) .delete-icon{margin-right:.0625rem}:host([disabled]) .delete-icon{color:rgba(var(--mdui-color-on-surface),38%)}.delete-icon .i,::slotted([slot=delete-icon]){font-size:inherit}::slotted(mdui-avatar[slot=delete-icon]){width:1.125rem;height:1.125rem}`;e.Chip=class extends Ji{constructor(){super(),this.variant="assist",this.elevated=!1,this.selectable=!1,this.selected=!1,this.deletable=!1,this.rippleRef=Li(),this.hasSlotController=new Jt(this,"icon","selected-icon","end-icon"),this.onClick=this.onClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.endIcon||this.hasSlotController.test("end-icon"),i=this.selectedIcon||["assist","filter"].includes(this.variant)||e||this.hasSlotController.test("selected-icon"),o=zi({button:!0,"has-icon":this.loading||!this.selected&&e||this.selected&&i,"has-end-icon":t});return ft`${this.isButton()?this.renderButton({className:o,part:"button",content:this.renderInner()}):this.disabled||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:o,part:"button",content:this.renderInner()})}`}onClick(){this.disabled||this.loading||this.selectable&&(this.selected=!this.selected)}onKeyDown(e){this.disabled||this.loading||(this.selectable&&" "===e.key&&(e.preventDefault(),this.selected=!this.selected),this.deletable&&["Delete","Backspace"].includes(e.key)&&this.emit("delete"))}onDelete(e){e.stopPropagation(),this.emit("delete")}renderIcon(){if(this.loading)return this.renderLoading();const e=()=>this.icon?ft``:Zt;return this.selected?ft`${(()=>this.selectedIcon?ft``:"assist"===this.variant||"filter"===this.variant?ft``:e())()}`:ft`${e()}`}renderLabel(){return ft``}renderEndIcon(){return ft`${this.endIcon?ft``:Zt}`}renderDeleteIcon(){return this.deletable?ft`${this.deleteIcon?ft``:ft``}`:Zt}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon(),this.renderDeleteIcon()]}},e.Chip.styles=[Ji.styles,uo],Se([Ot({reflect:!0})],e.Chip.prototype,"variant",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Chip.prototype,"elevated",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Chip.prototype,"selectable",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Chip.prototype,"selected",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Chip.prototype,"deletable",void 0),Se([Ot({reflect:!0})],e.Chip.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"selected-icon"})],e.Chip.prototype,"selectedIcon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.Chip.prototype,"endIcon",void 0),Se([Ot({reflect:!0,attribute:"delete-icon"})],e.Chip.prototype,"deleteIcon",void 0),Se([Ci("selected",!0)],e.Chip.prototype,"onSelectedChange",null),e.Chip=Se([Lt("mdui-chip")],e.Chip);const po=(e,t)=>{if(e.length!==t.length)return!1;const i=[...e].sort(),o=[...t].sort();return i.every(((e,t)=>e===o[t]))},mo=Pe`:host{display:block}`;e.Collapse=class extends Xt{constructor(){super(...arguments),this.accordion=!1,this.disabled=!1,this.activeKeys=[],this.isInitial=!0,this.definedController=new ki(this,{relatedElements:["mdui-collapse-item"]})}async onActiveKeysChange(){await this.definedController.whenDefined();const e=this.accordion?this.items.find((e=>this.activeKeys.includes(e.key)))?.value:this.items.filter((e=>this.activeKeys.includes(e.key))).map((e=>e.value));this.setValue(e),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),this.accordion){const e=this.value;if(e){const t=this.items.find((t=>t.value===e));this.setActiveKeys(t?[t.key]:[])}else this.setActiveKeys([])}else{const e=this.value;if(e.length){const t=this.items.filter((t=>e.includes(t.value))).map((e=>e.key));this.setActiveKeys(t)}else this.setActiveKeys([])}this.updateItems()}render(){return ft``}setActiveKeys(e){po(this.activeKeys,e)||(this.activeKeys=e)}setValue(e){this.accordion||u(this.value)||u(e)?this.value=e:po(this.value,e)||(this.value=e)}onClick(e){if(this.disabled)return;if(e.button)return;const t=e.target.closest("mdui-collapse-item");if(!t||t.disabled)return;const i=e.composedPath();if((!t.trigger||i.find((e=>v(e)&&M(e).is(t.trigger))))&&i.find((e=>v(e)&&e.part.contains("header")))){if(this.accordion)this.activeKeys.includes(t.key)?this.setActiveKeys([]):this.setActiveKeys([t.key]);else{const e=[...this.activeKeys];e.includes(t.key)?e.splice(e.indexOf(t.key),1):e.push(t.key),this.setActiveKeys(e)}this.isInitial=!1,this.updateItems()}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}updateItems(){this.items.forEach((e=>{e.active=this.activeKeys.includes(e.key),e.isInitial=this.isInitial}))}},e.Collapse.styles=[Qt,mo],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Collapse.prototype,"accordion",void 0),Se([Ot()],e.Collapse.prototype,"value",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Collapse.prototype,"disabled",void 0),Se([zt()],e.Collapse.prototype,"activeKeys",void 0),Se([Nt({selector:"mdui-collapse-item",flatten:!0})],e.Collapse.prototype,"items",void 0),Se([Ci("activeKeys",!0)],e.Collapse.prototype,"onActiveKeysChange",null),Se([Ci("value")],e.Collapse.prototype,"onValueChange",null),e.Collapse=Se([Lt("mdui-collapse")],e.Collapse);const fo=Pe`:host{display:flex;flex-direction:column}.header{display:block}.body{display:block;overflow:hidden;transition:height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-emphasized)}.body.opened{overflow:visible}.body.active{transition-duration:var(--mdui-motion-duration-medium4)}`;function vo(e,t,i){return e?t(e):i?.(e)}function go(e,t,i){return e?new Promise((o=>{if(i.duration===1/0)throw new Error("Promise-based animations must be finite.");d(i.duration)&&isNaN(i.duration)&&(i.duration=0),""===i.easing&&(i.easing="linear");const r=e.animate(t,i);r.addEventListener("cancel",o,{once:!0}),r.addEventListener("finish",o,{once:!0})})):Promise.resolve()}function bo(e){return e?Promise.all(e.getAnimations().map((e=>new Promise((t=>{const i=requestAnimationFrame(t);e.addEventListener("cancel",(()=>i),{once:!0}),e.addEventListener("finish",(()=>i),{once:!0}),e.cancel()}))))):Promise.resolve()}function yo(e){const t=s(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i)))))))))}e.CollapseItem=class extends Xt{constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.state="closed",this.isInitial=!0,this.key=Ri(),this.bodyRef=Li()}onActiveChange(){this.isInitial?(this.state=this.active?"opened":"closed",this.hasUpdated&&this.updateBodyHeight()):(this.state=this.active?"open":"close",this.emit(this.state),this.updateBodyHeight())}firstUpdated(e){super.firstUpdated(e),this.updateBodyHeight()}render(){return ft`${this.header}`}onTransitionEnd(e){e.target===this.bodyRef.value&&(this.state=this.active?"opened":"closed",this.emit(this.state),this.updateBodyHeight())}updateBodyHeight(){const e=this.bodyRef.value.scrollHeight;"close"===this.state&&(M(this.bodyRef.value).height(e),this.bodyRef.value.clientLeft),M(this.bodyRef.value).height("opened"===this.state?"auto":"open"===this.state?e:0)}},e.CollapseItem.styles=[Qt,fo],Se([Ot({reflect:!0})],e.CollapseItem.prototype,"value",void 0),Se([Ot({reflect:!0})],e.CollapseItem.prototype,"header",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.CollapseItem.prototype,"disabled",void 0),Se([Ot()],e.CollapseItem.prototype,"trigger",void 0),Se([zt()],e.CollapseItem.prototype,"active",void 0),Se([zt()],e.CollapseItem.prototype,"state",void 0),Se([Ci("active")],e.CollapseItem.prototype,"onActiveChange",null),e.CollapseItem=Se([Lt("mdui-collapse-item")],e.CollapseItem);let wo=[];class ko{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){wo.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){wo=wo.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return wo[wo.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>yo(e)))??null,end:t.reverse().find((e=>yo(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}const Co=(e,t)=>{const i=`--mdui-motion-easing-${t}`;return M(e).css(i).trim()},xo=(e,t)=>{const i=`--mdui-motion-duration-${t}`,o=M(e).css(i).trim().toLowerCase();return o.endsWith("ms")?parseFloat(o):1e3*parseFloat(o)};let $o;const Ro=e=>{if(u(document))return 0;if(void 0===$o){const e=M("
").css({width:"100%",height:"200px"}),t=M("
").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let o=e[0].offsetWidth;i===o&&(o=t[0].clientWidth),t.remove(),$o=i-o}return $o},Io=new WeakMap,So="mdui-lock-screen",Eo=(e,t)=>{const i=r();t??=i.documentElement,Io.has(t)||Io.set(t,new Set);Io.get(t).add(e);const o=M(t);(e=>e.scrollHeight>e.clientHeight)(t)&&o.css("width",`calc(100% - ${Ro()}px)`),o.addClass(So)},To=(e,t)=>{const i=r();t??=i.documentElement;const o=Io.get(t);o&&(o.delete(e),0===o.size&&(Io.delete(t),M(t).removeClass(So).width("")))},Ao=(e,t,i)=>{let o=e[0];for(let r=1;r{return"string"!=typeof(t=e)&&"strTag"in t?Ao(e.strings,e.values):e;var t},Mo="lit-localize-status";class Po{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}const Lo=[];for(let e=0;e<256;e++)Lo[e]=(e>>4&15).toString(16)+(15&e).toString(16);const _o="",Bo="h",Oo="s";function zo(e,t){return(t?Bo:Oo)+function(e){let t=0,i=8997,o=0,r=33826,n=0,s=40164,a=0,l=52210;for(let c=0;c>>16,i=65535&t,n+=o>>>16,r=65535&o,l=a+(n>>>16)&65535,s=65535&n;return Lo[l>>8]+Lo[255&l]+Lo[s>>8]+Lo[255&s]+Lo[r>>8]+Lo[255&r]+Lo[i>>8]+Lo[255&i]}("string"==typeof e?e:e.join(_o))}const No=new WeakMap,Fo=new Map;function Vo(e,t,i){if(e){const o=i?.id??function(e){const t="string"==typeof e?e:e.strings;let i=Fo.get(t);void 0===i&&(i=zo(t,"string"!=typeof e&&!("strTag"in e)),Fo.set(t,i));return i}(t),r=e[o];if(r){if("string"==typeof r)return r;if("strTag"in r)return Ao(r.strings,t.values,r.values);{let e=No.get(r);return void 0===e&&(e=r.values,No.set(r,e)),{...r,values:e.map((e=>t.values[e]))}}}}return Do(t)}function Ho(e){window.dispatchEvent(new CustomEvent(Mo,{detail:e}))}let Uo,Ko,qo,jo,Wo,Go="",Yo=new Po;Yo.resolve();let Xo=0;const Jo=e=>(function(e){if(tr)throw new Error("lit-localize can only be configured once");er=e,tr=!0}(((e,t)=>Vo(Wo,e,t))),Go=Ko=e.sourceLocale,qo=new Set(e.targetLocales),qo.add(e.sourceLocale),jo=e.loadLocale,{getLocale:Zo,setLocale:Qo}),Zo=()=>Go,Qo=e=>{if(e===(Uo??Go))return Yo.promise;if(!qo||!jo)throw new Error("Internal error");if(!qo.has(e))throw new Error("Invalid locale code");Xo++;const t=Xo;Uo=e,Yo.settled&&(Yo=new Po),Ho({status:"loading",loadingLocale:e});return(e===Ko?Promise.resolve({templates:void 0}):jo(e)).then((i=>{Xo===t&&(Go=e,Uo=void 0,Wo=i.templates,Ho({status:"ready",readyLocale:e}),Yo.resolve())}),(i=>{Xo===t&&(Ho({status:"error",errorLocale:e,errorMessage:i.toString()}),Yo.reject(i))})),Yo.promise};let er=Do,tr=!1;const ir=["ar-eg","az-az","be-by","bg-bg","bn-bd","ca-es","cs-cz","da-dk","de-de","el-gr","en-gb","es-es","et-ee","fa-ir","fi-fi","fr-be","fr-ca","fr-fr","ga-ie","gl-es","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","km-kh","kmr-iq","kn-in","ko-kr","lt-lt","lv-lv","mk-mk","ml-in","mn-mn","ms-my","nb-no","ne-np","nl-be","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-rs","sv-se","ta-in","th-th","tr-tr","uk-ua","ur-pk","vi-vn","zh-cn","zh-hk","zh-tw"],or="You must call `loadLocale` first to set up the localized template.";let rr,nr;let sr=!1;const ar=new Map,lr=(e,t)=>{if(!sr){sr=!0;s().addEventListener(Mo,(e=>{"ready"===e.detail.status&&ar.forEach((e=>{e.forEach((e=>e()))}))}))}const i=ar.get(e)||[];i.push(t),ar.set(e,i)},cr=e=>{ar.delete(e)},dr=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]) .action{flex-direction:column;align-items:end}:host([stacked-actions]) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;e.Dialog=class extends Xt{constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=Li(),this.panelRef=Li(),this.bodyRef=Li(),this.hasSlotController=new Jt(this,"header","icon","headline","description","action","[default]"),this.definedController=new ki(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=Co(this,"linear"),o=Co(this,"emphasized-decelerate"),r=Co(this,"emphasized-accelerate"),n=()=>Promise.all([bo(this.overlayRef.value),bo(this.panelRef.value),...t.map((e=>bo(e)))]);if(this.open){if(e){if(!this.emit("open",{cancelable:!0}))return}this.style.display="flex";const r=this.topAppBarElements??[];if(r.length){const e=r[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),Eo(this),await n(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const s=xo(this,"medium4");await Promise.all([go(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?s:0,easing:i}),go(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?s:0,easing:o}),go(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?s:0,easing:i}),...t.map((t=>go(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?s:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await n();const e=xo(this,"short4");await Promise.all([go(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),go(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:r}),go(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>go(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",To(this);const o=this.originalTrigger;"function"==typeof o?.focus&&setTimeout((()=>o.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),To(this),cr(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new ko(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),o=!!this.headline||this.hasSlotController.test("headline"),r=!!this.description||this.hasSlotController.test("description"),n=i||o||this.hasSlotController.test("header"),s=r||t;return ft`
${vo(n,(()=>ft`${vo(i,(()=>this.renderIcon()))} ${vo(o,(()=>this.renderHeadline()))}`))} ${vo(s,(()=>ft`
${vo(r,(()=>this.renderDescription()))}
`))} ${vo(e,(()=>ft``))}
`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return ft`${this.icon?ft``:Zt}`}renderHeadline(){return ft`${this.headline}`}renderDescription(){return ft`${this.description}`}},e.Dialog.styles=[Qt,dr],Se([Ot({reflect:!0})],e.Dialog.prototype,"icon",void 0),Se([Ot({reflect:!0})],e.Dialog.prototype,"headline",void 0),Se([Ot({reflect:!0})],e.Dialog.prototype,"description",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Dialog.prototype,"open",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Dialog.prototype,"fullscreen",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"close-on-esc"})],e.Dialog.prototype,"closeOnEsc",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"close-on-overlay-click"})],e.Dialog.prototype,"closeOnOverlayClick",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"stacked-actions"})],e.Dialog.prototype,"stackedActions",void 0),Se([Nt({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],e.Dialog.prototype,"topAppBarElements",void 0),Se([Ci("open")],e.Dialog.prototype,"onOpenChange",null),e.Dialog=Se([Lt("mdui-dialog")],e.Dialog);const hr=Pe`:host{display:block;height:.0625rem;background-color:rgb(var(--mdui-color-surface-variant))}:host([inset]){margin-left:1rem}:host([middle]){margin-left:1rem;margin-right:1rem}:host([vertical]){height:100%;width:.0625rem}`;function ur(e){return mr(e)?(e.nodeName||"").toLowerCase():"#document"}function pr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function mr(e){return e instanceof Node||e instanceof pr(e).Node}function fr(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof pr(e).ShadowRoot)}function vr(e){const{overflow:t,overflowX:i,overflowY:o,display:r}=function(e){return pr(e).getComputedStyle(e)}(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(r)}function gr(e){if("html"===ur(e))return e;const t=e.assignedSlot||e.parentNode||fr(e)&&e.host||function(e){var t;return null==(t=(mr(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}(e);return fr(t)?t.host:t}function br(e){const t=gr(e);return function(e){return["html","body","#document"].includes(ur(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:((i=t)instanceof HTMLElement||i instanceof pr(i).HTMLElement)&&vr(t)?t:br(t);var i}function yr(e,t,i){var o;void 0===t&&(t=[]),void 0===i&&(i=!0);const r=br(e),n=r===(null==(o=e.ownerDocument)?void 0:o.body),s=pr(r);return n?t.concat(s,s.visualViewport||[],vr(r)?r:[],s.frameElement&&i?yr(s.frameElement):[]):t.concat(r,yr(r,[],i))}e.Divider=class extends Xt{constructor(){super(...arguments),this.vertical=!1,this.inset=!1,this.middle=!1}render(){return ft``}},e.Divider.styles=[Qt,hr],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Divider.prototype,"vertical",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Divider.prototype,"inset",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Divider.prototype,"middle",void 0),e.Divider=Se([Lt("mdui-divider")],e.Divider);const wr=Pe`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;e.Dropdown=class extends Xt{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=Li(),this.definedController=new ki(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Co(this,"linear"),i=Co(this,"emphasized-decelerate"),o=Co(this,"emphasized-accelerate");if(this.open){if(e){if(!this.emit("open",{cancelable:!0}))return}const o=this.panelElements.find((e=>l(e.focus)));setTimeout((()=>{o?.focus()}));const r=xo(this,"medium4");await bo(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([go(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:e?r:0,easing:i}),go(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?r:0,easing:t})]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&l(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const e=xo(this,"short4");await bo(this.panelRef.value),await Promise.all([go(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:e,easing:o}),go(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=yr(this.triggerElement),this.overflowAncestors.forEach((e=>{e.addEventListener("scroll",this.onWindowScroll)}))}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((e=>{e.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter),this.observeResize=Ei(this.triggerElement,(()=>{this.updatePositioner()}))}))}render(){return ft``}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(e){if(this.disabled||!this.open)return;const t=e.composedPath();t.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&t.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(e){!this.disabled&&this.open&&("Escape"!==e.key?"Tab"===e.key&&(!this.hasTrigger("focus")&&l(this.triggerElement?.focus)&&e.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!this.open)}onPanelClick(e){this.disabled||this.stayOpenOnClick||!M(e.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(e){!this.disabled&&this.hasTrigger("contextmenu")&&(e.preventDefault(),this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const e=M(this.panelRef.value),t=M(window),i=this.panelElements,o=Math.max(...i?.map((e=>e.offsetWidth))??[]),r=i?.map((e=>e.offsetHeight)).reduce(((e,t)=>e+t),0),n=this.triggerElement.getBoundingClientRect(),s=this.openOnPointer?{top:this.pointerOffsetY+n.top,left:this.pointerOffsetX+n.left,width:0,height:0}:n;let a,l,c,d,h=this.placement;if("auto"===h){const e=t.width(),i=t.height();let n,a;n=i-s.top-s.height>r+8?"bottom":s.top>r+8?"top":e-s.left-s.width>o+8?"right":s.left>o+8?"left":"bottom",a=["top","bottom"].includes(n)?e-s.left>o+8?"start":s.left+s.width/2>o/2+8&&e-s.left-s.width/2>o/2+8?void 0:s.left+s.width>o+8?"end":"start":i-s.top>r+8?"start":s.top+s.height/2>r/2+8&&i-s.top-s.height/2>r/2+8?void 0:s.top+s.height>r+8?"end":"start",h=a?[n,a].join("-"):n}const[u,p]=h.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":l="bottom",c=s.top-r;break;case"bottom":l="top",c=s.top+s.height;break;default:switch(l="center",p){case"start":c=s.top;break;case"end":c=s.top+s.height-r;break;default:c=s.top+s.height/2-r/2}}switch(u){case"left":a="right",d=s.left-o;break;case"right":a="left",d=s.left+s.width;break;default:switch(a="center",p){case"start":d=s.left;break;case"end":d=s.left+s.width-o;break;default:d=s.left+s.width/2-o/2}}e.css({top:c,left:d,transformOrigin:[a,l].join(" ")})}},e.Dropdown.styles=[Qt,wr],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Dropdown.prototype,"open",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Dropdown.prototype,"disabled",void 0),Se([Ot({reflect:!0})],e.Dropdown.prototype,"trigger",void 0),Se([Ot({reflect:!0})],e.Dropdown.prototype,"placement",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"stay-open-on-click"})],e.Dropdown.prototype,"stayOpenOnClick",void 0),Se([Ot({type:Number,reflect:!0,attribute:"open-delay"})],e.Dropdown.prototype,"openDelay",void 0),Se([Ot({type:Number,reflect:!0,attribute:"close-delay"})],e.Dropdown.prototype,"closeDelay",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"open-on-pointer"})],e.Dropdown.prototype,"openOnPointer",void 0),Se([Nt({slot:"trigger",flatten:!0})],e.Dropdown.prototype,"triggerElements",void 0),Se([Nt({flatten:!0})],e.Dropdown.prototype,"panelElements",void 0),Se([Ci("placement",!0),Ci("openOnPointer",!0)],e.Dropdown.prototype,"onPositionChange",null),Se([Ci("open")],e.Dropdown.prototype,"onOpenChange",null),e.Dropdown=Se([Lt("mdui-dropdown")],e.Dropdown);const kr=(e=0)=>new Promise((t=>setTimeout(t,e))),Cr=Pe`:host{--shape-corner-small:var(--mdui-shape-corner-small);--shape-corner-normal:var(--mdui-shape-corner-large);--shape-corner-large:var(--mdui-shape-corner-extra-large);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner-normal);cursor:pointer;-webkit-tap-highlight-color:transparent;transition-property:box-shadow;transition-timing-function:var(--mdui-motion-easing-emphasized);transition-duration:var(--mdui-motion-duration-medium4);width:3.5rem;height:3.5rem;box-shadow:var(--mdui-elevation-level3);font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{padding:0 1rem}:host([size=small]) .button{padding:0 .5rem}:host([size=large]) .button{padding:0 1.875rem}:host([lowered]){box-shadow:var(--mdui-elevation-level1)}:host([focus-visible]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][focus-visible]){box-shadow:var(--mdui-elevation-level1)}:host([pressed]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][pressed]){box-shadow:var(--mdui-elevation-level1)}:host([hover]){box-shadow:var(--mdui-elevation-level4)}:host([lowered][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=primary]){color:rgb(var(--mdui-color-on-primary-container));background-color:rgb(var(--mdui-color-primary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-primary-container + )}:host([variant=surface]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-high));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=surface][lowered]){background-color:rgb(var(--mdui-color-surface-container-low))}:host([variant=secondary]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-secondary-container + )}:host([variant=tertiary]){color:rgb(var(--mdui-color-on-tertiary-container));background-color:rgb(var(--mdui-color-tertiary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-tertiary-container + )}:host([size=small]){border-radius:var(--shape-corner-small);width:2.5rem;height:2.5rem}:host([size=large]){border-radius:var(--shape-corner-large);width:6rem;height:6rem}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),12%);box-shadow:var(--mdui-elevation-level0)}:host([extended]){width:auto}.label{display:inline-flex;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short2);padding-left:.25rem;padding-right:.25rem}.has-icon .label{margin-left:.5rem}:host([size=small]) .has-icon .label{margin-left:.25rem}:host([size=large]) .has-icon .label{margin-left:1rem}:host(:not([extended])) .label{opacity:0;transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([size=large]) .label{font-size:1.5em}.icon{display:inline-flex;font-size:1.71428571em}:host([size=large]) .icon{font-size:2.57142857em}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.5rem;height:1.5rem}:host([size=large]) mdui-circular-progress{width:2.25rem;height:2.25rem}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;e.Fab=class extends Ji{constructor(){super(...arguments),this.variant="primary",this.size="normal",this.extended=!1,this.rippleRef=Li(),this.hasSlotController=new Jt(this,"icon"),this.definedController=new ki(this,{relatedElements:[""]})}get rippleElement(){return this.rippleRef.value}async onExtendedChange(){const e=this.hasUpdated;this.extended?this.style.width=`${this.scrollWidth}px`:this.style.width="",await this.definedController.whenDefined(),await this.updateComplete,this.extended&&!e&&(this.style.width=`${this.scrollWidth}px`),e||(await kr(),this.style.transitionProperty="box-shadow, width, bottom, transform")}render(){const e=zi({button:!0,"has-icon":this.icon||this.hasSlotController.test("icon")});return ft`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.disabled||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}renderLabel(){return ft``}renderIcon(){return this.loading?this.renderLoading():ft`${this.icon?ft``:Zt}`}renderInner(){return[this.renderIcon(),this.renderLabel()]}},e.Fab.styles=[Ji.styles,Cr],Se([Ot({reflect:!0})],e.Fab.prototype,"variant",void 0),Se([Ot({reflect:!0})],e.Fab.prototype,"size",void 0),Se([Ot({reflect:!0})],e.Fab.prototype,"icon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Fab.prototype,"extended",void 0),Se([Ci("extended")],e.Fab.prototype,"onExtendedChange",null),e.Fab=Se([Lt("mdui-fab")],e.Fab);const xr=Pe`:host{position:relative;display:flex;flex:1 1 auto;overflow:hidden}:host([full-height]){height:100%}`;e.Layout=class extends Xt{constructor(){super(...arguments),this.fullHeight=!1}render(){return ft``}},e.Layout.styles=[Qt,xr],Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"full-height"})],e.Layout.prototype,"fullHeight",void 0),e.Layout=Se([Lt("mdui-layout")],e.Layout);const $r=Pe`:host{display:flex;z-index:1}`;e.LayoutItem=class extends Mi{constructor(){super(...arguments),this.placement="top"}get layoutPlacement(){return this.placement}onPlacementChange(){this.layoutManager?.updateLayout(this)}render(){return ft``}},e.LayoutItem.styles=[Qt,$r],Se([Ot({reflect:!0})],e.LayoutItem.prototype,"placement",void 0),Se([Ci("placement",!0)],e.LayoutItem.prototype,"onPlacementChange",null),e.LayoutItem=Se([Lt("mdui-layout-item")],e.LayoutItem);const Rr=Pe`:host{flex:1 0 auto;max-width:100%;overflow:auto}`;e.LayoutMain=class extends Xt{connectedCallback(){super.connectedCallback();const e=this.parentElement;a(e,"mdui-layout")&&(this.layoutManager=Di(e),this.layoutManager.registerMain(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterMain()}render(){return ft``}},e.LayoutMain.styles=[Qt,Rr],e.LayoutMain=Se([Lt("mdui-layout-main")],e.LayoutMain);const Ir=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);position:relative;display:inline-block;width:100%;overflow:hidden;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container-highest));height:.25rem}.determinate,.indeterminate{background-color:rgb(var(--mdui-color-primary))}.determinate{height:100%;transition:width var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate::before{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate 2s var(--mdui-motion-easing-linear) infinite;content:' '}.indeterminate::after{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate-short 2s var(--mdui-motion-easing-linear) infinite;content:' '}@keyframes mdui-comp-progress-indeterminate{0%{left:0;width:0}50%{left:30%;width:70%}75%{left:100%;width:0}}@keyframes mdui-comp-progress-indeterminate-short{0%{left:0;width:0}50%{left:0;width:0}75%{left:0;width:25%}100%{left:100%;width:0}}`;e.LinearProgress=class extends Xt{constructor(){super(...arguments),this.max=1}render(){if(!u(this.value)){const e=this.value;return ft`
`}return ft`
`}},e.LinearProgress.styles=[Qt,Ir],Se([Ot({type:Number,reflect:!0})],e.LinearProgress.prototype,"max",void 0),Se([Ot({type:Number})],e.LinearProgress.prototype,"value",void 0),e.LinearProgress=Se([Lt("mdui-linear-progress")],e.LinearProgress);const Sr=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--shape-corner-rounded:var(--mdui-shape-corner-extra-large);position:relative;display:block;border-radius:var(--shape-corner);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([rounded]),:host([rounded]) mdui-ripple{border-radius:var(--shape-corner-rounded)}:host([active]){background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-secondary-container + )}:host([disabled]){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;color:inherit;-webkit-tap-highlight-color:transparent}:host([disabled]) .container{cursor:default;opacity:.38}:host([nonclickable]:not([href])) .container{cursor:auto;-webkit-user-select:auto;user-select:auto}.preset{display:flex;align-items:center;padding:.5rem 1.5rem .5rem 1rem;min-height:3.5rem}:host([alignment=start]) .preset{align-items:flex-start}:host([alignment=end]) .preset{align-items:flex-end}.body{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;min-width:0}.headline{display:block;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([active]) .headline{color:rgb(var(--mdui-color-on-secondary-container))}.description{display:none;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([disabled]) .description,:host([focused]) .description,:host([hover]) .description,:host([pressed]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description .description{display:block}:host([description-line='1']) .description,:host([headline-line='1']) .headline{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([description-line='2']) .description,:host([description-line='3']) .description,:host([headline-line='2']) .headline,:host([headline-line='3']) .headline{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}:host([description-line='2']) .description,:host([headline-line='2']) .headline{-webkit-line-clamp:2}:host([description-line='3']) .description,:host([headline-line='3']) .headline{-webkit-line-clamp:3}.end-icon,.icon{display:flex;flex:0 0 auto;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]) .end-icon,:host([disabled]) .icon,:host([focused]) .end-icon,:host([focused]) .icon,:host([hover]) .end-icon,:host([hover]) .icon,:host([pressed]) .end-icon,:host([pressed]) .icon{color:rgb(var(--mdui-color-on-surface))}:host([active]) .end-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}.end-icon mdui-icon,.icon mdui-icon,.is-end-icon ::slotted([slot=end-icon]),.is-icon ::slotted([slot=icon]){font-size:1.5rem}.has-icon .icon{margin-right:1rem}.has-icon ::slotted(mdui-checkbox[slot=icon]),.has-icon ::slotted(mdui-radio[slot=icon]){margin-left:-.5rem}.has-end-icon .end-icon{margin-left:1rem}.has-end-icon ::slotted(mdui-checkbox[slot=end-icon]),.has-end-icon ::slotted(mdui-radio[slot=end-icon]){margin-right:-.5rem}`;e.ListItem=class extends(Hi(Yi(qi(Xt)))){constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.nonclickable=!1,this.rounded=!1,this.alignment="center",this.rippleRef=Li(),this.itemRef=Li(),this.hasSlotController=new Jt(this,"[default]","description","icon","end-icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.focusDisabled}get focusElement(){return this.href&&!this.disabled?this.itemRef.value:this}get focusDisabled(){return this.href?this.disabled:this.disabled||this.nonclickable}render(){const e=zi({container:!0,preset:!this.hasSlotController.test("custom"),"has-icon":this.icon||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon"),"has-description":this.description||this.hasSlotController.test("description"),"is-icon":a(this.iconElements[0],"mdui-icon"),"is-end-icon":(t=this.endIconElements[0],t?.nodeName.toLowerCase()??"").startsWith("mdui-icon-")});var t;return ft`${this.href&&!this.disabled?this.renderAnchor({className:e,content:this.renderInner(),part:"container",refDirective:Oi(this.itemRef)}):ft`
${this.renderInner()}
`}`}renderInner(){const e=this.hasSlotController.test("[default]");return ft`${this.icon?ft``:Zt}
${e?ft``:ft`
${this.headline}
`}${this.description}
${this.endIcon?ft``:Zt}
`}},e.ListItem.styles=[Qt,Sr],Se([Ot({reflect:!0})],e.ListItem.prototype,"headline",void 0),Se([Ot({type:Number,reflect:!0,attribute:"headline-line"})],e.ListItem.prototype,"headlineLine",void 0),Se([Ot({reflect:!0})],e.ListItem.prototype,"description",void 0),Se([Ot({type:Number,reflect:!0,attribute:"description-line"})],e.ListItem.prototype,"descriptionLine",void 0),Se([Ot({reflect:!0})],e.ListItem.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.ListItem.prototype,"endIcon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.ListItem.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.ListItem.prototype,"active",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.ListItem.prototype,"nonclickable",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.ListItem.prototype,"rounded",void 0),Se([Ot({reflect:!0})],e.ListItem.prototype,"alignment",void 0),Se([Nt({slot:"icon",flatten:!0})],e.ListItem.prototype,"iconElements",void 0),Se([Nt({slot:"end-icon",flatten:!0})],e.ListItem.prototype,"endIconElements",void 0),e.ListItem=Se([Lt("mdui-list-item")],e.ListItem);const Er=Pe`:host{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);padding-left:1rem;padding-right:1.5rem;height:3.5rem;line-height:3.5rem}`;e.ListSubheader=class extends Xt{render(){return ft``}},e.ListSubheader.styles=[Qt,Er],e.ListSubheader=Se([Lt("mdui-list-subheader")],e.ListSubheader);const Tr=Pe`:host{display:block;padding:.5rem 0}::slotted(mdui-divider[middle]){margin-left:1rem;margin-right:1.5rem}`;e.List=class extends Xt{render(){return ft``}},e.List.styles=[Qt,Tr],e.List=Se([Lt("mdui-list")],e.List);let Ar=class extends Mt{render(){return ro('')}};Ar.styles=oo,Ar=Se([Lt("mdui-icon-arrow-right")],Ar);const Dr=Pe`:host{position:relative;display:block}:host([selected]){background-color:rgba(var(--mdui-color-primary),12%)}:host([disabled]){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host([disabled]) .container{cursor:default;opacity:.38}.preset{display:flex;align-items:center;text-decoration:none;height:3rem;padding:0 .75rem}.preset.dense{height:2rem}.label-container{flex:1 1 100%;min-width:0}.label{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.end-icon,.end-text,.icon,.selected-icon{display:none;flex:0 0 auto;color:rgb(var(--mdui-color-on-surface-variant))}.has-end-icon .end-icon,.has-end-text .end-text,.has-icon .icon,.has-icon .selected-icon{display:flex}.end-icon,.icon,.selected-icon{font-size:1.5rem}.end-icon::slotted(mdui-avatar),.icon::slotted(mdui-avatar),.selected-icon::slotted(mdui-avatar){width:1.5rem;height:1.5rem}.dense .end-icon,.dense .icon,.dense .selected-icon{font-size:1.125rem}.dense .end-icon::slotted(mdui-avatar),.dense .icon::slotted(mdui-avatar),.dense .selected-icon::slotted(mdui-avatar){width:1.125rem;height:1.125rem}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}.end-text{font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon,.selected-icon{margin-right:.75rem}.end-icon,.end-text{margin-left:.75rem}.arrow-right{color:rgb(var(--mdui-color-on-surface))}.submenu{--shape-corner:var(--mdui-shape-corner-extra-small);display:block;position:absolute;z-index:1;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.submenu::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;e.MenuItem=class extends(Hi(Yi(qi(Xt)))){constructor(){super(),this.disabled=!1,this.submenuOpen=!1,this.selected=!1,this.dense=!1,this.focusable=!1,this.key=Ri(),this.rippleRef=Li(),this.containerRef=Li(),this.submenuRef=Li(),this.hasSlotController=new Jt(this,"[default]","icon","end-icon","end-text","submenu","custom"),this.definedController=new ki(this,{relatedElements:[""]}),this.onOuterClick=this.onOuterClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get focusDisabled(){return this.disabled||!this.focusable}get focusElement(){return this.href&&!this.disabled?this.containerRef.value:this}get rippleDisabled(){return this.disabled}get rippleElement(){return this.rippleRef.value}get hasSubmenu(){return this.hasSlotController.test("submenu")}async onOpenChange(){const e=this.hasUpdated;if(!this.submenuOpen&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Co(this,"linear"),i=Co(this,"emphasized-decelerate"),o=Co(this,"emphasized-accelerate");if(this.submenuOpen){if(e){if(!this.emit("submenu-open",{cancelable:!0}))return}const o=xo(this,"medium4");await bo(this.submenuRef.value),this.submenuRef.value.hidden=!1,this.updateSubmenuPositioner(),await Promise.all([go(this.submenuRef.value,[{transform:"scaleY(0.45)"},{transform:"scaleY(1)"}],{duration:e?o:0,easing:i}),go(this.submenuRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?o:0,easing:t})]),e&&this.emit("submenu-opened")}else{if(!this.emit("submenu-close",{cancelable:!0}))return;const e=xo(this,"short4");await bo(this.submenuRef.value),await Promise.all([go(this.submenuRef.value,[{transform:"scaleY(1)"},{transform:"scaleY(0.45)"}],{duration:e,easing:o}),go(this.submenuRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.submenuRef.value&&(this.submenuRef.value.hidden=!0),this.emit("submenu-closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onOuterClick)}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOuterClick)}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave)}))}render(){const e=this.hasSubmenu,t=this.hasSlotController.test("custom"),i=this.hasSlotController.test("end-icon"),o=!this.endIcon&&e&&!i,r=this.endIcon||e||i,n=!u(this.icon)||"single"===this.selects||"multiple"===this.selects||this.hasSlotController.test("icon"),s=!!this.endText||this.hasSlotController.test("end-text"),a=zi({container:!0,dense:this.dense,preset:!t,"has-icon":n,"has-end-text":s,"has-end-icon":r});return ft`${this.href&&!this.disabled?this.renderAnchor({part:"container",className:a,content:this.renderInner(o,n),refDirective:Oi(this.containerRef),tabIndex:this.focusable?0:-1}):ft`
${this.renderInner(o,n)}
`} ${vo(e,(()=>ft``))}`}onOuterClick(e){this.disabled||!this.submenuOpen||this===e.target||M.contains(this,e.target)||(this.submenuOpen=!1)}hasTrigger(e){return!!this.submenuTrigger&&this.submenuTrigger.split(" ").includes(e)}onFocus(){!this.disabled&&!this.submenuOpen&&this.hasTrigger("focus")&&this.hasSubmenu&&(this.submenuOpen=!0)}onBlur(){!this.disabled&&this.submenuOpen&&this.hasTrigger("focus")&&this.hasSubmenu&&(this.submenuOpen=!1)}onClick(e){this.disabled||e.button||this.hasTrigger("click")&&e.target===this&&this.hasSubmenu&&(this.submenuOpen&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.submenuOpen=!this.submenuOpen))}onKeydown(e){!this.disabled&&this.hasSubmenu&&(this.submenuOpen||"Enter"!==e.key||(e.stopPropagation(),this.submenuOpen=!0),this.submenuOpen&&"Escape"===e.key&&(e.stopPropagation(),this.submenuOpen=!1))}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&this.hasSubmenu&&(window.clearTimeout(this.submenuCloseTimeout),this.submenuOpenDelay?this.submenuOpenTimeout=window.setTimeout((()=>{this.submenuOpen=!0}),this.submenuOpenDelay):this.submenuOpen=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&this.hasSubmenu&&(window.clearTimeout(this.submenuOpenTimeout),this.submenuCloseTimeout=window.setTimeout((()=>{this.submenuOpen=!1}),this.submenuCloseDelay||50))}updateSubmenuPositioner(){const e=M(window),t=M(this.submenuRef.value),i=this.getBoundingClientRect(),o=t.innerWidth(),r=t.innerHeight();let n="bottom",s="right";e.height()-i.top>r+8?n="bottom":i.top+i.height>r+8&&(n="top"),e.width()-i.left-i.width>o+8?s="right":i.left>o+8&&(s="left"),M(this.submenuRef.value).css({top:"bottom"===n?0:i.height-r,left:"right"===s?i.width:-o,transformOrigin:["right"===s?0:"100%","bottom"===n?0:"100%"].join(" ")})}renderInner(e,t){return ft`${this.selected?ft`${this.selectedIcon?ft``:ft``}`:ft`${t?ft``:Zt}`}
${this.endText}${e?ft``:ft`${this.endIcon?ft``:Zt}`}
`}},e.MenuItem.styles=[Qt,Dr],Se([Ot({reflect:!0})],e.MenuItem.prototype,"value",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.MenuItem.prototype,"disabled",void 0),Se([Ot({reflect:!0})],e.MenuItem.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.MenuItem.prototype,"endIcon",void 0),Se([Ot({reflect:!0,attribute:"end-text"})],e.MenuItem.prototype,"endText",void 0),Se([Ot({reflect:!0,attribute:"selected-icon"})],e.MenuItem.prototype,"selectedIcon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"submenu-open"})],e.MenuItem.prototype,"submenuOpen",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.MenuItem.prototype,"selected",void 0),Se([zt()],e.MenuItem.prototype,"dense",void 0),Se([zt()],e.MenuItem.prototype,"selects",void 0),Se([zt()],e.MenuItem.prototype,"submenuTrigger",void 0),Se([zt()],e.MenuItem.prototype,"submenuOpenDelay",void 0),Se([zt()],e.MenuItem.prototype,"submenuCloseDelay",void 0),Se([zt()],e.MenuItem.prototype,"focusable",void 0),Se([Ci("submenuOpen")],e.MenuItem.prototype,"onOpenChange",null),e.MenuItem=Se([Lt("mdui-menu-item")],e.MenuItem);const Mr=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;e.Menu=class extends Xt{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new ki(this,{relatedElements:["mdui-menu-item"]})}get items(){return M(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((e=>!e.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!M(this).parent().length}get lastActiveItem(){const e=this.lastActiveItems.length?this.lastActiveItems.length-1:0;return this.lastActiveItems[e]}set lastActiveItem(e){const t=this.lastActiveItems.length?this.lastActiveItems.length-1:0;this.lastActiveItems[t]=e}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((e=>{e.dense=this.dense,e.selects=this.selects,e.submenuTrigger=this.submenuTrigger,e.submenuOpenDelay=this.submenuOpenDelay,e.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value)),t=this.isMultiple?e:e[0]||void 0;this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const e=(this.isSingle||c(this.value)?[this.value]:this.value).filter((e=>e));if(e.length)if(this.isSingle){const t=this.itemsEnabled.find((t=>t.value===e[0]));this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(e){this.lastActiveItem&&this.focusOne(this.lastActiveItem,e)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((e=>e.focusable))})),this.addEventListener("submenu-open",(e=>{const t=M(e.target),i=t.children("mdui-menu-item:not([disabled])").get(),o=t.parents("mdui-menu-item").length+1;i.length&&(this.lastActiveItems[o]=i[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[o]))})),this.addEventListener("submenu-close",(e=>{const t=M(e.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===t&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[t-1]&&this.focusOne(this.lastActiveItems[t-1]))}))}render(){return ft``}setSelectedKeys(e){po(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle||u(this.value)||u(e)?this.value=e:po(this.value,e)||(this.value=e)}getSiblingsItems(e,t=!1){return M(e).parent().children("mdui-menu-item"+(t?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((e=>{e.focusable=e.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((e=>{e.focusable=this.selectedKeys.includes(e.key)}));else if(this.isMultiple){const e=this.items.find((e=>e.focusable));e?.key&&this.selectedKeys.includes(e.key)||this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).forEach(((e,t)=>e.focusable=!t))}}else this.itemsEnabled.forEach(((e,t)=>{e.focusable=!t}))}updateSelected(){this.items.forEach((e=>{e.selected=this.selectedKeys.includes(e.key)}))}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(e){this.items.forEach((t=>t.focusable=t.key===e.key)),await kr()}focusOne(e,t){e.focus(t)}async onClick(e){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(e.button)return;const t=e.target.closest("mdui-menu-item");t&&!t.disabled&&(this.lastActiveItem=t,this.isSelectable&&t.value&&this.selectOne(t),await this.focusableOne(t),this.focusOne(t))}async onKeyDown(e){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const t=e.target;if("Enter"===e.key&&(e.preventDefault(),t.click())," "===e.key&&(e.preventDefault(),this.isSelectable&&t.value&&(this.selectOne(t),await this.focusableOne(t),this.focusOne(t))),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const i=this.getSiblingsItems(t,!0),o=i.find((e=>e.focusable));let r=o?i.indexOf(o):0;if(i.length>0)return e.preventDefault(),"ArrowDown"===e.key?r++:"ArrowUp"===e.key?r--:"Home"===e.key?r=0:"End"===e.key&&(r=i.length-1),r<0&&(r=i.length-1),r>i.length-1&&(r=0),this.lastActiveItem=i[r],await this.focusableOne(i[r]),void this.focusOne(i[r])}}},e.Menu.styles=[Qt,Mr],Se([Ot({reflect:!0})],e.Menu.prototype,"selects",void 0),Se([Ot()],e.Menu.prototype,"value",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Menu.prototype,"dense",void 0),Se([Ot({reflect:!0,attribute:"submenu-trigger"})],e.Menu.prototype,"submenuTrigger",void 0),Se([Ot({type:Number,reflect:!0,attribute:"submenu-open-delay"})],e.Menu.prototype,"submenuOpenDelay",void 0),Se([Ot({type:Number,reflect:!0,attribute:"submenu-close-delay"})],e.Menu.prototype,"submenuCloseDelay",void 0),Se([zt()],e.Menu.prototype,"selectedKeys",void 0),Se([Nt({flatten:!0,selector:"mdui-menu-item"})],e.Menu.prototype,"childrenItems",void 0),Se([Ci("dense"),Ci("selects"),Ci("submenuTrigger"),Ci("submenuOpenDelay"),Ci("submenuCloseDelay")],e.Menu.prototype,"onSlotChange",null),Se([Ci("selects",!0)],e.Menu.prototype,"onSelectsChange",null),Se([Ci("selectedKeys",!0)],e.Menu.prototype,"onSelectedKeysChange",null),Se([Ci("value")],e.Menu.prototype,"onValueChange",null),e.Menu=Se([Lt("mdui-menu")],e.Menu);const Pr=Pe`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;flex:1;overflow:hidden;min-width:3rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;padding-top:.75rem;padding-bottom:.75rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;left:50%;transform:translateX(-50%);width:4rem;height:2rem;margin-top:.75rem;border-radius:var(--mdui-shape-corner-full)}mdui-ripple:not(.initial){transition:margin-top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host(:not([active])) mdui-ripple.label-visibility-selected,mdui-ripple.label-visibility-unlabeled{margin-top:1.5rem}.container.label-visibility-unlabeled,:host(:not([active])) .container.label-visibility-selected{padding-top:1.5rem;padding-bottom:0}.container.label-visibility-unlabeled .label,:host(:not([active])) .container.label-visibility-selected .label{opacity:0}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:4rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;e.NavigationBarItem=class extends(Hi(Yi(qi(Xt)))){constructor(){super(...arguments),this.isInitial=!0,this.active=!1,this.disabled=!1,this.key=Ri(),this.rippleRef=Li(),this.hasSlotController=new Jt(this,"active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=zi({"label-visibility-selected":"selected"===this.labelVisibility,"label-visibility-labeled":"labeled"===this.labelVisibility,"label-visibility-unlabeled":"unlabeled"===this.labelVisibility,initial:this.isInitial}),t=zi([{container:!0,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")},e]);return ft`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner()}):ft`
${this.renderInner()}
`}`}renderInner(){return ft`
${this.activeIcon?ft``:Zt}${this.icon?ft``:Zt}
`}},e.NavigationBarItem.styles=[Qt,Pr],Se([Ot({reflect:!0})],e.NavigationBarItem.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"active-icon"})],e.NavigationBarItem.prototype,"activeIcon",void 0),Se([Ot({reflect:!0})],e.NavigationBarItem.prototype,"value",void 0),Se([zt()],e.NavigationBarItem.prototype,"labelVisibility",void 0),Se([zt()],e.NavigationBarItem.prototype,"isInitial",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationBarItem.prototype,"active",void 0),Se([zt()],e.NavigationBarItem.prototype,"disabled",void 0),e.NavigationBarItem=Se([Lt("mdui-navigation-bar-item")],e.NavigationBarItem);const Lr=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;overflow:hidden;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition-property:transform;transition-duration:var(--mdui-motion-duration-long2);transition-timing-function:var(--mdui-motion-easing-emphasized);height:5rem;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]){transform:translateY(5.625rem);transition-duration:var(--mdui-motion-duration-short4)}`;e.NavigationBar=class extends(xi(Mi)){constructor(){super(...arguments),this.hide=!1,this.labelVisibility="auto",this.activeKey=0,this.isInitial=!0,this.definedController=new ki(this,{relatedElements:["mdui-navigation-bar-item"]})}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find((e=>e.key===this.activeKey));this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find((e=>e.value===this.value));this.activeKey=e?.key??0,this.updateItems()}async onLabelVisibilityChange(){await this.definedController.whenDefined(),this.updateItems()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return ft``}runScrollThreshold(e){if(!e&&!this.hide){this.emit("hide",{cancelable:!0})&&(this.hide=!0)}if(e&&this.hide){this.emit("show",{cancelable:!0})&&(this.hide=!1)}}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-bar-item");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateItems())}updateItems(){const e=this.items,t="auto"===this.labelVisibility?e.length<=3?"labeled":"selected":this.labelVisibility;e.forEach((e=>{e.active=this.activeKey===e.key,e.labelVisibility=t,e.isInitial=this.isInitial}))}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}},e.NavigationBar.styles=[Qt,Lr],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationBar.prototype,"hide",void 0),Se([Ot({reflect:!0,attribute:"label-visibility"})],e.NavigationBar.prototype,"labelVisibility",void 0),Se([Ot({reflect:!0})],e.NavigationBar.prototype,"value",void 0),Se([Ot({reflect:!0,attribute:"scroll-behavior"})],e.NavigationBar.prototype,"scrollBehavior",void 0),Se([zt()],e.NavigationBar.prototype,"activeKey",void 0),Se([Nt({selector:"mdui-navigation-bar-item",flatten:!0})],e.NavigationBar.prototype,"items",void 0),Se([Ci("activeKey",!0)],e.NavigationBar.prototype,"onActiveKeyChange",null),Se([Ci("value")],e.NavigationBar.prototype,"onValueChange",null),Se([Ci("labelVisibility",!0)],e.NavigationBar.prototype,"onLabelVisibilityChange",null),e.NavigationBar=Se([Lt("mdui-navigation-bar")],e.NavigationBar);const _r=e=>{const t=s(),i=r(),o=t.getComputedStyle(i.documentElement),n=v(e)?M(e).innerWidth():d(e)?e:M(t).innerWidth(),a=e=>{const t=o.getPropertyValue(`--mdui-breakpoint-${e}`).toLowerCase();return parseFloat(t)};return{up:e=>n>=a(e),down:e=>n{switch(e){case"xs":return"sm";case"sm":return"md";case"md":return"lg";case"lg":return"xl";case"xl":return"xxl"}})(e))},not(e){return!this.only(e)},between(e,t){return this.up(e)&&this.down(t)}}},Br=Pe`:host{--shape-corner:var(--mdui-shape-corner-large);--z-index:2200;display:none;position:fixed;top:0;bottom:0;left:0;z-index:1;width:22.5rem}:host([placement=right]){left:initial;right:0}:host([mobile]),:host([modal]){top:0!important;right:0;bottom:0!important;width:initial;z-index:var(--z-index)}:host([placement=right][mobile]),:host([placement=right][modal]){left:0}:host([contained]){position:absolute}.overlay{position:absolute;inset:0;z-index:inherit;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{display:block;position:absolute;top:0;bottom:0;left:0;width:100%;overflow:auto;z-index:inherit;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level0)}:host([mobile]) .panel,:host([modal]) .panel{border-radius:0 var(--shape-corner) var(--shape-corner) 0;max-width:80%;width:22.5rem;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([placement=right]) .panel{left:initial;right:0}:host([placement=right][mobile]) .panel,:host([placement=right][modal]) .panel{border-radius:var(--shape-corner) 0 0 var(--shape-corner)}`;e.NavigationDrawer=class extends Mi{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.placement="left",this.contained=!1,this.mobile=!1,this.overlayRef=Li(),this.panelRef=Li(),this.definedController=new ki(this,{needDomReady:!0})}get layoutPlacement(){return this.placement}get lockTarget(){return this.contained||this.isParentLayout?this.parentElement:document.documentElement}get isModal(){return this.mobile||this.modal}async onContainedChange(){await this.definedController.whenDefined(),this.observeResize?.unobserve(),this.observeResize=Ei(this.contained?this.parentElement:document.documentElement,(()=>{const e=this.contained?this.parentElement:void 0;this.mobile=_r(e).down("md"),this.isParentLayout&&this.layoutManager.updateLayout(this,{width:this.isModal?0:void 0})}))}onPlacementChange(){this.isParentLayout&&this.layoutManager.updateLayout(this)}async onMobileChange(){!this.open||this.isParentLayout||this.contained||(await this.definedController.whenDefined(),this.isModal?(Eo(this,this.lockTarget),await this.getLockTargetAnimate(!1,0)):(To(this,this.lockTarget),await this.getLockTargetAnimate(!0,0)))}async onOpenChange(){let e=this.panelRef.value,t=this.overlayRef.value;const i="right"===this.placement,o=Co(this,"linear"),r=Co(this,"emphasized"),n=(e,t)=>{M(this.layoutManager.getItemsAndMain()).css("transition",p(e)?null:`all ${e}ms ${t}`)},s=async()=>{const i=[];if(this.isModal?i.push(t,e):this.isParentLayout||i.push(this.lockTarget),this.isParentLayout){const e=this.layoutManager.getItemsAndMain(),t=e.indexOf(this);i.push(...e.slice(t))}this.isModal||i.includes(this)||i.push(this),await Promise.all(i.map((e=>bo(e))))};if(this.open){const a=this.hasUpdated;if(a||(await this.updateComplete,e=this.panelRef.value,t=this.overlayRef.value),a){if(!this.emit("open",{cancelable:!0}))return}await this.definedController.whenDefined(),this.style.display="block",this.originalTrigger=document.activeElement,this.isModal&&(this.modalHelper.activate(),this.contained||Eo(this,this.lockTarget)),await s(),requestAnimationFrame((()=>{const t=this.querySelector("[autofocus]");t?t.focus({preventScroll:!0}):e.focus({preventScroll:!0})}));const l=xo(this,"long2"),c=[];if(this.isModal?c.push(go(t,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:a?l:0,easing:o})):this.isParentLayout||c.push(this.getLockTargetAnimate(!0,a?l:0)),this.isParentLayout&&a&&(n(l,r),this.layoutManager.updateLayout(this)),c.push(go(this.isModal?e:this,[{transform:`translateX(${i?"":"-"}100%)`},{transform:"translateX(0)"}],{duration:a?l:0,easing:r})),await Promise.all(c),!this.open)return;this.isParentLayout&&a&&n(null),a&&this.emit("opened")}else if(this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;await this.definedController.whenDefined(),this.isModal&&this.modalHelper.deactivate(),await s();const a=xo(this,"short4"),c=[];if(this.isModal?c.push(go(t,[{opacity:1},{opacity:0}],{duration:a,easing:o})):this.isParentLayout||c.push(this.getLockTargetAnimate(!1,a)),this.isParentLayout&&(n(a,r),this.layoutManager.updateLayout(this,{width:0})),c.push(go(this.isModal?e:this,[{transform:"translateX(0)"},{transform:`translateX(${i?"":"-"}100%)`}],{duration:a,easing:r})),await Promise.all(c),this.open)return;this.isParentLayout&&n(null),this.style.display="none",this.isModal&&!this.contained&&To(this,this.lockTarget);const d=this.originalTrigger;l(d?.focus)&&setTimeout((()=>d.focus())),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new ko(this)}disconnectedCallback(){super.disconnectedCallback(),To(this,this.lockTarget),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&this.isModal&&(e.stopPropagation(),this.open=!1)}))}render(){return ft`${vo(this.isModal,(()=>ft`
`))}`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}getLockTargetAnimate(e,t){const i="right"===this.placement?"paddingRight":"paddingLeft",o=M(this.panelRef.value).innerWidth()+"px";return go(this.lockTarget,[{[i]:e?0:o},{[i]:e?o:0}],{duration:t,easing:Co(this,"emphasized"),fill:"forwards"})}},e.NavigationDrawer.styles=[Qt,Br],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationDrawer.prototype,"open",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationDrawer.prototype,"modal",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"close-on-esc"})],e.NavigationDrawer.prototype,"closeOnEsc",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"close-on-overlay-click"})],e.NavigationDrawer.prototype,"closeOnOverlayClick",void 0),Se([Ot({reflect:!0})],e.NavigationDrawer.prototype,"placement",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationDrawer.prototype,"contained",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationDrawer.prototype,"mobile",void 0),Se([Ci("contained")],e.NavigationDrawer.prototype,"onContainedChange",null),Se([Ci("placement",!0)],e.NavigationDrawer.prototype,"onPlacementChange",null),Se([Ci("mobile",!0),Ci("modal",!0)],e.NavigationDrawer.prototype,"onMobileChange",null),Se([Ci("open")],e.NavigationDrawer.prototype,"onOpenChange",null),e.NavigationDrawer=Se([Lt("mdui-navigation-drawer")],e.NavigationDrawer);const Or=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;border-radius:0 var(--shape-corner) var(--shape-corner) 0;z-index:var(--z-index);width:5rem;background-color:rgb(var(--mdui-color-surface));padding:.375rem .75rem}:host([contained]){position:absolute}:host([divider]){border-right:.0625rem solid rgb(var(--mdui-color-surface-variant));width:5.0625rem}:host([placement=right]){left:initial;right:0;border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host([placement=right][divider]){border-right:none;border-left:.0625rem solid rgb(var(--mdui-color-surface-variant))}.bottom,.items,.top{display:flex;flex-direction:column;align-items:center;width:100%}.top{margin-bottom:1.75rem}.bottom{margin-top:1.75rem}::slotted([slot=bottom]),::slotted([slot=top]),::slotted(mdui-navigation-rail-item){margin-top:.375rem;margin-bottom:.375rem}:host([alignment=start]) .top-spacer{flex-grow:0}:host([alignment=start]) .bottom-spacer{flex-grow:1}:host([alignment=end]) .top-spacer{flex-grow:1}:host([alignment=end]) .bottom-spacer{flex-grow:0}:host([alignment=center]){justify-content:center}:host([alignment=center]) .bottom,:host([alignment=center]) .top{position:absolute}:host([alignment=center]) .top{top:.375rem}:host([alignment=center]) .bottom{bottom:.375rem}`;e.NavigationRail=class extends Mi{constructor(){super(...arguments),this.placement="left",this.alignment="start",this.contained=!1,this.divider=!1,this.activeKey=0,this.hasSlotController=new Jt(this,"top","bottom"),this.definedController=new ki(this,{relatedElements:["mdui-navigation-rail-item"]}),this.isInitial=!0}get layoutPlacement(){return this.placement}get parentTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isRight(){return"right"===this.placement}get paddingValue(){return["fixed","absolute"].includes(M(this).css("position"))?this.offsetWidth:void 0}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find((e=>e.key===this.activeKey));this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find((e=>e.value===this.value));this.activeKey=e?.key??0,this.updateItems()}async onContainedChange(){this.isParentLayout||(await this.definedController.whenDefined(),M(document.body).css({paddingLeft:this.contained||this.isRight?null:this.paddingValue,paddingRight:this.contained||!this.isRight?null:this.paddingValue}),M(this.parentElement).css({paddingLeft:this.contained&&!this.isRight?this.paddingValue:null,paddingRight:this.contained&&this.isRight?this.paddingValue:null}))}async onPlacementChange(){await this.definedController.whenDefined(),this.layoutManager?.updateLayout(this),this.items.forEach((e=>{e.placement=this.placement})),this.isParentLayout||M(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}connectedCallback(){super.connectedCallback(),this.isParentLayout||this.definedController.whenDefined().then((()=>{M(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}))}disconnectedCallback(){super.disconnectedCallback(),!this.isParentLayout&&this.definedController.isDefined()&&M(this.parentTarget).css({paddingLeft:this.isRight?void 0:null,paddingRight:this.isRight?null:void 0})}render(){const e=this.hasSlotController.test("top"),t=this.hasSlotController.test("bottom");return ft`${vo(e,(()=>ft``))} ${vo(t,(()=>ft``))}`}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-rail-item");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateItems())}updateItems(){this.items.forEach((e=>{e.active=this.activeKey===e.key,e.placement=this.placement,e.isInitial=this.isInitial}))}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}},e.NavigationRail.styles=[Qt,Or],Se([Ot({reflect:!0})],e.NavigationRail.prototype,"value",void 0),Se([Ot({reflect:!0})],e.NavigationRail.prototype,"placement",void 0),Se([Ot({reflect:!0})],e.NavigationRail.prototype,"alignment",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationRail.prototype,"contained",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationRail.prototype,"divider",void 0),Se([zt()],e.NavigationRail.prototype,"activeKey",void 0),Se([Nt({selector:"mdui-navigation-rail-item",flatten:!0})],e.NavigationRail.prototype,"items",void 0),Se([Ci("activeKey",!0)],e.NavigationRail.prototype,"onActiveKeyChange",null),Se([Ci("value")],e.NavigationRail.prototype,"onValueChange",null),Se([Ci("contained",!0)],e.NavigationRail.prototype,"onContainedChange",null),Se([Ci("placement",!0)],e.NavigationRail.prototype,"onPlacementChange",null),e.NavigationRail=Se([Lt("mdui-navigation-rail")],e.NavigationRail);const zr=Pe`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;width:100%;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:3.5rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;width:3.5rem;height:2rem;border-radius:var(--mdui-shape-corner-full)}.container:not(.has-label)+mdui-ripple{height:3.5rem}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.placement-right::slotted([slot=badge]){transform:translate(-50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.placement-right::slotted([slot=badge][variant=small]){transform:translate(-.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active-icon]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:3.5rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) :not(.has-label) .indicator{height:3.5rem}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;e.NavigationRailItem=class extends(Hi(Yi(qi(Xt)))){constructor(){super(...arguments),this.active=!1,this.isInitial=!0,this.placement="left",this.disabled=!1,this.key=Ri(),this.rippleRef=Li(),this.hasSlotController=new Jt(this,"[default]","active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=this.hasSlotController.test("[default]"),t=zi({container:!0,"has-label":e,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon"),initial:this.isInitial});return ft`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner(e)}):ft`
${this.renderInner(e)}
`}`}renderInner(e){return ft`
${this.activeIcon?ft``:Zt}${this.icon?ft``:Zt}
${e?ft``:gt}`}},e.NavigationRailItem.styles=[Qt,zr],Se([Ot({reflect:!0})],e.NavigationRailItem.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"active-icon"})],e.NavigationRailItem.prototype,"activeIcon",void 0),Se([Ot({reflect:!0})],e.NavigationRailItem.prototype,"value",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.NavigationRailItem.prototype,"active",void 0),Se([zt()],e.NavigationRailItem.prototype,"isInitial",void 0),Se([zt()],e.NavigationRailItem.prototype,"placement",void 0),Se([zt()],e.NavigationRailItem.prototype,"disabled",void 0),e.NavigationRailItem=Se([Lt("mdui-navigation-rail-item")],e.NavigationRailItem);let Nr=class extends Mt{render(){return ro('')}};Nr.styles=oo,Nr=Se([Lt("mdui-icon-circle")],Nr);let Fr=class extends Mt{render(){return ro('')}};Fr.styles=oo,Fr=Se([Lt("mdui-icon-radio-button-unchecked")],Fr);const Vr=Pe`:host{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon{display:flex;position:absolute;font-size:1.5rem}:not(.initial) .icon{transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.unchecked-icon{transition-property:color;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .unchecked-icon,:host([hover]) .unchecked-icon,:host([pressed]) .unchecked-icon{color:rgb(var(--mdui-color-on-surface))}.checked-icon{opacity:0;transform:scale(.2);transition-property:color,opacity,transform;color:rgb(var(--mdui-color-primary))}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface))}.label:not(.initial){transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]) .checked-icon{opacity:1;transform:scale(.5)}i.invalid{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}i.invalid .icon{color:rgb(var(--mdui-color-error))}.label.invalid{color:rgb(var(--mdui-color-error))}:host([disabled]),:host([group-disabled]){cursor:default;pointer-events:none}:host([disabled]) .icon,:host([group-disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]) .label,:host([group-disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}`;e.Radio=class extends(Yi(qi(Xt))){constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.invalid=!1,this.groupDisabled=!1,this.focusable=!0,this.isInitial=!0,this.rippleRef=Li()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()}get focusElement(){return this}get focusDisabled(){return this.isDisabled()||!this.focusable}onCheckedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.isDisabled()||(this.checked=!0)}))}render(){const e=ji({invalid:this.invalid,initial:this.isInitial});return ft`${this.uncheckedIcon?ft``:ft``}${this.checkedIcon?ft``:ft``}`}isDisabled(){return this.disabled||this.groupDisabled}},e.Radio.styles=[Qt,Vr],Se([Ot({reflect:!0})],e.Radio.prototype,"value",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Radio.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Radio.prototype,"checked",void 0),Se([Ot({reflect:!0,attribute:"unchecked-icon"})],e.Radio.prototype,"uncheckedIcon",void 0),Se([Ot({reflect:!0,attribute:"checked-icon"})],e.Radio.prototype,"checkedIcon",void 0),Se([zt()],e.Radio.prototype,"invalid",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"group-disabled"})],e.Radio.prototype,"groupDisabled",void 0),Se([zt()],e.Radio.prototype,"focusable",void 0),Se([zt()],e.Radio.prototype,"isInitial",void 0),Se([Ci("checked",!0)],e.Radio.prototype,"onCheckedChange",null),e.Radio=Se([Lt("mdui-radio")],e.Radio);const Hr=Pe`:host{display:inline-block}fieldset{border:none;padding:0;margin:0;min-width:0}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}`;function*Ur(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}e.RadioGroup=class extends Xt{constructor(){super(...arguments),this.disabled=!1,this.name="",this.value="",this.defaultValue="",this.required=!1,this.invalid=!1,this.isInitial=!0,this.inputRef=Li(),this.formController=new Vi(this),this.definedController=new ki(this,{relatedElements:["mdui-radio"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return M(this).find("mdui-radio").get()}get itemsEnabled(){return M(this).find("mdui-radio:not([disabled])").get()}async onValueChange(){this.isInitial=!1,await this.definedController.whenDefined(),this.emit("input"),this.emit("change"),this.updateItems(),this.updateRadioFocusable(),await this.updateComplete;const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft`
`}updateRadioFocusable(){const e=this.items,t=e.find((e=>e.checked));t?e.forEach((e=>{e.focusable=e===t})):this.itemsEnabled.forEach(((e,t)=>{e.focusable=!t}))}async onClick(e){await this.definedController.whenDefined();const t=e.target.closest("mdui-radio");t&&!t.disabled&&(this.value=t.value,await this.updateComplete,t.focus())}async onKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;e.preventDefault(),await this.definedController.whenDefined();const t=this.itemsEnabled,i=t.find((e=>e.checked))??t[0],o=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let r=t.indexOf(i)+o;r<0&&(r=t.length-1),r>t.length-1&&(r=0),this.value=t[r].value,await this.updateComplete,t[r].focus()}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(),this.updateRadioFocusable()}onCheckedChange(e){e.stopPropagation()}updateItems(){this.items.forEach((e=>{e.checked=e.value===this.value,e.invalid=this.invalid,e.groupDisabled=this.disabled,e.isInitial=this.isInitial}))}},e.RadioGroup.styles=[Qt,Hr],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.RadioGroup.prototype,"disabled",void 0),Se([Ot({reflect:!0})],e.RadioGroup.prototype,"form",void 0),Se([Ot({reflect:!0})],e.RadioGroup.prototype,"name",void 0),Se([Ot({reflect:!0})],e.RadioGroup.prototype,"value",void 0),Se([io()],e.RadioGroup.prototype,"defaultValue",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.RadioGroup.prototype,"required",void 0),Se([zt()],e.RadioGroup.prototype,"invalid",void 0),Se([Ci("value",!0)],e.RadioGroup.prototype,"onValueChange",null),Se([Ci("invalid",!0),Ci("disabled")],e.RadioGroup.prototype,"onInvalidChange",null),e.RadioGroup=Se([Lt("mdui-radio-group")],e.RadioGroup);const Kr=Pe`:host{position:relative;display:block;width:100%;-webkit-tap-highlight-color:transparent;height:2.5rem;padding:0 1.25rem}label{position:relative;display:block;width:100%;height:100%}input[type=range]{position:absolute;inset:0;z-index:4;height:100%;cursor:pointer;opacity:0;appearance:none;width:calc(100% + 20rem * 2 / 16);margin:0 -1.25rem;padding:0 .75rem}:host([disabled]) input[type=range]{cursor:not-allowed}.track-active,.track-inactive{position:absolute;top:50%;height:.25rem;margin-top:-.125rem}.track-inactive{left:-.125rem;right:-.125rem;border-radius:var(--mdui-shape-corner-full);background-color:rgb(var(--mdui-color-surface-container-highest))}.invalid .track-inactive{background-color:rgba(var(--mdui-color-error),.12)}:host([disabled]) .track-inactive{background-color:rgba(var(--mdui-color-on-surface),.12)}.track-active{background-color:rgb(var(--mdui-color-primary))}.invalid .track-active{background-color:rgb(var(--mdui-color-error))}:host([disabled]) .track-active{background-color:rgba(var(--mdui-color-on-surface),.38)}.handle{position:absolute;top:50%;transform:translate(-50%);cursor:pointer;z-index:2;width:2.5rem;height:2.5rem;margin-top:-1.25rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.invalid .handle{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.handle .elevation,.handle::before{position:absolute;display:block;content:' ';left:.625rem;top:.625rem;width:1.25rem;height:1.25rem;border-radius:var(--mdui-shape-corner-full)}.handle .elevation{background-color:rgb(var(--mdui-color-primary));box-shadow:var(--mdui-elevation-level1)}.invalid .handle .elevation{background-color:rgb(var(--mdui-color-error))}:host([disabled]) .handle .elevation{background-color:rgba(var(--mdui-color-on-surface),.38);box-shadow:var(--mdui-elevation-level0)}.handle::before{background-color:rgb(var(--mdui-color-background))}.handle mdui-ripple{border-radius:var(--mdui-shape-corner-full)}.label{position:absolute;left:50%;transform:translateX(-50%) scale(0);transform-origin:center bottom;display:flex;align-items:center;justify-content:center;cursor:default;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform var(--mdui-motion-duration-short2) var(--mdui-motion-easing-standard);bottom:2.5rem;min-width:1.75rem;height:1.75rem;padding:.375rem .5rem;border-radius:var(--mdui-shape-corner-full);color:rgb(var(--mdui-color-on-primary));font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height);background-color:rgb(var(--mdui-color-primary))}.invalid .label{color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error))}.label::after{content:' ';position:absolute;z-index:-1;transform:rotate(45deg);width:.875rem;height:.875rem;bottom:-.125rem;background-color:rgb(var(--mdui-color-primary))}.invalid .label::after{background-color:rgb(var(--mdui-color-error))}.label-visible{transform:translateX(-50%) scale(1);transition:transform var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.tickmark{position:absolute;top:50%;transform:translate(-50%);width:.125rem;height:.125rem;margin-top:-.0625rem;border-radius:var(--mdui-shape-corner-full);background-color:rgba(var(--mdui-color-on-surface-variant),.38)}.invalid .tickmark{background-color:rgba(var(--mdui-color-error),.38)}.tickmark.active{background-color:rgba(var(--mdui-color-on-primary),.38)}.invalid .tickmark.active{background-color:rgba(var(--mdui-color-on-error),.38)}:host([disabled]) .tickmark{background-color:rgba(var(--mdui-color-on-surface),.38)}`;class qr extends(Yi(qi(Xt))){constructor(){super(...arguments),this.min=0,this.max=100,this.step=1,this.tickmarks=!1,this.nolabel=!1,this.disabled=!1,this.name="",this.invalid=!1,this.labelVisible=!1,this.inputRef=Li(),this.trackActiveRef=Li(),this.labelFormatter=e=>e.toString()}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}onDisabledChange(){this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}fixValue(e){const{min:t,max:i,step:o}=this;e=Math.min(Math.max(e,t),i);let r=t+Math.round((e-t)/o)*o;return r>i&&(r-=o),r}getCandidateValues(){return Array.from({length:this.max-this.min+1},((e,t)=>t+this.min)).filter((e=>!((e-this.min)%this.step)))}renderLabel(e){return vo(!this.nolabel,(()=>ft`
${this.labelFormatter(e)}
`))}onChange(){this.emit("change")}}qr.styles=[Qt,Kr],Se([Ot({type:Number,reflect:!0})],qr.prototype,"min",void 0),Se([Ot({type:Number,reflect:!0})],qr.prototype,"max",void 0),Se([Ot({type:Number,reflect:!0})],qr.prototype,"step",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],qr.prototype,"tickmarks",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],qr.prototype,"nolabel",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],qr.prototype,"disabled",void 0),Se([Ot({reflect:!0})],qr.prototype,"form",void 0),Se([Ot({reflect:!0})],qr.prototype,"name",void 0),Se([zt()],qr.prototype,"invalid",void 0),Se([zt()],qr.prototype,"labelVisible",void 0),Se([Ot({attribute:!1})],qr.prototype,"labelFormatter",void 0),Se([Ci("disabled",!0)],qr.prototype,"onDisabledChange",null),e.RangeSlider=class extends qr{constructor(){super(...arguments),this.defaultValue=[],this.currentHandle="start",this.rippleStartRef=Li(),this.rippleEndRef=Li(),this.handleStartRef=Li(),this.handleEndRef=Li(),this.formController=new Vi(this),this._value=[],this.getRippleIndex=()=>this.hoverHandle?"start"===this.hoverHandle?0:1:"start"===this.currentHandle?0:1}get value(){return this._value}set value(e){const t=[...this._value];this._value=[this.fixValue(e[0]),this.fixValue(e[1])],this.requestUpdate("value",t),this.updateComplete.then((()=>{this.updateStyle();const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}))}get rippleElement(){return[this.rippleStartRef.value,this.rippleEndRef.value]}connectedCallback(){super.connectedCallback(),this.value.length||(this.value=[this.min,this.max]),this.value[0]=this.fixValue(this.value[0]),this.value[1]=this.fixValue(this.value[1]),this.defaultValue.length||(this.defaultValue=[...this.value])}firstUpdated(e){super.firstUpdated(e);const t=e=>{const t=M(this),i=parseFloat(t.css("padding-left")),o=parseFloat(t.css("padding-right")),r=(e.offsetX-i)/(this.clientWidth-i-o);return(this.max-this.min)*r+this.min>(this.value[1]-this.value[0])/2+this.value[0]?"end":"start"},i=()=>{this.disabled||(this.labelVisible=!0)},o=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",i),this.addEventListener("mousedown",i),this.addEventListener("touchend",o),this.addEventListener("mouseup",o),this.addEventListener("pointerdown",(e=>{this.currentHandle=t(e)})),this.addEventListener("pointermove",(e=>{const i=t(e);this.hoverHandle!==i&&(this.endHover(e),this.hoverHandle=i,this.startHover(e))})),this.updateStyle()}render(){return ft``}updateStyle(){const e=e=>(e-this.min)/(this.max-this.min)*100,t=e(this.value[0]),i=e(this.value[1]);this.trackActiveRef.value.style.width=i-t+"%",this.trackActiveRef.value.style.left=`${t}%`,this.handleStartRef.value.style.left=`${t}%`,this.handleEndRef.value.style.left=`${i}%`}onInput(){const e="start"===this.currentHandle,t=parseFloat(this.inputRef.value.value),i=this.value[0],o=this.value[1],r=()=>{this.updateStyle()};e?t<=o?(this.value=[t,o],r()):i!==o&&(this.value=[o,o],r()):t>=i?(this.value=[i,t],r()):i!==o&&(this.value=[i,i],r())}},e.RangeSlider.styles=[qr.styles],Se([io()],e.RangeSlider.prototype,"defaultValue",void 0),Se([zt()],e.RangeSlider.prototype,"currentHandle",void 0),Se([Ot({type:Array,attribute:!1})],e.RangeSlider.prototype,"value",null),e.RangeSlider=Se([Lt("mdui-range-slider")],e.RangeSlider);const jr=Pe`:host{position:relative;display:inline-flex;flex-grow:1;flex-shrink:0;float:left;height:100%;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;border:.0625rem solid rgb(var(--mdui-color-outline))}.button{width:100%;padding:0 .75rem}:host([invalid]){color:rgb(var(--mdui-color-error));border-color:rgb(var(--mdui-color-error))}:host([invalid]) .button{background-color:rgb(var(--mdui-color-error-container))}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( + --mdui-color-on-secondary-container + )}:host([disabled]),:host([group-disabled]){cursor:default;pointer-events:none;color:rgba(var(--mdui-color-on-surface),38%);border-color:rgba(var(--mdui-color-on-surface),12%)}:host([loading]){cursor:default;pointer-events:none}:host(:not(.mdui-segmented-button-first)){margin-left:-.0625rem}:host(.mdui-segmented-button-first){border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host(.mdui-segmented-button-last){border-radius:0 var(--shape-corner) var(--shape-corner) 0}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}mdui-circular-progress{width:1.125rem;height:1.125rem}:host([disabled]) mdui-circular-progress{opacity:.38}.label{display:inline-flex}.has-icon .label{padding-left:.5rem}.has-end-icon .label{padding-right:.5rem}`;e.SegmentedButton=class extends Ji{constructor(){super(...arguments),this.selected=!1,this.invalid=!1,this.groupDisabled=!1,this.key=Ri(),this.rippleRef=Li(),this.hasSlotController=new Jt(this,"[default]","icon","end-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()||this.loading}get focusDisabled(){return this.isDisabled()||this.loading}render(){const e=zi({button:!0,"has-icon":this.icon||this.selected||this.loading||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon")});return ft`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.isDisabled()||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}isDisabled(){return this.disabled||this.groupDisabled}renderIcon(){return this.loading?this.renderLoading():this.selected?ft`${this.selectedIcon?ft``:ft``}`:ft`${this.icon?ft``:Zt}`}renderLabel(){return this.hasSlotController.test("[default]")?ft``:Zt}renderEndIcon(){return ft`${this.endIcon?ft``:Zt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}},e.SegmentedButton.styles=[Ji.styles,jr],Se([Ot({reflect:!0})],e.SegmentedButton.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.SegmentedButton.prototype,"endIcon",void 0),Se([Ot({reflect:!0,attribute:"selected-icon"})],e.SegmentedButton.prototype,"selectedIcon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.SegmentedButton.prototype,"selected",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.SegmentedButton.prototype,"invalid",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"group-disabled"})],e.SegmentedButton.prototype,"groupDisabled",void 0),e.SegmentedButton=Se([Lt("mdui-segmented-button")],e.SegmentedButton);const Wr=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;vertical-align:middle;height:2.5rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([full-width]){display:flex;flex-wrap:nowrap}input,select{position:absolute;width:100%;height:100%;padding:0;opacity:0;pointer-events:none}`;e.SegmentedButtonGroup=class extends Xt{constructor(){super(...arguments),this.fullWidth=!1,this.disabled=!1,this.required=!1,this.name="",this.value="",this.defaultValue="",this.selectedKeys=[],this.invalid=!1,this.isInitial=!0,this.inputRef=Li(),this.formController=new Vi(this),this.definedController=new ki(this,{relatedElements:["mdui-segmented-button"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return M(this).find("mdui-segmented-button").get()}get itemsEnabled(){return M(this).find("mdui-segmented-button:not([disabled])").get()}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value)),t=this.isMultiple?e:e[0]||"";this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateItems();const e=(this.isSingle||c(this.value)?[this.value]:this.value).filter((e=>e));if(e.length)if(this.isSingle){const t=this.itemsEnabled.find((t=>t.value===e[0]));this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.setSelectedKeys([]);if(this.updateItems(),!this.isInitial){const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}connectedCallback(){super.connectedCallback(),this.value=this.isMultiple&&c(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue="multiple"===this.selects?[]:""}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft`${vo(this.isSelectable&&this.isSingle,(()=>ft``))}${vo(this.isSelectable&&this.isMultiple,(()=>ft``))}`}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateItems()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const t=e.target.closest("mdui-segmented-button");t&&!t.disabled&&this.isSelectable&&t.value&&this.selectOne(t)}async onInputKeyDown(e){if(["Enter"," "].includes(e.key)){if(e.preventDefault(),await this.definedController.whenDefined(),this.isSingle){const t=e.target;t.checked=!t.checked,this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus()}this.isMultiple&&(this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus())}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(!0)}setSelectedKeys(e){po(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle?this.value=e:po(this.value,e)||(this.value=e)}updateItems(e=!1){const t=this.items;t.forEach(((i,o)=>{i.invalid=this.invalid,i.groupDisabled=this.disabled,i.selected=this.selectedKeys.includes(i.key),e&&(i.classList.toggle("mdui-segmented-button-first",0===o),i.classList.toggle("mdui-segmented-button-last",o===t.length-1))}))}},e.SegmentedButtonGroup.styles=[Qt,Wr],Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"full-width"})],e.SegmentedButtonGroup.prototype,"fullWidth",void 0),Se([Ot({reflect:!0})],e.SegmentedButtonGroup.prototype,"selects",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.SegmentedButtonGroup.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.SegmentedButtonGroup.prototype,"required",void 0),Se([Ot({reflect:!0})],e.SegmentedButtonGroup.prototype,"form",void 0),Se([Ot({reflect:!0})],e.SegmentedButtonGroup.prototype,"name",void 0),Se([Ot()],e.SegmentedButtonGroup.prototype,"value",void 0),Se([io()],e.SegmentedButtonGroup.prototype,"defaultValue",void 0),Se([zt()],e.SegmentedButtonGroup.prototype,"selectedKeys",void 0),Se([zt()],e.SegmentedButtonGroup.prototype,"invalid",void 0),Se([Ci("selects",!0)],e.SegmentedButtonGroup.prototype,"onSelectsChange",null),Se([Ci("selectedKeys",!0)],e.SegmentedButtonGroup.prototype,"onSelectedKeysChange",null),Se([Ci("value")],e.SegmentedButtonGroup.prototype,"onValueChange",null),Se([Ci("invalid",!0),Ci("disabled")],e.SegmentedButtonGroup.prototype,"onInvalidChange",null),e.SegmentedButtonGroup=Se([Lt("mdui-segmented-button-group")],e.SegmentedButtonGroup);const Gr=new WeakMap;let Yr=0;const Xr=new Map,Jr=new WeakSet,Zr=()=>new Promise((e=>requestAnimationFrame(e))),Qr=(e,t)=>{const i=e-t;return 0===i?void 0:i},en=(e,t)=>{const i=e/t;return 1===i?void 0:i},tn={left:(e,t)=>{const i=Qr(e,t);return{value:i,transform:null==i||isNaN(i)?void 0:`translateX(${i}px)`}},top:(e,t)=>{const i=Qr(e,t);return{value:i,transform:null==i||isNaN(i)?void 0:`translateY(${i}px)`}},width:(e,t)=>{let i;0===t&&(t=1,i={width:"1px"});const o=en(e,t);return{value:o,overrideFrom:i,transform:null==o||isNaN(o)?void 0:`scaleX(${o})`}},height:(e,t)=>{let i;0===t&&(t=1,i={height:"1px"});const o=en(e,t);return{value:o,overrideFrom:i,transform:null==o||isNaN(o)?void 0:`scaleY(${o})`}}},on={duration:333,easing:"ease-in-out"},rn=["left","top","width","height","opacity","color","background"],nn=new WeakMap;const sn=qt(class extends hi{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Ht)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return gt}getController(){return Gr.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[t]){const i=void 0===this.u;return i&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((e=>this.t=!0)),this.element=e.element,nn.set(this.element,this)),this.optionsOrCallback=t,(i||"function"!=typeof t)&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();void 0!==t&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=rn,this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((o=>{const r=t[o]??(tn[o]?void 0:i[o]),n=Number(r);e[o]=isNaN(n)?r+"":n})),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((e,t)=>{if(Array.isArray(e)){if(Array.isArray(t)&&t.length===e.length&&e.every(((e,i)=>e===t[i])))return!1}else if(t===e)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await Zr;const t=this.O(),i=this.j(this.options.keyframeOptions,t),o=this.m();if(void 0!==this.A){const{from:i,to:r}=this.N(this.A,o,t);this.log("measured",[this.A,o,i,r]),e=this.calculateKeyframes(i,r)}else{const i=Xr.get(this.options.inId);if(i){Xr.delete(this.options.inId);const{from:r,to:n}=this.N(i,o,t);e=this.calculateKeyframes(r,n),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,Yr++,e.forEach((e=>e.zIndex=Yr))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){void 0!==this.P&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h)return;if(void 0!==this.options.id&&Xr.set(this.options.id,this.A),void 0===this.options.out)return;if(this.prepare(),await Zr(),this.i?.isConnected){const e=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,e),this.options.stabilizeOut){const e=this.m();this.log("stabilizing out");const t=this.A.left-e.left,i=this.A.top-e.top;!("static"===getComputedStyle(this.element).position)||0===t&&0===i||(this.element.style.position="relative"),0!==t&&(this.element.style.left=t+"px"),0!==i&&(this.element.style.top=i+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t?.parentNode){const i=nn.get(t);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=Jr.has(this.u);return e||this.u.updateComplete.then((()=>{Jr.add(this.u)})),e}j(e,t=this.O()){const i={...on};return t.forEach((e=>Object.assign(i,e.options.keyframeOptions))),Object.assign(i,e),i}N(e,t,i){e={...e},t={...t};const o=i.map((e=>e.animatingProperties)).filter((e=>void 0!==e));let r=1,n=1;return o.length>0&&(o.forEach((e=>{e.width&&(r/=e.width),e.height&&(n/=e.height)})),void 0!==e.left&&void 0!==t.left&&(e.left=r*e.left,t.left=r*t.left),void 0!==e.top&&void 0!==t.top&&(e.top=n*e.top,t.top=n*t.top)),{from:e,to:t}}calculateKeyframes(e,t,i=!1){const o={},r={};let n=!1;const s={};for(const i in t){const a=e[i],l=t[i];if(i in tn){const e=tn[i];if(void 0===a||void 0===l)continue;const t=e(a,l);void 0!==t.transform&&(s[i]=t.value,n=!0,o.transform=`${o.transform??""} ${t.transform}`,void 0!==t.overrideFrom&&Object.assign(o,t.overrideFrom))}else a!==l&&void 0!==a&&void 0!==l&&(n=!0,o[i]=a,r[i]=l)}return o.transformOrigin=r.transformOrigin=i?"center center":"top left",this.animatingProperties=s,n?[o,r]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),void 0!==e)){this.log("animate",[e,t]),i=!0,this.webAnimation=this.element.animate(e,t);const o=this.getController();o?.add(this);try{await this.webAnimation.finished}catch(e){}o?.remove(this)}return this.didFinish(i),i}isAnimating(){return"running"===this.webAnimation?.playState||this.webAnimation?.pending}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}});let an=class extends Mt{render(){return ro('')}};an.styles=oo,an=Se([Lt("mdui-icon-cancel--outlined")],an);let ln=class extends Mt{render(){return ro('')}};ln.styles=oo,ln=Se([Lt("mdui-icon-error")],ln);let cn=class extends Mt{render(){return ro('')}};cn.styles=oo,cn=Se([Lt("mdui-icon-visibility-off")],cn);let dn=class extends Mt{render(){return ro('')}};dn.styles=oo,dn=Se([Lt("mdui-icon-visibility")],dn);const hn=Pe`:host{display:inline-block;width:100%}:host([disabled]){pointer-events:none}:host([type=hidden]){display:none}.container{position:relative;display:flex;align-items:center;height:100%;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);padding:0 1rem}.container.has-icon{padding-left:.75rem}.container.has-end-icon,.container.has-error-icon{padding-right:.75rem}:host([variant=filled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));border-radius:var(--mdui-shape-corner-extra-small) var(--mdui-shape-corner-extra-small) 0 0}:host([variant=filled]) .container.invalid,:host([variant=filled]) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-error))}:host([variant=filled]:hover) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .container.invalid,:host([variant=filled]:hover) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .container,:host([variant=filled][focused]) .container{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-primary))}:host([variant=filled][focused-style]) .container.invalid,:host([variant=filled][focused-style]) .container.invalid-style,:host([variant=filled][focused]) .container.invalid,:host([variant=filled][focused]) .container.invalid-style{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-error))}:host([variant=filled][disabled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),4%)}:host([variant=outlined]) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-outline));border-radius:var(--mdui-shape-corner-extra-small)}:host([variant=outlined]) .container.invalid,:host([variant=outlined]) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-error))}:host([variant=outlined]:hover) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-surface))}:host([variant=outlined]:hover) .container.invalid,:host([variant=outlined]:hover) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-error-container))}:host([variant=outlined][focused-style]) .container,:host([variant=outlined][focused]) .container{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-primary))}:host([variant=outlined][focused-style]) .container.invalid,:host([variant=outlined][focused-style]) .container.invalid-style,:host([variant=outlined][focused]) .container.invalid,:host([variant=outlined][focused]) .container.invalid-style{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-error))}:host([variant=outlined][disabled]) .container{box-shadow:inset 0 0 0 .125rem rgba(var(--mdui-color-on-surface),12%)}.icon,.prefix,.right-icon,.suffix{display:flex;-webkit-user-select:none;user-select:none;color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]) .icon,:host([disabled]) .prefix,:host([disabled]) .right-icon,:host([disabled]) .suffix{color:rgba(var(--mdui-color-on-surface),38%)}.invalid .right-icon,.invalid .suffix,.invalid-style .right-icon,.invalid-style .suffix{color:rgb(var(--mdui-color-error))}:host(:hover) .invalid .right-icon,:host(:hover) .invalid .suffix,:host(:hover) .invalid-style .right-icon,:host(:hover) .invalid-style .suffix{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style]) .invalid .right-icon,:host([focused-style]) .invalid .suffix,:host([focused-style]) .invalid-style .right-icon,:host([focused-style]) .invalid-style .suffix,:host([focused]) .invalid .right-icon,:host([focused]) .invalid .suffix,:host([focused]) .invalid-style .right-icon,:host([focused]) .invalid-style .suffix{color:rgb(var(--mdui-color-error))}.icon,.right-icon{font-size:1.5rem}.icon mdui-button-icon,.right-icon mdui-button-icon,::slotted(mdui-button-icon[slot]){margin-left:-.5rem;margin-right:-.5rem}.icon .i,.right-icon .i,::slotted([slot$=icon]){font-size:inherit}.has-icon .icon{margin-right:1rem}.has-end-icon .end-icon,.right-icon:not(.end-icon){margin-left:1rem}.prefix,.suffix{display:none;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([variant=filled][label]) .prefix,:host([variant=filled][label]) .suffix{padding-top:1rem}.has-value .prefix,.has-value .suffix,:host([focused-style]) .prefix,:host([focused-style]) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{display:flex}.has-prefix .prefix{padding-right:.125rem}.has-suffix .suffix{padding-left:.125rem}.input-container{width:100%;height:100%}.label{position:absolute;pointer-events:none;max-width:calc(100% - 1rem);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;top:1rem;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}.invalid .label,.invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=outlined]) .label{padding:0 .25rem;margin:0 -.25rem}:host([variant=outlined]:hover) .label{color:rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .invalid .label,:host([variant=filled]:hover) .invalid-style .label,:host([variant=outlined]:hover) .invalid .label,:host([variant=outlined]:hover) .invalid-style .label{color:rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label{color:rgb(var(--mdui-color-primary))}:host([variant=filled]) .has-value .label,:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=filled][type=date]) .label,:host([variant=filled][type=datetime-local]) .label,:host([variant=filled][type=month]) .label,:host([variant=filled][type=time]) .label,:host([variant=filled][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:.25rem}:host([variant=outlined]) .has-value .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label,:host([variant=outlined][type=date]) .label,:host([variant=outlined][type=datetime-local]) .label,:host([variant=outlined][type=month]) .label,:host([variant=outlined][type=time]) .label,:host([variant=outlined][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:-.5rem;left:.75rem;background-color:rgb(var(--mdui-color-background))}:host([variant=filled][focused-style]) .invalid .label,:host([variant=filled][focused-style]) .invalid-style .label,:host([variant=filled][focused]) .invalid .label,:host([variant=filled][focused]) .invalid-style .label,:host([variant=outlined][focused-style]) .invalid .label,:host([variant=outlined][focused-style]) .invalid-style .label,:host([variant=outlined][focused]) .invalid .label,:host([variant=outlined][focused]) .invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=filled][disabled]) .label,:host([variant=outlined][disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}.input{display:flex;flex-wrap:wrap;width:100%;height:100%;min-height:100%;border:none;outline:0;background:0 0;appearance:none;resize:none;cursor:inherit;font-family:inherit;padding:1rem 0;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height);color:rgb(var(--mdui-color-on-surface));caret-color:rgb(var(--mdui-color-primary))}.input.hide-input{opacity:0;height:0;min-height:0;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}.invalid .input,.invalid-style .input{caret-color:rgb(var(--mdui-color-error))}:host([disabled]) .input{color:rgba(var(--mdui-color-on-surface),38%)}:host([end-aligned]) .input{text-align:right}:host([variant=filled]) .label+.input{padding:1.5rem 0 .5rem 0}.supporting{display:flex;justify-content:space-between;padding:.25rem 1rem;color:rgb(var(--mdui-color-on-surface-variant))}.supporting.invalid,.supporting.invalid-style{color:rgb(var(--mdui-color-error))}.helper{display:block;opacity:1;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([disabled]) .helper{color:rgba(var(--mdui-color-on-surface),38%)}:host([helper-on-focus]) .helper{opacity:0}:host([helper-on-focus][focused-style]) .helper,:host([helper-on-focus][focused]) .helper{opacity:1}.error{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}.counter{flex-wrap:nowrap;padding-left:1rem;font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}::-ms-reveal{display:none}.is-firefox .input[type=date],.is-firefox .input[type=datetime-local],.is-firefox .input[type=time]{clip-path:inset(0 2em 0 0)}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;display:none}.input[type=number]{-moz-appearance:textfield}.input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}`;e.TextField=class extends(qi(Xt)){constructor(){super(...arguments),this.variant="filled",this.type="text",this.name="",this.value="",this.defaultValue="",this.helperOnFocus=!1,this.clearable=!1,this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.autosize=!1,this.counter=!1,this.togglePassword=!1,this.spellcheck=!1,this.invalid=!1,this.invalidStyle=!1,this.focusedStyle=!1,this.isPasswordVisible=!1,this.hasValue=!1,this.error="",this.inputRef=Li(),this.formController=new Vi(this),this.hasSlotController=new Jt(this,"icon","end-icon","helper","input"),this.readonlyButClearable=!1}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get valueAsNumber(){return this.inputRef.value?.valueAsNumber??parseFloat(this.value)}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}get isFocusedStyle(){return this.focused||this.focusedStyle}get isTextarea(){return this.rows&&this.rows>1||this.autosize}onDisabledChange(){this.inputRef.value.disabled=this.disabled,this.invalid=!this.inputRef.value.checkValidity()}async onValueChange(){if(this.hasValue=!["",null].includes(this.value),this.hasUpdated){await this.updateComplete;const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}onRowsChange(){this.setTextareaHeight()}async onMaxRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=M(this.inputRef.value);e.css("max-height",parseFloat(e.css("line-height"))*(this.maxRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}async onMinRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=M(this.inputRef.value);e.css("min-height",parseFloat(e.css("line-height"))*(this.minRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve(),cr(this)}select(){this.inputRef.value.select()}setSelectionRange(e,t,i="none"){this.inputRef.value.setSelectionRange(e,t,i)}setRangeText(e,t,i,o="preserve"){this.inputRef.value.setRangeText(e,t,i,o),this.value!==this.inputRef.value.value&&(this.value=this.inputRef.value.value,this.setTextareaHeight(),this.emit("input"),this.emit("change"))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.setCustomValidityInternal(e),cr(this)}firstUpdated(e){super.firstUpdated(e),this.setTextareaHeight(),this.observeResize=Ei(this.inputRef.value,(()=>this.setTextareaHeight()))}render(){const e=!!this.icon||this.hasSlotController.test("icon"),t=!!this.endIcon||this.hasSlotController.test("end-icon"),i=this.invalid||this.invalidStyle,o=!!this.prefix||this.hasSlotController.test("prefix"),r=!!this.suffix||this.hasSlotController.test("suffix"),n=!!this.helper||this.hasSlotController.test("helper"),s=i&&!(!this.error&&!this.inputRef.value.validationMessage),a=this.counter&&!!this.maxlength,l=this.hasSlotController.test("input"),c={invalid:this.invalid,"invalid-style":this.invalidStyle},d=ji({container:!0,"has-value":this.hasValue,"has-icon":e,"has-end-icon":t,"has-error-icon":i,"has-prefix":o,"has-suffix":r,"is-firefox":navigator.userAgent.includes("Firefox"),...c});return ft`
${this.renderPrefix()}
${this.renderLabel()} ${this.isTextarea?this.renderTextArea(l):this.renderInput(l)} ${vo(l,(()=>ft``))}
${this.renderClearButton()}${this.renderTogglePasswordButton()} ${this.renderSuffix(i)}
${vo(s||n||a,(()=>ft`
${this.renderHelper(s,n)} ${this.renderCounter(a)}
`))}`}setCustomValidityInternal(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity(),this.requestUpdate()}onChange(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("change")}onClear(e){this.value="",this.emit("clear"),this.emit("input"),this.emit("change"),this.focus(),e.stopPropagation()}onInput(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("input")}onInvalid(e){e.preventDefault()}onKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||this.formController.submit()}))}onTextAreaKeyUp(){if(this.pattern){const e=new RegExp(this.pattern);this.value&&!this.value.match(e)?(this.setCustomValidityInternal(this.getPatternErrorMsg()),lr(this,(()=>{this.setCustomValidityInternal(this.getPatternErrorMsg())}))):(this.setCustomValidityInternal(""),cr(this))}}onTogglePassword(){this.isPasswordVisible=!this.isPasswordVisible}getPatternErrorMsg(){return er("Please match the requested format.",{id:"components.textField.patternError"})}setTextareaHeight(){this.autosize?(this.inputRef.value.style.height="auto",this.inputRef.value.style.height=`${this.inputRef.value.scrollHeight}px`):this.inputRef.value.style.height=void 0}renderLabel(){return this.label?ft``:Zt}renderPrefix(){return ft`${this.icon?ft``:Zt}${this.prefix}`}renderSuffix(e){return ft`${this.suffix}${e?ft`${this.errorIcon?ft``:ft``}`:ft`${this.endIcon?ft``:Zt}`}`}renderClearButton(){return vo(this.clearable&&!this.disabled&&(!this.readonly||this.readonlyButClearable)&&("number"==typeof this.value||this.value.length>0),(()=>ft`${this.clearIcon?ft``:ft``}`))}renderTogglePasswordButton(){return vo("password"===this.type&&this.togglePassword&&!this.disabled,(()=>ft`${this.isPasswordVisible?ft`${this.showPasswordIcon?ft``:ft``}`:ft`${this.hidePasswordIcon?ft``:ft``}`}`))}renderInput(e){return ft``}renderTextArea(e){return ft``}renderHelper(e,t){return e?ft`
${this.error||this.inputRef.value.validationMessage}
`:t?ft`${this.helper}`:ft``}renderCounter(e){return e?ft`
${this.value.length}/${this.maxlength}
`:Zt}},e.TextField.styles=[Qt,hn],Se([Ot({reflect:!0})],e.TextField.prototype,"variant",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"type",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"name",void 0),Se([Ot()],e.TextField.prototype,"value",void 0),Se([io()],e.TextField.prototype,"defaultValue",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"label",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"placeholder",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"helper",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"helper-on-focus"})],e.TextField.prototype,"helperOnFocus",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"clearable",void 0),Se([Ot({reflect:!0,attribute:"clear-icon"})],e.TextField.prototype,"clearIcon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"end-aligned"})],e.TextField.prototype,"endAligned",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"prefix",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"suffix",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.TextField.prototype,"endIcon",void 0),Se([Ot({reflect:!0,attribute:"error-icon"})],e.TextField.prototype,"errorIcon",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"form",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"readonly",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"required",void 0),Se([Ot({type:Number,reflect:!0})],e.TextField.prototype,"rows",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"autosize",void 0),Se([Ot({type:Number,reflect:!0,attribute:"min-rows"})],e.TextField.prototype,"minRows",void 0),Se([Ot({type:Number,reflect:!0,attribute:"max-rows"})],e.TextField.prototype,"maxRows",void 0),Se([Ot({type:Number,reflect:!0})],e.TextField.prototype,"minlength",void 0),Se([Ot({type:Number,reflect:!0})],e.TextField.prototype,"maxlength",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"counter",void 0),Se([Ot({type:Number,reflect:!0})],e.TextField.prototype,"min",void 0),Se([Ot({type:Number,reflect:!0})],e.TextField.prototype,"max",void 0),Se([Ot({type:Number,reflect:!0})],e.TextField.prototype,"step",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"pattern",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"toggle-password"})],e.TextField.prototype,"togglePassword",void 0),Se([Ot({reflect:!0,attribute:"show-password-icon"})],e.TextField.prototype,"showPasswordIcon",void 0),Se([Ot({reflect:!0,attribute:"hide-password-icon"})],e.TextField.prototype,"hidePasswordIcon",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"autocapitalize",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"autocorrect",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"autocomplete",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"enterkeyhint",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TextField.prototype,"spellcheck",void 0),Se([Ot({reflect:!0})],e.TextField.prototype,"inputmode",void 0),Se([zt()],e.TextField.prototype,"invalid",void 0),Se([zt()],e.TextField.prototype,"invalidStyle",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"focused-style"})],e.TextField.prototype,"focusedStyle",void 0),Se([zt()],e.TextField.prototype,"isPasswordVisible",void 0),Se([zt()],e.TextField.prototype,"hasValue",void 0),Se([zt()],e.TextField.prototype,"error",void 0),Se([Ci("disabled",!0)],e.TextField.prototype,"onDisabledChange",null),Se([Ci("value")],e.TextField.prototype,"onValueChange",null),Se([Ci("rows",!0)],e.TextField.prototype,"onRowsChange",null),Se([Ci("maxRows")],e.TextField.prototype,"onMaxRowsChange",null),Se([Ci("minRows")],e.TextField.prototype,"onMinRowsChange",null),e.TextField=Se([Lt("mdui-text-field")],e.TextField);const un=Pe`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;e.Select=class extends(qi(Xt)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=Li(),this.textFieldRef=Li(),this.hiddenInputRef=Li(),this.formController=new Vi(this),this.hasSlotController=new Jt(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new ki(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&c(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const e=this.hiddenInputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.hiddenInputRef.value.setCustomValidity(e),this.invalid=!this.hiddenInputRef.value.checkValidity()}firstUpdated(e){super.firstUpdated(e),this.observeResize=Ei(this.textFieldRef.value,(()=>this.resizeMenu()))}render(){const e=this.multiple?!!this.value.length:!!this.value;return ft`${this.multiple?ft``:ft``}`${e}:text-field__${e}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${e=>e.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${Ur(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(e=>this.hasSlotController.test(e)?ft``:gt))} ${vo(this.multiple&&this.value.length,(()=>ft`
${Ur(this.value,(e=>ft``${e}:chip__${e}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(e)}">${this.getMenuItemLabelByValue(e)}`))}
`))}
`}getMenuItemLabelByValue(e){return this.menuItems.length&&this.menuItems.find((t=>t.value===e))?.textContent?.trim()||e}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(e){const t=e.target;this.value=this.multiple?t.value.map((e=>e??"")):t.value??"",await this.updateComplete;const i=this.formController.getForm();i&&Fi.get(i)?.has(this)?(this.invalid=!1,Fi.get(i).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(e){const t=[...this.value];t.includes(e)&&t.splice(t.indexOf(e),1),this.value=t}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(e){"Enter"===e.key&&(e.preventDefault(),this.textFieldRef.value.click())}},e.Select.styles=[Qt,un],Se([Ot({reflect:!0})],e.Select.prototype,"variant",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Select.prototype,"multiple",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"name",void 0),Se([Ot()],e.Select.prototype,"value",void 0),Se([io()],e.Select.prototype,"defaultValue",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"label",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"placeholder",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"helper",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Select.prototype,"clearable",void 0),Se([Ot({reflect:!0,attribute:"clear-icon"})],e.Select.prototype,"clearIcon",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"placement",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"end-aligned"})],e.Select.prototype,"endAligned",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"prefix",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"suffix",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"icon",void 0),Se([Ot({reflect:!0,attribute:"end-icon"})],e.Select.prototype,"endIcon",void 0),Se([Ot({reflect:!0,attribute:"error-icon"})],e.Select.prototype,"errorIcon",void 0),Se([Ot({reflect:!0})],e.Select.prototype,"form",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Select.prototype,"readonly",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Select.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Select.prototype,"required",void 0),Se([zt()],e.Select.prototype,"invalid",void 0),Se([Nt({flatten:!0,selector:"mdui-menu-item"})],e.Select.prototype,"menuItems",void 0),e.Select=Se([Lt("mdui-select")],e.Select);const pn=Pe`.track-active{left:-.125rem;border-radius:var(--mdui-shape-corner-full) 0 0 var(--mdui-shape-corner-full)}`;e.Slider=class extends qr{constructor(){super(...arguments),this.value=0,this.defaultValue=0,this.rippleRef=Li(),this.handleRef=Li(),this.formController=new Vi(this)}get rippleElement(){return this.rippleRef.value}async onValueChange(){this.value=this.fixValue(this.value);const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):(await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()),this.updateStyle()}connectedCallback(){super.connectedCallback(),this.value=this.fixValue(this.value)}firstUpdated(e){super.firstUpdated(e);const t=()=>{this.disabled||(this.labelVisible=!0)},i=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",t),this.addEventListener("mousedown",t),this.addEventListener("touchend",i),this.addEventListener("mouseup",i),this.updateStyle()}render(){return ft``}updateStyle(){const e=(this.value-this.min)/(this.max-this.min)*100;this.trackActiveRef.value.style.width=`${e}%`,this.handleRef.value.style.left=`${e}%`}onInput(){this.value=parseFloat(this.inputRef.value.value),this.updateStyle()}},e.Slider.styles=[qr.styles,pn],Se([Ot({type:Number})],e.Slider.prototype,"value",void 0),Se([io()],e.Slider.prototype,"defaultValue",void 0),Se([Ci("value",!0)],e.Slider.prototype,"onValueChange",null),e.Slider=Se([Lt("mdui-slider")],e.Slider);const mn=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-small);--z-index:2400;position:fixed;z-index:var(--z-index);display:none;align-items:center;flex-wrap:wrap;border-radius:var(--shape-corner);min-width:20rem;max-width:36rem;padding:.25rem 0;box-shadow:var(--mdui-elevation-level3);background-color:rgb(var(--mdui-color-inverse-surface));color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([placement^=top]){transform-origin:top;top:1rem}:host([placement^=bottom]){transform-origin:bottom;bottom:1rem}:host([placement=bottom-start]),:host([placement=top-start]){left:1rem}:host([placement=bottom-end]),:host([placement=top-end]){right:1rem}.message{display:block;margin:.625rem 1rem}:host([message-line='1']) .message{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([message-line='2']) .message{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.action-group{display:flex;align-items:center;margin-left:auto;padding-right:.5rem}.action,.close-button{display:inline-flex;align-items:center;justify-content:center}.action{color:rgb(var(--mdui-color-inverse-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.action mdui-button,::slotted(mdui-button[slot=action][variant=outlined]),::slotted(mdui-button[slot=action][variant=text]){color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-primary)}.action mdui-button::part(button){padding:0 .5rem}.close-button{margin:0 -.25rem 0 .25rem;font-size:1.5rem;color:rgb(var(--mdui-color-inverse-on-surface))}.close-button mdui-button-icon,::slotted(mdui-button-icon[slot=close-button][variant=outlined]),::slotted(mdui-button-icon[slot=close-button][variant=standard]){font-size:inherit;color:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}.close-button .i,::slotted([slot=close-icon]){font-size:inherit}`;e.Snackbar=class extends Xt{constructor(){super(),this.open=!1,this.placement="bottom",this.actionLoading=!1,this.closeable=!1,this.autoCloseDelay=5e3,this.closeOnOutsideClick=!1,this.onDocumentClick=this.onDocumentClick.bind(this)}async onOpenChange(){const e=_r().down("sm"),t=["top","bottom"].includes(this.placement),i=Co(this,"linear"),o=Co(this,"emphasized-decelerate"),r=Array.from(this.renderRoot.querySelectorAll(".message, .action-group")),n=e?{left:"1rem",right:"1rem",minWidth:0}:t?{left:"50%"}:{};if(this.open){const s=this.hasUpdated;if(s||await this.updateComplete,s){if(!this.emit("open",{cancelable:!0}))return}window.clearTimeout(this.closeTimeout),this.autoCloseDelay&&(this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.autoCloseDelay)),this.style.display="flex",await Promise.all([bo(this),...r.map((e=>bo(e)))]);const a=xo(this,"medium4"),l=i=>{const o=`scaleY(${"start"===i?0:1})`;return e?{transform:o}:{transform:[o,t?"translateX(-50%)":""].filter((e=>e)).join(" ")}};return await Promise.all([go(this,[{...l("start"),...n},{...l("end"),...n}],{duration:s?a:0,easing:o,fill:"forwards"}),go(this,[{opacity:0},{opacity:1,offset:.5},{opacity:1}],{duration:s?a:0,easing:i,fill:"forwards"}),...r.map((e=>go(e,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:s?a:0,easing:i})))]),void(s&&this.emit("opened"))}if(!this.open&&this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),await Promise.all([bo(this),...r.map((e=>bo(e)))]);const o=xo(this,"short4"),s=i=>{const o={opacity:"start"===i?1:0};return!e&&t&&Object.assign(o,{transform:"translateX(-50%)"}),o};return await Promise.all([go(this,[{...s("start"),...n},{...s("end"),...n}],{duration:o,easing:i,fill:"forwards"}),...r.map((e=>go(e,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:o,easing:i})))]),this.style.display="none",void this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick)}render(){return ft`
${this.action?ft`${this.action}`:Zt}${vo(this.closeable,(()=>ft`${this.closeIcon?ft``:ft``}`))}
`}onDocumentClick(e){if(!this.open||!this.closeOnOutsideClick)return;const t=e.target;this.contains(t)||this===t||(this.open=!1)}onActionClick(e){e.stopPropagation(),this.emit("action-click")}onCloseClick(){this.open=!1}},e.Snackbar.styles=[Qt,mn],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Snackbar.prototype,"open",void 0),Se([Ot({reflect:!0})],e.Snackbar.prototype,"placement",void 0),Se([Ot({reflect:!0,attribute:"action"})],e.Snackbar.prototype,"action",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"action-loading"})],e.Snackbar.prototype,"actionLoading",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Snackbar.prototype,"closeable",void 0),Se([Ot({reflect:!0,attribute:"close-icon"})],e.Snackbar.prototype,"closeIcon",void 0),Se([Ot({type:Number,reflect:!0,attribute:"message-line"})],e.Snackbar.prototype,"messageLine",void 0),Se([Ot({type:Number,reflect:!0,attribute:"auto-close-delay"})],e.Snackbar.prototype,"autoCloseDelay",void 0),Se([Ot({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:wi})],e.Snackbar.prototype,"closeOnOutsideClick",void 0),Se([Ci("open")],e.Snackbar.prototype,"onOpenChange",null),e.Snackbar=Se([Lt("mdui-snackbar")],e.Snackbar);const fn=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);--shape-corner-thumb:var(--mdui-shape-corner-full);position:relative;display:inline-block;cursor:pointer;-webkit-tap-highlight-color:transparent;height:2.5rem}:host([disabled]){cursor:default;pointer-events:none}label{display:inline-flex;align-items:center;width:100%;height:100%;white-space:nowrap;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}.track{position:relative;display:flex;align-items:center;border-radius:var(--shape-corner);transition-property:background-color,border-width;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:2rem;width:3.25rem;border:.125rem solid rgb(var(--mdui-color-outline));background-color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]) .track{background-color:rgb(var(--mdui-color-primary));border-width:0}.invalid .track{background-color:rgb(var(--mdui-color-error-container));border-color:rgb(var(--mdui-color-error))}:host([disabled]) .track{background-color:rgba(var(--mdui-color-surface-container-highest),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled][checked]) .track{background-color:rgba(var(--mdui-color-on-surface),.12)}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}mdui-ripple{border-radius:50%;transition-property:left,top;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);width:2.5rem;height:2.5rem}.thumb{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:var(--shape-corner-thumb);transition-property:width,height,left,background-color;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:1rem;width:1rem;left:.375rem;background-color:rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.thumb mdui-ripple{left:-.75rem;top:-.75rem}.has-unchecked-icon .thumb{height:1.5rem;width:1.5rem;left:.125rem}.has-unchecked-icon .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([focus-visible]) .thumb,:host([hover]) .thumb,:host([pressed]) .thumb{background-color:rgb(var(--mdui-color-on-surface-variant))}:host([checked]) .thumb{height:1.5rem;width:1.5rem;left:1.5rem;background-color:rgb(var(--mdui-color-on-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]) .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([pressed]) .thumb{height:1.75rem;width:1.75rem;left:0}:host([pressed]) .thumb mdui-ripple{left:-.375rem;top:-.375rem}:host([pressed][checked]) .thumb{left:1.375rem}:host([focus-visible][checked]) .thumb,:host([hover][checked]) .thumb,:host([pressed][checked]) .thumb{background-color:rgb(var(--mdui-color-primary-container))}.invalid .thumb{background-color:rgb(var(--mdui-color-error));--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([focus-visible]) .invalid .thumb,:host([hover]) .invalid .thumb,:host([pressed]) .invalid .thumb{background-color:rgb(var(--mdui-color-error))}:host([disabled]) .thumb{background-color:rgba(var(--mdui-color-on-surface),.38)}:host([disabled][checked]) .thumb{background-color:rgb(var(--mdui-color-surface))}.checked-icon,.unchecked-icon{display:flex;position:absolute;transition-property:opacity,transform;font-size:1rem}.unchecked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]) .unchecked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([disabled]) .unchecked-icon{color:rgba(var(--mdui-color-surface-container-highest),.38)}.checked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-on-primary-container))}:host([checked]) .checked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3)}.invalid .checked-icon{color:rgb(var(--mdui-color-error-container))}:host([disabled]) .checked-icon{color:rgba(var(--mdui-color-on-surface),.38)}.checked-icon .i,.unchecked-icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){font-size:inherit;color:inherit}`;e.Switch=class extends(Yi(qi(Xt))){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.rippleRef=Li(),this.inputRef=Li(),this.formController=new Vi(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new Jt(this,"unchecked-icon")}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&Fi.get(e)?.has(this)?(this.invalid=!1,Fi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft``}onChange(){this.checked=this.inputRef.value.checked,this.emit("change")}},e.Switch.styles=[Qt,fn],Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Switch.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Switch.prototype,"checked",void 0),Se([io("checked")],e.Switch.prototype,"defaultChecked",void 0),Se([Ot({reflect:!0,attribute:"unchecked-icon"})],e.Switch.prototype,"uncheckedIcon",void 0),Se([Ot({reflect:!0,attribute:"checked-icon"})],e.Switch.prototype,"checkedIcon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Switch.prototype,"required",void 0),Se([Ot({reflect:!0})],e.Switch.prototype,"form",void 0),Se([Ot({reflect:!0})],e.Switch.prototype,"name",void 0),Se([Ot({reflect:!0})],e.Switch.prototype,"value",void 0),Se([zt()],e.Switch.prototype,"invalid",void 0),Se([Ci("disabled",!0),Ci("required",!0)],e.Switch.prototype,"onDisabledChange",null),Se([Ci("checked",!0)],e.Switch.prototype,"onCheckedChange",null),e.Switch=Se([Lt("mdui-switch")],e.Switch);const vn=Pe`:host{position:relative;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.container{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:100%}.preset{flex-direction:column;min-height:3rem;padding:.625rem 1rem}:host([inline]) .preset{flex-direction:row}.icon-container,.label-container{position:relative;display:flex;align-items:center;justify-content:center}.icon-container ::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.icon-container ::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.label-container ::slotted([slot=badge]){position:absolute;left:100%;bottom:100%;transform:translate(-.75rem,.625rem)}.label-container ::slotted([slot=badge][variant=small]){transform:translate(-.375rem,.375rem)}.icon,.label{display:flex;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .icon,:host([focused]) .label,:host([hover]) .icon,:host([hover]) .label,:host([pressed]) .icon,:host([pressed]) .label{color:rgb(var(--mdui-color-on-surface))}:host([active]) .icon,:host([active]) .label{color:rgb(var(--mdui-color-primary))}:host([active]) .variant-secondary .icon,:host([active]) .variant-secondary .label{color:rgb(var(--mdui-color-on-surface))}.icon{font-size:1.5rem}.label{font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit;color:inherit}`;e.Tab=class extends(Yi(qi(Xt))){constructor(){super(...arguments),this.inline=!1,this.active=!1,this.variant="primary",this.key=Ri(),this.rippleRef=Li(),this.hasSlotController=new Jt(this,"icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return!1}get focusElement(){return this}get focusDisabled(){return!1}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.hasSlotController.test("custom"),i=()=>ft``;return ft`
${vo(e||this.icon,i)}${this.icon?ft``:Zt}
${vo(!e,i)}
`}},e.Tab.styles=[Qt,vn],Se([Ot({reflect:!0})],e.Tab.prototype,"value",void 0),Se([Ot({reflect:!0})],e.Tab.prototype,"icon",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Tab.prototype,"inline",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Tab.prototype,"active",void 0),Se([zt()],e.Tab.prototype,"variant",void 0),e.Tab=Se([Lt("mdui-tab")],e.Tab);const gn=Pe`:host{display:block;overflow-y:auto;flex:1 1 auto}:host(:not([active])){display:none}`;e.TabPanel=class extends Xt{constructor(){super(...arguments),this.active=!1}render(){return ft``}},e.TabPanel.styles=[Qt,gn],Se([Ot({reflect:!0})],e.TabPanel.prototype,"value",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TabPanel.prototype,"active",void 0),e.TabPanel=Se([Lt("mdui-tab-panel")],e.TabPanel);const bn=Pe`:host{position:relative;display:flex}:host([placement^=top]){flex-direction:column}:host([placement^=bottom]){flex-direction:column-reverse}:host([placement^=left]){flex-direction:row}:host([placement^=right]){flex-direction:row-reverse}.container{position:relative;display:flex;flex:0 0 auto;overflow-x:auto;background-color:rgb(var(--mdui-color-surface))}:host([placement^=bottom]) .container,:host([placement^=top]) .container{flex-direction:row}:host([placement^=left]) .container,:host([placement^=right]) .container{flex-direction:column}:host([placement$='-start']) .container{justify-content:flex-start}:host([placement=bottom]) .container,:host([placement=left]) .container,:host([placement=right]) .container,:host([placement=top]) .container{justify-content:center}:host([placement$='-end']) .container{justify-content:flex-end}.container::after{content:' ';position:absolute;background-color:rgb(var(--mdui-color-surface-variant))}:host([placement^=bottom]) .container::after,:host([placement^=top]) .container::after{left:0;width:100%;height:.0625rem}:host([placement^=top]) .container::after{bottom:0}:host([placement^=bottom]) .container::after{top:0}:host([placement^=left]) .container::after,:host([placement^=right]) .container::after{top:0;height:100%;width:.0625rem}:host([placement^=left]) .container::after{right:0}:host([placement^=right]) .container::after{left:0}.indicator{position:absolute;z-index:1;background-color:rgb(var(--mdui-color-primary))}.container:not(.initial) .indicator{transition-duration:var(--mdui-motion-duration-medium2);transition-timing-function:var(--mdui-motion-easing-standard-decelerate)}:host([placement^=bottom]) .indicator,:host([placement^=top]) .indicator{transition-property:transform,left,width}:host([placement^=left]) .indicator,:host([placement^=right]) .indicator{transition-property:transform,top,height}:host([placement^=top]) .indicator{bottom:0}:host([placement^=bottom]) .indicator{top:0}:host([placement^=left]) .indicator{right:0}:host([placement^=right]) .indicator{left:0}:host([placement^=bottom][variant=primary]) .indicator,:host([placement^=top][variant=primary]) .indicator{height:.1875rem}:host([placement^=bottom][variant=secondary]) .indicator,:host([placement^=top][variant=secondary]) .indicator{height:.125rem}:host([placement^=left][variant=primary]) .indicator,:host([placement^=right][variant=primary]) .indicator{width:.1875rem}:host([placement^=left][variant=secondary]) .indicator,:host([placement^=right][variant=secondary]) .indicator{width:.125rem}:host([placement^=top][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-top-right-radius:.1875rem}:host([placement^=bottom][variant=primary]) .indicator{border-bottom-right-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=left][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=right][variant=primary]) .indicator{border-top-right-radius:.1875rem;border-bottom-right-radius:.1875rem}:host([full-width]) ::slotted(mdui-tab){flex:1}`;e.Tabs=class extends Xt{constructor(){super(...arguments),this.variant="primary",this.placement="top-start",this.fullWidth=!1,this.activeKey=0,this.isInitial=!0,this.containerRef=Li(),this.indicatorRef=Li(),this.definedController=new ki(this,{relatedElements:["mdui-tab","mdui-tab-panel"]})}async onActiveKeyChange(){await this.definedController.whenDefined(),this.value=this.tabs.find((e=>e.key===this.activeKey))?.value,this.updateActive(),this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.tabs.find((e=>e.value===this.value));this.activeKey=e?.key??0}async onIndicatorChange(){await this.updateComplete,this.updateIndicator()}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.observeResize=Ei(this.containerRef.value,(()=>this.updateIndicator()))}render(){return ft`
`}async onSlotChange(){await this.definedController.whenDefined(),this.updateActive()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const t=e.target.closest("mdui-tab");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateActive())}updateActive(){this.activeTab=this.tabs.map((e=>(e.active=this.activeKey===e.key,e))).find((e=>e.active)),this.panels.forEach((e=>e.active=e.value===this.activeTab?.value)),this.updateIndicator()}updateIndicator(){const e=this.activeTab,t=M(this.indicatorRef.value),i=this.placement.startsWith("left")||this.placement.startsWith("right");if(!e)return void t.css({transform:i?"scaleY(0)":"scaleX(0)"});const o=M(e),r=e.offsetTop,n=e.offsetLeft,s=i?{transform:"scaleY(1)",width:"",left:""}:{transform:"scaleX(1)",height:"",top:""};let a={};if("primary"===this.variant){const t=o.find(':scope > [slot="custom"]'),s=t.length?t.get():M(e.renderRoot).find('slot[name="custom"]').children().get();if(i){const e=Math.min(...s.map((e=>e.offsetTop)))+r;a={top:e,height:Math.max(...s.map((e=>e.offsetTop+e.offsetHeight)))+r-e}}else{const e=Math.min(...s.map((e=>e.offsetLeft)))+n;a={left:e,width:Math.max(...s.map((e=>e.offsetLeft+e.offsetWidth)))+n-e}}}"secondary"===this.variant&&(a=i?{top:r,height:e.offsetHeight}:{left:n,width:e.offsetWidth}),t.css({...s,...a})}},e.Tabs.styles=[Qt,bn],Se([Ot({reflect:!0})],e.Tabs.prototype,"variant",void 0),Se([Ot({reflect:!0})],e.Tabs.prototype,"value",void 0),Se([Ot({reflect:!0})],e.Tabs.prototype,"placement",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi,attribute:"full-width"})],e.Tabs.prototype,"fullWidth",void 0),Se([zt()],e.Tabs.prototype,"activeKey",void 0),Se([zt()],e.Tabs.prototype,"isInitial",void 0),Se([Nt({selector:"mdui-tab",flatten:!0})],e.Tabs.prototype,"tabs",void 0),Se([Nt({selector:"mdui-tab-panel",slot:"panel",flatten:!0})],e.Tabs.prototype,"panels",void 0),Se([Ci("activeKey",!0)],e.Tabs.prototype,"onActiveKeyChange",null),Se([Ci("value")],e.Tabs.prototype,"onValueChange",null),Se([Ci("variant",!0),Ci("placement",!0),Ci("fullWidth",!0)],e.Tabs.prototype,"onIndicatorChange",null),e.Tabs=Se([Lt("mdui-tabs")],e.Tabs);class yn{constructor(e,t){this.isHover=!1,this.uniqueID=Ri(),this.enterEventName=`mouseenter.${this.uniqueID}.hoverController`,this.leaveEventName=`mouseleave.${this.uniqueID}.hoverController`,this.mouseEnterItems=[],this.mouseLeaveItems=[],(this.host=e).addController(this),this.elementRef=t}hostConnected(){this.host.updateComplete.then((()=>{M(this.elementRef.value).on(this.enterEventName,(()=>{this.isHover=!0;for(let e=this.mouseEnterItems.length-1;e>=0;e--){const t=this.mouseEnterItems[e];t.callback(),t.one&&this.mouseEnterItems.splice(e,1)}})).on(this.leaveEventName,(()=>{this.isHover=!1;for(let e=this.mouseLeaveItems.length-1;e>=0;e--){const t=this.mouseLeaveItems[e];t.callback(),t.one&&this.mouseLeaveItems.splice(e,1)}}))}))}hostDisconnected(){M(this.elementRef.value).off(this.enterEventName).off(this.leaveEventName)}onMouseEnter(e,t=!1){this.mouseEnterItems.push({callback:e,one:t})}onMouseLeave(e,t=!1){this.mouseLeaveItems.push({callback:e,one:t})}}const wn=Pe`:host{--shape-corner-plain:var(--mdui-shape-corner-extra-small);--shape-corner-rich:var(--mdui-shape-corner-medium);--z-index:2500;display:contents}.popup{position:fixed;display:flex;flex-direction:column;z-index:var(--z-index);border-radius:var(--shape-corner-plain);background-color:rgb(var(--mdui-color-inverse-surface));padding:0 .5rem;min-width:1.75rem;max-width:20rem}:host([variant=rich]) .popup{border-radius:var(--shape-corner-rich);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);padding:.75rem 1rem .5rem 1rem}.headline{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.content{display:flex;padding:.25rem 0;color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([variant=rich]) .content{color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}.action{display:flex;justify-content:flex-start;padding-top:.5rem}.action ::slotted(:not(:last-child)){margin-right:.5rem}`;e.Tooltip=class extends Xt{constructor(){super(),this.variant="plain",this.placement="auto",this.openDelay=150,this.closeDelay=150,this.trigger="hover focus",this.disabled=!1,this.open=!1,this.popupRef=Li(),this.hasSlotController=new Jt(this,"headline","action"),this.hoverController=new yn(this,this.popupRef),this.definedController=new ki(this,{needDomReady:!0}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get target(){return[...this.children].find((e=>"style"!==e.tagName.toLowerCase()&&"content"!==e.getAttribute("slot")))}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated,t=xo(this,"short4"),i=Co(this,"standard");if(this.open){if(await this.definedController.whenDefined(),M(`mdui-tooltip[variant="${this.variant}"]`).filter(((e,t)=>t!==this)).prop("open",!1),e||await this.updateComplete,e){if(!this.emit("open",{cancelable:!0}))return}return await bo(this.popupRef.value),this.popupRef.value.hidden=!1,this.updatePositioner(),await go(this.popupRef.value,[{transform:"scale(0)"},{transform:"scale(1)"}],{duration:e?t:0,easing:i}),void(e&&this.emit("opened"))}if(!this.open&&e){if(!this.emit("close",{cancelable:!0}))return;await bo(this.popupRef.value),await go(this.popupRef.value,[{transform:"scale(1)"},{transform:"scale(0)"}],{duration:t,easing:i}),this.popupRef.value.hidden=!0,this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors=yr(this.target),this.overflowAncestors.forEach((e=>{e.addEventListener("scroll",this.onWindowScroll)}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors?.forEach((e=>{e.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{const e=this.target;e.addEventListener("focus",this.onFocus),e.addEventListener("blur",this.onBlur),e.addEventListener("pointerdown",this.onClick),e.addEventListener("keydown",this.onKeydown),e.addEventListener("mouseenter",this.onMouseEnter),e.addEventListener("mouseleave",this.onMouseLeave),this.observeResize=Ei(e,(()=>{this.updatePositioner()}))}))}render(){const e=this.isRich()&&(this.headline||this.hasSlotController.test("headline")),t=this.isRich()&&this.hasSlotController.test("action");return ft``}isRich(){return"rich"===this.variant}requestClose(){this.hoverController.isHover?this.hoverController.onMouseLeave((()=>{this.hasTrigger("hover")?this.hoverTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50):this.open=!1}),!0):this.open=!1}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onBlur(){!this.disabled&&this.open&&this.hasTrigger("focus")&&this.requestClose()}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.open=!this.open)}onKeydown(e){!this.disabled&&this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose())}onMouseEnter(){this.disabled||this.open||!this.hasTrigger("hover")||(this.openDelay?(window.clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay)):this.open=!0)}onMouseLeave(){window.clearTimeout(this.hoverTimeout),!this.disabled&&this.open&&this.hasTrigger("hover")&&(this.hoverTimeout=window.setTimeout((()=>{this.requestClose()}),this.closeDelay||50))}onDocumentClick(e){if(this.disabled||!this.open)return;e.composedPath().includes(this)||this.requestClose()}onWindowScroll(){window.requestAnimationFrame((()=>this.updatePositioner()))}updatePositioner(){const e=M(this.popupRef.value),t=this.isRich()?0:4,i=this.target.getBoundingClientRect(),o=i.top,r=i.left,n=i.height,s=i.width,a=this.popupRef.value.offsetHeight,l=this.popupRef.value.offsetWidth,c=l+t+4,d=a+t+4;let h,u,p,m,f=this.placement;if("auto"===f){const e=M(window),t=o>d,i=e.height()-o-n>d,a=r>c,l=e.width()-r-s>c;this.isRich()?(f="bottom-right",i&&l?f="bottom-right":i&&a?f="bottom-left":t&&l?f="top-right":t&&a?f="top-left":i?f="bottom":t?f="top":l?f="right":a&&(f="left")):(f="top",t?f="top":i?f="bottom":a?f="left":l&&(f="right"))}const[v,g]=f.split("-");switch(v){case"top":u="bottom",p=o-a-t;break;case"bottom":u="top",p=o+n+t;break;default:switch(u="center",g){case"start":p=o;break;case"end":p=o+n-a;break;default:p=o+n/2-a/2}}switch(v){case"left":h="right",m=r-l-t;break;case"right":h="left",m=r+s+t;break;default:switch(h="center",g){case"start":m=r;break;case"end":m=r+s-l;break;case"left":h="right",m=r-l-t;break;case"right":h="left",m=r+s+t;break;default:m=r+s/2-l/2}}e.css({top:p,left:m,transformOrigin:[h,u].join(" ")})}},e.Tooltip.styles=[Qt,wn],Se([Ot({reflect:!0})],e.Tooltip.prototype,"variant",void 0),Se([Ot({reflect:!0})],e.Tooltip.prototype,"placement",void 0),Se([Ot({type:Number,reflect:!0,attribute:"open-delay"})],e.Tooltip.prototype,"openDelay",void 0),Se([Ot({type:Number,reflect:!0,attribute:"close-delay"})],e.Tooltip.prototype,"closeDelay",void 0),Se([Ot({reflect:!0})],e.Tooltip.prototype,"headline",void 0),Se([Ot({reflect:!0})],e.Tooltip.prototype,"content",void 0),Se([Ot({reflect:!0})],e.Tooltip.prototype,"trigger",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Tooltip.prototype,"disabled",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.Tooltip.prototype,"open",void 0),Se([Ci("placement",!0),Ci("content",!0)],e.Tooltip.prototype,"onPositionChange",null),Se([Ci("open")],e.Tooltip.prototype,"onOpenChange",null),e.Tooltip=Se([Lt("mdui-tooltip")],e.Tooltip);const kn=Pe`:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;e.TopAppBarTitle=class extends Xt{constructor(){super(...arguments),this.variant="small",this.shrink=!1,this.hasSlotController=new Jt(this,"label-large"),this.labelLargeRef=Li(),this.defaultSlotRef=Li()}render(){const e=this.hasSlotController.test("label-large"),t=ji({shrink:this.shrink,"variant-center-aligned":"center-aligned"===this.variant,"variant-small":"small"===this.variant,"variant-medium":"medium"===this.variant,"variant-large":"large"===this.variant});return ft`${e?ft``:ft`
`}`}onSlotChange(e){e||(this.labelLargeRef.value.innerHTML=(e=>{const t=e.assignedNodes({flatten:!0});let i="";return[...t].forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(i+=e.outerHTML),e.nodeType===Node.TEXT_NODE&&(i+=e.textContent)})),i})(this.defaultSlotRef.value))}},e.TopAppBarTitle.styles=[Qt,kn],Se([zt()],e.TopAppBarTitle.prototype,"variant",void 0),Se([zt()],e.TopAppBarTitle.prototype,"shrink",void 0),e.TopAppBarTitle=Se([Lt("mdui-top-app-bar-title")],e.TopAppBarTitle);const Cn=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]){top:-7.625rem}:host([hide][variant=large]){top:-10.125rem}:host([shrink][variant=large]),:host([shrink][variant=medium]){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;function xn(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.TopAppBar=class extends(xi(Mi)){constructor(){super(...arguments),this.variant="small",this.hide=!1,this.shrink=!1,this.scrolling=!1}get scrollPaddingPosition(){return"top"}get layoutPlacement(){return"top"}async onVariantChange(){this.hasUpdated?this.addEventListener("transitionend",(async()=>{await this.scrollBehaviorDefinedController.whenDefined(),this.updateContainerPadding()}),{once:!0}):await this.updateComplete,this.titleElements.forEach((e=>{e.variant=this.variant}))}async onShrinkChange(){this.hasUpdated||await this.updateComplete,this.titleElements.forEach((e=>{e.shrink=this.shrink}))}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return ft``}runScrollNoThreshold(e,t){this.hasScrollBehavior("shrink")&&e&&t<8&&(this.shrink=!1)}runScrollThreshold(e,t){if(this.hasScrollBehavior("elevate")&&(this.scrolling=!!t),this.hasScrollBehavior("shrink")&&(e||(this.shrink=!0)),this.hasScrollBehavior("hide")){if(!e&&!this.hide){this.emit("hide",{cancelable:!0})&&(this.hide=!0)}if(e&&this.hide){this.emit("show",{cancelable:!0})&&(this.hide=!1)}}}},e.TopAppBar.styles=[Qt,Cn],Se([Ot({reflect:!0})],e.TopAppBar.prototype,"variant",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TopAppBar.prototype,"hide",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TopAppBar.prototype,"shrink",void 0),Se([Ot({reflect:!0,attribute:"scroll-behavior"})],e.TopAppBar.prototype,"scrollBehavior",void 0),Se([Ot({type:Boolean,reflect:!0,converter:wi})],e.TopAppBar.prototype,"scrolling",void 0),Se([Nt({selector:"mdui-top-app-bar-title",flatten:!0})],e.TopAppBar.prototype,"titleElements",void 0),Se([Ci("variant")],e.TopAppBar.prototype,"onVariantChange",null),Se([Ci("shrink")],e.TopAppBar.prototype,"onShrinkChange",null),e.TopAppBar=Se([Lt("mdui-top-app-bar")],e.TopAppBar);const $n={};function Rn(e,t){if(u($n[e])&&($n[e]=[]),u(t))return $n[e];$n[e].push(t)}function In(e){if(u($n[e]))return;if(!$n[e].length)return;$n[e].shift()()}const Sn={onClick:x},En="mdui.functions.dialog.";let Tn;const An=t=>{const i=new e.Dialog,o=M(i),r=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions"],n=["onOpen","onOpened","onClose","onClosed","onOverlayClick"];return Object.entries(t).forEach((([e,t])=>{if(r.includes(e))i[e]=t;else if(n.includes(e)){const r=k(e.slice(2));o.on(r,(()=>{t.call(i,i)}))}})),t.body&&o.append(t.body),t.actions&&t.actions.forEach((e=>{const t=Object.assign({},Sn,e);M(`${t.text}`).appendTo(o).on("click",(function(){const e=t.onClick.call(i,i);xn(e)?(this.loading=!0,e.then((()=>{i.open=!1})).finally((()=>{this.loading=!1}))):!1!==e&&(i.open=!1)}))})),o.appendTo("body").on("closed",(()=>{o.remove(),t.queue&&(Tn=void 0,In(En+t.queue))})),t.queue?Tn?Rn(En+t.queue,(()=>{i.open=!0,Tn=i})):(setTimeout((()=>{i.open=!0})),Tn=i):setTimeout((()=>{i.open=!0})),i},Dn=()=>er("OK",{id:"functions.alert.confirmText"}),Mn=()=>er("OK",{id:"functions.confirm.confirmText"}),Pn=()=>er("Cancel",{id:"functions.confirm.cancelText"});function Ln(e){return e<0?-1:0===e?0:1}function _n(e,t,i){return(1-i)*e+i*t}function Bn(e,t,i){return it?t:i}function On(e){return(e%=360)<0&&(e+=360),e}function zn(e){return(e%=360)<0&&(e+=360),e}function Nn(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function Fn(e,t){return[e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2]]}const Vn=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],Hn=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Un=[95.047,100,108.883];function Kn(e,t,i){return(255<<24|(255&e)<<16|(255&t)<<8|255&i)>>>0}function qn(e){return Kn(es(e[0]),es(e[1]),es(e[2]))}function jn(e){return e>>16&255}function Wn(e){return e>>8&255}function Gn(e){return 255&e}function Yn(e,t,i){const o=Hn,r=o[0][0]*e+o[0][1]*t+o[0][2]*i,n=o[1][0]*e+o[1][1]*t+o[1][2]*i,s=o[2][0]*e+o[2][1]*t+o[2][2]*i;return Kn(es(r),es(n),es(s))}function Xn(e){const t=function(e){return Fn([Qn(jn(e)),Qn(Wn(e)),Qn(Gn(e))],Vn)}(e)[1];return 116*ts(t/100)-16}function Jn(e){return 100*is((e+16)/116)}function Zn(e){return 116*ts(e/100)-16}function Qn(e){const t=e/255;return t<=.040449936?t/12.92*100:100*Math.pow((t+.055)/1.055,2.4)}function es(e){const t=e/100;let i=0;return i=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,o=0,r=255,(n=Math.round(255*i))r?r:n;var o,r,n}function ts(e){const t=24389/27;return e>216/24389?Math.pow(e,1/3):(t*e+16)/116}function is(e){const t=e*e*e;return t>216/24389?t:(116*e-16)/(24389/27)}class os{static make(e=function(){return Un}(),t=200/Math.PI*Jn(50)/100,i=50,o=2,r=!1){const n=e,s=.401288*n[0]+.650173*n[1]+-.051461*n[2],a=-.250268*n[0]+1.204414*n[1]+.045854*n[2],l=-.002079*n[0]+.048952*n[1]+.953127*n[2],c=.8+o/10,d=c>=.9?_n(.59,.69,10*(c-.9)):_n(.525,.59,10*(c-.8));let h=r?1:c*(1-1/3.6*Math.exp((-t-42)/92));h=h>1?1:h<0?0:h;const u=c,p=[h*(100/s)+1-h,h*(100/a)+1-h,h*(100/l)+1-h],m=1/(5*t+1),f=m*m*m*m,v=1-f,g=f*t+.1*v*v*Math.cbrt(5*t),b=Jn(i)/e[1],y=1.48+Math.sqrt(b),w=.725/Math.pow(b,.2),k=w,C=[Math.pow(g*p[0]*s/100,.42),Math.pow(g*p[1]*a/100,.42),Math.pow(g*p[2]*l/100,.42)],x=[400*C[0]/(C[0]+27.13),400*C[1]/(C[1]+27.13),400*C[2]/(C[2]+27.13)];return new os(b,(2*x[0]+x[1]+.05*x[2])*w,w,k,d,u,p,g,Math.pow(g,.25),y)}constructor(e,t,i,o,r,n,s,a,l,c){this.n=e,this.aw=t,this.nbb=i,this.ncb=o,this.c=r,this.nc=n,this.rgbD=s,this.fl=a,this.fLRoot=l,this.z=c}}os.DEFAULT=os.make();class rs{constructor(e,t,i,o,r,n,s,a,l){this.hue=e,this.chroma=t,this.j=i,this.q=o,this.m=r,this.s=n,this.jstar=s,this.astar=a,this.bstar=l}distance(e){const t=this.jstar-e.jstar,i=this.astar-e.astar,o=this.bstar-e.bstar,r=Math.sqrt(t*t+i*i+o*o);return 1.41*Math.pow(r,.63)}static fromInt(e){return rs.fromIntInViewingConditions(e,os.DEFAULT)}static fromIntInViewingConditions(e,t){const i=(65280&e)>>8,o=255&e,r=Qn((16711680&e)>>16),n=Qn(i),s=Qn(o),a=.41233895*r+.35762064*n+.18051042*s,l=.2126*r+.7152*n+.0722*s,c=.01932141*r+.11916382*n+.95034478*s,d=.401288*a+.650173*l-.051461*c,h=-.250268*a+1.204414*l+.045854*c,u=-.002079*a+.048952*l+.953127*c,p=t.rgbD[0]*d,m=t.rgbD[1]*h,f=t.rgbD[2]*u,v=Math.pow(t.fl*Math.abs(p)/100,.42),g=Math.pow(t.fl*Math.abs(m)/100,.42),b=Math.pow(t.fl*Math.abs(f)/100,.42),y=400*Ln(p)*v/(v+27.13),w=400*Ln(m)*g/(g+27.13),k=400*Ln(f)*b/(b+27.13),C=(11*y+-12*w+k)/11,x=(y+w-2*k)/9,$=(20*y+20*w+21*k)/20,R=(40*y+20*w+k)/20,I=180*Math.atan2(x,C)/Math.PI,S=I<0?I+360:I>=360?I-360:I,E=S*Math.PI/180,T=R*t.nbb,A=100*Math.pow(T/t.aw,t.c*t.z),D=4/t.c*Math.sqrt(A/100)*(t.aw+4)*t.fLRoot,M=S<20.14?S+360:S,P=5e4/13*(.25*(Math.cos(M*Math.PI/180+2)+3.8))*t.nc*t.ncb*Math.sqrt(C*C+x*x)/($+.305),L=Math.pow(P,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),_=L*Math.sqrt(A/100),B=_*t.fLRoot,O=50*Math.sqrt(L*t.c/(t.aw+4)),z=(1+100*.007)*A/(1+.007*A),N=1/.0228*Math.log(1+.0228*B),F=N*Math.cos(E),V=N*Math.sin(E);return new rs(S,_,A,D,B,O,z,F,V)}static fromJch(e,t,i){return rs.fromJchInViewingConditions(e,t,i,os.DEFAULT)}static fromJchInViewingConditions(e,t,i,o){const r=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,n=t*o.fLRoot,s=t/Math.sqrt(e/100),a=50*Math.sqrt(s*o.c/(o.aw+4)),l=i*Math.PI/180,c=(1+100*.007)*e/(1+.007*e),d=1/.0228*Math.log(1+.0228*n),h=d*Math.cos(l),u=d*Math.sin(l);return new rs(i,t,e,r,n,a,c,h,u)}static fromUcs(e,t,i){return rs.fromUcsInViewingConditions(e,t,i,os.DEFAULT)}static fromUcsInViewingConditions(e,t,i,o){const r=t,n=i,s=Math.sqrt(r*r+n*n),a=(Math.exp(.0228*s)-1)/.0228/o.fLRoot;let l=Math.atan2(n,r)*(180/Math.PI);l<0&&(l+=360);const c=e/(1-.007*(e-100));return rs.fromJchInViewingConditions(c,a,l,o)}toInt(){return this.viewed(os.DEFAULT)}viewed(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),i=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,r=.25*(Math.cos(o+2)+3.8),n=e.aw*Math.pow(this.j/100,1/e.c/e.z),s=r*(5e4/13)*e.nc*e.ncb,a=n/e.nbb,l=Math.sin(o),c=Math.cos(o),d=23*(a+.305)*i/(23*s+11*i*c+108*i*l),h=d*c,u=d*l,p=(460*a+451*h+288*u)/1403,m=(460*a-891*h-261*u)/1403,f=(460*a-220*h-6300*u)/1403,v=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Ln(p)*(100/e.fl)*Math.pow(v,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Ln(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),k=Ln(f)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],x=y/e.rgbD[1],$=k/e.rgbD[2];return Yn(1.86206786*C-1.01125463*x+.14918677*$,.38752654*C+.62144744*x-.00897398*$,-.0158415*C-.03412294*x+1.04996444*$)}static fromXyzInViewingConditions(e,t,i,o){const r=.401288*e+.650173*t-.051461*i,n=-.250268*e+1.204414*t+.045854*i,s=-.002079*e+.048952*t+.953127*i,a=o.rgbD[0]*r,l=o.rgbD[1]*n,c=o.rgbD[2]*s,d=Math.pow(o.fl*Math.abs(a)/100,.42),h=Math.pow(o.fl*Math.abs(l)/100,.42),u=Math.pow(o.fl*Math.abs(c)/100,.42),p=400*Ln(a)*d/(d+27.13),m=400*Ln(l)*h/(h+27.13),f=400*Ln(c)*u/(u+27.13),v=(11*p+-12*m+f)/11,g=(p+m-2*f)/9,b=(20*p+20*m+21*f)/20,y=(40*p+20*m+f)/20,w=180*Math.atan2(g,v)/Math.PI,k=w<0?w+360:w>=360?w-360:w,C=k*Math.PI/180,x=y*o.nbb,$=100*Math.pow(x/o.aw,o.c*o.z),R=4/o.c*Math.sqrt($/100)*(o.aw+4)*o.fLRoot,I=k<20.14?k+360:k,S=5e4/13*(1/4*(Math.cos(I*Math.PI/180+2)+3.8))*o.nc*o.ncb*Math.sqrt(v*v+g*g)/(b+.305),E=Math.pow(S,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),T=E*Math.sqrt($/100),A=T*o.fLRoot,D=50*Math.sqrt(E*o.c/(o.aw+4)),M=(1+100*.007)*$/(1+.007*$),P=Math.log(1+.0228*A)/.0228,L=P*Math.cos(C),_=P*Math.sin(C);return new rs(k,T,$,R,A,D,M,L,_)}xyzInViewingConditions(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),i=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,r=.25*(Math.cos(o+2)+3.8),n=e.aw*Math.pow(this.j/100,1/e.c/e.z),s=r*(5e4/13)*e.nc*e.ncb,a=n/e.nbb,l=Math.sin(o),c=Math.cos(o),d=23*(a+.305)*i/(23*s+11*i*c+108*i*l),h=d*c,u=d*l,p=(460*a+451*h+288*u)/1403,m=(460*a-891*h-261*u)/1403,f=(460*a-220*h-6300*u)/1403,v=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Ln(p)*(100/e.fl)*Math.pow(v,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Ln(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),k=Ln(f)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],x=y/e.rgbD[1],$=k/e.rgbD[2];return[1.86206786*C-1.01125463*x+.14918677*$,.38752654*C+.62144744*x-.00897398*$,-.0158415*C-.03412294*x+1.04996444*$]}}class ns{static sanitizeRadians(e){return(e+8*Math.PI)%(2*Math.PI)}static trueDelinearized(e){const t=e/100;let i=0;return i=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,255*i}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return 400*Ln(e)*t/(t+27.13)}static hueOf(e){const t=Fn(e,ns.SCALED_DISCOUNT_FROM_LINRGB),i=ns.chromaticAdaptation(t[0]),o=ns.chromaticAdaptation(t[1]),r=ns.chromaticAdaptation(t[2]),n=(11*i+-12*o+r)/11,s=(i+o-2*r)/9;return Math.atan2(s,n)}static areInCyclicOrder(e,t,i){return ns.sanitizeRadians(t-e)100.01||y[1]>100.01||y[2]>100.01?0:qn(y);o-=(x-i)*o/(2*x)}return 0}static solveToInt(e,t,i){if(t<1e-4||i<1e-4||i>99.9999)return function(e){const t=es(Jn(e));return Kn(t,t,t)}(i);const o=(e=zn(e))/180*Math.PI,r=Jn(i),n=ns.findResultByJ(o,t,r);if(0!==n)return n;return qn(ns.bisectToLimit(r,o))}static solveToCam(e,t,i){return rs.fromInt(ns.solveToInt(e,t,i))}}ns.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],ns.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],ns.Y_FROM_LINRGB=[.2126,.7152,.0722],ns.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];class ss{static from(e,t,i){return new ss(ns.solveToInt(e,t,i))}static fromInt(e){return new ss(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(ns.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(ns.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(ns.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const t=rs.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Xn(e),this.argb=e}setInternalState(e){const t=rs.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Xn(e),this.argb=e}inViewingConditions(e){const t=rs.fromInt(this.toInt()).xyzInViewingConditions(e),i=rs.fromXyzInViewingConditions(t[0],t[1],t[2],os.make());return ss.from(i.hue,i.chroma,Zn(t[1]))}}class as{static harmonize(e,t){const i=ss.fromInt(e),o=ss.fromInt(t),r=Nn(i.hue,o.hue),n=Math.min(.5*r,15),s=zn(i.hue+n*(a=i.hue,zn(o.hue-a)<=180?1:-1));var a;return ss.from(s,i.chroma,i.tone).toInt()}static hctHue(e,t,i){const o=as.cam16Ucs(e,t,i),r=rs.fromInt(o),n=rs.fromInt(e);return ss.from(r.hue,n.chroma,Xn(e)).toInt()}static cam16Ucs(e,t,i){const o=rs.fromInt(e),r=rs.fromInt(t),n=o.jstar,s=o.astar,a=o.bstar,l=n+(r.jstar-n)*i,c=s+(r.astar-s)*i,d=a+(r.bstar-a)*i;return rs.fromUcs(l,c,d).toInt()}}class ls{static ratioOfTones(e,t){return e=Bn(0,100,e),t=Bn(0,100,t),ls.ratioOfYs(Jn(e),Jn(t))}static ratioOfYs(e,t){const i=e>t?e:t;return(i+5)/((i===t?e:t)+5)}static lighter(e,t){if(e<0||e>100)return-1;const i=Jn(e),o=t*(i+5)-5,r=ls.ratioOfYs(o,i),n=Math.abs(r-t);if(r.04)return-1;const s=Zn(o)+.4;return s<0||s>100?-1:s}static darker(e,t){if(e<0||e>100)return-1;const i=Jn(e),o=(i+5)/t-5,r=ls.ratioOfYs(i,o),n=Math.abs(r-t);if(r.04)return-1;const s=Zn(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(e,t){const i=ls.lighter(e,t);return i<0?100:i}static darkerUnsafe(e,t){const i=ls.darker(e,t);return i<0?0:i}}class cs{static isDisliked(e){const t=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,i=Math.round(e.chroma)>16,o=Math.round(e.tone)<65;return t&&i&&o}static fixIfDisliked(e){return cs.isDisliked(e)?ss.from(e.hue,e.chroma,70):e}}class ds{static fromPalette(e){return new ds(e.name??"",e.palette,e.tone,e.isBackground??!1,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}constructor(e,t,i,o,r,n,s,a){if(this.name=e,this.palette=t,this.tone=i,this.isBackground=o,this.background=r,this.secondBackground=n,this.contrastCurve=s,this.toneDeltaPair=a,this.hctCache=new Map,!r&&n)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!r&&s)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(r&&!s)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){const t=this.hctCache.get(e);if(null!=t)return t;const i=this.getTone(e),o=this.palette(e).getHct(i);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,o),o}getTone(e){const t=e.contrastLevel<0;if(this.toneDeltaPair){const i=this.toneDeltaPair(e),o=i.roleA,r=i.roleB,n=i.delta,s=i.polarity,a=i.stayTogether,l=this.background(e).getTone(e),c="nearer"===s||"lighter"===s&&!e.isDark||"darker"===s&&e.isDark,d=c?o:r,h=c?r:o,u=this.name===d.name,p=e.isDark?1:-1,m=d.contrastCurve.get(e.contrastLevel),f=h.contrastCurve.get(e.contrastLevel),v=d.tone(e);let g=ls.ratioOfTones(l,v)>=m?v:ds.foregroundTone(l,m);const b=h.tone(e);let y=ls.ratioOfTones(l,b)>=f?b:ds.foregroundTone(l,f);return t&&(g=ds.foregroundTone(l,m),y=ds.foregroundTone(l,f)),(y-g)*p>=n||(y=Bn(0,100,g+n*p),(y-g)*p>=n||(g=Bn(0,100,y-n*p))),50<=g&&g<60?p>0?(g=60,y=Math.max(y,g+n*p)):(g=49,y=Math.min(y,g+n*p)):50<=y&&y<60&&(a?p>0?(g=60,y=Math.max(y,g+n*p)):(g=49,y=Math.min(y,g+n*p)):y=p>0?60:49),u?g:y}{let i=this.tone(e);if(null==this.background)return i;const o=this.background(e).getTone(e),r=this.contrastCurve.get(e.contrastLevel);if(ls.ratioOfTones(o,i)>=r||(i=ds.foregroundTone(o,r)),t&&(i=ds.foregroundTone(o,r)),this.isBackground&&50<=i&&i<60&&(i=ls.ratioOfTones(49,o)>=r?49:60),this.secondBackground){const[t,o]=[this.background,this.secondBackground],[n,s]=[t(e).getTone(e),o(e).getTone(e)],[a,l]=[Math.max(n,s),Math.min(n,s)];if(ls.ratioOfTones(a,i)>=r&&ls.ratioOfTones(l,i)>=r)return i;const c=ls.lighter(a,r),d=ls.darker(l,r),h=[];-1!==c&&h.push(c),-1!==d&&h.push(d);return ds.tonePrefersLightForeground(n)||ds.tonePrefersLightForeground(s)?c<0?100:c:1===h.length?h[0]:d<0?0:d}return i}}static foregroundTone(e,t){const i=ls.lighterUnsafe(e,t),o=ls.darkerUnsafe(e,t),r=ls.ratioOfTones(i,e),n=ls.ratioOfTones(o,e);if(ds.tonePrefersLightForeground(e)){const e=Math.abs(r-n)<.1&&r=t||r>=n||e?i:o}return n>=t||n>=r?o:i}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return ds.tonePrefersLightForeground(e)&&!ds.toneAllowsLightForeground(e)?49:e}}class hs{static fromInt(e){const t=ss.fromInt(e);return hs.fromHct(t)}static fromHct(e){return new hs(e.hue,e.chroma,e)}static fromHueAndChroma(e,t){const i=new us(e,t).create();return new hs(e,t,i)}constructor(e,t,i){this.hue=e,this.chroma=t,this.keyColor=i,this.cache=new Map}tone(e){let t=this.cache.get(e);return void 0===t&&(t=ss.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}getHct(e){return ss.fromInt(this.tone(e))}}class us{constructor(e,t){this.hue=e,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,t=100;for(;e=this.requestedChroma-.01)if(Math.abs(e-50)e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),bs.secondaryPaletteKeyColor=ds.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),bs.tertiaryPaletteKeyColor=ds.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),bs.neutralPaletteKeyColor=ds.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),bs.neutralVariantPaletteKeyColor=ds.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),bs.background=ds.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),bs.onBackground=ds.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>bs.background,contrastCurve:new ps(3,3,4.5,7)}),bs.surface=ds.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),bs.surfaceDim=ds.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new ps(87,87,80,75).get(e.contrastLevel),isBackground:!0}),bs.surfaceBright=ds.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ps(24,24,29,34).get(e.contrastLevel):98,isBackground:!0}),bs.surfaceContainerLowest=ds.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ps(4,4,2,0).get(e.contrastLevel):100,isBackground:!0}),bs.surfaceContainerLow=ds.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ps(10,10,11,12).get(e.contrastLevel):new ps(96,96,96,95).get(e.contrastLevel),isBackground:!0}),bs.surfaceContainer=ds.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ps(12,12,16,20).get(e.contrastLevel):new ps(94,94,92,90).get(e.contrastLevel),isBackground:!0}),bs.surfaceContainerHigh=ds.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ps(17,17,21,25).get(e.contrastLevel):new ps(92,92,88,85).get(e.contrastLevel),isBackground:!0}),bs.surfaceContainerHighest=ds.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ps(22,22,26,30).get(e.contrastLevel):new ps(90,90,84,80).get(e.contrastLevel),isBackground:!0}),bs.onSurface=ds.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>bs.highestSurface(e),contrastCurve:new ps(4.5,7,11,21)}),bs.surfaceVariant=ds.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),bs.onSurfaceVariant=ds.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>bs.highestSurface(e),contrastCurve:new ps(3,4.5,7,11)}),bs.inverseSurface=ds.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),bs.inverseOnSurface=ds.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>bs.inverseSurface,contrastCurve:new ps(4.5,7,11,21)}),bs.outline=ds.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>bs.highestSurface(e),contrastCurve:new ps(1.5,3,4.5,7)}),bs.outlineVariant=ds.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5)}),bs.shadow=ds.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0}),bs.scrim=ds.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0}),bs.surfaceTint=ds.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),bs.primary=ds.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>gs(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(3,4.5,7,7),toneDeltaPair:e=>new ms(bs.primaryContainer,bs.primary,10,"nearer",!1)}),bs.onPrimary=ds.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>gs(e)?e.isDark?10:90:e.isDark?20:100,background:e=>bs.primary,contrastCurve:new ps(4.5,7,11,21)}),bs.primaryContainer=ds.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>vs(e)?e.sourceColorHct.tone:gs(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.primaryContainer,bs.primary,10,"nearer",!1)}),bs.onPrimaryContainer=ds.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>vs(e)?ds.foregroundTone(bs.primaryContainer.tone(e),4.5):gs(e)?e.isDark?0:100:e.isDark?90:30,background:e=>bs.primaryContainer,contrastCurve:new ps(3,4.5,7,11)}),bs.inversePrimary=ds.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>bs.inverseSurface,contrastCurve:new ps(3,4.5,7,7)}),bs.secondary=ds.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(3,4.5,7,7),toneDeltaPair:e=>new ms(bs.secondaryContainer,bs.secondary,10,"nearer",!1)}),bs.onSecondary=ds.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>gs(e)?e.isDark?10:100:e.isDark?20:100,background:e=>bs.secondary,contrastCurve:new ps(4.5,7,11,21)}),bs.secondaryContainer=ds.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;return gs(e)?e.isDark?30:85:vs(e)?function(e,t,i,o){let r=i,n=ss.from(e,t,i);if(n.chromas.chroma)break;if(Math.abs(s.chroma-t)<.4)break;Math.abs(s.chroma-t)bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.secondaryContainer,bs.secondary,10,"nearer",!1)}),bs.onSecondaryContainer=ds.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>gs(e)?e.isDark?90:10:vs(e)?ds.foregroundTone(bs.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>bs.secondaryContainer,contrastCurve:new ps(3,4.5,7,11)}),bs.tertiary=ds.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(3,4.5,7,7),toneDeltaPair:e=>new ms(bs.tertiaryContainer,bs.tertiary,10,"nearer",!1)}),bs.onTertiary=ds.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?e.isDark?10:90:e.isDark?20:100,background:e=>bs.tertiary,contrastCurve:new ps(4.5,7,11,21)}),bs.tertiaryContainer=ds.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(gs(e))return e.isDark?60:49;if(!vs(e))return e.isDark?30:90;const t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return cs.fixIfDisliked(t).tone},isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.tertiaryContainer,bs.tertiary,10,"nearer",!1)}),bs.onTertiaryContainer=ds.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?e.isDark?0:100:vs(e)?ds.foregroundTone(bs.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>bs.tertiaryContainer,contrastCurve:new ps(3,4.5,7,11)}),bs.error=ds.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(3,4.5,7,7),toneDeltaPair:e=>new ms(bs.errorContainer,bs.error,10,"nearer",!1)}),bs.onError=ds.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>bs.error,contrastCurve:new ps(4.5,7,11,21)}),bs.errorContainer=ds.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.errorContainer,bs.error,10,"nearer",!1)}),bs.onErrorContainer=ds.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>gs(e)?e.isDark?90:10:e.isDark?90:30,background:e=>bs.errorContainer,contrastCurve:new ps(3,4.5,7,11)}),bs.primaryFixed=ds.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>gs(e)?40:90,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.primaryFixed,bs.primaryFixedDim,10,"lighter",!0)}),bs.primaryFixedDim=ds.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>gs(e)?30:80,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.primaryFixed,bs.primaryFixedDim,10,"lighter",!0)}),bs.onPrimaryFixed=ds.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>gs(e)?100:10,background:e=>bs.primaryFixedDim,secondBackground:e=>bs.primaryFixed,contrastCurve:new ps(4.5,7,11,21)}),bs.onPrimaryFixedVariant=ds.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>gs(e)?90:30,background:e=>bs.primaryFixedDim,secondBackground:e=>bs.primaryFixed,contrastCurve:new ps(3,4.5,7,11)}),bs.secondaryFixed=ds.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>gs(e)?80:90,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.secondaryFixed,bs.secondaryFixedDim,10,"lighter",!0)}),bs.secondaryFixedDim=ds.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>gs(e)?70:80,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.secondaryFixed,bs.secondaryFixedDim,10,"lighter",!0)}),bs.onSecondaryFixed=ds.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>bs.secondaryFixedDim,secondBackground:e=>bs.secondaryFixed,contrastCurve:new ps(4.5,7,11,21)}),bs.onSecondaryFixedVariant=ds.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>gs(e)?25:30,background:e=>bs.secondaryFixedDim,secondBackground:e=>bs.secondaryFixed,contrastCurve:new ps(3,4.5,7,11)}),bs.tertiaryFixed=ds.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?40:90,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.tertiaryFixed,bs.tertiaryFixedDim,10,"lighter",!0)}),bs.tertiaryFixedDim=ds.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?30:80,isBackground:!0,background:e=>bs.highestSurface(e),contrastCurve:new ps(1,1,3,4.5),toneDeltaPair:e=>new ms(bs.tertiaryFixed,bs.tertiaryFixedDim,10,"lighter",!0)}),bs.onTertiaryFixed=ds.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?100:10,background:e=>bs.tertiaryFixedDim,secondBackground:e=>bs.tertiaryFixed,contrastCurve:new ps(4.5,7,11,21)}),bs.onTertiaryFixedVariant=ds.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>gs(e)?90:30,background:e=>bs.tertiaryFixedDim,secondBackground:e=>bs.tertiaryFixed,contrastCurve:new ps(3,4.5,7,11)});class ys{static of(e){return new ys(e,!1)}static contentOf(e){return new ys(e,!0)}static fromColors(e){return ys.createPaletteFromColors(!1,e)}static contentFromColors(e){return ys.createPaletteFromColors(!0,e)}static createPaletteFromColors(e,t){const i=new ys(t.primary,e);if(t.secondary){const o=new ys(t.secondary,e);i.a2=o.a1}if(t.tertiary){const o=new ys(t.tertiary,e);i.a3=o.a1}if(t.error){const o=new ys(t.error,e);i.error=o.a1}if(t.neutral){const o=new ys(t.neutral,e);i.n1=o.n1}if(t.neutralVariant){const o=new ys(t.neutralVariant,e);i.n2=o.n2}return i}constructor(e,t){const i=ss.fromInt(e),o=i.hue,r=i.chroma;t?(this.a1=hs.fromHueAndChroma(o,r),this.a2=hs.fromHueAndChroma(o,r/3),this.a3=hs.fromHueAndChroma(o+60,r/2),this.n1=hs.fromHueAndChroma(o,Math.min(r/12,4)),this.n2=hs.fromHueAndChroma(o,Math.min(r/6,8))):(this.a1=hs.fromHueAndChroma(o,Math.max(48,r)),this.a2=hs.fromHueAndChroma(o,16),this.a3=hs.fromHueAndChroma(o+60,24),this.n1=hs.fromHueAndChroma(o,4),this.n2=hs.fromHueAndChroma(o,8)),this.error=hs.fromHueAndChroma(25,84)}}class ws{fromInt(e){return function(e){const t=Qn(jn(e)),i=Qn(Wn(e)),o=Qn(Gn(e)),r=Vn,n=r[0][0]*t+r[0][1]*i+r[0][2]*o,s=r[1][0]*t+r[1][1]*i+r[1][2]*o,a=r[2][0]*t+r[2][1]*i+r[2][2]*o,l=s/Un[1],c=a/Un[2],d=ts(n/Un[0]),h=ts(l);return[116*h-16,500*(d-h),200*(h-ts(c))]}(e)}toInt(e){return function(e,t,i){const o=Un,r=(e+16)/116,n=r-i/200,s=is(t/500+r),a=is(r),l=is(n);return Yn(s*o[0],a*o[1],l*o[2])}(e[0],e[1],e[2])}distance(e,t){const i=e[0]-t[0],o=e[1]-t[1],r=e[2]-t[2];return i*i+o*o+r*r}}class ks{static quantize(e,t,i){const o=new Map,r=new Array,n=new Array,s=new ws;let a=0;for(let t=0;t0&&(c=Math.min(c,t.length));const d=new Array;for(let e=0;e0)for(let e=0;e=4*a)continue;const t=s.distance(i,d[e]);t3&&(t++,u[e]=h)}}if(0===t&&0!==e)break;const i=new Array(c).fill(0),o=new Array(c).fill(0),n=new Array(c).fill(0);for(let e=0;e>24&255)<255||t.set(o,(t.get(o)??0)+1)}return t}}const $s=33,Rs=35937,Is="red",Ss="green",Es="blue";class Ts{constructor(e=[],t=[],i=[],o=[],r=[],n=[]){this.weights=e,this.momentsR=t,this.momentsG=i,this.momentsB=o,this.moments=r,this.cubes=n}quantize(e,t){this.constructHistogram(e),this.computeMoments();const i=this.createBoxes(t);return this.createResult(i.resultCount)}constructHistogram(e){this.weights=Array.from({length:Rs}).fill(0),this.momentsR=Array.from({length:Rs}).fill(0),this.momentsG=Array.from({length:Rs}).fill(0),this.momentsB=Array.from({length:Rs}).fill(0),this.moments=Array.from({length:Rs}).fill(0);const t=xs.quantize(e);for(const[e,i]of t.entries()){const t=jn(e),o=Wn(e),r=Gn(e),n=3,s=1+(t>>n),a=1+(o>>n),l=1+(r>>n),c=this.getIndex(s,a,l);this.weights[c]=(this.weights[c]??0)+i,this.momentsR[c]+=i*t,this.momentsG[c]+=i*o,this.momentsB[c]+=i*r,this.moments[c]+=i*(t*t+o*o+r*r)}}computeMoments(){for(let e=1;e<$s;e++){const t=Array.from({length:$s}).fill(0),i=Array.from({length:$s}).fill(0),o=Array.from({length:$s}).fill(0),r=Array.from({length:$s}).fill(0),n=Array.from({length:$s}).fill(0);for(let s=1;s<$s;s++){let a=0,l=0,c=0,d=0,h=0;for(let u=1;u<$s;u++){const p=this.getIndex(e,s,u);a+=this.weights[p],l+=this.momentsR[p],c+=this.momentsG[p],d+=this.momentsB[p],h+=this.moments[p],t[u]+=a,i[u]+=l,o[u]+=c,r[u]+=d,n[u]+=h;const m=this.getIndex(e-1,s,u);this.weights[p]=this.weights[m]+t[u],this.momentsR[p]=this.momentsR[m]+i[u],this.momentsG[p]=this.momentsG[m]+o[u],this.momentsB[p]=this.momentsB[m]+r[u],this.moments[p]=this.moments[m]+n[u]}}}}createBoxes(e){this.cubes=Array.from({length:e}).fill(0).map((()=>new As));const t=Array.from({length:e}).fill(0);this.cubes[0].r0=0,this.cubes[0].g0=0,this.cubes[0].b0=0,this.cubes[0].r1=32,this.cubes[0].g1=32,this.cubes[0].b1=32;let i=e,o=0;for(let r=1;r1?this.variance(this.cubes[o]):0,t[r]=this.cubes[r].vol>1?this.variance(this.cubes[r]):0):(t[o]=0,r--),o=0;let e=t[0];for(let i=1;i<=r;i++)t[i]>e&&(e=t[i],o=i);if(e<=0){i=r+1;break}}return new Ds(e,i)}createResult(e){const t=[];for(let i=0;i0){const i=255<<24|(255&Math.round(this.volume(e,this.momentsR)/o))<<16|(255&Math.round(this.volume(e,this.momentsG)/o))<<8|255&Math.round(this.volume(e,this.momentsB)/o);t.push(i)}}return t}variance(e){const t=this.volume(e,this.momentsR),i=this.volume(e,this.momentsG),o=this.volume(e,this.momentsB);return this.moments[this.getIndex(e.r1,e.g1,e.b1)]-this.moments[this.getIndex(e.r1,e.g1,e.b0)]-this.moments[this.getIndex(e.r1,e.g0,e.b1)]+this.moments[this.getIndex(e.r1,e.g0,e.b0)]-this.moments[this.getIndex(e.r0,e.g1,e.b1)]+this.moments[this.getIndex(e.r0,e.g1,e.b0)]+this.moments[this.getIndex(e.r0,e.g0,e.b1)]-this.moments[this.getIndex(e.r0,e.g0,e.b0)]-(t*t+i*i+o*o)/this.volume(e,this.weights)}cut(e,t){const i=this.volume(e,this.momentsR),o=this.volume(e,this.momentsG),r=this.volume(e,this.momentsB),n=this.volume(e,this.weights),s=this.maximize(e,Is,e.r0+1,e.r1,i,o,r,n),a=this.maximize(e,Ss,e.g0+1,e.g1,i,o,r,n),l=this.maximize(e,Es,e.b0+1,e.b1,i,o,r,n);let c;const d=s.maximum,h=a.maximum,u=l.maximum;if(d>=h&&d>=u){if(s.cutLocation<0)return!1;c=Is}else c=h>=d&&h>=u?Ss:Es;switch(t.r1=e.r1,t.g1=e.g1,t.b1=e.b1,c){case Is:e.r1=s.cutLocation,t.r0=e.r1,t.g0=e.g0,t.b0=e.b0;break;case Ss:e.g1=a.cutLocation,t.r0=e.r0,t.g0=e.g1,t.b0=e.b0;break;case Es:e.b1=l.cutLocation,t.r0=e.r0,t.g0=e.g0,t.b0=e.b1;break;default:throw new Error("unexpected direction "+c)}return e.vol=(e.r1-e.r0)*(e.g1-e.g0)*(e.b1-e.b0),t.vol=(t.r1-t.r0)*(t.g1-t.g0)*(t.b1-t.b0),!0}maximize(e,t,i,o,r,n,s,a){const l=this.bottom(e,t,this.momentsR),c=this.bottom(e,t,this.momentsG),d=this.bottom(e,t,this.momentsB),h=this.bottom(e,t,this.weights);let u=0,p=-1,m=0,f=0,v=0,g=0;for(let b=i;bu&&(u=y,p=b))}return new Ms(p,u)}volume(e,t){return t[this.getIndex(e.r1,e.g1,e.b1)]-t[this.getIndex(e.r1,e.g1,e.b0)]-t[this.getIndex(e.r1,e.g0,e.b1)]+t[this.getIndex(e.r1,e.g0,e.b0)]-t[this.getIndex(e.r0,e.g1,e.b1)]+t[this.getIndex(e.r0,e.g1,e.b0)]+t[this.getIndex(e.r0,e.g0,e.b1)]-t[this.getIndex(e.r0,e.g0,e.b0)]}bottom(e,t,i){switch(t){case Is:return-i[this.getIndex(e.r0,e.g1,e.b1)]+i[this.getIndex(e.r0,e.g1,e.b0)]+i[this.getIndex(e.r0,e.g0,e.b1)]-i[this.getIndex(e.r0,e.g0,e.b0)];case Ss:return-i[this.getIndex(e.r1,e.g0,e.b1)]+i[this.getIndex(e.r1,e.g0,e.b0)]+i[this.getIndex(e.r0,e.g0,e.b1)]-i[this.getIndex(e.r0,e.g0,e.b0)];case Es:return-i[this.getIndex(e.r1,e.g1,e.b0)]+i[this.getIndex(e.r1,e.g0,e.b0)]+i[this.getIndex(e.r0,e.g1,e.b0)]-i[this.getIndex(e.r0,e.g0,e.b0)];default:throw new Error("unexpected direction $direction")}}top(e,t,i,o){switch(t){case Is:return o[this.getIndex(i,e.g1,e.b1)]-o[this.getIndex(i,e.g1,e.b0)]-o[this.getIndex(i,e.g0,e.b1)]+o[this.getIndex(i,e.g0,e.b0)];case Ss:return o[this.getIndex(e.r1,i,e.b1)]-o[this.getIndex(e.r1,i,e.b0)]-o[this.getIndex(e.r0,i,e.b1)]+o[this.getIndex(e.r0,i,e.b0)];case Es:return o[this.getIndex(e.r1,e.g1,i)]-o[this.getIndex(e.r1,e.g0,i)]-o[this.getIndex(e.r0,e.g1,i)]+o[this.getIndex(e.r0,e.g0,i)];default:throw new Error("unexpected direction $direction")}}getIndex(e,t,i){return(e<<10)+(e<<6)+e+(t<<5)+t+i}}class As{constructor(e=0,t=0,i=0,o=0,r=0,n=0,s=0){this.r0=e,this.r1=t,this.g0=i,this.g1=o,this.b0=r,this.b1=n,this.vol=s}}class Ds{constructor(e,t){this.requestedCount=e,this.resultCount=t}}class Ms{constructor(e,t){this.cutLocation=e,this.maximum=t}}class Ps{static quantize(e,t){const i=(new Ts).quantize(e,t);return ks.quantize(e,i,t)}}class Ls{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(e){return Ls.lightFromCorePalette(ys.of(e))}static dark(e){return Ls.darkFromCorePalette(ys.of(e))}static lightContent(e){return Ls.lightFromCorePalette(ys.contentOf(e))}static darkContent(e){return Ls.darkFromCorePalette(ys.contentOf(e))}static lightFromCorePalette(e){return new Ls({primary:e.a1.tone(40),onPrimary:e.a1.tone(100),primaryContainer:e.a1.tone(90),onPrimaryContainer:e.a1.tone(10),secondary:e.a2.tone(40),onSecondary:e.a2.tone(100),secondaryContainer:e.a2.tone(90),onSecondaryContainer:e.a2.tone(10),tertiary:e.a3.tone(40),onTertiary:e.a3.tone(100),tertiaryContainer:e.a3.tone(90),onTertiaryContainer:e.a3.tone(10),error:e.error.tone(40),onError:e.error.tone(100),errorContainer:e.error.tone(90),onErrorContainer:e.error.tone(10),background:e.n1.tone(99),onBackground:e.n1.tone(10),surface:e.n1.tone(99),onSurface:e.n1.tone(10),surfaceVariant:e.n2.tone(90),onSurfaceVariant:e.n2.tone(30),outline:e.n2.tone(50),outlineVariant:e.n2.tone(80),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(20),inverseOnSurface:e.n1.tone(95),inversePrimary:e.a1.tone(80)})}static darkFromCorePalette(e){return new Ls({primary:e.a1.tone(80),onPrimary:e.a1.tone(20),primaryContainer:e.a1.tone(30),onPrimaryContainer:e.a1.tone(90),secondary:e.a2.tone(80),onSecondary:e.a2.tone(20),secondaryContainer:e.a2.tone(30),onSecondaryContainer:e.a2.tone(90),tertiary:e.a3.tone(80),onTertiary:e.a3.tone(20),tertiaryContainer:e.a3.tone(30),onTertiaryContainer:e.a3.tone(90),error:e.error.tone(80),onError:e.error.tone(20),errorContainer:e.error.tone(30),onErrorContainer:e.error.tone(80),background:e.n1.tone(10),onBackground:e.n1.tone(90),surface:e.n1.tone(10),onSurface:e.n1.tone(90),surfaceVariant:e.n2.tone(30),onSurfaceVariant:e.n2.tone(80),outline:e.n2.tone(60),outlineVariant:e.n2.tone(30),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(90),inverseOnSurface:e.n1.tone(20),inversePrimary:e.a1.tone(40)})}constructor(e){this.props=e}toJSON(){return{...this.props}}}const _s={desired:4,fallbackColorARGB:4282549748,filter:!0};function Bs(e,t){return e.score>t.score?-1:e.score=15;e--){d.length=0;for(const{hct:t}of c){if(d.find((i=>Nn(t.hue,i.hue)=i)break}if(d.length>=i)break}const h=[];0===d.length&&h.push(o);for(const e of d)h.push(e.toInt());return h}}function zs(e){const t=3===(e=e.replace("#","")).length,i=6===e.length,o=8===e.length;if(!t&&!i&&!o)throw new Error("unexpected hex "+e);let r=0,n=0,s=0;return t?(r=Ns(e.slice(0,1).repeat(2)),n=Ns(e.slice(1,2).repeat(2)),s=Ns(e.slice(2,3).repeat(2))):i?(r=Ns(e.slice(0,2)),n=Ns(e.slice(2,4)),s=Ns(e.slice(4,6))):o&&(r=Ns(e.slice(2,4)),n=Ns(e.slice(4,6)),s=Ns(e.slice(6,8))),(255<<24|(255&r)<<16|(255&n)<<8|255&s)>>>0}function Ns(e){return parseInt(e,16)}Os.TARGET_CHROMA=48,Os.WEIGHT_PROPORTION=.7,Os.WEIGHT_CHROMA_ABOVE=.3,Os.WEIGHT_CHROMA_BELOW=.1,Os.CUTOFF_CHROMA=5,Os.CUTOFF_EXCITED_PROPORTION=.01;const Fs=()=>er("OK",{id:"functions.prompt.confirmText"}),Vs=()=>er("Cancel",{id:"functions.prompt.cancelText"}),Hs=["light","dark"],Us="mdui-custom-color-scheme-";let Ks=0;const qs=e=>{const t=M(e);let i=t.get().map((e=>Array.from(e.classList))).flat();i=L(i).filter((e=>e.startsWith(Us))),t.removeClass(i.join(" "));const o=i.filter((e=>0===M(`.${e}`).length));M(o.map((e=>`#${e}`)).join(",")).remove()},js=(e,t)=>{const i=r(),o=M(t?.target||i.documentElement),n={light:Ls.light(e).toJSON(),dark:Ls.dark(e).toJSON()},s=ys.of(e);Object.assign(n.light,{"surface-dim":s.n1.tone(87),"surface-bright":s.n1.tone(98),"surface-container-lowest":s.n1.tone(100),"surface-container-low":s.n1.tone(96),"surface-container":s.n1.tone(94),"surface-container-high":s.n1.tone(92),"surface-container-highest":s.n1.tone(90),"surface-tint-color":n.light.primary}),Object.assign(n.dark,{"surface-dim":s.n1.tone(6),"surface-bright":s.n1.tone(24),"surface-container-lowest":s.n1.tone(4),"surface-container-low":s.n1.tone(10),"surface-container":s.n1.tone(12),"surface-container-high":s.n1.tone(17),"surface-container-highest":s.n1.tone(22),"surface-tint-color":n.dark.primary}),(t?.customColors||[]).map((t=>{const i=k(t.name),o=function(e,t){let i=t.value;const o=i,r=e;t.blend&&(i=as.harmonize(o,r));const n=ys.of(i).a1;return{color:t,value:i,light:{color:n.tone(40),onColor:n.tone(100),colorContainer:n.tone(90),onColorContainer:n.tone(10)},dark:{color:n.tone(80),onColor:n.tone(20),colorContainer:n.tone(30),onColorContainer:n.tone(90)}}}(e,{name:i,value:zs(t.value),blend:!0});Hs.forEach((e=>{n[e][i]=o[e].color,n[e][`on-${i}`]=o[e].onColor,n[e][`${i}-container`]=o[e].colorContainer,n[e][`on-${i}-container`]=o[e].onColorContainer}))}));const a=(e,t)=>Object.entries(n[e]).map((([e,i])=>t(k(e),(e=>[jn(e),Wn(e),Gn(e)].join(", "))(i)))).join(""),l=Us+`${e}-${Ks++}`,c=`.${l} {\n ${a("light",((e,t)=>`--mdui-color-${e}-light: ${t};`))}\n ${a("dark",((e,t)=>`--mdui-color-${e}-dark: ${t};`))}\n ${a("light",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-light);`))}\n\n color: rgb(var(--mdui-color-on-background));\n background-color: rgb(var(--mdui-color-background));\n}\n\n.mdui-theme-dark .${l},\n.mdui-theme-dark.${l} {\n ${a("dark",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-dark);`))}\n}\n\n@media (prefers-color-scheme: dark) {\n .mdui-theme-auto .${l},\n .mdui-theme-auto.${l} {\n ${a("dark",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-dark);`))}\n }\n}`;qs(o),M(i.head).append(``),o.addClass(l)},Ws="mdui.functions.snackbar.";let Gs;e.$=M,e.alert=e=>{const t=Object.assign({},{confirmText:Dn(),onConfirm:x},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((o,r)=>{let n=!1;const s=An({...Object.fromEntries(i.filter((e=>!u(t[e]))).map((e=>[e,t[e]]))),actions:[{text:t.confirmText,onClick:e=>{const i=t.onConfirm.call(e,e);return xn(i)?i.then((()=>{n=!0})):!1!==i&&(n=!0),i}}]});e.confirmText||lr(s,(()=>{M(s).find('[slot="action"]').text(Dn())})),M(s).on("close",(()=>{n?o():r(),cr(s)}))}))},e.breakpoint=_r,e.confirm=e=>{const t=Object.assign({},{confirmText:Mn(),cancelText:Pn(),onConfirm:x,onCancel:x},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((o,r)=>{let n=!1;const s=An({...Object.fromEntries(i.filter((e=>!u(t[e]))).map((e=>[e,t[e]]))),actions:[{text:t.cancelText,onClick:e=>t.onCancel.call(e,e)},{text:t.confirmText,onClick:e=>{const i=t.onConfirm.call(e,e);return xn(i)?i.then((()=>{n=!0})):!1!==i&&(n=!0),i}}]});e.confirmText||lr(s,(()=>{M(s).find('[slot="action"]').last().text(Mn())})),e.cancelText||lr(s,(()=>{M(s).find('[slot="action"]').first().text(Pn())})),M(s).on("close",(()=>{n?o():r(),cr(s)}))}))},e.dialog=An,e.getColorFromImage=async e=>{const t=M(e),i=await async function(e){const t=await new Promise(((t,i)=>{const o=document.createElement("canvas"),r=o.getContext("2d");if(!r)return void i(new Error("Could not get canvas context"));const n=()=>{o.width=e.width,o.height=e.height,r.drawImage(e,0,0);let i=[0,0,e.width,e.height];const n=e.dataset.area;n&&/^\d+(\s*,\s*\d+){3}$/.test(n)&&(i=n.split(/\s*,\s*/).map((e=>parseInt(e,10))));const[s,a,l,c]=i;t(r.getImageData(s,a,l,c).data)},s=()=>{i(new Error("Image load failed"))};e.complete?n():(e.onload=n,e.onerror=s)})),i=[];for(let e=0;e{if(!rr)throw new Error(or);return rr()},e.getTheme=(e=document.documentElement)=>{const t=M(e)[0],i=["light","dark","auto"],o="mdui-theme-";return Array.from(t.classList).find((e=>i.map((e=>o+e)).includes(e)))?.slice(11)??"light"},e.loadLocale=e=>{(e=>{const t=s(),i=Jo({sourceLocale:"en-us",targetLocales:ir,loadLocale:e});rr=i.getLocale,nr=i.setLocale,t.addEventListener(Mo,(e=>{t.dispatchEvent(new CustomEvent("mdui-localize-status",{detail:e.detail}))}))})(e)},e.observeResize=Ei,e.prompt=t=>{const i=Object.assign({},{confirmText:Fs(),cancelText:Vs(),onConfirm:x,onCancel:x,validator:x,textFieldOptions:{}},t),o=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"],r=new e.TextField;return Object.entries(i.textFieldOptions).forEach((([e,t])=>{r[e]=t})),new Promise(((e,n)=>{let s=!1;const a=An({...Object.fromEntries(o.filter((e=>!u(i[e]))).map((e=>[e,i[e]]))),body:r,actions:[{text:i.cancelText,onClick:e=>i.onCancel.call(e,r.value,e)},{text:i.confirmText,onClick:e=>{if(r.setCustomValidity(""),!r.reportValidity())return!1;const t=i.validator.call(r,r.value);return h(t)&&!t?(r.setCustomValidity(" "),!1):c(t)?(r.setCustomValidity(t),!1):xn(t)?new Promise(((e,i)=>{t.then(e).catch((e=>{r.setCustomValidity(e),i(e)}))})):(()=>{const t=i.onConfirm.call(e,r.value,e);return xn(t)?t.then((()=>{s=!0})):!1!==t&&(s=!0),t})()}}]});t.confirmText||lr(a,(()=>{M(a).find('[slot="action"]').last().text(Fs())})),t.cancelText||lr(a,(()=>{M(a).find('[slot="action"]').first().text(Vs())})),M(a).on("close",(()=>{s?e(r.value):n(),cr(a)}))}))},e.removeColorScheme=(e=document.documentElement)=>{qs(e)},e.setColorScheme=(e,t)=>{const i=zs(e);js(i,t)},e.setLocale=e=>{if(!nr)throw new Error(or);return nr(e)},e.setTheme=(e,t=document.documentElement)=>{const i=M(t),o="mdui-theme-";i.removeClass(["light","dark","auto"].map((e=>o+e)).join(" ")).addClass(o+e)},e.snackbar=t=>{const i=new e.Snackbar,o=M(i);return Object.entries(t).forEach((([e,r])=>{if("message"===e)i.innerHTML=r;else if(["onClick","onActionClick","onOpen","onOpened","onClose","onClosed"].includes(e)){const n=k(e.slice(2));o.on(n,(()=>{if("onActionClick"===e){const e=(t.onActionClick??x).call(i,i);xn(e)?(i.actionLoading=!0,e.then((()=>{i.open=!1})).finally((()=>{i.actionLoading=!1}))):!1!==e&&(i.open=!1)}else r.call(i,i)}))}else i[e]=r})),o.appendTo("body").on("closed",(()=>{o.remove(),t.queue&&(Gs=void 0,In(Ws+t.queue))})),t.queue?Gs?Rn(Ws+t.queue,(()=>{i.open=!0,Gs=i})):(setTimeout((()=>{i.open=!0})),Gs=i):setTimeout((()=>{i.open=!0})),i},e.throttle=(e,t=0)=>{const i=s();let o,r;return function(...n){return void 0===o&&(o=i.setTimeout((()=>{r=e.apply(this,n),o=void 0}),t)),r}}})); \ No newline at end of file diff --git a/privacy-policy.html b/privacy-policy.html deleted file mode 100644 index b366a3e..0000000 --- a/privacy-policy.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - Privacy Policy - - - - - - - -
-
- -
-
-

Privacy Policy

-

This website does not collect - any personally identifiable information (PII) from its users.

-

Last - updated:

-
- -
- - - \ No newline at end of file diff --git a/privacy-policy.php b/privacy-policy.php new file mode 100644 index 0000000..4f429f7 --- /dev/null +++ b/privacy-policy.php @@ -0,0 +1,77 @@ + + + + + + + + + Privacy Policy + + + + + + + +
+
+ + +
+
+

Privacy Policy

+

This website does not collect + any personally identifiable information (PII) from its users.

+

Last + updated:

+
+ +
+ + + \ No newline at end of file diff --git a/styles/download.css b/styles/download.css new file mode 100644 index 0000000..0b1e0cd --- /dev/null +++ b/styles/download.css @@ -0,0 +1,65 @@ +body { + font-family: 'Helvetica Neue', Arial, sans-serif; + line-height: 1.6; + background-color: #121212; + color: #e0e0e0; + margin: 0; + padding: 20px; + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; +} + +.container { + width: 100%; + max-width: 600px; + background: #1e1e1e; + padding: 20px; + border-radius: 12px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); + text-align: center; +} + +h2 { + color: #ffffff; + margin-bottom: 20px; + border-bottom: 1px solid #444; + padding-bottom: 5px; + display: flex; + align-items: center; + justify-content: center; +} + +h2 img { + margin-right: 5px; + height: 30px; +} + +#message { + margin-top: 20px; + padding: 10px; + background-color: #2e2e2e; + border: 1px solid #444; + border-radius: 4px; + word-wrap: break-word; +} + +.footer-links { + margin-top: 20px; + text-align: center; +} + +.footer-links a { + color: #ccc; + text-decoration: none; + margin: 0 10px; +} + +.footer-links a:hover { + color: #fff; +} + +mdui-button { + margin: 5px; +} \ No newline at end of file diff --git a/styles/index.css b/styles/index.css new file mode 100644 index 0000000..8eb117f --- /dev/null +++ b/styles/index.css @@ -0,0 +1,135 @@ +body { + font-family: 'Helvetica Neue', Arial, sans-serif; + line-height: 1.6; + background-color: #121212; + color: #e0e0e0; + margin: 0; + padding: 20px; + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; +} + +.container { + width: 100%; + max-width: 800px; + background: #1e1e1e; + padding: 20px; + border-radius: 12px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); + text-align: center; +} + +h2 { + color: #ffffff; + margin-bottom: 20px; + border-bottom: 1px solid #444; + padding-bottom: 5px; + display: flex; + align-items: center; + justify-content: center; +} + +h2 img { + margin-right: 3px; + height: 30px; +} + +form { + margin-bottom: 20px; + display: flex; + flex-direction: column; + align-items: center; +} + +input[type=file] { + padding: 10px; + width: 100%; + margin-bottom: 10px; + border: 1px solid #444; + border-radius: 4px; + background-color: #2e2e2e; + color: #e0e0e0; + box-sizing: border-box; +} + +button[type=submit] { + padding: 10px 20px; + background-color: skyblue; + color: #ffffff; + border: none; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button[type=submit]:hover { + background-color: blue; +} + +.download-link { + margin-top: 10px; + padding: 10px; + background-color: #2e2e2e; + border: 1px solid #444; + border-radius: 4px; + word-wrap: break-word; + display: none +} + +.footer-links { + margin-top: 20px; + text-align: center; +} + +.footer-links a { + color: #ccc; + text-decoration: none; + margin: 0 10px; +} + +.footer-links a:hover { + color: #fff; +} + +.storage-message, +.donate-message { + text-align: center; + margin-top: 10px; + font-size: 14px; + color: #ccc; + word-wrap: break-word; +} + +.donate-message strong { + display: block; + margin-top: 10px; +} + +progress { + width: 100%; + height: 10px; + margin-top: 10px; + display: none; +} + +progress[value] { + background-color: #2e2e2e; + border-radius: 5px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset; +} + +progress[value]::-webkit-progress-value { + background-color: skyblue; + border-radius: 5px; +} + +progress[value]::-moz-progress-bar { + background-color: skyblue; + border-radius: 5px; +} + +mdui-button { + margin: 5px; +} \ No newline at end of file diff --git a/styles/privacy-policy.css b/styles/privacy-policy.css new file mode 100644 index 0000000..391b563 --- /dev/null +++ b/styles/privacy-policy.css @@ -0,0 +1,61 @@ +body { + font-family: 'Helvetica Neue', Arial, sans-serif; + line-height: 1.6; + background-color: #121212; + color: #e0e0e0; + margin: 20px; +} + +.container { + max-width: 800px; + margin: 0 auto; + padding: 20px; + background: #1e1e1e; + border-radius: 12px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); +} + +h1 { + color: #ffffff; + border-bottom: 1px solid #444; + padding-bottom: 5px; +} + +p { + margin-bottom: 20px; +} + +a { + color: #3498db; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.language-switcher { + text-align: right; + margin-bottom: 20px; +} + +.language-switcher button { + background: #3498db; + color: #ffffff; + border: none; + padding: 10px; + cursor: pointer; + border-radius: 5px; +} + +.language-switcher button:hover { + background: #2980b9; +} + +.hidden { + display: none; +} + +.block { + display: block; +} \ No newline at end of file diff --git a/styles/terms-of-use.css b/styles/terms-of-use.css new file mode 100644 index 0000000..8e3cdf5 --- /dev/null +++ b/styles/terms-of-use.css @@ -0,0 +1,70 @@ +body { + font-family: 'Helvetica Neue', Arial, sans-serif; + line-height: 1.6; + background-color: #121212; + color: #e0e0e0; + margin: 20px; +} + +.container { + max-width: 800px; + margin: 0 auto; + padding: 20px; + background: #1e1e1e; + border-radius: 12px; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); +} + +h1 { + color: #ffffff; + border-bottom: 1px solid #444; + padding-bottom: 5px; +} + +p { + margin-bottom: 20px; +} + +pre { + background-color: #2e2e2e; + color: #e0e0e0; + padding: 10px; + border-radius: + 4px; + overflow-x: auto; +} + +a { + color: #3498db; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.language-switcher { + text-align: right; + margin-bottom: 20px; +} + +.language-switcher button { + background: #3498db; + color: #ffffff; + border: none; + padding: 10px; + cursor: pointer; + border-radius: 5px; +} + +.language-switcher button:hover { + background: #2980b9; +} + +.hidden { + display: none; +} + +.block { + display: block; +} \ No newline at end of file diff --git a/terms-of-use.html b/terms-of-use.php similarity index 84% rename from terms-of-use.html rename to terms-of-use.php index 95747e1..e58558b 100644 --- a/terms-of-use.html +++ b/terms-of-use.php @@ -1,3 +1,43 @@ + + @@ -6,84 +46,18 @@ Terms of Use + + - - -
- + +
-
+

Terms of Use

By accessing this website or using the software/service provided, you agree to the following terms and @@ -163,7 +137,7 @@

Disclaimer

Users of this service are responsible for complying with all applicable laws and regulations.

-