/*! * mdui 2.0.1 (https://www.mdui.org) * Copyright 2016-2023 zdhxiong * Licensed under MIT */ !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)=>(null==e?void 0: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,v=e=>"undefined"!=typeof Document&&e instanceof Document,f=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=>v(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 T=e=>r().createElement(e),E=(e,t)=>e.appendChild(t),I=e=>e.parentNode?e.parentNode.removeChild(e):e,A=(e,t)=>{const i=T(t);return i.innerHTML=e,[].slice.call(i.childNodes)},P=(()=>{const e=function(t){const i=r();if(!t)return new S;if(t instanceof S)return t;if(l(t))return/complete|loaded|interactive/.test(i.readyState)&&i.body?t.call(i,e):i.addEventListener("DOMContentLoaded",(()=>t.call(i,e)),!1),new S([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 S(A(e,t))}return new S(i.querySelectorAll(t))}return!g(t)||(o=t,"undefined"!=typeof Node&&o instanceof Node)?new S([t]):new S(t);var o};return e.fn=S.prototype,e})(),M=(e,t)=>($(t,(t=>{e.push(t)})),e),D=e=>[...new Set(e)];P.fn.get=function(e){return void 0===e?[].slice.call(this):this[e>=0?e:e+this.length]},P.fn.add=function(e){return new S(D(M(this.get(),P(e).get())))};const B=(e,t,i)=>{const o=e.getAttribute(t);return p(o)?i:o},L=(e,t)=>{e.removeAttribute(t)},_=(e,t,i)=>{p(i)?L(e,t):e.setAttribute(t,i)};P.fn.each=function(e){return $(this,((t,i)=>e.call(t,i,t)))},$(["add","remove","toggle"],(e=>{P.fn[`${e}Class`]=function(t){return"remove"!==e||arguments.length?this.each(((i,o)=>{if(!f(o))return;const r=(l(t)?t.call(o,i,B(o,"class","")):t).split(" ").filter((e=>e));$(r,(t=>{o.classList[e](t)}))})):this.each(((e,t)=>{_(t,"class","")}))}})),$(["insertBefore","insertAfter"],((e,t)=>{P.fn[e]=function(e){const i=t?P(this.get().reverse()):this,o=P(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)}))})),P(t?r.reverse():r)}}));function O(e,t){return g(e)?$(e,((e,i)=>t.call(e,i,e))):R(e,t)}function z(e,t){const i=s();let o;const r=[];return O(e,((e,n)=>{o=t.call(i,n,e),null!=o&&r.push(o)})),[].concat(...r)}$(["before","after"],((e,t)=>{P.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)?P(A(e,"div")):i&&f(e)?P(e.cloneNode(!0)):P(e),r[t?"insertAfter":"insertBefore"](o)}))}))}})),P.fn.map=function(e){return new S(z(this,((t,i)=>e.call(t,i,t))))},P.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},P.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)=>{v(o)||m(o)||o.matches.call(o,e)&&(t=!0)})),t;const i=P(e);return this.each(((e,o)=>{i.each(((e,i)=>{o===i&&(t=!0)}))})),t},P.fn.remove=function(e){return this.each(((t,i)=>{e&&!P(i).is(e)||I(i)}))},$(["prepend","append"],((e,t)=>{P.fn[e]=function(...e){return this.each(((i,o)=>{const r=o.childNodes,n=r.length,s=n?r[t?n-1:0]:T("div");n||E(o,s);let a=l(e[0])?[e[0].call(o,i,o.innerHTML)]:e;i&&(a=a.map((e=>c(e)?e:P(e).clone()))),P(s)[t?"after":"before"](...a),n||I(s)}))}})),$(["appendTo","prependTo"],((e,t)=>{P.fn[e]=function(e){const i=[],o=P(e).map(((e,o)=>{const r=o.childNodes,n=r.length;if(n)return r[t?0:n-1];const s=T("div");return E(o,s),i.push(s),s})),r=this[t?"insertBefore":"insertAfter"](o);return P(i).remove(),r}}));const F=(e,t)=>s().getComputedStyle(e).getPropertyValue(k(t)),N=e=>"border-box"===F(e,"box-sizing"),V=(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)},H=(e,t)=>{if("width"===t||"height"===t){const i=e.getBoundingClientRect()[t];return N(e)?`${i}px`:i-V(e,t,"border")-V(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?B(e,i):1===t?e[i]:H(e,i);P.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 f(e)?i(e,o):void 0}return this.each(((e,n)=>{((e,i,o)=>{if(u(o))return;if(0===t)return _(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)}))}})),P.fn.children=function(e){const t=[];return this.each(((i,o)=>{$(o.childNodes,(i=>{f(i)&&(e&&!P(i).is(e)||t.push(i))}))})),new S(D(t))},P.fn.slice=function(...e){return new S([].slice.apply(this,e))},P.fn.eq=function(e){const t=-1===e?this.slice(e):this.slice(e,+e+1);return new S(t)};const U=(e,t,i,o,r)=>{const n=[];let s;return e.each(((e,a)=>{for(s=a[i];s&&f(s);){if(2===t){if(o&&P(s).is(o))break;r&&!P(s).is(r)||n.push(s)}else{if(0===t){o&&!P(s).is(o)||n.push(s);break}o&&!P(s).is(o)||n.push(s)}s=s[i]}})),new S(D(n))};$(["","s","sUntil"],((e,t)=>{P.fn[`parent${e}`]=function(e,i){const o=t?P(this.get().reverse()):this;return U(o,t,"parentNode",e,i)}})),P.fn.closest=function(e){if(this.is(e))return this;const t=[];return this.parents().each(((i,o)=>{if(P(o).is(e))return t.push(o),!1})),new S(t)};const q=new WeakMap,j=e=>{var t;return null!==(t=q.get(e))&&void 0!==t?t:{}},G=(e,t)=>{const i=j(e),o=w(t);return o in i?i[o]:void 0},W=(e,t)=>{const i=j(e);R(t,((e,t)=>{i[w(e)]=t})),q.set(e,i)},Y=(e,t,i)=>{W(e,{[t]:i})},X=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,J=(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:X.test(e)?JSON.parse(e):e))(i)}catch(e){}return i};P.fn.data=function(e,t){if(u(e)){if(!this.length)return;const e=this[0],t=j(e);return 1!==e.nodeType||R(e.dataset,(i=>{t[i]=J(e,i,t[i])})),t}return b(e)?this.each((function(){W(this,e)})):2===arguments.length&&u(t)?this:u(t)?this.length?J(this[0],w(e),G(this[0],e)):void 0:this.each((function(){Y(this,e,t)}))},P.fn.empty=function(){return this.each(((e,t)=>{t.innerHTML=""}))},P.fn.extend=function(e){return R(e,((e,t)=>{P.fn[e]=t})),this},P.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)=>P(i).is(e)?i:void 0));const t=P(e);return this.map(((e,i)=>t.get().includes(i)?i:void 0))},P.fn.find=function(e){const t=[];return this.each(((i,o)=>{M(t,P(o.querySelectorAll(e)).get())})),new S(t)},P.fn.first=function(){return this.eq(0)};const Z=(e,t)=>e!==t&&y(e).contains(t);P.fn.has=function(e){const t=c(e)?this.find(e):P(e),{length:i}=t;return this.map((function(){for(let e=0;e{const s=i=>V(e,t.toLowerCase(),i)*n;return 2===o&&r&&(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,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(v(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 Q(e,t,d,i,o,1)};$(["Width","Height"],(e=>{$([`inner${e}`,e.toLowerCase(),`outer${e}`],((t,i)=>{P.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,ee(e,i,o,r)):n;if(null==s)return;const a=P(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=Q(e,i,u,o,r,-1)+(h||"px"),a.css(d,s)})(r,o,e,i,n,t))):this.length?ee(this[0],e,i,n):void 0}}))})),P.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 z(e,(e=>y(e)[i])).join("");if(!e.length)return;const o=e[0],r=P(o);return 0===t&&r.is("select[multiple]")?z(r.find("option:checked"),(e=>e.value)):o[i]};P.fn[e]=function(e){return arguments.length?this.each(((r,n)=>{const s=P(n),a=l(e)?e.call(n,r,o(s)):e;0===t&&Array.isArray(a)?s.is("select[multiple]")?z(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&&f(o)&&(o=o.outerHTML),e[i]=o})(n,a)})):o(this)}})),P.fn.index=function(e){return arguments.length?c(e)?P(e).get().indexOf(this[0]):this.get().indexOf(P(e)[0]):this.eq(0).parent().children().get().indexOf(this[0])},P.fn.last=function(){return this.eq(-1)},$(["","All","Until"],((e,t)=>{P.fn[`next${e}`]=function(e,i){return U(this,t,"nextElementSibling",e,i)}})),P.fn.not=function(e){const t=this.filter(e);return this.map(((e,i)=>t.index(i)>-1?void 0:i))};const te=s().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 r=ae(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=le(t);return ae(e).filter((e=>e&&(!r.type||e.type===r.type)&&(!r.namespace||ce(r.namespace).test(e.namespace))&&(!i||ne(e.func)===ne(i))&&(!o||e.selector===o)))})(e,t,i,o).forEach((e=>{n(e)}))})):r.forEach((e=>{n(e)}))};function he(e,...t){return $(t,(t=>{R(t,((t,i)=>{u(i)||(e[t]=i)}))})),e}P.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(){de(this,e,i,t)})))},P.fn.offsetParent=function(){const e=r();return this.map((function(){let t=this.offsetParent;for(;t&&"static"===P(t).css("position");)t=t.offsetParent;return t||e.documentElement}))};const ue=(e,t)=>parseFloat(e.css(t));P.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:r}=e.ownerDocument.defaultView;return{top:t+o,left:i+r}};P.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=P(e),r=o.css("position");"static"===r&&o.css("position","relative");const n=pe(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,he({},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)}))},P.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=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,r?P(e).find(r).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:r,id:ae(e).length,proxy:l};ae(e).push(c),e.addEventListener(c.type,l,n)}))})(this,e,o,i,t)}))},P.fn.one=function(e,t,i,o){return this.on(e,t,i,o,!0)},$(["","All","Until"],((e,t)=>{P.fn[`prev${e}`]=function(e,i){const o=t?P(this.get().reverse()):this;return U(o,t,"previousElementSibling",e,i)}})),P.fn.removeAttr=function(e){const t=e.split(" ").filter((e=>e));return this.each((function(){$(t,(e=>{L(this,e)}))}))};const me=(e,t)=>{if(u(t))return(e=>{q.delete(e)})(e);((e,t)=>{const i=j(e);$(t,(e=>{const t=w(e);delete i[t]})),q.set(e,i)})(e,c(t)?t.split(" ").filter((e=>e)):t)};P.fn.removeData=function(e){return this.each(((t,i)=>{me(i,e)}))},P.fn.removeProp=function(e){return this.each(((t,i)=>{try{delete i[e]}catch(e){}}))},P.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=P(o).clone()),P(i).before(o)})),this.remove()},P.fn.replaceAll=function(e){return P(e).map(((e,t)=>(P(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("&")},fe=new WeakMap,ge=e=>{const t=[];return e.each(((e,i)=>{const o=i instanceof HTMLFormElement?(e=>{const t=[...e.getRootNode().querySelectorAll("*")],i=[...e.elements],o=fe.get(e);return[...i,...o?Array.from(o):[]].sort(((e,i)=>t.indexOf(e)t.indexOf(i)?1:0))})(i):[i];P(o).each(((e,i)=>{const o=P(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};P.fn.serializeArray=function(){return ge(this).map((e=>Array.isArray(e.value)?e.value.map((t=>({name:e.name,value:t}))):e)).flat()},P.fn.serialize=function(){return ve(this.serializeArray())},P.fn.serializeObject=function(){const e={};return ge(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 be={};P.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=r();let i,o;return be[e]||(i=T(e),E(t.body,i),o=H(i,"display"),I(i),"none"===o&&(o="block"),be[e]=o),be[e]})(t.nodeName))}))},P.fn.siblings=function(e){return this.prevAll(e).add(this.nextAll(e))},P.fn.toggle=function(){return this.each(((e,t)=>{"none"===H(t,"display")?P(t).show():P(t).hide()}))},P.fn.trigger=function(e,t=null,i){const{type:o,namespace:r}=le(e),n=new ie(o,{detail:t,data:null,namespace:r,bubbles:!0,cancelable:!1,composed:!0,...i});return this.each(((e,t)=>{t.dispatchEvent(n)}))};const ye="ajaxSuccess",we="ajaxError",ke="ajaxComplete",Ce={},xe=(e,t)=>`${e}&${t}`.replace(/[&?]{1,2}/,"?"),$e=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(Ce,((e,i)=>{["beforeSend","success","error","complete","statusCode"].includes(e)||u(i)||(t[e]=i)})),he({},t,e)})(e),d=l.method.toUpperCase();let{data:h,url:p}=l;p=p||i.location.toString();const{processData:m,async:v,cache:f,username:g,password:b,headers:y,xhrFields:w,statusCode:k,dataType:C,contentType:x,timeout:S,global:T}=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=xe(p,h),h=null);const I=(e,i,...r)=>{let s,c;T&&P(t).trigger(e,"success"===i?a:n),i in Ce&&(s=Ce[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&&!f&&(p=xe(p,`_=${Date.now()}`));const m=new XMLHttpRequest;let T;if(m.open(d,p,v,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=()=>{var i;T&&clearTimeout(T);const o=(r=m.status)>=200&&r<300||[0,304].includes(r);var r;let n;if(o)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",I(we,"error",m,e),c(e)}"parsererror"!==e&&(I(ye,"success",n,e,m),t(n))}else n="HEAD"===d?void 0:"text"===m.responseType||""===m.responseType?m.responseText:m.response,a.response=n,I(ye,"success",n,e,m),t(n);else e="error",I(we,"error",m,e),c(e);$([null!==(i=Ce.statusCode)&&void 0!==i?i:{},k],(t=>{t[m.status]&&(o?t[m.status](n,e,m):t[m.status](m,e))})),I(ke,"complete",m,e)},m.onerror=()=>{T&&clearTimeout(T),I(we,"error",m,m.statusText),I(ke,"complete",m,"error"),c(m.statusText)},m.onabort=()=>{let e="abort";T&&(e="timeout",clearTimeout(T)),I(we,"error",m,e),I(ke,"complete",m,e),c(e)},I("ajaxStart","beforeSend",m,l),o)return c("cancel");S>0&&(T=i.setTimeout((()=>m.abort()),S)),m.send(h)}))})()};P.ajax=$e;function Re(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}P.ajaxSetup=e=>he(Ce,e),P.contains=Z,P.data=function(e,t,i){return b(t)?(W(e,t),t):u(i)?u(t)?j(e):G(e,t):(Y(e,t,i),i)},P.each=O,P.extend=function(e,...t){return t.length?he(e,...t):(R(e,((e,t)=>{this[e]=t})),this)},P.map=z,P.merge=M,P.param=ve,P.removeData=me,P.unique=D,"function"==typeof SuppressedError&&SuppressedError;const Se=window,Te=Se.ShadowRoot&&(void 0===Se.ShadyCSS||Se.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ee=Symbol(),Ie=new WeakMap;let Ae=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ee)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=Ie.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ie.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 Ae(i,e,Ee)},Me=Te?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new Ae("string"==typeof e?e:e+"",void 0,Ee))(t)})(e):e;var De;const Be=window,Le=Be.trustedTypes,_e=Le?Le.emptyScript:"",Oe=Be.reactiveElementPolyfillSupport,ze={toAttribute(e,t){switch(t){case Boolean:e=e?_e: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}},Fe=(e,t)=>t!==e&&(t==t||e==e),Ne={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:Fe},Ve="finalized";let He=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,i)=>{const o=this._$Ep(i,t);void 0!==o&&(this._$Ev.set(o,i),e.push(o))})),e}static createProperty(e,t=Ne){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i="symbol"==typeof e?Symbol():"__"+e,o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(o){const r=this[e];this[t]=o,this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Ne}static finalize(){if(this.hasOwnProperty(Ve))return!1;this[Ve]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}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 _$Ep(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,i;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{Te?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const i=document.createElement("style"),o=Se.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=t.cssText,e.appendChild(i)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=Ne){var o;const r=this.constructor._$Ep(e,i);if(void 0!==r&&!0===i.reflect){const n=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:ze).toAttribute(t,i.type);this._$El=e,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(e,t){var i;const o=this.constructor,r=o._$Ev.get(e);if(void 0!==r&&this._$El!==r){const e=o.getPropertyOptions(r),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(i=e.converter)||void 0===i?void 0:i.fromAttribute)?e.converter:ze;this._$El=r,this[r]=n.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,i){let o=!0;void 0!==e&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||Fe)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};var Ke;He[Ve]=!0,He.elementProperties=new Map,He.elementStyles=[],He.shadowRootOptions={mode:"open"},null==Oe||Oe({ReactiveElement:He}),(null!==(De=Be.reactiveElementVersions)&&void 0!==De?De:Be.reactiveElementVersions=[]).push("1.6.2");const Ue=window,qe=Ue.trustedTypes,je=qe?qe.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ge="$lit$",We=`lit$${(Math.random()+"").slice(9)}$`,Ye="?"+We,Xe=`<${Ye}>`,Je=document,Ze=()=>Je.createComment(""),Qe=e=>null===e||"object"!=typeof e&&"function"!=typeof e,et=Array.isArray,tt="[ \t\n\f\r]",it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,rt=/>/g,nt=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,at=/"/g,lt=/^(?:script|style|textarea|title)$/i,ct=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),dt=Symbol.for("lit-noChange"),ht=Symbol.for("lit-nothing"),ut=new WeakMap,pt=Je.createTreeWalker(Je,129,null,!1);class mt{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]=((e,t)=>{const i=e.length-1,o=[];let r,n=2===t?"":"",s=it;for(let t=0;t"===l[0]?(s=null!=r?r:it,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?nt:'"'===l[3]?at:st):s===at||s===st?s=nt:s===ot||s===rt?s=it:(s=nt,r=void 0);const h=s===nt&&e[t+1].startsWith("/>")?" ":"";n+=s===it?i+Xe:c>=0?(o.push(a),i.slice(0,c)+Ge+i.slice(c)+We+h):i+We+(-2===c?(o.push(void 0),t):h)}const a=n+(e[i]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==je?je.createHTML(a):a,o]})(e,t);if(this.el=mt.createElement(l,i),pt.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(o=pt.nextNode())&&a.length0){o.textContent=qe?qe.emptyScript:"";for(let i=0;iet(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==ht&&Qe(this._$AH)?this._$AA.nextSibling.data=e:this.$(Je.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:o}=e,r="number"==typeof o?this._$AC(e):(void 0===o.el&&(o.el=mt.createElement(o.h,this.options)),o);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.v(i);else{const e=new class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:i},parts:o}=this._$AD,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:Je).importNode(i,!0);pt.currentNode=r;let n=pt.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let t;2===l.type?t=new ft(n,n.nextSibling,this,e):1===l.type?t=new l.ctor(n,l.name,l.strings,this,e):6===l.type&&(t=new Ct(n,this,e)),this._$AV.push(t),l=o[++a]}s!==(null==l?void 0:l.index)&&(n=pt.nextNode(),s++)}return pt.currentNode=Je,r}v(e){let t=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}(r,this),t=e.u(this.options);e.v(i),this.$(t),this._$AH=e}}_$AC(e){let t=ut.get(e.strings);return void 0===t&&ut.set(e.strings,t=new mt(e)),t}T(e){et(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 ft(this.k(Ze()),this.k(Ze()),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=ht}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,o){const r=this.strings;let n=!1;if(void 0===r)e=vt(this,e,t,0),n=!Qe(e)||e!==this._$AH&&e!==dt,n&&(this._$AH=e);else{const o=e;let s,a;for(e=r[0],s=0;s{var o,r;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:t;let s=n._$litPart$;if(void 0===s){const e=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new ft(t.insertBefore(Ze(),e),e,void 0,null!=i?i:{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return dt}};St.finalized=!0,St._$litElement$=!0,null===($t=globalThis.litElementHydrateSupport)||void 0===$t||$t.call(globalThis,{LitElement:St});const Tt=globalThis.litElementPolyfillSupport;null==Tt||Tt({LitElement:St}),(null!==(Rt=globalThis.litElementVersions)&&void 0!==Rt?Rt:globalThis.litElementVersions=[]).push("3.3.2");const Et=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:i,elements:o}=t;return{kind:i,elements:o,finisher(t){customElements.define(e,t)}}})(e,t),It=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(i){i.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}},At=(e,t,i)=>{t.constructor.createProperty(i,e)};function Pt(e){return(t,i)=>void 0!==i?At(e,t,i):It(e,t)}function Mt(e){return Pt({...e,state:!0})}var Dt;const Bt=null!=(null===(Dt=window.HTMLSlotElement)||void 0===Dt?void 0:Dt.prototype.assignedElements)?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter((e=>e.nodeType===Node.ELEMENT_NODE));function Lt(e){const{slot:t,selector:i}=null!=e?e:{};return(({finisher:e,descriptor:t})=>(i,o)=>{var r;if(void 0===o){const o=null!==(r=i.originalKey)&&void 0!==r?r:i.key,n=null!=t?{kind:"method",placement:"prototype",key:o,descriptor:t(i.key)}:{...i,key:o};return null!=e&&(n.finisher=function(t){e(t,o)}),n}{const r=i.constructor;void 0!==t&&Object.defineProperty(i,o,t(o)),null==e||e(r,o)}})({descriptor:o=>({get(){var o;const r="slot"+(t?`[name=${t}]`:":not([name])"),n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=n?Bt(n,e):[];return i?s.filter((e=>e.matches(i))):s},enumerable:!0,configurable:!0})})}const _t=e=>null!=e?e:ht,Ot=1,zt=2,Ft=3,Nt=4,Vt=e=>(...t)=>({_$litDirective$:e,values:t});let Ht=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 Kt="important",Ut=" !"+Kt,qt=Vt(class extends Ht{constructor(e){var t;if(super(e),e.type!==Ot||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.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.ut){this.ut=new Set;for(const e in t)this.ut.add(e);return this.render(t)}this.ut.forEach((e=>{null==t[e]&&(this.ut.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const o=t[e];if(null!=o){this.ut.add(e);const t="string"==typeof o&&o.endsWith(Ut);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?Kt:""):i[e]=o}}return dt}});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)}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 Gt=ct`${ht}`,Wt=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 Yt=class extends Ht{constructor(e){if(super(e),this.et=ht,e.type!==zt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ht||null==e)return this.ft=void 0,this.et=e;if(e===dt)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Yt.directiveName="unsafeHTML",Yt.resultType=1;let Xt=class extends Yt{};Xt.directiveName="unsafeSVG",Xt.resultType=2;const Jt=Vt(Xt),Zt=e=>void 0===e.strings,Qt={},ei=(e,t)=>{var i,o;const r=e._$AN;if(void 0===r)return!1;for(const e of r)null===(o=(i=e)._$AO)||void 0===o||o.call(i,t,!1),ei(e,t);return!0},ti=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===(null==i?void 0:i.size))},ii=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),ni(t)}};function oi(e){void 0!==this._$AN?(ti(this),this._$AM=e,ii(this)):this._$AM=e}function ri(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{var t,i,o,r;e.type==zt&&(null!==(t=(o=e)._$AP)&&void 0!==t||(o._$AP=ri),null!==(i=(r=e)._$AQ)&&void 0!==i||(r._$AQ=oi))};let si=class extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),ii(this),this.isConnected=e._$AU}_$AO(e,t=!0){var i,o;e!==this.isConnected&&(this.isConnected=e,e?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),t&&(ei(this,e),ti(this))}setValue(e){if(Zt(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 ai{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}const li=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,ci=1073741823;const di=Vt(class extends si{constructor(){super(...arguments),this._$C_t=ci,this._$Cwt=[],this._$Cq=new ai(this),this._$CK=new class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var e;null!==(e=this.Y)&&void 0!==e||(this.Y=new Promise((e=>this.Z=e)))}resume(){var e;null===(e=this.Z)||void 0===e||e.call(this),this.Y=this.Z=void 0}}}render(...e){var t;return null!==(t=e.find((e=>!li(e))))&&void 0!==t?t:dt}update(e,t){const i=this._$Cwt;let o=i.length;this._$Cwt=t;const r=this._$Cq,n=this._$CK;this.isConnected||this.disconnected();for(let e=0;ethis._$C_t);e++){const s=t[e];if(!li(s))return this._$C_t=e,s;e{for(;n.get();)await n.get();const t=r.deref();if(void 0!==t){const i=t._$Cwt.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 ct`${e}`}return this.src?ct`${di($e({url:this.src}).then(Jt))}`:ct``})()}},e.Icon.styles=[Wt,hi],Re([Pt({reflect:!0})],e.Icon.prototype,"name",void 0),Re([Pt({reflect:!0})],e.Icon.prototype,"src",void 0),e.Icon=Re([Et("mdui-icon")],e.Icon);const ui=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;align-items:center;justify-content:center;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 St{constructor(){super(...arguments),this.hasSlotController=new jt(this,"[default]")}render(){return this.hasSlotController.test("[default]")?ct``:this.src?ct`${_t(this.label)}`:this.icon?ct``:Gt}},e.Avatar.styles=[Wt,ui],Re([Pt({reflect:!0})],e.Avatar.prototype,"src",void 0),Re([Pt({reflect:!0})],e.Avatar.prototype,"fit",void 0),Re([Pt({reflect:!0})],e.Avatar.prototype,"icon",void 0),Re([Pt({reflect:!0})],e.Avatar.prototype,"label",void 0),e.Avatar=Re([Et("mdui-avatar")],e.Avatar);const pi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);display:inline-flex;align-items:center;justify-content:center;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 St{constructor(){super(...arguments),this.variant="large"}render(){return"small"===this.variant?Gt:ct``}},e.Badge.styles=[Wt,pi],Re([Pt({reflect:!0})],e.Badge.prototype,"variant",void 0),e.Badge=Re([Et("mdui-badge")],e.Badge);const mi=e=>null!==e&&"false"!==e,vi=(e,t,i)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...i});return e.dispatchEvent(o),o};function fi(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 gi=e=>{class t extends e{constructor(...e){super(...e),this.lastScrollTopThreshold=0,this.lastScrollTopNoThreshold=0,this.isParentLayout=!1,this.onListeningScroll=this.onListeningScroll.bind(this)}get scrollPaddingPosition(){throw new Error("Must implement scrollPaddingPosition getter")}onScrollTargetChange(e,t){if((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))}onScrollBehaviorChange(e,t){(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.isParentLayout=a(this.parentElement,"mdui-layout"),this.updateContainerPadding()}disconnectedCallback(){super.disconnectedCallback(),this.updateContainerPadding(!1)}hasScrollBehavior(e){var t,i;const o=null!==(i=null===(t=this.scrollBehavior)||void 0===t?void 0:t.split(" "))&&void 0!==i?i:[];return Array.isArray(e)?!!o.filter((t=>e.includes(t))).length:o.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(P(this).css("position"))?this.offsetHeight:null;P(t).css({[i]:e})}else P(t).css({[i]:null})}onListeningScroll(){const e=this.getListening(this.scrollTarget);window.requestAnimationFrame((()=>this.onScroll(e)))}onScroll(e){var t;const i=null!==(t=e.scrollY)&&void 0!==t?t:e.scrollTop;this.lastScrollTopNoThreshold!==i&&(this.runScrollNoThreshold(i(this.scrollThreshold||0)&&(this.runScrollThreshold(i++bi;let wi,ki;const Ci=(e,t)=>{const i=P(e),o=yi(),r={unobserve:()=>{i.each(((e,t)=>{var i;const r=null!==(i=wi.get(t))&&void 0!==i?i:[],n=r.findIndex((e=>e.key===o));-1!==n&&r.splice(n,1),r.length?wi.set(t,r):(ki.unobserve(t),wi.delete(t))}))}};return wi||(wi=new WeakMap,ki=new ResizeObserver((e=>{e.forEach((e=>{const t=e.target;wi.get(t).forEach((t=>{t.callback.call(r,e,r)}))}))}))),i.each(((e,i)=>{var r;ki.observe(i);const n=null!==(r=wi.get(i))&&void 0!==r?r:[];n.push({callback:t,key:o}),wi.set(i,n)})),r};class xi{constructor(e){this.states=[],this.$layout=P(e)}registerMain(e){this.$main=P(e)}unregisterMain(){this.$main=void 0}registerItem(e){const t={element:e};this.states.push(t),t.observeResize=Ci(t.element,(()=>{a(t.element,"mdui-navigation-drawer")&&t.element.isModal?this.updateLayout(t.element,{width:0}):this.updateLayout(t.element)})),this.items=void 0,this.resort(),this.updateLayout()}unregisterItem(e){var t;const i=this.states.findIndex((t=>t.element===e));if(i<0)return;null===(t=this.states[i].observeResize)||void 0===t||t.unobserve(),this.items=void 0,this.states.splice(i,1),this.states[i]&&this.updateLayout(this.states[i].element)}getItems(){return this.items||(this.items=this.$layout.children(["mdui-navigation-bar","mdui-navigation-drawer","mdui-navigation-rail","mdui-bottom-app-bar","mdui-top-app-bar","mdui-layout-item"].join(",")).get()),this.items}getMain(){return this.$main?this.$main[0]:void 0}getItemsAndMain(){return[...this.getItems(),this.getMain()].filter((e=>e))}hasItem(e){return this.getItems().includes(e)}updateOrder(){this.resort(),this.updateLayout()}updateLayout(e,t){const i=e?{element:e,width:null==t?void 0:t.width,height:null==t?void 0: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)=>{var i,r,n,s,a,l,c,d;if(t0?this.states[t-1]:void 0,p=null!==(i=null==u?void 0:u.top)&&void 0!==i?i:0,m=null!==(r=null==u?void 0:u.right)&&void 0!==r?r:0,v=null!==(n=null==u?void 0:u.bottom)&&void 0!==n?n:0,f=null!==(s=null==u?void 0:u.left)&&void 0!==s?s:0;switch(Object.assign(e,{top:p,right:m,bottom:v,left:f}),h){case"top":e.top+=null!==(a=e.height)&&void 0!==a?a:e.element.offsetHeight;break;case"right":e.right+=null!==(l=e.width)&&void 0!==l?l:e.element.offsetWidth;break;case"bottom":e.bottom+=null!==(c=e.height)&&void 0!==c?c:e.element.offsetHeight;break;case"left":e.left+=null!==(d=e.width)&&void 0!==d?d:e.element.offsetWidth}e.height=e.width=void 0,P(e.element).css({position:"absolute",top:"bottom"===h?null:p,right:"left"===h?null:m,bottom:"top"===h?null:v,left:"right"===h?null:f})}));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)=>{var o,r;const n=null!==(o=t.element.order)&&void 0!==o?o:0,s=null!==(r=i.element.order)&&void 0!==r?r:0;return n>s?1:ne.indexOf(i.element)?1:e.indexOf(t.element)($i.has(e)||$i.set(e,new xi(e)),$i.get(e));class Si extends St{constructor(){super(...arguments),this.isParentLayout=!1}get layoutPlacement(){throw new Error("Must implement placement getter!")}onOrderChange(){var e;null===(e=this.layoutManager)||void 0===e||e.updateOrder()}connectedCallback(){super.connectedCallback();const e=this.parentElement;this.isParentLayout=a(e,"mdui-layout"),this.isParentLayout&&(this.layoutManager=Ri(e),this.layoutManager.registerItem(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterItem(this)}}Re([Pt({type:Number,reflect:!0})],Si.prototype,"order",void 0),Re([fi("order",!0)],Si.prototype,"onOrderChange",null);const Ti=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(gi(Si)){constructor(){super(...arguments),this.hide=!1,this.fabDetach=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}connectedCallback(){super.connectedCallback(),this.addEventListener("transitionend",(e=>{e.target===this&&vi(this,this.hide?"hidden":"shown")}))}render(){return ct``}runScrollThreshold(e){if(!e&&!this.hide){vi(this,"hide").defaultPrevented||(this.hide=!0)}if(e&&this.hide){vi(this,"show").defaultPrevented||(this.hide=!1)}}},e.BottomAppBar.styles=[Wt,Ti],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.BottomAppBar.prototype,"hide",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"fab-detach"})],e.BottomAppBar.prototype,"fabDetach",void 0),Re([Pt({reflect:!0,attribute:"scroll-behavior"})],e.BottomAppBar.prototype,"scrollBehavior",void 0),e.BottomAppBar=Re([Et("mdui-bottom-app-bar")],e.BottomAppBar);const Ei=()=>new Ii;let Ii=class{};const Ai=new WeakMap,Pi=Vt(class extends si{render(e){return ht}update(e,[t]){var i;const o=t!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=t,this.ct=null===(i=e.options)||void 0===i?void 0:i.host,this.ot(this.lt=e.element)),ht}ot(e){var t;if("function"==typeof this.G){const i=null!==(t=this.ct)&&void 0!==t?t:globalThis;let o=Ai.get(i);void 0===o&&(o=new WeakMap,Ai.set(i,o)),void 0!==o.get(this.G)&&this.G.call(this.ct,void 0),o.set(this.G,e),void 0!==e&&this.G.call(this.ct,e)}else this.G.value=e}get rt(){var e,t,i;return"function"==typeof this.G?null===(t=Ai.get(null!==(e=this.ct)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.G):null===(i=this.G)||void 0===i?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});function Mi(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let i,o=0;o{const t=P(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.form=this.options.form(this.host),this.form&&this.attachForm(this.form)}hostDisconnected(){this.detachForm()}hostUpdated(){const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e))}getForm(){var e;return null!==(e=this.form)&&void 0!==e?e:null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}attachForm(e){e?(this.form=e,fe.has(this.form)?fe.get(this.form).add(this.host):fe.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),Di.has(this.form)||(Di.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){this.form&&(fe.get(this.form).delete(this.host),this.form.removeEventListener("formdata",this.onFormData),this.form.removeEventListener("submit",this.onFormSubmit),this.form.removeEventListener("reset",this.onFormReset),Di.has(this.form)&&!fe.get(this.form).size&&(this.form.reportValidity=Di.get(this.form),Di.delete(this.form)))}doAction(e,t){if(!this.form)return;const i=P(``}isButton(){return!this.href}}qi.styles=[Wt,Ui],Re([Pt({type:Boolean,reflect:!0,converter:mi})],qi.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],qi.prototype,"loading",void 0),Re([Pt({reflect:!0})],qi.prototype,"name",void 0),Re([Pt({reflect:!0})],qi.prototype,"value",void 0),Re([Pt({reflect:!0})],qi.prototype,"type",void 0),Re([Pt({reflect:!0})],qi.prototype,"form",void 0),Re([Pt({reflect:!0,attribute:"formaction"})],qi.prototype,"formAction",void 0),Re([Pt({reflect:!0,attribute:"formenctype"})],qi.prototype,"formEnctype",void 0),Re([Pt({reflect:!0,attribute:"formmethod"})],qi.prototype,"formMethod",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"formnovalidate"})],qi.prototype,"formNoValidate",void 0),Re([Pt({reflect:!0,attribute:"formtarget"})],qi.prototype,"formTarget",void 0);const ji=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;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 qi{constructor(){super(...arguments),this.variant="filled",this.fullWidth=!1,this.rippleRef=Ei()}get rippleElement(){return this.rippleRef.value}render(){return ct`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderInner()}):this.disabled||this.loading?ct`${this.renderInner()}`:this.renderAnchor({className:"button",part:"button",content:this.renderInner()})}`}renderIcon(){return this.loading?this.renderLoading():ct`${this.icon?ct``:Gt}`}renderLabel(){return ct``}renderEndIcon(){return ct`${this.endIcon?ct``:Gt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}},e.Button.styles=[qi.styles,ji],Re([Pt({reflect:!0})],e.Button.prototype,"variant",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"full-width"})],e.Button.prototype,"fullWidth",void 0),Re([Pt({reflect:!0})],e.Button.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.Button.prototype,"endIcon",void 0),e.Button=Re([Et("mdui-button")],e.Button);const Gi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;min-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 qi{constructor(){super(...arguments),this.variant="standard",this.selectable=!1,this.selected=!1,this.rippleRef=Ei(),this.hasSlotController=new jt(this,"[default]","selected-icon")}get rippleElement(){return this.rippleRef.value}onSelectedChange(){vi(this,"change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.selectable&&!this.disabled&&(this.selected=!this.selected)}))}render(){return ct`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderIcon()}):this.disabled||this.loading?ct`${this.renderIcon()}`:this.renderAnchor({className:"button",part:"button",content:this.renderIcon()})} ${this.renderLoading()}`}renderIcon(){const e=()=>this.hasSlotController.test("[default]")?ct``:this.icon?ct``:Gt;return this.selected?(()=>this.hasSlotController.test("selected-icon")||this.selectedIcon?ct``:e())():e()}},e.ButtonIcon.styles=[qi.styles,Gi],Re([Pt({reflect:!0})],e.ButtonIcon.prototype,"variant",void 0),Re([Pt({reflect:!0})],e.ButtonIcon.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"selected-icon"})],e.ButtonIcon.prototype,"selectedIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.ButtonIcon.prototype,"selectable",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.ButtonIcon.prototype,"selected",void 0),Re([fi("selected",!0)],e.ButtonIcon.prototype,"onSelectedChange",null),e.ButtonIcon=Re([Et("mdui-button-icon")],e.ButtonIcon);const Wi=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(_i(Ki(Fi(St)))){constructor(){super(...arguments),this.variant="elevated",this.clickable=!1,this.disabled=!1,this.rippleRef=Ei()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled||!this.href&&!this.clickable}get focusElement(){return this}get focusDisabled(){return this.rippleDisabled}render(){return ct`${this.href&&!this.disabled?this.renderAnchor({className:"link",content:ct``}):ct``}`}},e.Card.styles=[Wt,Wi],Re([Pt({reflect:!0})],e.Card.prototype,"variant",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Card.prototype,"clickable",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Card.prototype,"disabled",void 0),e.Card=Re([Et("mdui-card")],e.Card);const Yi=Vt(class extends Ht{constructor(e){if(super(e),e.type!==Ft&&e.type!==Ot&&e.type!==Nt)throw Error("The `live` directive is not allowed on child or event bindings");if(!Zt(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===dt||t===ht)return t;const i=e.element,o=e.name;if(e.type===Ft){if(t===i[o])return dt}else if(e.type===Nt){if(!!t===i.hasAttribute(o))return dt}else if(e.type===Ot&&i.getAttribute(o)===t+"")return dt;return((e,t=Qt)=>{e._$AH=t})(e),t}});function Xi(e="value"){return(t,i)=>{const o=t.constructor,r=o.prototype.attributeChangedCallback;o.prototype.attributeChangedCallback=function(t,n,s){var a;const d=o.getPropertyOptions(e);if(t===(c(d.attribute)?d.attribute:e)){const t=d.converter||ze,o=(l(t)?t:null!==(a=null==t?void 0:t.fromAttribute)&&void 0!==a?a:ze.fromAttribute)(s,d.type);this[e]!==o&&(this[i]=o)}r.call(this,t,n,s)}}}const Ji=Pe`:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`,Zi=e=>ct`${Jt(e)}`;let Qi=class extends St{render(){return Zi('')}};Qi.styles=Ji,Qi=Re([Et("mdui-icon-check-box-outline-blank")],Qi);let eo=class extends St{render(){return Zi('')}};eo.styles=Ji,eo=Re([Et("mdui-icon-check-box")],eo);let to=class extends St{render(){return Zi('')}};to.styles=Ji,to=Re([Et("mdui-icon-indeterminate-check-box")],to);const io=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;overflow:hidden;border-radius:50%;width:2.5rem;min-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)}:host([invalid]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([invalid]) .icon{color:rgb(var(--mdui-color-error))}:host([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(Ki(Fi(St))){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=Ei(),this.rippleRef=Ei(),this.formController=new Li(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(){var e;await this.updateComplete;const t=this.formController.getForm();t&&(null===(e=Bi.get(t))||void 0===e?void 0:e.has(this))?(this.invalid=!1,Bi.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}).defaultPrevented&&(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ct``}onChange(){this.checked=this.inputRef.value.checked,this.indeterminate=!1,vi(this,"change")}},e.Checkbox.styles=[Wt,io],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Checkbox.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Checkbox.prototype,"checked",void 0),Re([Xi("checked")],e.Checkbox.prototype,"defaultChecked",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Checkbox.prototype,"indeterminate",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Checkbox.prototype,"required",void 0),Re([Pt({reflect:!0})],e.Checkbox.prototype,"form",void 0),Re([Pt({reflect:!0})],e.Checkbox.prototype,"name",void 0),Re([Pt({reflect:!0})],e.Checkbox.prototype,"value",void 0),Re([Pt({reflect:!0,attribute:"unchecked-icon"})],e.Checkbox.prototype,"uncheckedIcon",void 0),Re([Pt({reflect:!0,attribute:"checked-icon"})],e.Checkbox.prototype,"checkedIcon",void 0),Re([Pt({reflect:!0,attribute:"indeterminate-icon"})],e.Checkbox.prototype,"indeterminateIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Checkbox.prototype,"invalid",void 0),Re([fi("disabled",!0),fi("indeterminate",!0),fi("required",!0)],e.Checkbox.prototype,"onDisabledChange",null),Re([fi("checked",!0)],e.Checkbox.prototype,"onCheckedChange",null),e.Checkbox=Re([Et("mdui-checkbox")],e.Checkbox);let oo=class extends St{render(){return Zi('')}};oo.styles=Ji,oo=Re([Et("mdui-icon-check")],oo);let ro=class extends St{render(){return Zi('')}};ro.styles=Ji,ro=Re([Et("mdui-icon-clear")],ro);const no=Pe`:host{--shape-corner:var(--mdui-shape-corner-small);position:relative;display:inline-block;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 qi{constructor(){super(),this.variant="assist",this.elevated=!1,this.selectable=!1,this.selected=!1,this.deletable=!1,this.rippleRef=Ei(),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(){vi(this,"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=Mi({button:!0,"has-icon":this.loading||!this.selected&&e||this.selected&&i,"has-end-icon":t});return ct`${this.isButton()?this.renderButton({className:o,part:"button",content:this.renderInner()}):this.disabled||this.loading?ct`${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)&&vi(this,"delete"))}onDelete(e){e.stopPropagation(),vi(this,"delete")}renderIcon(){if(this.loading)return this.renderLoading();const e=()=>this.icon?ct``:Gt;return this.selected?ct`${(()=>this.selectedIcon?ct``:"assist"===this.variant||"filter"===this.variant?ct``:e())()}`:ct`${e()}`}renderLabel(){return ct``}renderEndIcon(){return ct`${this.endIcon?ct``:Gt}`}renderDeleteIcon(){return this.deletable?ct`${this.deleteIcon?ct``:ct``}`:Gt}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon(),this.renderDeleteIcon()]}},e.Chip.styles=[qi.styles,no],Re([Pt({reflect:!0})],e.Chip.prototype,"variant",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Chip.prototype,"elevated",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Chip.prototype,"selectable",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Chip.prototype,"selected",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Chip.prototype,"deletable",void 0),Re([Pt({reflect:!0})],e.Chip.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"selected-icon"})],e.Chip.prototype,"selectedIcon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.Chip.prototype,"endIcon",void 0),Re([Pt({reflect:!0,attribute:"delete-icon"})],e.Chip.prototype,"deleteIcon",void 0),Re([fi("selected",!0)],e.Chip.prototype,"onSelectedChange",null),e.Chip=Re([Et("mdui-chip")],e.Chip);const so=Pe`:host{display:block}`;e.Collapse=class extends St{constructor(){super(...arguments),this.accordion=!1,this.disabled=!1,this.activeKeys=[],this.items=[]}onActiveKeysChange(){var e;this.value=this.accordion?null===(e=this.items.find((e=>this.activeKeys.includes(e.key))))||void 0===e?void 0:e.value:this.items.filter((e=>this.activeKeys.includes(e.key))).map((e=>e.value)),vi(this,"change")}onValueChange(){if(this.accordion){const e=this.value;if(e){const t=this.items.find((t=>t.value===e));this.activeKeys=t?[t.key]:[]}else this.activeKeys=[]}else{const e=this.value;e.length?this.activeKeys=this.items.filter((t=>e.includes(t.value))).map((e=>e.key)):this.activeKeys=[]}this.updateActive()}connectedCallback(){super.connectedCallback(),this.syncItems()}render(){return ct``}syncItems(){this.items=P(this).find("mdui-collapse-item").get()}onClick(e){if(this.disabled)return;if(e.button)return;const t=e.target.closest("mdui-collapse-item");if(t.disabled)return;const i=e.composedPath();if((!t.trigger||i.find((e=>f(e)&&P(e).is(t.trigger))))&&i.find((e=>f(e)&&e.part.contains("header")))){if(this.accordion)this.activeKeys.includes(t.key)?this.activeKeys=[]:this.activeKeys=[t.key];else{const e=[...this.activeKeys];e.includes(t.key)?e.splice(e.indexOf(t.key),1):e.push(t.key),this.activeKeys=e}this.updateActive()}}onSlotChange(){this.syncItems(),this.updateActive()}updateActive(){this.items.forEach((e=>e.active=this.activeKeys.includes(e.key)))}},e.Collapse.styles=[Wt,so],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Collapse.prototype,"accordion",void 0),Re([Pt()],e.Collapse.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Collapse.prototype,"disabled",void 0),Re([Mt()],e.Collapse.prototype,"activeKeys",void 0),Re([fi("activeKeys",!0)],e.Collapse.prototype,"onActiveKeysChange",null),Re([fi("value")],e.Collapse.prototype,"onValueChange",null),e.Collapse=Re([Et("mdui-collapse")],e.Collapse);const ao=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}:host([active]) .body{transition-duration:var(--mdui-motion-duration-medium4)}`;function lo(e,t,i){return e?t():null==i?void 0:i()}function co(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 ho(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 uo(e){const t=s(),i=e.tagName.toLowerCase();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 St{constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.state="closed",this.key=yi(),this.bodyRef=Ei()}onActiveChange(){this.hasUpdated?(this.state=this.active?"open":"close",vi(this,this.state),this.updateBodyHeight()):this.state=this.active?"opened":"closed"}firstUpdated(e){super.firstUpdated(e),P(this.bodyRef.value).on("transitionend",(e=>{e.target===this.bodyRef.value&&(this.state=this.active?"opened":"closed",vi(this,this.state),this.updateBodyHeight())})),this.updateBodyHeight()}render(){return ct`${this.header}`}updateBodyHeight(){const e=this.bodyRef.value.scrollHeight;"close"===this.state&&(P(this.bodyRef.value).height(e),this.bodyRef.value.clientLeft),P(this.bodyRef.value).height("opened"===this.state?"auto":"open"===this.state?e:0)}},e.CollapseItem.styles=[Wt,ao],Re([Pt({reflect:!0})],e.CollapseItem.prototype,"value",void 0),Re([Pt({reflect:!0})],e.CollapseItem.prototype,"header",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.CollapseItem.prototype,"disabled",void 0),Re([Pt()],e.CollapseItem.prototype,"trigger",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.CollapseItem.prototype,"active",void 0),Re([Mt()],e.CollapseItem.prototype,"state",void 0),Re([fi("active")],e.CollapseItem.prototype,"onActiveChange",null),e.CollapseItem=Re([Et("mdui-collapse-item")],e.CollapseItem);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){var t,i;const o=[];return function e(t){t instanceof HTMLElement&&(o.push(t),null!==t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot)),[...t.children].forEach((t=>e(t)))}(e),{start:null!==(t=o.find((e=>uo(e))))&&void 0!==t?t:null,end:null!==(i=o.reverse().find((e=>uo(e))))&&void 0!==i?i:null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof(null==i?void 0: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 vo=(e,t)=>{const i=`--mdui-motion-easing-${t}`;return P(e).css(i).trim()},fo=(e,t)=>{const i=`--mdui-motion-duration-${t}`,o=P(e).css(i).trim().toLowerCase();return o.endsWith("ms")?parseFloat(o):1e3*parseFloat(o)},go=new Set,bo="mdui-lock-screen",yo=(e,t)=>{const i=r();go.add(e),P(t||i.body).addClass(bo)},wo=(e,t)=>{const i=r();go.delete(e),0===go.size&&P(t||i.body).removeClass(bo)},ko=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{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 St{constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=Ei(),this.panelRef=Ei(),this.bodyRef=Ei(),this.hasSlotController=new jt(this,"header","icon","headline","description","action","[default]")}async onOpenChange(){var e;const t=this.hasUpdated;t||await this.updateComplete;const i=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),o=vo(this,"linear"),r=vo(this,"emphasized-decelerate"),n=vo(this,"emphasized-accelerate");if(this.open){if(t){if(vi(this,"open",{cancelable:!0}).defaultPrevented)return}this.style.display="flex";const n=null!==(e=this.topAppBarElements)&&void 0!==e?e:[];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(),yo(this),await Promise.all([ho(this.overlayRef.value),ho(this.panelRef.value),...i.map((e=>ho(e)))]),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const s=fo(this,"medium4");return await Promise.all([co(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:t?s:0,easing:o}),co(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:t?s:0,easing:r}),co(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:t?s:0,easing:o}),...i.map((e=>co(e,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:t?s:0,easing:o})))]),void(t&&vi(this,"opened"))}if(!this.open&&t){if(vi(this,"close",{cancelable:!0}).defaultPrevented)return;this.modalHelper.deactivate(),await Promise.all([ho(this.overlayRef.value),ho(this.panelRef.value),...i.map((e=>ho(e)))]);const e=fo(this,"short4");await Promise.all([co(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:o}),co(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:n}),co(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:o}),...i.map((t=>co(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:o})))]),this.style.display="none",wo(this);const t=this.originalTrigger;return"function"==typeof(null==t?void 0:t.focus)&&setTimeout((()=>t.focus())),void vi(this,"closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new mo(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}disconnectedCallback(){super.disconnectedCallback(),wo(this)}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 ct`
${lo(n,(()=>ct`${lo(i,(()=>this.renderIcon()))} ${lo(o,(()=>this.renderHeadline()))}`))} ${lo(s,(()=>ct`
${lo(r,(()=>this.renderDescription()))}
`))} ${lo(e,(()=>ct``))}
`}onOverlayClick(){vi(this,"overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return ct`${this.icon?ct``:Gt}`}renderHeadline(){return ct`${this.headline}`}renderDescription(){return ct`${this.description}`}},e.Dialog.styles=[Wt,ko],Re([Pt({reflect:!0})],e.Dialog.prototype,"icon",void 0),Re([Pt({reflect:!0})],e.Dialog.prototype,"headline",void 0),Re([Pt({reflect:!0})],e.Dialog.prototype,"description",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Dialog.prototype,"open",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Dialog.prototype,"fullscreen",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"close-on-esc"})],e.Dialog.prototype,"closeOnEsc",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"close-on-overlay-click"})],e.Dialog.prototype,"closeOnOverlayClick",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"stacked-actions"})],e.Dialog.prototype,"stackedActions",void 0),Re([Lt({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],e.Dialog.prototype,"topAppBarElements",void 0),Re([fi("open")],e.Dialog.prototype,"onOpenChange",null),e.Dialog=Re([Et("mdui-dialog")],e.Dialog);const Co=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}`;e.Divider=class extends St{constructor(){super(...arguments),this.vertical=!1,this.inset=!1,this.middle=!1}render(){return ct``}},e.Divider.styles=[Wt,Co],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Divider.prototype,"vertical",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Divider.prototype,"inset",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Divider.prototype,"middle",void 0),e.Divider=Re([Et("mdui-divider")],e.Divider);const xo=Pe`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;e.Dropdown=class extends St{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=Ei(),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 triggerSlot(){return this.triggerSlots[0]}get panelSlot(){return this.panelSlots[0]}async onPositionChange(){this.open&&this.updatePositioner()}async onOpenChange(){var e,t,i,o;const r=this.hasUpdated,n=vo(this,"linear"),s=vo(this,"emphasized-decelerate"),a=vo(this,"emphasized-accelerate");if(this.open){if(r||await this.updateComplete,r){if(vi(this,"open",{cancelable:!0}).defaultPrevented)return}"function"==typeof(null===(e=this.panelSlot)||void 0===e?void 0:e.focus)&&this.panelSlot.focus();const t=fo(this,"medium4");return await ho(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([co(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:r?t:0,easing:s}),co(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:r?t:0,easing:n})]),void(r&&vi(this,"opened"))}if(!this.open&&r){if(vi(this,"close",{cancelable:!0}).defaultPrevented)return;this.hasTrigger("focus")||"function"!=typeof(null===(t=this.triggerSlot)||void 0===t?void 0:t.focus)||!this.contains(document.activeElement)&&!this.contains(null!==(o=null===(i=document.activeElement)||void 0===i?void 0:i.assignedSlot)&&void 0!==o?o:null)||this.triggerSlot.focus();const e=fo(this,"short4");await ho(this.panelRef.value),await Promise.all([co(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:e,easing:a}),co(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:n})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),vi(this,"closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),window.addEventListener("scroll",this.onWindowScroll),this.updateComplete.then((()=>{this.observeResize=Ci(this.triggerSlot,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),window.removeEventListener("scroll",this.onWindowScroll),null===(e=this.observeResize)||void 0===e||e.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("mouseleave",this.onMouseLeave),this.triggerSlot.addEventListener("focus",this.onFocus),this.triggerSlot.addEventListener("click",this.onClick),this.triggerSlot.addEventListener("contextmenu",this.onContextMenu),this.triggerSlot.addEventListener("mouseenter",this.onMouseEnter),P(this.panelRef.value).on("click",this.onPanelClick)}render(){return ct``}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.triggerSlot)&&(this.open=!1)}onDocumentKeydown(e){var t;!this.disabled&&this.open&&("Escape"!==e.key?"Tab"===e.key&&(this.hasTrigger("focus")||"function"!=typeof(null===(t=this.triggerSlot)||void 0===t?void 0:t.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){const t=e;this.disabled||this.stayOpenOnClick||!P(t.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(){var e;const t=P(this.panelRef.value),i=P(window),o=this.panelSlots,r=Math.max(...null!==(e=null==o?void 0:o.map((e=>e.offsetWidth)))&&void 0!==e?e:[]),n=null==o?void 0:o.map((e=>e.offsetHeight)).reduce(((e,t)=>e+t)),s=this.triggerSlot.getBoundingClientRect(),a=this.openOnPointer?{top:this.pointerOffsetY+s.top,left:this.pointerOffsetX+s.left,width:0,height:0}:s;let l,c,d,h,u=this.placement;if("auto"===u){const e=i.width(),t=i.height();let o,s;o=t-a.top-a.height>n+8?"bottom":a.top>n+8?"top":e-a.left-a.width>r+8?"right":a.left>r+8?"left":"bottom",s=["top","bottom"].includes(o)?e-a.left>r+8?"start":a.left+a.width/2>r/2+8&&e-a.left-a.width/2>r/2+8?void 0:a.left+a.width>r+8?"end":"start":t-a.top>n+8?"start":a.top+a.height/2>n/2+8&&t-a.top-a.height/2>n/2+8?void 0:a.top+a.height>n+8?"end":"start",u=s?[o,s].join("-"):o}const[p,m]=u.split("-");switch(this.animateDirection=["top","bottom"].includes(p)?"vertical":"horizontal",p){case"top":c="bottom",d=a.top-n;break;case"bottom":c="top",d=a.top+a.height;break;default:switch(c="center",m){case"start":d=a.top;break;case"end":d=a.top+a.height-n;break;default:d=a.top+a.height/2-n/2}}switch(p){case"left":l="right",h=a.left-r;break;case"right":l="left",h=a.left+a.width;break;default:switch(l="center",m){case"start":h=a.left;break;case"end":h=a.left+a.width-r;break;default:h=a.left+a.width/2-r/2}}t.css({top:d,left:h,transformOrigin:[l,c].join(" ")})}},e.Dropdown.styles=[Wt,xo],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Dropdown.prototype,"open",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Dropdown.prototype,"disabled",void 0),Re([Pt({reflect:!0})],e.Dropdown.prototype,"trigger",void 0),Re([Pt({reflect:!0})],e.Dropdown.prototype,"placement",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"stay-open-on-click"})],e.Dropdown.prototype,"stayOpenOnClick",void 0),Re([Pt({type:Number,reflect:!0,attribute:"open-delay"})],e.Dropdown.prototype,"openDelay",void 0),Re([Pt({type:Number,reflect:!0,attribute:"close-delay"})],e.Dropdown.prototype,"closeDelay",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"open-on-pointer"})],e.Dropdown.prototype,"openOnPointer",void 0),Re([Lt({slot:"trigger",flatten:!0})],e.Dropdown.prototype,"triggerSlots",void 0),Re([Lt({flatten:!0})],e.Dropdown.prototype,"panelSlots",void 0),Re([fi("placement",!0),fi("openOnPointer",!0)],e.Dropdown.prototype,"onPositionChange",null),Re([fi("open")],e.Dropdown.prototype,"onOpenChange",null),e.Dropdown=Re([Et("mdui-dropdown")],e.Dropdown);const $o=(e=0)=>new Promise((t=>setTimeout(t,e))),Ro=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;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 qi{constructor(){super(...arguments),this.variant="primary",this.size="normal",this.extended=!1,this.rippleRef=Ei(),this.hasSlotController=new jt(this,"icon")}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.updateComplete,this.extended&&!e&&(await $o(),this.style.width=`${this.scrollWidth}px`),e||(await $o(),this.style.transitionProperty="box-shadow, width, bottom, transform")}render(){const e=Mi({button:!0,"has-icon":this.icon||this.hasSlotController.test("icon")});return ct`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.disabled||this.loading?ct`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}renderLabel(){return ct``}renderIcon(){return this.loading?this.renderLoading():ct`${this.icon?ct``:Gt}`}renderInner(){return[this.renderIcon(),this.renderLabel()]}},e.Fab.styles=[qi.styles,Ro],Re([Pt({reflect:!0})],e.Fab.prototype,"variant",void 0),Re([Pt({reflect:!0})],e.Fab.prototype,"size",void 0),Re([Pt({reflect:!0})],e.Fab.prototype,"icon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Fab.prototype,"extended",void 0),Re([fi("extended")],e.Fab.prototype,"onExtendedChange",null),e.Fab=Re([Et("mdui-fab")],e.Fab);const So=Pe`:host{position:relative;display:flex;flex:1 1 auto;overflow:hidden}:host([full-height]){height:100%}`;e.Layout=class extends St{constructor(){super(...arguments),this.fullHeight=!1}render(){return ct``}},e.Layout.styles=[Wt,So],Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"full-height"})],e.Layout.prototype,"fullHeight",void 0),e.Layout=Re([Et("mdui-layout")],e.Layout);const To=Pe`:host{display:flex;z-index:1}`;e.LayoutItem=class extends Si{constructor(){super(...arguments),this.placement="top"}get layoutPlacement(){return this.placement}onPlacementChange(){var e;null===(e=this.layoutManager)||void 0===e||e.updateLayout(this)}render(){return ct``}},e.LayoutItem.styles=[Wt,To],Re([Pt({reflect:!0})],e.LayoutItem.prototype,"placement",void 0),Re([fi("placement",!0)],e.LayoutItem.prototype,"onPlacementChange",null),e.LayoutItem=Re([Et("mdui-layout-item")],e.LayoutItem);const Eo=Pe`:host{flex:1 0 auto;max-width:100%;overflow:auto}`;e.LayoutMain=class extends St{connectedCallback(){super.connectedCallback();const e=this.parentElement;a(e,"mdui-layout")&&(this.layoutManager=Ri(e),this.layoutManager.registerMain(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterMain()}render(){return ct``}},e.LayoutMain.styles=[Wt,Eo],e.LayoutMain=Re([Et("mdui-layout-main")],e.LayoutMain);const Io=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 St{constructor(){super(...arguments),this.max=1}render(){var e;if(!u(this.value)){const t=this.value;return ct`
`}return ct`
`}},e.LinearProgress.styles=[Wt,Io],Re([Pt({type:Number,reflect:!0})],e.LinearProgress.prototype,"max",void 0),Re([Pt({type:Number})],e.LinearProgress.prototype,"value",void 0),e.LinearProgress=Re([Et("mdui-linear-progress")],e.LinearProgress);const Ao=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;-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;text-decoration:none;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(_i(Ki(Fi(St)))){constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.nonclickable=!1,this.rounded=!1,this.alignment="center",this.rippleRef=Ei(),this.itemRef=Ei(),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.itemRef.value:this}get focusDisabled(){return this.href?this.disabled:this.disabled||this.nonclickable}render(){const e=Mi({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],null!==(i=null==t?void 0:t.nodeName.toLowerCase())&&void 0!==i?i:"").startsWith("mdui-icon-")});var t,i;return ct`${this.href&&!this.disabled?this.renderAnchor({className:e,content:this.renderInner(),part:"container",refDirective:Pi(this.itemRef)}):ct`
${this.renderInner()}
`}`}renderInner(){const e=this.hasSlotController.test("[default]");return ct`${this.icon?ct``:Gt}
${e?ct``:ct`
${this.headline}
`}${this.description}
${this.endIcon?ct``:Gt}
`}},e.ListItem.styles=[Wt,Ao],Re([Pt({reflect:!0})],e.ListItem.prototype,"headline",void 0),Re([Pt({type:Number,reflect:!0,attribute:"headline-line"})],e.ListItem.prototype,"headlineLine",void 0),Re([Pt({reflect:!0})],e.ListItem.prototype,"description",void 0),Re([Pt({type:Number,reflect:!0,attribute:"description-line"})],e.ListItem.prototype,"descriptionLine",void 0),Re([Pt({reflect:!0})],e.ListItem.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.ListItem.prototype,"endIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.ListItem.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.ListItem.prototype,"active",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.ListItem.prototype,"nonclickable",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.ListItem.prototype,"rounded",void 0),Re([Pt({reflect:!0})],e.ListItem.prototype,"alignment",void 0),Re([Lt({slot:"icon",flatten:!0})],e.ListItem.prototype,"iconElements",void 0),Re([Lt({slot:"end-icon",flatten:!0})],e.ListItem.prototype,"endIconElements",void 0),e.ListItem=Re([Et("mdui-list-item")],e.ListItem);const Po=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 St{render(){return ct``}},e.ListSubheader.styles=[Wt,Po],e.ListSubheader=Re([Et("mdui-list-subheader")],e.ListSubheader);const Mo=Pe`:host{display:block;padding:.5rem 0}::slotted(mdui-divider[middle]){margin-left:1rem;margin-right:1.5rem}`;e.List=class extends St{render(){return ct``}},e.List.styles=[Wt,Mo],e.List=Re([Et("mdui-list")],e.List);let Do=class extends St{render(){return Zi('')}};Do.styles=Ji,Do=Re([Et("mdui-icon-arrow-right")],Do);const Bo=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(_i(Ki(Fi(St)))){constructor(){super(),this.disabled=!1,this.submenuOpen=!1,this.selected=!1,this.dense=!1,this.focusable=!1,this.key=yi(),this.rippleRef=Ei(),this.containerRef=Ei(),this.submenuRef=Ei(),this.hasSlotController=new jt(this,"[default]","icon","end-icon","end-text","submenu","custom"),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.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,t=vo(this,"linear"),i=vo(this,"emphasized-decelerate"),o=vo(this,"emphasized-accelerate");if(this.submenuOpen){if(e||await this.updateComplete,e){if(vi(this,"submenu-open",{cancelable:!0}).defaultPrevented)return}const o=fo(this,"medium4");return await ho(this.submenuRef.value),this.submenuRef.value.hidden=!1,this.updateSubmenuPositioner(),await Promise.all([co(this.submenuRef.value,[{transform:"scaleY(0.45)"},{transform:"scaleY(1)"}],{duration:e?o:0,easing:i}),co(this.submenuRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?o:0,easing:t})]),void(e&&vi(this,"submenu-opened"))}if(!this.submenuOpen&&e){if(vi(this,"submenu-close",{cancelable:!0}).defaultPrevented)return;const e=fo(this,"short4");await ho(this.submenuRef.value),await Promise.all([co(this.submenuRef.value,[{transform:"scaleY(1)"},{transform:"scaleY(0.45)"}],{duration:e,easing:o}),co(this.submenuRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.submenuRef.value.hidden=!0,vi(this,"submenu-closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onOuterClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOuterClick)}firstUpdated(e){super.firstUpdated(e),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=Mi({container:!0,dense:this.dense,preset:!t,"has-icon":n,"has-end-text":s,"has-end-icon":r});return ct`${this.href&&!this.disabled?this.renderAnchor({part:"container",className:a,content:this.renderInner(o,n),refDirective:Pi(this.containerRef)}):ct`
${this.renderInner(o,n)}
`} ${lo(e,(()=>ct``))}`}onOuterClick(e){this.disabled||!this.submenuOpen||this===e.target||P.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=P(window),t=P(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"),P(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 ct`${this.selected?ct`${this.selectedIcon?ct``:ct``}`:ct`${t?ct``:Gt}`}
${this.endText}${e?ct``:ct`${this.endIcon?ct``:Gt}`}
`}},e.MenuItem.styles=[Wt,Bo],Re([Pt({reflect:!0})],e.MenuItem.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.MenuItem.prototype,"disabled",void 0),Re([Pt({reflect:!0})],e.MenuItem.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.MenuItem.prototype,"endIcon",void 0),Re([Pt({reflect:!0,attribute:"end-text"})],e.MenuItem.prototype,"endText",void 0),Re([Pt({reflect:!0,attribute:"selected-icon"})],e.MenuItem.prototype,"selectedIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"submenu-open"})],e.MenuItem.prototype,"submenuOpen",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.MenuItem.prototype,"selected",void 0),Re([Mt()],e.MenuItem.prototype,"dense",void 0),Re([Mt()],e.MenuItem.prototype,"selects",void 0),Re([Mt()],e.MenuItem.prototype,"submenuTrigger",void 0),Re([Mt()],e.MenuItem.prototype,"submenuOpenDelay",void 0),Re([Mt()],e.MenuItem.prototype,"submenuCloseDelay",void 0),Re([Mt()],e.MenuItem.prototype,"focusable",void 0),Re([fi("submenuOpen")],e.MenuItem.prototype,"onOpenChange",null),e.MenuItem=Re([Et("mdui-menu-item")],e.MenuItem);const Lo=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 St{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.hasSetDefaultValue=!1,this.lastActiveItems=[]}get items(){return P(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!P(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}onSlotChange(){this.items.forEach((e=>{e.dense=this.dense,e.selects=this.selects,e.submenuTrigger=this.submenuTrigger,e.submenuOpenDelay=this.submenuOpenDelay,e.submenuCloseDelay=this.submenuCloseDelay}))}onSelectsChange(){!this.isSelectable&&this.selectedKeys.length&&(this.selectedKeys=[],this.onSelectedKeysChange(),this.onValueChange()),this.isSingle&&this.selectedKeys.length>1&&(this.selectedKeys=this.selectedKeys.slice(0,1),this.onSelectedKeysChange(),this.onValueChange())}onSelectedKeysChange(e){const t=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value));this.isMultiple&&e&&e.length===this.selectedKeys.length&&e.every(((e,t)=>e===this.selectedKeys[t]))?this.hasSetDefaultValue=!0:(this.value=this.isMultiple?t:t[0]||void 0,this.hasSetDefaultValue?vi(this,"change"):this.hasSetDefaultValue=!0)}async onValueChange(){if(this.hasUpdated||await this.updateComplete,!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.selectedKeys=t?[t.key]:[]}else this.isMultiple&&(this.selectedKeys=this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.selectedKeys=[];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.updateFocusable(),this.lastActiveItem=this.items.find((e=>e.focusable)),this.addEventListener("submenu-open",(e=>{const t=P(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=P(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 ct``}getSiblingsItems(e,t=!1){return P(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));(null==e?void 0: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.selectedKeys=t}this.isSingle&&(this.selectedKeys.includes(e.key)?this.selectedKeys=[]:this.selectedKeys=[e.key]),this.updateSelected()}focusableOne(e){this.items.forEach((t=>t.focusable=t.key===e.key))}async focusOne(e,t){await $o(),e.focus(t)}onClick(e){if(this.isSubmenu)return;if(e.button)return;const t=e.target.closest("mdui-menu-item");(null==t?void 0:t.disabled)||(this.lastActiveItem=t,this.isSelectable&&t.value&&this.selectOne(t),this.focusableOne(t),this.focusOne(t))}onKeyDown(e){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),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],this.focusableOne(i[r]),void this.focusOne(i[r])}}},e.Menu.styles=[Wt,Lo],Re([Pt({reflect:!0})],e.Menu.prototype,"selects",void 0),Re([Pt()],e.Menu.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Menu.prototype,"dense",void 0),Re([Pt({reflect:!0,attribute:"submenu-trigger"})],e.Menu.prototype,"submenuTrigger",void 0),Re([Pt({type:Number,reflect:!0,attribute:"submenu-open-delay"})],e.Menu.prototype,"submenuOpenDelay",void 0),Re([Pt({type:Number,reflect:!0,attribute:"submenu-close-delay"})],e.Menu.prototype,"submenuCloseDelay",void 0),Re([Mt()],e.Menu.prototype,"selectedKeys",void 0),Re([Lt({flatten:!0,selector:"mdui-menu-item"})],e.Menu.prototype,"childrenItems",void 0),Re([fi("dense"),fi("selects"),fi("submenuTrigger"),fi("submenuOpenDelay"),fi("submenuCloseDelay")],e.Menu.prototype,"onSlotChange",null),Re([fi("selects")],e.Menu.prototype,"onSelectsChange",null),Re([fi("selectedKeys",!0)],e.Menu.prototype,"onSelectedKeysChange",null),Re([fi("value")],e.Menu.prototype,"onValueChange",null),e.Menu=Re([Et("mdui-menu")],e.Menu);const _o=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;transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);padding-top:.75rem;padding-bottom:.75rem}mdui-ripple{z-index:1;left:50%;transform:translateX(-50%);transition:margin-top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);width:4rem;height:2rem;margin-top:.75rem;border-radius:var(--mdui-shape-corner-full)}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-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:2rem;width:2rem}::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;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);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)}:host([label-visibility=selected]:not([active])) mdui-ripple,:host([label-visibility=unlabeled]) mdui-ripple{margin-top:1.5rem}:host([label-visibility=selected]:not([active])) .container,:host([label-visibility=unlabeled]) .container{padding-top:1.5rem;padding-bottom:0}:host([label-visibility=selected]:not([active])) .label,:host([label-visibility=unlabeled]) .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(_i(Ki(Fi(St)))){constructor(){super(...arguments),this.active=!1,this.disabled=!1,this.key=yi(),this.rippleRef=Ei(),this.hasSlotController=new jt(this,"active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){var e;return this.href?null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=Mi({container:!0,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")});return ct`${this.href?this.renderAnchor({part:"container",className:e,content:this.renderInner()}):ct`
${this.renderInner()}
`}`}renderInner(){return ct`
${this.activeIcon?ct``:Gt}${this.icon?ct``:Gt}
`}},e.NavigationBarItem.styles=[Wt,_o],Re([Pt({reflect:!0})],e.NavigationBarItem.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"active-icon"})],e.NavigationBarItem.prototype,"activeIcon",void 0),Re([Pt({reflect:!0})],e.NavigationBarItem.prototype,"value",void 0),Re([Pt({reflect:!0,attribute:"label-visibility"})],e.NavigationBarItem.prototype,"labelVisibility",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationBarItem.prototype,"active",void 0),Re([Mt()],e.NavigationBarItem.prototype,"disabled",void 0),e.NavigationBarItem=Re([Et("mdui-navigation-bar-item")],e.NavigationBarItem);const Oo=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(gi(Si)){constructor(){super(...arguments),this.hide=!1,this.labelVisibility="auto",this.activeKey=0,this.hasSetDefaultValue=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}get items(){return P(this).find("mdui-navigation-bar-item").get()}onActiveKeyChange(){const e=this.items.find((e=>e.key===this.activeKey));this.value=null==e?void 0:e.value,this.hasSetDefaultValue?vi(this,"change"):this.hasSetDefaultValue=!0}onValueChange(){var e;const t=this.items.find((e=>e.value===this.value));this.activeKey=null!==(e=null==t?void 0:t.key)&&void 0!==e?e:0,this.updateActive()}onLabelVisibilityChange(){const e=this.items,t="auto"===this.labelVisibility?e.length<=3?"labeled":"selected":this.labelVisibility;e.forEach((e=>{e.labelVisibility=t}))}connectedCallback(){super.connectedCallback(),this.addEventListener("transitionend",(e=>{e.target===this&&vi(this,this.hide?"hidden":"shown")}))}render(){return ct``}runScrollThreshold(e){if(!e&&!this.hide){vi(this,"hide").defaultPrevented||(this.hide=!0)}if(e&&this.hide){vi(this,"show").defaultPrevented||(this.hide=!1)}}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-bar-item");this.activeKey=t.key,this.updateActive()}updateActive(){this.items.forEach((e=>e.active=this.activeKey===e.key))}onSlotChange(){this.onLabelVisibilityChange()}},e.NavigationBar.styles=[Wt,Oo],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationBar.prototype,"hide",void 0),Re([Pt({reflect:!0,attribute:"label-visibility"})],e.NavigationBar.prototype,"labelVisibility",void 0),Re([Pt({reflect:!0})],e.NavigationBar.prototype,"value",void 0),Re([Pt({reflect:!0,attribute:"scroll-behavior"})],e.NavigationBar.prototype,"scrollBehavior",void 0),Re([Mt()],e.NavigationBar.prototype,"activeKey",void 0),Re([fi("activeKey")],e.NavigationBar.prototype,"onActiveKeyChange",null),Re([fi("value")],e.NavigationBar.prototype,"onValueChange",null),Re([fi("labelVisibility",!0)],e.NavigationBar.prototype,"onLabelVisibilityChange",null),e.NavigationBar=Re([Et("mdui-navigation-bar")],e.NavigationBar);const zo=e=>{const t=s(),i=r(),o=t.getComputedStyle(i.documentElement),n=f(e)?P(e).innerWidth():d(e)?e:P(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)}}},Fo=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;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 Si{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=Ei(),this.panelRef=Ei()}get layoutPlacement(){return this.placement}get lockTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isModal(){return this.mobile||this.modal}onContainedChange(){var e;this.hasUpdated&&(null===(e=this.observeResize)||void 0===e||e.unobserve()),this.observeResize=Ci(this.contained?this.parentElement:document.body,(()=>{const e=this.contained?this.parentElement:void 0;this.mobile=zo(e).down("md"),this.isParentLayout&&this.layoutManager.updateLayout(this,{width:this.isModal?0:void 0})}))}onPlacementChange(){this.isParentLayout&&this.layoutManager.updateLayout(this)}async onOpenChange(){let e=this.panelRef.value,t=this.overlayRef.value;const i="right"===this.placement,o=i?"paddingRight":"paddingLeft",r=vo(this,"linear"),n=vo(this,"emphasized"),s=(e,t)=>{P(this.layoutManager.getItemsAndMain()).css("transition",p(e)?null:`all ${e}ms ${t}`)},a=async()=>{await Promise.all([this.isModal?ho(t):this.isParentLayout?Promise.resolve():ho(this.lockTarget),this.isModal?ho(e):ho(this)])};if(this.open){const l=this.hasUpdated;if(l||(await this.updateComplete,e=this.panelRef.value,t=this.overlayRef.value),l){if(vi(this,"open",{cancelable:!0}).defaultPrevented)return}this.style.display="block",this.originalTrigger=document.activeElement,this.isModal&&(this.modalHelper.activate(),yo(this,this.lockTarget)),await a(),requestAnimationFrame((()=>{const t=this.querySelector("[autofocus]");t?t.focus({preventScroll:!0}):e.focus({preventScroll:!0})}));const c=fo(this,"long2"),d=[];return this.isModal?d.push(co(t,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:l?c:0,easing:r})):this.isParentLayout||d.push(co(this.lockTarget,[{[o]:0},{[o]:P(e).innerWidth()+"px"}],{duration:l?c:0,easing:n,fill:"forwards"})),this.isParentLayout&&l&&s(c,n),d.push(co(this.isModal?e:this,[{transform:`translateX(${i?"":"-"}100%)`},{transform:"translateX(0)"}],{duration:l?c:0,easing:n})),await Promise.all(d),this.isParentLayout&&l&&s(null),void(l&&vi(this,"opened"))}if(!this.open&&this.hasUpdated){if(vi(this,"close",{cancelable:!0}).defaultPrevented)return;this.isModal&&this.modalHelper.deactivate(),await a();const l=fo(this,"short4"),c=[];this.isModal?c.push(co(t,[{opacity:1},{opacity:0}],{duration:l,easing:r})):this.isParentLayout||c.push(co(this.lockTarget,[{[o]:P(e).innerWidth()+"px"},{[o]:0}],{duration:l,easing:n,fill:"forwards"})),this.isParentLayout&&(s(l,n),this.layoutManager.updateLayout(this,{width:0})),c.push(co(this.isModal?e:this,[{transform:"translateX(0)"},{transform:`translateX(${i?"":"-"}100%)`}],{duration:l,easing:n})),await Promise.all(c),this.isParentLayout&&s(null),this.style.display="none",this.isModal&&wo(this,this.lockTarget);const d=this.originalTrigger;return"function"==typeof(null==d?void 0:d.focus)&&setTimeout((()=>d.focus())),void vi(this,"closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new mo(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&this.isModal&&(e.stopPropagation(),this.open=!1)}))}disconnectedCallback(){var e;super.disconnectedCallback(),wo(this,this.lockTarget),null===(e=this.observeResize)||void 0===e||e.unobserve()}render(){return ct`${lo(this.isModal,(()=>ct`
`))}`}onOverlayClick(){vi(this,"overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}},e.NavigationDrawer.styles=[Wt,Fo],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationDrawer.prototype,"open",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationDrawer.prototype,"modal",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"close-on-esc"})],e.NavigationDrawer.prototype,"closeOnEsc",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"close-on-overlay-click"})],e.NavigationDrawer.prototype,"closeOnOverlayClick",void 0),Re([Pt({reflect:!0})],e.NavigationDrawer.prototype,"placement",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationDrawer.prototype,"contained",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationDrawer.prototype,"mobile",void 0),Re([fi("contained")],e.NavigationDrawer.prototype,"onContainedChange",null),Re([fi("placement")],e.NavigationDrawer.prototype,"onPlacementChange",null),Re([fi("open")],e.NavigationDrawer.prototype,"onOpenChange",null),e.NavigationDrawer=Re([Et("mdui-navigation-drawer")],e.NavigationDrawer);const No=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 Si{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.hasSetDefaultValue=!1}get layoutPlacement(){return this.placement}get items(){return P(this).find("mdui-navigation-rail-item").get()}get parentTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isRight(){return"right"===this.placement}get paddingValue(){return["fixed","absolute"].includes(P(this).css("position"))?this.offsetWidth:void 0}onActiveKeyChange(){const e=this.items.find((e=>e.key===this.activeKey));this.value=null==e?void 0:e.value,this.hasSetDefaultValue?vi(this,"change"):this.hasSetDefaultValue=!0}onValueChange(){var e;const t=this.items.find((e=>e.value===this.value));this.activeKey=null!==(e=null==t?void 0:t.key)&&void 0!==e?e:0,this.updateActive()}onContainedChange(){this.isParentLayout||(P(document.body).css({paddingLeft:this.contained||this.isRight?null:this.paddingValue,paddingRight:this.contained||!this.isRight?null:this.paddingValue}),P(this.parentElement).css({paddingLeft:this.contained&&!this.isRight?this.paddingValue:null,paddingRight:this.contained&&this.isRight?this.paddingValue:null}))}onPlacementChange(){var e;null===(e=this.layoutManager)||void 0===e||e.updateLayout(this),this.items.forEach((e=>{e.placement=this.placement})),this.isParentLayout||P(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}connectedCallback(){super.connectedCallback(),this.isParentLayout||P(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}disconnectedCallback(){super.disconnectedCallback(),this.isParentLayout||P(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 ct`${lo(e,(()=>ct``))} ${lo(t,(()=>ct``))}`}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-rail-item");this.activeKey=t.key,this.updateActive()}updateActive(){this.items.forEach((e=>e.active=this.activeKey===e.key))}onSlotChange(){this.items.forEach((e=>{e.placement=this.placement}))}},e.NavigationRail.styles=[Wt,No],Re([Pt({reflect:!0})],e.NavigationRail.prototype,"value",void 0),Re([Pt({reflect:!0})],e.NavigationRail.prototype,"placement",void 0),Re([Pt({reflect:!0})],e.NavigationRail.prototype,"alignment",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationRail.prototype,"contained",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationRail.prototype,"divider",void 0),Re([Mt()],e.NavigationRail.prototype,"activeKey",void 0),Re([fi("activeKey")],e.NavigationRail.prototype,"onActiveKeyChange",null),Re([fi("value")],e.NavigationRail.prototype,"onValueChange",null),Re([fi("contained",!0)],e.NavigationRail.prototype,"onContainedChange",null),Re([fi("placement")],e.NavigationRail.prototype,"onPlacementChange",null),e.NavigationRail=Re([Et("mdui-navigation-rail")],e.NavigationRail);const Vo=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;transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);height:3.5rem}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);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);height:2rem;width:2rem}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}:host([placement=right]) ::slotted([slot=badge]){transform:translate(-50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}:host([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;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);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)}: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(_i(Ki(Fi(St)))){constructor(){super(...arguments),this.active=!1,this.placement="left",this.disabled=!1,this.key=yi(),this.rippleRef=Ei(),this.hasSlotController=new jt(this,"[default]","active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){var e;return this.href?null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=this.hasSlotController.test("[default]"),t=Mi({container:!0,"has-label":e,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")});return ct`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner(e)}):ct`
${this.renderInner(e)}
`}`}renderInner(e){return ct`
${this.activeIcon?ct``:Gt}${this.icon?ct``:Gt}
${e?ct``:ht}`}},e.NavigationRailItem.styles=[Wt,Vo],Re([Pt({reflect:!0})],e.NavigationRailItem.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"active-icon"})],e.NavigationRailItem.prototype,"activeIcon",void 0),Re([Pt({reflect:!0})],e.NavigationRailItem.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.NavigationRailItem.prototype,"active",void 0),Re([Pt({reflect:!0})],e.NavigationRailItem.prototype,"placement",void 0),Re([Mt()],e.NavigationRailItem.prototype,"disabled",void 0),e.NavigationRailItem=Re([Et("mdui-navigation-rail-item")],e.NavigationRailItem);let Ho=class extends St{render(){return Zi('')}};Ho.styles=Ji,Ho=Re([Et("mdui-icon-circle")],Ho);let Ko=class extends St{render(){return Zi('')}};Ko.styles=Ji,Ko=Re([Et("mdui-icon-radio-button-unchecked")],Ko);const Uo=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;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;overflow:hidden;border-radius:50%;width:2.5rem;min-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]) .checked-icon{opacity:1;transform:scale(.5)}:host([invalid]) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([invalid]) .icon{color:rgb(var(--mdui-color-error))}:host([invalid]) .label{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(Ki(Fi(St))){constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.invalid=!1,this.groupDisabled=!1,this.focusable=!1,this.rippleRef=Ei()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()}get focusElement(){return this}get focusDisabled(){return this.isDisabled()||!this.focusable}onCheckedChange(){this.checked&&vi(this,"change")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",(()=>{this.isDisabled()||(this.checked=!0)}))}render(){return ct`${this.uncheckedIcon?ct``:ct``}${this.checkedIcon?ct``:ct``}`}isDisabled(){return this.disabled||this.groupDisabled}},e.Radio.styles=[Wt,Uo],Re([Pt({reflect:!0})],e.Radio.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Radio.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Radio.prototype,"checked",void 0),Re([Pt({reflect:!0,attribute:"unchecked-icon"})],e.Radio.prototype,"uncheckedIcon",void 0),Re([Pt({reflect:!0,attribute:"checked-icon"})],e.Radio.prototype,"checkedIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Radio.prototype,"invalid",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"group-disabled"})],e.Radio.prototype,"groupDisabled",void 0),Re([Mt()],e.Radio.prototype,"focusable",void 0),Re([fi("checked",!0)],e.Radio.prototype,"onCheckedChange",null),e.Radio=Re([Et("mdui-radio")],e.Radio);const qo=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*jo(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}e.RadioGroup=class extends St{constructor(){super(...arguments),this.disabled=!1,this.name="",this.value="",this.defaultValue="",this.required=!1,this.invalid=!1,this.inputRef=Ei(),this.formController=new Li(this)}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get radios(){return P(this).find("mdui-radio").get()}get radiosEnabled(){return P(this).find("mdui-radio:not([disabled])").get()}async onValueChange(){var e;vi(this,"input"),vi(this,"change"),this.radios.forEach((e=>e.checked=e.value===this.value)),this.updateRadioFocusable(),await this.updateComplete;const t=this.formController.getForm();t&&(null===(e=Bi.get(t))||void 0===e?void 0:e.has(this))?(this.invalid=!1,Bi.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}onInvalidChange(){this.radiosEnabled.forEach((e=>e.invalid=this.invalid))}onDisabledChange(){this.radios.forEach((e=>e.groupDisabled=this.disabled))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}).defaultPrevented&&(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 ct`
`}updateRadioFocusable(){const e=this.radios,t=e.find((e=>e.checked));t?e.forEach((e=>e.focusable=e===t)):this.radiosEnabled.forEach(((e,t)=>e.focusable=!t))}async onRadioClick(e){const t=e.target,i=a(t,"mdui-radio")?t:P(t).closest("mdui-radio")[0];i.disabled||(this.value=i.value,await this.updateComplete,i.focus())}onKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const i=this.radiosEnabled,o=null!==(t=i.find((e=>e.checked)))&&void 0!==t?t:i[0],r=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=i.indexOf(o)+r;n<0&&(n=i.length-1),n>i.length-1&&(n=0),this.value=i[n].value,this.updateComplete.then((()=>{i[n].focus()})),e.preventDefault()}onSlotChange(){this.radios.forEach((e=>e.checked=e.value===this.value)),this.updateRadioFocusable()}onCheckedChange(e){e.stopPropagation();const t=e.target;this.value=t.value}},e.RadioGroup.styles=[Wt,qo],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.RadioGroup.prototype,"disabled",void 0),Re([Pt({reflect:!0})],e.RadioGroup.prototype,"form",void 0),Re([Pt({reflect:!0})],e.RadioGroup.prototype,"name",void 0),Re([Pt({reflect:!0})],e.RadioGroup.prototype,"value",void 0),Re([Xi()],e.RadioGroup.prototype,"defaultValue",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.RadioGroup.prototype,"required",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.RadioGroup.prototype,"invalid",void 0),Re([fi("value",!0)],e.RadioGroup.prototype,"onValueChange",null),Re([fi("invalid")],e.RadioGroup.prototype,"onInvalidChange",null),Re([fi("disabled")],e.RadioGroup.prototype,"onDisabledChange",null),e.RadioGroup=Re([Et("mdui-radio-group")],e.RadioGroup);const Go=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;-webkit-appearance:none;appearance:none;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))}:host([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))}:host([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)}:host([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)}:host([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))}:host([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))}:host([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)}:host([invalid]) .tickmark{background-color:rgba(var(--mdui-color-error),.38)}.tickmark.active{background-color:rgba(var(--mdui-color-on-primary),.38)}:host([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 Wo extends(Ki(Fi(St))){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=Ei(),this.trackActiveRef=Ei(),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||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}).defaultPrevented&&(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}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 lo(!this.nolabel,(()=>ct`
${this.labelFormatter(e)}
`))}onChange(){vi(this,"change")}}Wo.styles=[Wt,Go],Re([Pt({type:Number,reflect:!0})],Wo.prototype,"min",void 0),Re([Pt({type:Number,reflect:!0})],Wo.prototype,"max",void 0),Re([Pt({type:Number,reflect:!0})],Wo.prototype,"step",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],Wo.prototype,"tickmarks",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],Wo.prototype,"nolabel",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],Wo.prototype,"disabled",void 0),Re([Pt({reflect:!0})],Wo.prototype,"form",void 0),Re([Pt({reflect:!0})],Wo.prototype,"name",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],Wo.prototype,"invalid",void 0),Re([Mt()],Wo.prototype,"labelVisible",void 0),Re([Pt({attribute:!1})],Wo.prototype,"labelFormatter",void 0),Re([fi("disabled",!0)],Wo.prototype,"onDisabledChange",null),e.RangeSlider=class extends Wo{constructor(){super(...arguments),this.defaultValue=[],this.currentHandle="start",this.rippleStartRef=Ei(),this.rippleEndRef=Ei(),this.handleStartRef=Ei(),this.handleEndRef=Ei(),this.formController=new Li(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=e,this.requestUpdate("value",t),this.updateComplete.then((()=>{var e;this.updateStyle();const t=this.formController.getForm();t&&(null===(e=Bi.get(t))||void 0===e?void 0:e.has(this))?(this.invalid=!1,Bi.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}))}get rippleElement(){return[this.rippleStartRef.value,this.rippleEndRef.value]}connectedCallback(){super.connectedCallback(),this.value=[this.min,this.max],this.defaultValue.length||(this.defaultValue=[...this.value]);const e=e=>{const t=P(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"},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.addEventListener("pointerdown",(t=>{this.currentHandle=e(t)})),this.addEventListener("pointermove",(t=>{const i=e(t);this.hoverHandle!==i&&(this.endHover(t),this.hoverHandle=i,this.startHover(t))}))}firstUpdated(e){super.firstUpdated(e),this.updateStyle()}render(){return ct``}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=()=>{vi(this,"input"),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=[Wo.styles],Re([Xi()],e.RangeSlider.prototype,"defaultValue",void 0),Re([Mt()],e.RangeSlider.prototype,"currentHandle",void 0),Re([Pt({type:Array,attribute:!1})],e.RangeSlider.prototype,"value",null),e.RangeSlider=Re([Et("mdui-range-slider")],e.RangeSlider);const Yo=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 qi{constructor(){super(...arguments),this.selected=!1,this.invalid=!1,this.groupDisabled=!1,this.key=yi(),this.rippleRef=Ei(),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=Mi({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 ct`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.isDisabled()||this.loading?ct`${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?ct`${this.selectedIcon?ct``:ct``}`:ct`${this.icon?ct``:Gt}`}renderLabel(){return this.hasSlotController.test("[default]")?ct``:Gt}renderEndIcon(){return ct`${this.endIcon?ct``:Gt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}},e.SegmentedButton.styles=[qi.styles,Yo],Re([Pt({reflect:!0})],e.SegmentedButton.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.SegmentedButton.prototype,"endIcon",void 0),Re([Pt({reflect:!0,attribute:"selected-icon"})],e.SegmentedButton.prototype,"selectedIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.SegmentedButton.prototype,"selected",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.SegmentedButton.prototype,"invalid",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"group-disabled"})],e.SegmentedButton.prototype,"groupDisabled",void 0),e.SegmentedButton=Re([Et("mdui-segmented-button")],e.SegmentedButton);const Xo=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;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 St{constructor(){super(...arguments),this.fullWidth=!1,this.disabled=!1,this.required=!1,this.name="",this.value="",this.defaultValue="",this.selectedKeys=[],this.invalid=!1,this.hasSetDefaultValue=!1,this.inputRef=Ei(),this.formController=new Li(this)}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return P(this).find("mdui-segmented-button").get()}get itemsEnabled(){return P(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}onSelectsChange(){!this.isSelectable&&this.selectedKeys.length&&(this.selectedKeys=[],this.onSelectedKeysChange(),this.onValueChange()),this.isSingle&&this.selectedKeys.length>1&&(this.selectedKeys=this.selectedKeys.slice(0,1),this.onSelectedKeysChange(),this.onValueChange())}onSelectedKeysChange(){const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value));this.value=this.isMultiple?e:e[0]||"",this.hasSetDefaultValue?vi(this,"change"):this.hasSetDefaultValue=!0}async onValueChange(){const e=this.hasUpdated;if(e||await this.updateComplete,!this.isSelectable)return void this.updateSelected(e);const t=(this.isSingle||c(this.value)?[this.value]:this.value).filter((e=>e));if(t.length)if(this.isSingle){const e=this.itemsEnabled.find((e=>e.value===t[0]));this.selectedKeys=e?[e.key]:[]}else this.isMultiple&&(this.selectedKeys=this.itemsEnabled.filter((e=>t.includes(e.value))).map((e=>e.key)));else this.selectedKeys=[];this.updateSelected(e)}onInvalidChange(){this.itemsEnabled.forEach((e=>e.invalid=this.invalid))}onDisabledChange(){this.items.forEach((e=>e.groupDisabled=this.disabled))}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||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}).defaultPrevented&&(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 ct`${lo(this.isSelectable&&this.isSingle,(()=>ct``))}${lo(this.isSelectable&&this.isMultiple,(()=>ct``))}`}async updateSelected(e){var t;if(this.items.forEach((e=>e.selected=this.selectedKeys.includes(e.key))),e){await this.updateComplete;const e=this.formController.getForm();e&&(null===(t=Bi.get(e))||void 0===t?void 0:t.has(this))?(this.invalid=!1,Bi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}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.selectedKeys=t}this.isSingle&&(this.selectedKeys.includes(e.key)?this.selectedKeys=[]:this.selectedKeys=[e.key]),this.updateSelected(this.hasUpdated)}onClick(e){if(e.button)return;const t=e.target.closest("mdui-segmented-button");t.disabled||this.isSelectable&&t.value&&this.selectOne(t)}onInputKeyDown(e){if(["Enter"," "].includes(e.key)){if(e.preventDefault(),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())}}onSlotChange(){const e=this.items;e.forEach(((t,i)=>{t.classList.toggle("mdui-segmented-button-first",0===i),t.classList.toggle("mdui-segmented-button-last",i===e.length-1)}))}},e.SegmentedButtonGroup.styles=[Wt,Xo],Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"full-width"})],e.SegmentedButtonGroup.prototype,"fullWidth",void 0),Re([Pt({reflect:!0})],e.SegmentedButtonGroup.prototype,"selects",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.SegmentedButtonGroup.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.SegmentedButtonGroup.prototype,"required",void 0),Re([Pt({reflect:!0})],e.SegmentedButtonGroup.prototype,"form",void 0),Re([Pt({reflect:!0})],e.SegmentedButtonGroup.prototype,"name",void 0),Re([Pt()],e.SegmentedButtonGroup.prototype,"value",void 0),Re([Xi()],e.SegmentedButtonGroup.prototype,"defaultValue",void 0),Re([Mt()],e.SegmentedButtonGroup.prototype,"selectedKeys",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.SegmentedButtonGroup.prototype,"invalid",void 0),Re([fi("selects")],e.SegmentedButtonGroup.prototype,"onSelectsChange",null),Re([fi("selectedKeys",!0)],e.SegmentedButtonGroup.prototype,"onSelectedKeysChange",null),Re([fi("value")],e.SegmentedButtonGroup.prototype,"onValueChange",null),Re([fi("invalid")],e.SegmentedButtonGroup.prototype,"onInvalidChange",null),Re([fi("disabled")],e.SegmentedButtonGroup.prototype,"onDisabledChange",null),e.SegmentedButtonGroup=Re([Et("mdui-segmented-button-group")],e.SegmentedButtonGroup);const Jo=new WeakMap;let Zo=0;const Qo=new Map,er=new WeakSet,tr=()=>new Promise((e=>requestAnimationFrame(e))),ir=(e,t)=>{const i=e-t;return 0===i?void 0:i},or=(e,t)=>{const i=e/t;return 1===i?void 0:i},rr={left:(e,t)=>{const i=ir(e,t);return{value:i,transform:i&&`translateX(${i}px)`}},top:(e,t)=>{const i=ir(e,t);return{value:i,transform:i&&`translateY(${i}px)`}},width:(e,t)=>{const i=or(e,t);return{value:i,transform:i&&`scaleX(${i})`}},height:(e,t)=>{const i=or(e,t);return{value:i,transform:i&&`scaleY(${i})`}}},nr={duration:333,easing:"ease-in-out"},sr=["left","top","width","height","opacity","color","background"],ar=new WeakMap;const lr=Vt(class extends si{constructor(e){if(super(e),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,e.type===zt)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;null===(e=this.resolveFinished)||void 0===e||e.call(this),this.finished=new Promise((e=>{this.h=e}))}async resolveFinished(){var e;null===(e=this.h)||void 0===e||e.call(this),this.h=void 0}render(e){return ht}getController(){return Jo.get(this.l)}isDisabled(){var e;return this.options.disabled||(null===(e=this.getController())||void 0===e?void 0:e.disabled)}update(e,[t]){var i;const o=void 0===this.l;return o&&(this.l=null===(i=e.options)||void 0===i?void 0:i.host,this.l.addController(this),this.element=e.element,ar.set(this.element,this)),this.optionsOrCallback=t,(o||"function"!=typeof t)&&this.u(t),this.render(t)}u(e){var t,i;e=null!=e?e:{};const o=this.getController();void 0!==o&&((e={...o.defaultOptions,...e}).keyframeOptions={...o.defaultOptions.keyframeOptions,...e.keyframeOptions}),null!==(t=(i=e).properties)&&void 0!==t||(i.properties=sr),this.options=e}v(){const e={},t=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((o=>{var r;const n=null!==(r=t[o])&&void 0!==r?r:rr[o]?void 0:i[o],s=Number(n);e[o]=isNaN(s)?n+"":s})),e}p(){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.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.o&&(this.m=Array.isArray(e)?Array.from(e):e),this.o}hostUpdate(){var e;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(e=this.t)&&void 0!==e?e:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await tr;const t=this._(),i=this.A(this.options.keyframeOptions,t),o=this.v();if(void 0!==this.g){const{from:i,to:r}=this.O(this.g,o,t);this.log("measured",[this.g,o,i,r]),e=this.calculateKeyframes(i,r)}else{const i=Qo.get(this.options.inId);if(i){Qo.delete(this.options.inId);const{from:r,to:n}=this.O(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,Zo++,e.forEach((e=>e.zIndex=Zo))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){var e;void 0!==this.P&&(this.element.setAttribute("style",null!==(e=this.P)&&void 0!==e?e:""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),null===(e=this.webAnimation)||void 0===e||e.commitStyles(),null===(t=this.webAnimation)||void 0===t||t.cancel()}reconnected(){}async disconnected(){var e;if(!this.o)return;if(void 0!==this.options.id&&Qo.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await tr(),null===(e=this.t)||void 0===e?void 0:e.isConnected){const e=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,e),this.options.stabilizeOut){const e=this.v();this.log("stabilizing out");const t=this.g.left-e.left,i=this.g.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 t=this.A(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;null===(t=(e=this.options).onStart)||void 0===t||t.call(e,this)}didFinish(e){var t,i;e&&(null===(i=(t=this.options).onComplete)||void 0===i||i.call(t,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const e=[];for(let t=this.element.parentNode;t;t=null==t?void 0:t.parentNode){const i=ar.get(t);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=er.has(this.l);return e||this.l.updateComplete.then((()=>{er.add(this.l)})),e}A(e,t=this._()){const i={...nr};return t.forEach((e=>Object.assign(i,e.options.keyframeOptions))),Object.assign(i,e),i}O(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 void 0!==o&&(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){var o;const r={},n={};let s=!1;const a={};for(const i in t){const l=e[i],c=t[i];if(i in rr){const e=rr[i];if(void 0===l||void 0===c)continue;const t=e(l,c);void 0!==t.transform&&(a[i]=t.value,s=!0,r.transform=`${null!==(o=r.transform)&&void 0!==o?o:""} ${t.transform}`)}else l!==c&&void 0!==l&&void 0!==c&&(s=!0,r[i]=l,n[i]=c)}return r.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=a,s?[r,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();null==o||o.add(this);try{await this.webAnimation.finished}catch(e){}null==o||o.remove(this)}return this.didFinish(i),i}isAnimating(){var e,t;return"running"===(null===(e=this.webAnimation)||void 0===e?void 0:e.playState)||(null===(t=this.webAnimation)||void 0===t?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}});let cr=class extends St{render(){return Zi('')}};cr.styles=Ji,cr=Re([Et("mdui-icon-cancel--outlined")],cr);let dr=class extends St{render(){return Zi('')}};dr.styles=Ji,dr=Re([Et("mdui-icon-error")],dr);let hr=class extends St{render(){return Zi('')}};hr.styles=Ji,hr=Re([Et("mdui-icon-visibility-off")],hr);let ur=class extends St{render(){return Zi('')}};ur.styles=Ji,ur=Re([Et("mdui-icon-visibility")],ur);const pr=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;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][invalid-style]) .container,:host([variant=filled][invalid]) .container{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][invalid-style]:hover) .container,:host([variant=filled][invalid]:hover) .container{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][invalid-style]) .container,:host([variant=filled][focused-style][invalid]) .container,:host([variant=filled][focused][invalid-style]) .container,:host([variant=filled][focused][invalid]) .container{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][invalid-style]) .container,:host([variant=outlined][invalid]) .container{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][invalid-style]:hover) .container,:host([variant=outlined][invalid]:hover) .container{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][invalid-style]) .container,:host([variant=outlined][focused-style][invalid]) .container,:host([variant=outlined][focused][invalid-style]) .container,:host([variant=outlined][focused][invalid]) .container{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%)}:host([invalid-style]) .right-icon,:host([invalid-style]) .suffix,:host([invalid]) .right-icon,:host([invalid]) .suffix{color:rgb(var(--mdui-color-error))}:host([invalid-style]:hover) .right-icon,:host([invalid-style]:hover) .suffix,:host([invalid]:hover) .right-icon,:host([invalid]:hover) .suffix{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style][invalid-style]) .right-icon,:host([focused-style][invalid-style]) .suffix,:host([focused-style][invalid]) .right-icon,:host([focused-style][invalid]) .suffix,:host([focused][invalid-style]) .right-icon,:host([focused][invalid-style]) .suffix,:host([focused][invalid]) .right-icon,:host([focused][invalid]) .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}.prefix{padding-right:.125rem}.suffix{padding-left:.125rem}.input-container{width: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)}:host([invalid-style]) .label,:host([invalid]) .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][invalid-style]:hover) .label,:host([variant=filled][invalid]:hover) .label,:host([variant=outlined][invalid-style]:hover) .label,:host([variant=outlined][invalid]:hover) .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-style]) .label,:host([variant=filled][focused-style][invalid]) .label,:host([variant=filled][focused][invalid-style]) .label,:host([variant=filled][focused][invalid]) .label,:host([variant=outlined][focused-style][invalid-style]) .label,:host([variant=outlined][focused-style][invalid]) .label,:host([variant=outlined][focused][invalid-style]) .label,:host([variant=outlined][focused][invalid]) .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%;border:none;outline:0;background:0 0;-webkit-appearance:none;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;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}:host([invalid-style]) .input,:host([invalid]) .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))}:host([invalid-style]) .supporting,:host([invalid]) .supporting{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]{-webkit-clip-path:inset(0 2em 0 0);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(Fi(St)){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=Ei(),this.formController=new Li(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(){var e,t;return null!==(t=null===(e=this.inputRef.value)||void 0===e?void 0:e.valueAsNumber)&&void 0!==t?t: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(){var e;if(this.hasValue=!!this.value,this.hasUpdated){await this.updateComplete;const t=this.formController.getForm();t&&(null===(e=Bi.get(t))||void 0===e?void 0:e.has(this))?(this.invalid=!1,Bi.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}onRowsChange(){this.setTextareaHeight()}async onMaxRowsChange(){if(!this.autosize)return;const e=()=>{var e;const t=P(this.inputRef.value);t.css("max-height",parseFloat(t.css("line-height"))*(null!==(e=this.maxRows)&&void 0!==e?e:1)+parseFloat(t.css("padding-top"))+parseFloat(t.css("padding-bottom")))};this.hasUpdated||await this.updateComplete,e()}async onMinRowsChange(){if(!this.autosize)return;const e=()=>{var e;const t=P(this.inputRef.value);t.css("min-height",parseFloat(t.css("line-height"))*(null!==(e=this.minRows)&&void 0!==e?e:1)+parseFloat(t.css("padding-top"))+parseFloat(t.css("padding-bottom")))};this.hasUpdated||await this.updateComplete,e()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.setTextareaHeight(),this.observeResize=Ci(this.inputRef.value,(()=>this.setTextareaHeight()))}))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.observeResize)||void 0===e||e.unobserve()}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(),vi(this,"input"),vi(this,"change"))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){const e=!!this.icon||this.hasSlotController.test("icon"),t=!!this.endIcon||this.hasSlotController.test("end-icon"),i=this.invalid||this.invalidStyle,o=!!this.helper||this.hasSlotController.test("helper"),r=i&&!(!this.error&&!this.inputRef.value.validationMessage),n=this.counter&&!!this.maxlength,s=this.hasSlotController.test("input"),a=Ni({container:!0,"has-value":this.hasValue,"has-icon":e,"has-end-icon":t,"has-error-icon":i,"is-firefox":navigator.userAgent.includes("Firefox")});return ct`
${this.renderPrefix()}
${this.renderLabel()} ${this.isTextarea?this.renderTextArea(s):this.renderInput(s)} ${lo(s,(()=>ct``))}
${this.renderClearButton()}${this.renderTogglePasswordButton()} ${this.renderSuffix(i)}
${lo(r||o||n,(()=>ct`
${this.renderHelper(r,o)} ${this.renderCounter(n)}
`))}`}onChange(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),vi(this,"change")}onClear(e){this.value="",vi(this,"clear"),vi(this,"input"),vi(this,"change"),this.focus(),e.stopPropagation()}onInput(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),vi(this,"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),t=this.value&&!this.value.match(e);this.setCustomValidity(t?"请与请求的格式匹配。":"")}}onTogglePassword(){this.isPasswordVisible=!this.isPasswordVisible}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?ct``:Gt}renderPrefix(){return ct`${this.icon?ct``:Gt}${this.prefix}`}renderSuffix(e){return ct`${this.suffix}${e?ct`${this.errorIcon?ct``:ct``}`:ct`${this.endIcon?ct``:Gt}`}`}renderClearButton(){return lo(this.clearable&&!this.disabled&&(!this.readonly||this.readonlyButClearable)&&("number"==typeof this.value||this.value.length>0),(()=>ct`${this.clearIcon?ct``:ct``}`))}renderTogglePasswordButton(){return lo("password"===this.type&&this.togglePassword&&!this.disabled,(()=>ct`${this.isPasswordVisible?ct`${this.showPasswordIcon?ct``:ct``}`:ct`${this.hidePasswordIcon?ct``:ct``}`}`))}renderInput(e){return ct``}renderTextArea(e){var t;return ct``}renderHelper(e,t){return e?ct`
${this.error||this.inputRef.value.validationMessage}
`:t?ct`${this.helper}`:ct``}renderCounter(e){return e?ct`
${this.value.length}/${this.maxlength}
`:Gt}},e.TextField.styles=[Wt,pr],Re([Pt({reflect:!0})],e.TextField.prototype,"variant",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"type",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"name",void 0),Re([Pt()],e.TextField.prototype,"value",void 0),Re([Xi()],e.TextField.prototype,"defaultValue",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"label",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"placeholder",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"helper",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"helper-on-focus"})],e.TextField.prototype,"helperOnFocus",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"clearable",void 0),Re([Pt({reflect:!0,attribute:"clear-icon"})],e.TextField.prototype,"clearIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"end-aligned"})],e.TextField.prototype,"endAligned",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"prefix",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"suffix",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.TextField.prototype,"endIcon",void 0),Re([Pt({reflect:!0,attribute:"error-icon"})],e.TextField.prototype,"errorIcon",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"form",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"readonly",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"required",void 0),Re([Pt({type:Number,reflect:!0})],e.TextField.prototype,"rows",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"autosize",void 0),Re([Pt({type:Number,reflect:!0,attribute:"min-rows"})],e.TextField.prototype,"minRows",void 0),Re([Pt({type:Number,reflect:!0,attribute:"max-rows"})],e.TextField.prototype,"maxRows",void 0),Re([Pt({type:Number,reflect:!0})],e.TextField.prototype,"minlength",void 0),Re([Pt({type:Number,reflect:!0})],e.TextField.prototype,"maxlength",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"counter",void 0),Re([Pt({type:Number,reflect:!0})],e.TextField.prototype,"min",void 0),Re([Pt({type:Number,reflect:!0})],e.TextField.prototype,"max",void 0),Re([Pt({type:Number,reflect:!0})],e.TextField.prototype,"step",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"pattern",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"toggle-password"})],e.TextField.prototype,"togglePassword",void 0),Re([Pt({reflect:!0,attribute:"show-password-icon"})],e.TextField.prototype,"showPasswordIcon",void 0),Re([Pt({reflect:!0,attribute:"hide-password-icon"})],e.TextField.prototype,"hidePasswordIcon",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"autocapitalize",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"autocorrect",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"autocomplete",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"enterkeyhint",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"spellcheck",void 0),Re([Pt({reflect:!0})],e.TextField.prototype,"inputmode",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TextField.prototype,"invalid",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"invalid-style"})],e.TextField.prototype,"invalidStyle",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"focused-style"})],e.TextField.prototype,"focusedStyle",void 0),Re([Mt()],e.TextField.prototype,"isPasswordVisible",void 0),Re([Mt()],e.TextField.prototype,"hasValue",void 0),Re([Mt()],e.TextField.prototype,"error",void 0),Re([fi("disabled",!0)],e.TextField.prototype,"onDisabledChange",null),Re([fi("value")],e.TextField.prototype,"onValueChange",null),Re([fi("rows",!0)],e.TextField.prototype,"onRowsChange",null),Re([fi("maxRows")],e.TextField.prototype,"onMaxRowsChange",null),Re([fi("minRows")],e.TextField.prototype,"onMinRowsChange",null),e.TextField=Re([Et("mdui-text-field")],e.TextField);const mr=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(Fi(St)){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=Ei(),this.textFieldRef=Ei(),this.hiddenInputRef=Ei(),this.formController=new Li(this),this.hasSlotController=new jt(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper")}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.updateComplete.then((()=>{this.observeResize=Ci(this.textFieldRef.value,(()=>this.resizeMenu()))}))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.observeResize)||void 0===e||e.unobserve()}checkValidity(){const e=this.hiddenInputRef.value.checkValidity();return e||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(vi(this,"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.requestUpdate()}render(){var e;const t=this.multiple?!!this.value.length:!!this.value;return ct`${this.multiple?ct``:ct``}${jo(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(e=>this.hasSlotController.test(e)?ct``:ht))} ${lo(this.multiple&&this.value.length,(()=>ct`
${jo(this.value,(e=>ct`${this.getMenuItemLabelByValue(e)}`))}
`))}
`}getMenuItemLabelByValue(e){var t;return this.menuItems.length&&(null===(t=this.menuItems.find((t=>t.value===e)))||void 0===t?void 0:t.textContent)||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}async onValueChange(e){var t,i;const o=e.target;this.value=this.multiple?o.value.map((e=>null!=e?e:"")):null!==(t=o.value)&&void 0!==t?t:"",await this.updateComplete;const r=this.formController.getForm();r&&(null===(i=Bi.get(r))||void 0===i?void 0:i.has(this))?(this.invalid=!1,Bi.get(r).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.enabledWarnings=["migration"],e.Select.styles=[Wt,mr],Re([Pt({reflect:!0})],e.Select.prototype,"variant",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Select.prototype,"multiple",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"name",void 0),Re([Pt()],e.Select.prototype,"value",void 0),Re([Xi()],e.Select.prototype,"defaultValue",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"label",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"placeholder",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"helper",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Select.prototype,"clearable",void 0),Re([Pt({reflect:!0,attribute:"clear-icon"})],e.Select.prototype,"clearIcon",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"placement",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"end-aligned"})],e.Select.prototype,"endAligned",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"prefix",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"suffix",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"icon",void 0),Re([Pt({reflect:!0,attribute:"end-icon"})],e.Select.prototype,"endIcon",void 0),Re([Pt({reflect:!0,attribute:"error-icon"})],e.Select.prototype,"errorIcon",void 0),Re([Pt({reflect:!0})],e.Select.prototype,"form",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Select.prototype,"readonly",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Select.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Select.prototype,"required",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Select.prototype,"invalid",void 0),Re([Lt({flatten:!0,selector:"mdui-menu-item"})],e.Select.prototype,"menuItems",void 0),e.Select=Re([Et("mdui-select")],e.Select);const vr=Pe`.track-active{left:-.125rem;border-radius:var(--mdui-shape-corner-full) 0 0 var(--mdui-shape-corner-full)}`;e.Slider=class extends Wo{constructor(){super(...arguments),this.value=0,this.defaultValue=0,this.rippleRef=Ei(),this.handleRef=Ei(),this.formController=new Li(this)}get rippleElement(){return this.rippleRef.value}onValueChange(){var e;const t=this.formController.getForm();t&&(null===(e=Bi.get(t))||void 0===e?void 0:e.has(this))?(this.invalid=!1,Bi.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity(),this.inputRef.value.value=this.value.toString(),this.value=parseFloat(this.inputRef.value.value),this.updateStyle()}connectedCallback(){super.connectedCallback(),this.valuethis.max&&(this.value=this.max);const e=()=>{this.disabled||(this.labelVisible=!0)},t=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",e),this.addEventListener("mousedown",e),this.addEventListener("touchend",t),this.addEventListener("mouseup",t)}firstUpdated(e){super.firstUpdated(e),this.updateStyle()}render(){return ct``}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),vi(this,"input"),this.updateStyle()}},e.Slider.styles=[Wo.styles,vr],Re([Pt({type:Number})],e.Slider.prototype,"value",void 0),Re([Xi()],e.Slider.prototype,"defaultValue",void 0),Re([fi("value",!0)],e.Slider.prototype,"onValueChange",null),e.Slider=Re([Et("mdui-slider")],e.Slider);const fr=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 St{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=zo().down("sm"),t=["top","bottom"].includes(this.placement),i=vo(this,"linear"),o=vo(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(vi(this,"open",{cancelable:!0}).defaultPrevented)return}window.clearTimeout(this.closeTimeout),this.autoCloseDelay&&(this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.autoCloseDelay)),this.style.display="flex",await Promise.all([ho(this),...r.map((e=>ho(e)))]);const a=fo(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([co(this,[{...l("start"),...n},{...l("end"),...n}],{duration:s?a:0,easing:o,fill:"forwards"}),co(this,[{opacity:0},{opacity:1,offset:.5},{opacity:1}],{duration:s?a:0,easing:i,fill:"forwards"}),...r.map((e=>co(e,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:s?a:0,easing:i})))]),void(s&&vi(this,"opened"))}if(!this.open&&this.hasUpdated){if(vi(this,"close",{cancelable:!0}).defaultPrevented)return;window.clearTimeout(this.closeTimeout),await Promise.all([ho(this),...r.map((e=>ho(e)))]);const o=fo(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([co(this,[{...s("start"),...n},{...s("end"),...n}],{duration:o,easing:i,fill:"forwards"}),...r.map((e=>co(e,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:o,easing:i})))]),this.style.display="none",void vi(this,"closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick)}render(){return ct`
${this.action?ct`${this.action}`:Gt}${lo(this.closeable,(()=>ct`${this.closeIcon?ct``:ct``}`))}
`}onDocumentClick(e){if(!this.open||!this.closeOnOutsideClick)return;const t=e.target;this.contains(t)||this===t||(this.open=!1)}onActionClick(e){e.stopPropagation(),vi(this,"action-click")}onCloseClick(){this.open=!1}},e.Snackbar.styles=[Wt,fr],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Snackbar.prototype,"open",void 0),Re([Pt({reflect:!0})],e.Snackbar.prototype,"placement",void 0),Re([Pt({reflect:!0,attribute:"action"})],e.Snackbar.prototype,"action",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"action-loading"})],e.Snackbar.prototype,"actionLoading",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Snackbar.prototype,"closeable",void 0),Re([Pt({reflect:!0,attribute:"close-icon"})],e.Snackbar.prototype,"closeIcon",void 0),Re([Pt({type:Number,reflect:!0,attribute:"message-line"})],e.Snackbar.prototype,"messageLine",void 0),Re([Pt({type:Number,reflect:!0,attribute:"auto-close-delay"})],e.Snackbar.prototype,"autoCloseDelay",void 0),Re([Pt({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:mi})],e.Snackbar.prototype,"closeOnOutsideClick",void 0),Re([fi("open")],e.Snackbar.prototype,"onOpenChange",null),e.Snackbar=Re([Et("mdui-snackbar")],e.Snackbar);const gr=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}:host([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))}:host([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)}:host([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(Ki(Fi(St))){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=Ei(),this.inputRef=Ei(),this.formController=new Li(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(){var e;await this.updateComplete;const t=this.formController.getForm();t&&(null===(e=Bi.get(t))||void 0===e?void 0:e.has(this))?(this.invalid=!1,Bi.get(t).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){vi(this,"invalid",{bubbles:!1,cancelable:!0,composed:!1}).defaultPrevented&&(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ct``}onChange(){this.checked=this.inputRef.value.checked,vi(this,"change")}},e.Switch.styles=[Wt,gr],Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Switch.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Switch.prototype,"checked",void 0),Re([Xi("checked")],e.Switch.prototype,"defaultChecked",void 0),Re([Pt({reflect:!0,attribute:"unchecked-icon"})],e.Switch.prototype,"uncheckedIcon",void 0),Re([Pt({reflect:!0,attribute:"checked-icon"})],e.Switch.prototype,"checkedIcon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Switch.prototype,"required",void 0),Re([Pt({reflect:!0})],e.Switch.prototype,"form",void 0),Re([Pt({reflect:!0})],e.Switch.prototype,"name",void 0),Re([Pt({reflect:!0})],e.Switch.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Switch.prototype,"invalid",void 0),Re([fi("disabled",!0),fi("required",!0)],e.Switch.prototype,"onDisabledChange",null),Re([fi("checked",!0)],e.Switch.prototype,"onCheckedChange",null),e.Switch=Re([Et("mdui-switch")],e.Switch);const br=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(Ki(Fi(St))){constructor(){super(...arguments),this.inline=!1,this.active=!1,this.variant="primary",this.key=yi(),this.rippleRef=Ei(),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=()=>ct``;return ct`
${lo(e||this.icon,i)}${this.icon?ct``:Gt}
${lo(!e,i)}
`}},e.Tab.styles=[Wt,br],Re([Pt({reflect:!0})],e.Tab.prototype,"value",void 0),Re([Pt({reflect:!0})],e.Tab.prototype,"icon",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Tab.prototype,"inline",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Tab.prototype,"active",void 0),Re([Pt({reflect:!0})],e.Tab.prototype,"variant",void 0),e.Tab=Re([Et("mdui-tab")],e.Tab);const yr=Pe`:host{display:block;overflow-y:auto;flex:1 1 auto}:host(:not([active])){display:none}`;e.TabPanel=class extends St{constructor(){super(...arguments),this.active=!1}render(){return ct``}},e.TabPanel.styles=[Wt,yr],Re([Pt({reflect:!0})],e.TabPanel.prototype,"value",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TabPanel.prototype,"active",void 0),e.TabPanel=Re([Et("mdui-tab-panel")],e.TabPanel);const wr=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;transition-duration:var(--mdui-motion-duration-medium2);transition-timing-function:var(--mdui-motion-easing-standard-decelerate);background-color:rgb(var(--mdui-color-primary))}: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 St{constructor(){super(...arguments),this.variant="primary",this.placement="top-start",this.fullWidth=!1,this.activeKey=0,this.tabs=[],this.panels=[],this.containerRef=Ei(),this.indicatorRef=Ei()}onActiveKeyChange(){var e;this.value=null===(e=this.tabs.find((e=>e.key===this.activeKey)))||void 0===e?void 0:e.value,vi(this,"change")}onValueChange(){var e;const t=this.tabs.find((e=>e.value===this.value));this.activeKey=null!==(e=null==t?void 0:t.key)&&void 0!==e?e:0,this.updateActive()}onIndicatorChange(){this.updateIndicator()}connectedCallback(){super.connectedCallback(),this.syncTabsAndPanels(),this.updateComplete.then((()=>{this.observeResize=Ci(this.containerRef.value,(()=>this.updateIndicator()))}))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.observeResize)||void 0===e||e.unobserve()}render(){return ct`
`}syncTabsAndPanels(){this.tabs=P(this).find("mdui-tab").get(),this.panels=P(this).find('mdui-tab-panel[slot="panel"]').get()}onSlotChange(){this.syncTabsAndPanels(),this.updateActive()}onClick(e){if(e.button)return;const t=e.target.closest("mdui-tab");this.activeKey=t.key,this.updateActive()}updateActive(){this.activeTab=this.tabs.map((e=>(e.active=this.activeKey===e.key,e))).find((e=>e.active)),this.panels.forEach((e=>{var t;return e.active=e.value===(null===(t=this.activeTab)||void 0===t?void 0:t.value)})),this.updateIndicator()}async updateIndicator(){await this.updateComplete;const e=this.activeTab,t=P(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=P(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"]').get(),s=t.length?t:P(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=[Wt,wr],Re([Pt({reflect:!0})],e.Tabs.prototype,"variant",void 0),Re([Pt({reflect:!0})],e.Tabs.prototype,"value",void 0),Re([Pt({reflect:!0})],e.Tabs.prototype,"placement",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi,attribute:"full-width"})],e.Tabs.prototype,"fullWidth",void 0),Re([Mt()],e.Tabs.prototype,"activeKey",void 0),Re([fi("activeKey",!0)],e.Tabs.prototype,"onActiveKeyChange",null),Re([fi("value")],e.Tabs.prototype,"onValueChange",null),Re([fi("variant",!0),fi("placement",!0),fi("fullWidth",!0)],e.Tabs.prototype,"onIndicatorChange",null),e.Tabs=Re([Et("mdui-tabs")],e.Tabs);class kr{constructor(e,t){this.isHover=!1,this.uniqueID=yi(),this.enterEventName=`mouseenter.${this.uniqueID}.hoverController`,this.leaveEventName=`mouseleave.${this.uniqueID}.hoverController`,this.mouseEnterItems=[],this.mouseLeaveItems=[],(this.host=e).addController(this),this.elementRef=t,this.host.updateComplete.then((()=>{P(this.elementRef.value).on(this.enterEventName,(()=>{this.isHover=!0,this.mouseEnterItems.forEach(((e,t,i)=>{e.callback(),e.one&&i.splice(t,1)}))})).on(this.leaveEventName,(()=>{this.isHover=!1,this.mouseLeaveItems.forEach(((e,t,i)=>{e.callback(),e.one&&i.splice(t,1)}))}))}))}hostDisconnected(){P(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 Cr=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 St{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=Ei(),this.hasSlotController=new jt(this,"headline","action"),this.hoverController=new kr(this,this.popupRef),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)}async onPositionChange(){this.open&&this.updatePositioner()}async onOpenChange(){const e=this.hasUpdated,t=fo(this,"short4"),i=vo(this,"standard");if(this.open){if(P(`mdui-tooltip[variant="${this.variant}"]`).filter(((e,t)=>t!==this)).prop("open",!1),e||await this.updateComplete,e){if(vi(this,"open",{cancelable:!0}).defaultPrevented)return}return await ho(this.popupRef.value),this.popupRef.value.hidden=!1,this.updatePositioner(),await co(this.popupRef.value,[{transform:"scale(0)"},{transform:"scale(1)"}],{duration:e?t:0,easing:i}),void(e&&vi(this,"opened"))}if(!this.open&&e){if(vi(this,"close",{cancelable:!0}).defaultPrevented)return;return await ho(this.popupRef.value),await co(this.popupRef.value,[{transform:"scale(1)"},{transform:"scale(0)"}],{duration:t,easing:i}),this.popupRef.value.hidden=!0,void vi(this,"closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),window.addEventListener("scroll",this.onWindowScroll),this.updateComplete.then((()=>{this.observeResize=Ci(this.target,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),window.removeEventListener("scroll",this.onWindowScroll),null===(e=this.observeResize)||void 0===e||e.unobserve()}firstUpdated(e){super.firstUpdated(e),this.target=this.getTarget(),this.target.addEventListener("focus",this.onFocus),this.target.addEventListener("blur",this.onBlur),this.target.addEventListener("pointerdown",this.onClick),this.target.addEventListener("keydown",this.onKeydown),this.target.addEventListener("mouseenter",this.onMouseEnter),this.target.addEventListener("mouseleave",this.onMouseLeave)}render(){const e=this.isRich()&&(this.headline||this.hasSlotController.test("headline")),t=this.isRich()&&this.hasSlotController.test("action");return ct``}isRich(){return"rich"===this.variant}async 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}getTarget(){return[...this.children].find((e=>"style"!==e.tagName.toLowerCase()&&"content"!==e.getAttribute("slot")))}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=P(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,v=this.placement;if("auto"===v){const e=P(window),t=o>d,i=e.height()-o-n>d,a=r>c,l=e.width()-r-s>c;this.isRich()?(v="bottom-right",i&&l?v="bottom-right":i&&a?v="bottom-left":t&&l?v="top-right":t&&a?v="top-left":i?v="bottom":t?v="top":l?v="right":a&&(v="left")):(v="top",t?v="top":i?v="bottom":a?v="left":l&&(v="right"))}const[f,g]=v.split("-");switch(f){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(f){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=[Wt,Cr],Re([Pt({reflect:!0})],e.Tooltip.prototype,"variant",void 0),Re([Pt({reflect:!0})],e.Tooltip.prototype,"placement",void 0),Re([Pt({type:Number,reflect:!0,attribute:"open-delay"})],e.Tooltip.prototype,"openDelay",void 0),Re([Pt({type:Number,reflect:!0,attribute:"close-delay"})],e.Tooltip.prototype,"closeDelay",void 0),Re([Pt({reflect:!0})],e.Tooltip.prototype,"headline",void 0),Re([Pt({reflect:!0})],e.Tooltip.prototype,"content",void 0),Re([Pt({reflect:!0})],e.Tooltip.prototype,"trigger",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Tooltip.prototype,"disabled",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.Tooltip.prototype,"open",void 0),Re([fi("placement",!0),fi("content",!0)],e.Tooltip.prototype,"onPositionChange",null),Re([fi("open")],e.Tooltip.prototype,"onOpenChange",null),e.Tooltip=Re([Et("mdui-tooltip")],e.Tooltip);const xr=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)}:host([variant=center-aligned]) .label{text-align:center}:host([variant=large]:not([shrink])) .label,:host([variant=medium]:not([shrink])) .label{opacity:0}:host([variant=large][shrink]) .label,:host([variant=medium][shrink]) .label{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)}:host([variant=large]) .label-large,:host([variant=medium]) .label-large{display:block}:host([variant=medium]) .label-large{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)}:host([variant=large]) .label-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)}:host([variant=large]:not([shrink])) .label-large,:host([variant=medium]:not([shrink])) .label-large{opacity:1;transition-delay:var(--mdui-motion-duration-short2)}:host([variant=large][shrink]) .label-large,:host([variant=medium][shrink]) .label-large{opacity:0;z-index:-1}`;e.TopAppBarTitle=class extends St{constructor(){super(...arguments),this.variant="small",this.shrink=!1,this.hasSlotController=new jt(this,"label-large"),this.labelLargeRef=Ei(),this.defaultSlotRef=Ei()}render(){const e=this.hasSlotController.test("label-large");return ct`${e?ct``:ct`
`}`}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=[Wt,xr],Re([Pt({reflect:!0})],e.TopAppBarTitle.prototype,"variant",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TopAppBarTitle.prototype,"shrink",void 0),e.TopAppBarTitle=Re([Et("mdui-top-app-bar-title")],e.TopAppBarTitle);const $r=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 Rr(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.TopAppBar=class extends(gi(Si)){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",(()=>{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}))}connectedCallback(){super.connectedCallback(),this.addEventListener("transitionend",(e=>{e.target===this&&vi(this,this.hide?"hidden":"shown")}))}render(){return ct``}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){vi(this,"hide").defaultPrevented||(this.hide=!0)}if(e&&this.hide){vi(this,"show").defaultPrevented||(this.hide=!1)}}}},e.TopAppBar.styles=[Wt,$r],Re([Pt({reflect:!0})],e.TopAppBar.prototype,"variant",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TopAppBar.prototype,"hide",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TopAppBar.prototype,"shrink",void 0),Re([Pt({reflect:!0,attribute:"scroll-behavior"})],e.TopAppBar.prototype,"scrollBehavior",void 0),Re([Pt({type:Boolean,reflect:!0,converter:mi})],e.TopAppBar.prototype,"scrolling",void 0),Re([Lt({selector:"mdui-top-app-bar-title",flatten:!0})],e.TopAppBar.prototype,"titleElements",void 0),Re([fi("variant")],e.TopAppBar.prototype,"onVariantChange",null),Re([fi("shrink")],e.TopAppBar.prototype,"onShrinkChange",null),e.TopAppBar=Re([Et("mdui-top-app-bar")],e.TopAppBar);const Sr={};function Tr(e,t){if(u(Sr[e])&&(Sr[e]=[]),u(t))return Sr[e];Sr[e].push(t)}function Er(e){if(u(Sr[e]))return;if(!Sr[e].length)return;Sr[e].shift()()}const Ir={onClick:x},Ar="mdui.functions.dialog.";let Pr;const Mr=t=>{const i=new e.Dialog,o=P(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({},Ir,e);P(`${t.text}`).appendTo(o).on("click",(function(){const e=t.onClick.call(i,i);Rr(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&&(Pr=void 0,Er(Ar+t.queue))})),t.queue?Pr?Tr(Ar+t.queue,(()=>{i.open=!0,Pr=i})):(setTimeout((()=>{i.open=!0})),Pr=i):setTimeout((()=>{i.open=!0})),i},Dr={confirmText:"确定",onConfirm:x},Br={confirmText:"确定",cancelText:"取消",onConfirm:x,onCancel:x};function Lr(e){return e<0?-1:0===e?0:1}function _r(e,t,i){return(1-i)*e+i*t}function Or(e,t,i){return it?t:i}function zr(e){return(e%=360)<0&&(e+=360),e}function Fr(e){return(e%=360)<0&&(e+=360),e}function Nr(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function Vr(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 Hr=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],Kr=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Ur=[95.047,100,108.883];function qr(e,t,i){return(255<<24|(255&e)<<16|(255&t)<<8|255&i)>>>0}function jr(e){return qr(tn(e[0]),tn(e[1]),tn(e[2]))}function Gr(e){return e>>16&255}function Wr(e){return e>>8&255}function Yr(e){return 255&e}function Xr(e,t,i){const o=Kr,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 qr(tn(r),tn(n),tn(s))}function Jr(e){const t=function(e){return Vr([en(Gr(e)),en(Wr(e)),en(Yr(e))],Hr)}(e)[1];return 116*on(t/100)-16}function Zr(e){return 100*rn((e+16)/116)}function Qr(e){return 116*on(e/100)-16}function en(e){const t=e/255;return t<=.040449936?t/12.92*100:100*Math.pow((t+.055)/1.055,2.4)}function tn(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 on(e){return e>216/24389?Math.pow(e,1/3):(903.2962962962963*e+16)/116}function rn(e){const t=e*e*e;return t>216/24389?t:(116*e-16)/903.2962962962963}class nn{static make(e=function(){return Ur}(),t=200/Math.PI*Zr(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?_r(.59,.69,10*(c-.9)):_r(.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),v=m*m*m*m,f=1-v,g=v*t+.1*f*f*Math.cbrt(5*t),b=Zr(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 nn(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}}nn.DEFAULT=nn.make();class sn{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 sn.fromIntInViewingConditions(e,nn.DEFAULT)}static fromIntInViewingConditions(e,t){const i=(65280&e)>>8,o=255&e,r=en((16711680&e)>>16),n=en(i),s=en(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,v=t.rgbD[2]*u,f=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(v)/100,.42),y=400*Lr(p)*f/(f+27.13),w=400*Lr(m)*g/(g+27.13),k=400*Lr(v)*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,S=180*Math.atan2(x,C)/Math.PI,T=S<0?S+360:S>=360?S-360:S,E=T*Math.PI/180,I=R*t.nbb,A=100*Math.pow(I/t.aw,t.c*t.z),P=4/t.c*Math.sqrt(A/100)*(t.aw+4)*t.fLRoot,M=T<20.14?T+360:T,D=5e4/13*(.25*(Math.cos(M*Math.PI/180+2)+3.8))*t.nc*t.ncb*Math.sqrt(C*C+x*x)/($+.305),B=Math.pow(D,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),L=B*Math.sqrt(A/100),_=L*t.fLRoot,O=50*Math.sqrt(B*t.c/(t.aw+4)),z=(1+100*.007)*A/(1+.007*A),F=1/.0228*Math.log(1+.0228*_),N=F*Math.cos(E),V=F*Math.sin(E);return new sn(T,L,A,P,_,O,z,N,V)}static fromJch(e,t,i){return sn.fromJchInViewingConditions(e,t,i,nn.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 sn(i,t,e,r,n,a,c,h,u)}static fromUcs(e,t,i){return sn.fromUcsInViewingConditions(e,t,i,nn.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 sn.fromJchInViewingConditions(c,a,l,o)}toInt(){return this.viewed(nn.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,v=(460*a-220*h-6300*u)/1403,f=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Lr(p)*(100/e.fl)*Math.pow(f,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Lr(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),k=Lr(v)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],x=y/e.rgbD[1],$=k/e.rgbD[2];return Xr(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*Lr(a)*d/(d+27.13),m=400*Lr(l)*h/(h+27.13),v=400*Lr(c)*u/(u+27.13),f=(11*p+-12*m+v)/11,g=(p+m-2*v)/9,b=(20*p+20*m+21*v)/20,y=(40*p+20*m+v)/20,w=180*Math.atan2(g,f)/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,S=k<20.14?k+360:k,T=5e4/13*(1/4*(Math.cos(S*Math.PI/180+2)+3.8))*o.nc*o.ncb*Math.sqrt(f*f+g*g)/(b+.305),E=Math.pow(T,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),I=E*Math.sqrt($/100),A=I*o.fLRoot,P=50*Math.sqrt(E*o.c/(o.aw+4)),M=(1+100*.007)*$/(1+.007*$),D=Math.log(1+.0228*A)/.0228,B=D*Math.cos(C),L=D*Math.sin(C);return new sn(k,I,$,R,A,P,M,B,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,v=(460*a-220*h-6300*u)/1403,f=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Lr(p)*(100/e.fl)*Math.pow(f,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Lr(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(v)/(400-Math.abs(v))),k=Lr(v)*(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 an{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*Lr(e)*t/(t+27.13)}static hueOf(e){const t=Vr(e,an.SCALED_DISCOUNT_FROM_LINRGB),i=an.chromaticAdaptation(t[0]),o=an.chromaticAdaptation(t[1]),r=an.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 an.sanitizeRadians(t-e)100.01||y[1]>100.01||y[2]>100.01?0:jr(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=tn(Zr(e));return qr(t,t,t)}(i);const o=(e=Fr(e))/180*Math.PI,r=Zr(i),n=an.findResultByJ(o,t,r);if(0!==n)return n;return jr(an.bisectToLimit(r,o))}static solveToCam(e,t,i){return sn.fromInt(an.solveToInt(e,t,i))}}an.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],an.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],an.Y_FROM_LINRGB=[.2126,.7152,.0722],an.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 ln{static from(e,t,i){return new ln(an.solveToInt(e,t,i))}static fromInt(e){return new ln(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(an.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(an.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(an.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const t=sn.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Jr(e),this.argb=e}setInternalState(e){const t=sn.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Jr(e),this.argb=e}inViewingConditions(e){const t=sn.fromInt(this.toInt()).xyzInViewingConditions(e),i=sn.fromXyzInViewingConditions(t[0],t[1],t[2],nn.make());return ln.from(i.hue,i.chroma,Qr(t[1]))}}class cn{static harmonize(e,t){const i=ln.fromInt(e),o=ln.fromInt(t),r=Nr(i.hue,o.hue),n=Math.min(.5*r,15),s=Fr(i.hue+n*(a=i.hue,Fr(o.hue-a)<=180?1:-1));var a;return ln.from(s,i.chroma,i.tone).toInt()}static hctHue(e,t,i){const o=cn.cam16Ucs(e,t,i),r=sn.fromInt(o),n=sn.fromInt(e);return ln.from(r.hue,n.chroma,Jr(e)).toInt()}static cam16Ucs(e,t,i){const o=sn.fromInt(e),r=sn.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 sn.fromUcs(l,c,d).toInt()}}class dn{static ratioOfTones(e,t){return e=Or(0,100,e),t=Or(0,100,t),dn.ratioOfYs(Zr(e),Zr(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=Zr(e),o=t*(i+5)-5,r=dn.ratioOfYs(o,i),n=Math.abs(r-t);if(r.04)return-1;const s=Qr(o)+.4;return s<0||s>100?-1:s}static darker(e,t){if(e<0||e>100)return-1;const i=Zr(e),o=(i+5)/t-5,r=dn.ratioOfYs(i,o),n=Math.abs(r-t);if(r.04)return-1;const s=Qr(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(e,t){const i=dn.lighter(e,t);return i<0?100:i}static darkerUnsafe(e,t){const i=dn.darker(e,t);return i<0?0:i}}class hn{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 hn.isDisliked(e)?ln.from(e.hue,e.chroma,70):e}}class un{static fromPalette(e){return new un(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.getContrast(e.contrastLevel),v=h.contrastCurve.getContrast(e.contrastLevel),f=d.tone(e);let g=dn.ratioOfTones(l,f)>=m?f:un.foregroundTone(l,m);const b=h.tone(e);let y=dn.ratioOfTones(l,b)>=v?b:un.foregroundTone(l,v);return t&&(g=un.foregroundTone(l,m),y=un.foregroundTone(l,v)),(y-g)*p>=n||(y=Or(0,100,g+n*p),(y-g)*p>=n||(g=Or(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.getContrast(e.contrastLevel);if(dn.ratioOfTones(o,i)>=r||(i=un.foregroundTone(o,r)),t&&(i=un.foregroundTone(o,r)),this.isBackground&&50<=i&&i<60&&(i=dn.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(dn.ratioOfTones(a,i)>=r&&dn.ratioOfTones(l,i)>=r)return i;const c=dn.lighter(a,r),d=dn.darker(l,r),h=[];-1!==c&&h.push(c),-1!==d&&h.push(d);return un.tonePrefersLightForeground(n)||un.tonePrefersLightForeground(s)?c<0?100:c:1===h.length?h[0]:d<0?0:d}return i}}static foregroundTone(e,t){const i=dn.lighterUnsafe(e,t),o=dn.darkerUnsafe(e,t),r=dn.ratioOfTones(i,e),n=dn.ratioOfTones(o,e);if(un.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 un.tonePrefersLightForeground(e)&&!un.toneAllowsLightForeground(e)?49:e}}var pn;!function(e){e[e.MONOCHROME=0]="MONOCHROME",e[e.NEUTRAL=1]="NEUTRAL",e[e.TONAL_SPOT=2]="TONAL_SPOT",e[e.VIBRANT=3]="VIBRANT",e[e.EXPRESSIVE=4]="EXPRESSIVE",e[e.FIDELITY=5]="FIDELITY",e[e.CONTENT=6]="CONTENT",e[e.RAINBOW=7]="RAINBOW",e[e.FRUIT_SALAD=8]="FRUIT_SALAD"}(pn||(pn={}));class mn{constructor(e,t,i,o){this.low=e,this.normal=t,this.medium=i,this.high=o}getContrast(e){return e<=-1?this.low:e<0?_r(this.low,this.normal,(e- -1)/1):e<.5?_r(this.normal,this.medium,(e-0)/.5):e<1?_r(this.medium,this.high,(e-.5)/.5):this.high}}class vn{constructor(e,t,i,o,r){this.roleA=e,this.roleB=t,this.delta=i,this.polarity=o,this.stayTogether=r}}function fn(e){return e.variant===pn.FIDELITY||e.variant===pn.CONTENT}function gn(e){return e.variant===pn.MONOCHROME}function bn(e,t){const i=e.inViewingConditions(function(e){return nn.make(void 0,void 0,e.isDark?30:80,void 0,void 0)}(t));return un.tonePrefersLightForeground(e.tone)&&!un.toneAllowsLightForeground(i.tone)?un.enableLightForeground(e.tone):un.enableLightForeground(i.tone)}class yn{static highestSurface(e){return e.isDark?yn.surfaceBright:yn.surfaceDim}}yn.contentAccentToneDelta=15,yn.primaryPaletteKeyColor=un.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),yn.secondaryPaletteKeyColor=un.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),yn.tertiaryPaletteKeyColor=un.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),yn.neutralPaletteKeyColor=un.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),yn.neutralVariantPaletteKeyColor=un.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),yn.background=un.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),yn.onBackground=un.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>yn.background,contrastCurve:new mn(3,3,4.5,7)}),yn.surface=un.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),yn.surfaceDim=un.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:87,isBackground:!0}),yn.surfaceBright=un.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?24:98,isBackground:!0}),yn.surfaceContainerLowest=un.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:100,isBackground:!0}),yn.surfaceContainerLow=un.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?10:96,isBackground:!0}),yn.surfaceContainer=un.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?12:94,isBackground:!0}),yn.surfaceContainerHigh=un.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?17:92,isBackground:!0}),yn.surfaceContainerHighest=un.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?22:90,isBackground:!0}),yn.onSurface=un.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>yn.highestSurface(e),contrastCurve:new mn(4.5,7,11,21)}),yn.surfaceVariant=un.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),yn.onSurfaceVariant=un.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>yn.highestSurface(e),contrastCurve:new mn(3,4.5,7,11)}),yn.inverseSurface=un.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),yn.inverseOnSurface=un.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>yn.inverseSurface,contrastCurve:new mn(4.5,7,11,21)}),yn.outline=un.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>yn.highestSurface(e),contrastCurve:new mn(1.5,3,4.5,7)}),yn.outlineVariant=un.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7)}),yn.shadow=un.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0}),yn.scrim=un.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0}),yn.surfaceTint=un.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),yn.primary=un.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>gn(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(3,4.5,7,11),toneDeltaPair:e=>new vn(yn.primaryContainer,yn.primary,15,"nearer",!1)}),yn.onPrimary=un.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>gn(e)?e.isDark?10:90:e.isDark?20:100,background:e=>yn.primary,contrastCurve:new mn(4.5,7,11,21)}),yn.primaryContainer=un.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>fn(e)?bn(e.sourceColorHct,e):gn(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.primaryContainer,yn.primary,15,"nearer",!1)}),yn.onPrimaryContainer=un.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>fn(e)?un.foregroundTone(yn.primaryContainer.tone(e),4.5):gn(e)?e.isDark?0:100:e.isDark?90:10,background:e=>yn.primaryContainer,contrastCurve:new mn(4.5,7,11,21)}),yn.inversePrimary=un.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>yn.inverseSurface,contrastCurve:new mn(3,4.5,7,11)}),yn.secondary=un.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(3,4.5,7,11),toneDeltaPair:e=>new vn(yn.secondaryContainer,yn.secondary,15,"nearer",!1)}),yn.onSecondary=un.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>gn(e)?e.isDark?10:100:e.isDark?20:100,background:e=>yn.secondary,contrastCurve:new mn(4.5,7,11,21)}),yn.secondaryContainer=un.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;if(gn(e))return e.isDark?30:85;if(!fn(e))return t;let i=function(e,t,i,o){let r=i,n=ln.from(e,t,i);if(n.chromas.chroma)break;if(Math.abs(s.chroma-t)<.4)break;Math.abs(s.chroma-t)yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.secondaryContainer,yn.secondary,15,"nearer",!1)}),yn.onSecondaryContainer=un.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>fn(e)?un.foregroundTone(yn.secondaryContainer.tone(e),4.5):e.isDark?90:10,background:e=>yn.secondaryContainer,contrastCurve:new mn(4.5,7,11,21)}),yn.tertiary=un.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(3,4.5,7,11),toneDeltaPair:e=>new vn(yn.tertiaryContainer,yn.tertiary,15,"nearer",!1)}),yn.onTertiary=un.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?e.isDark?10:90:e.isDark?20:100,background:e=>yn.tertiary,contrastCurve:new mn(4.5,7,11,21)}),yn.tertiaryContainer=un.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(gn(e))return e.isDark?60:49;if(!fn(e))return e.isDark?30:90;const t=bn(e.tertiaryPalette.getHct(e.sourceColorHct.tone),e),i=e.tertiaryPalette.getHct(t);return hn.fixIfDisliked(i).tone},isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.tertiaryContainer,yn.tertiary,15,"nearer",!1)}),yn.onTertiaryContainer=un.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?e.isDark?0:100:fn(e)?un.foregroundTone(yn.tertiaryContainer.tone(e),4.5):e.isDark?90:10,background:e=>yn.tertiaryContainer,contrastCurve:new mn(4.5,7,11,21)}),yn.error=un.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(3,4.5,7,11),toneDeltaPair:e=>new vn(yn.errorContainer,yn.error,15,"nearer",!1)}),yn.onError=un.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>yn.error,contrastCurve:new mn(4.5,7,11,21)}),yn.errorContainer=un.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.errorContainer,yn.error,15,"nearer",!1)}),yn.onErrorContainer=un.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?90:10,background:e=>yn.errorContainer,contrastCurve:new mn(4.5,7,11,21)}),yn.primaryFixed=un.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>gn(e)?40:90,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.primaryFixed,yn.primaryFixedDim,10,"lighter",!0)}),yn.primaryFixedDim=un.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>gn(e)?30:80,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.primaryFixed,yn.primaryFixedDim,10,"lighter",!0)}),yn.onPrimaryFixed=un.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>gn(e)?100:10,background:e=>yn.primaryFixedDim,secondBackground:e=>yn.primaryFixed,contrastCurve:new mn(4.5,7,11,21)}),yn.onPrimaryFixedVariant=un.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>gn(e)?90:30,background:e=>yn.primaryFixedDim,secondBackground:e=>yn.primaryFixed,contrastCurve:new mn(3,4.5,7,11)}),yn.secondaryFixed=un.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>gn(e)?80:90,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.secondaryFixed,yn.secondaryFixedDim,10,"lighter",!0)}),yn.secondaryFixedDim=un.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>gn(e)?70:80,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.secondaryFixed,yn.secondaryFixedDim,10,"lighter",!0)}),yn.onSecondaryFixed=un.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>yn.secondaryFixedDim,secondBackground:e=>yn.secondaryFixed,contrastCurve:new mn(4.5,7,11,21)}),yn.onSecondaryFixedVariant=un.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>gn(e)?25:30,background:e=>yn.secondaryFixedDim,secondBackground:e=>yn.secondaryFixed,contrastCurve:new mn(3,4.5,7,11)}),yn.tertiaryFixed=un.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?40:90,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.tertiaryFixed,yn.tertiaryFixedDim,10,"lighter",!0)}),yn.tertiaryFixedDim=un.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?30:80,isBackground:!0,background:e=>yn.highestSurface(e),contrastCurve:new mn(1,1,3,7),toneDeltaPair:e=>new vn(yn.tertiaryFixed,yn.tertiaryFixedDim,10,"lighter",!0)}),yn.onTertiaryFixed=un.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?100:10,background:e=>yn.tertiaryFixedDim,secondBackground:e=>yn.tertiaryFixed,contrastCurve:new mn(4.5,7,11,21)}),yn.onTertiaryFixedVariant=un.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>gn(e)?90:30,background:e=>yn.tertiaryFixedDim,secondBackground:e=>yn.tertiaryFixed,contrastCurve:new mn(3,4.5,7,11)});class wn{static fromInt(e){const t=ln.fromInt(e);return wn.fromHct(t)}static fromHct(e){return new wn(e.hue,e.chroma,e)}static fromHueAndChroma(e,t){return new wn(e,t,wn.createKeyColor(e,t))}constructor(e,t,i){this.hue=e,this.chroma=t,this.keyColor=i,this.cache=new Map}static createKeyColor(e,t){let i=ln.from(e,t,50),o=Math.abs(i.chroma-t);for(let r=1;r<50;r+=1){if(Math.round(t)===Math.round(i.chroma))return i;const n=ln.from(e,t,50+r),s=Math.abs(n.chroma-t);s0&&(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 Sn=33,Tn=35937,En="red",In="green",An="blue";class Pn{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:Tn}).fill(0),this.momentsR=Array.from({length:Tn}).fill(0),this.momentsG=Array.from({length:Tn}).fill(0),this.momentsB=Array.from({length:Tn}).fill(0),this.moments=Array.from({length:Tn}).fill(0);const t=Rn.quantize(e);for(const[e,i]of t.entries()){const t=Gr(e),o=Wr(e),r=Yr(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;enew Mn));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 Dn(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,En,e.r0+1,e.r1,i,o,r,n),a=this.maximize(e,In,e.g0+1,e.g1,i,o,r,n),l=this.maximize(e,An,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=En}else c=h>=d&&h>=u?In:An;switch(t.r1=e.r1,t.g1=e.g1,t.b1=e.b1,c){case En:e.r1=s.cutLocation,t.r0=e.r1,t.g0=e.g0,t.b0=e.b0;break;case In:e.g1=a.cutLocation,t.r0=e.r0,t.g0=e.g1,t.b0=e.b0;break;case An: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,v=0,f=0,g=0;for(let b=i;bu&&(u=y,p=b))}return new Bn(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 En: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 In: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 An: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 En: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 In: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 An: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 Mn{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 Dn{constructor(e,t){this.requestedCount=e,this.resultCount=t}}class Bn{constructor(e,t){this.cutLocation=e,this.maximum=t}}class Ln{static quantize(e,t){const i=(new Pn).quantize(e,t);return xn.quantize(e,i,t)}}class _n{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 _n.lightFromCorePalette(kn.of(e))}static dark(e){return _n.darkFromCorePalette(kn.of(e))}static lightContent(e){return _n.lightFromCorePalette(kn.contentOf(e))}static darkContent(e){return _n.darkFromCorePalette(kn.contentOf(e))}static lightFromCorePalette(e){return new _n({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 _n({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 On={desired:4,fallbackColorARGB:4282549748,filter:!0};function zn(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=>Nr(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 Nn(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=Vn(e.slice(0,1).repeat(2)),n=Vn(e.slice(1,2).repeat(2)),s=Vn(e.slice(2,3).repeat(2))):i?(r=Vn(e.slice(0,2)),n=Vn(e.slice(2,4)),s=Vn(e.slice(4,6))):o&&(r=Vn(e.slice(2,4)),n=Vn(e.slice(4,6)),s=Vn(e.slice(6,8))),(255<<24|(255&r)<<16|(255&n)<<8|255&s)>>>0}function Vn(e){return parseInt(e,16)}async function Hn(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)};e.complete?n():e.onload=n})),i=[];for(let e=0;e{const t=P(e);let i=t.get().map((e=>Array.from(e.classList))).flat();i=D(i).filter((e=>e.startsWith(qn))),t.removeClass(i.join(" "));const o=i.filter((e=>0===P(`.${e}`).length));P(o.map((e=>`#${e}`)).join(",")).remove()},Wn=(e,t)=>{const i=r(),o=P((null==t?void 0:t.target)||i.documentElement),n={light:_n.light(e).toJSON(),dark:_n.dark(e).toJSON()},s=kn.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}),((null==t?void 0: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=cn.harmonize(o,r));const n=kn.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:Nn(t.value),blend:!0});Un.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=>[Gr(e),Wr(e),Yr(e)].join(", "))(i)))).join(""),l=qn+`${e}-${jn++}`,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}`;Gn(o),P(i.head).append(``),o.addClass(l)},Yn="mdui.functions.snackbar.";let Xn;e.$=P,e.alert=e=>{const t=Object.assign({},Dr,e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((e,o)=>{let r=!1;const n=Mr({...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 Rr(i)?i.then((()=>{r=!0})):!1!==i&&(r=!0),i}}]});P(n).on("close",(()=>{r?e():o()}))}))},e.breakpoint=zo,e.confirm=e=>{const t=Object.assign({},Br,e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((e,o)=>{let r=!1;const n=Mr({...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 Rr(i)?i.then((()=>{r=!0})):!1!==i&&(r=!0),i}}]});P(n).on("close",(()=>{r?e():o()}))}))},e.dialog=Mr,e.getColorFromImage=async e=>{const t=P(e);return function(e){const t=Gr(e),i=Wr(e),o=Yr(e),r=[t.toString(16),i.toString(16),o.toString(16)];for(const[e,t]of r.entries())1===t.length&&(r[e]="0"+t);return"#"+r.join("")}(await Hn(t[0]))},e.getTheme=(e=document.documentElement)=>{var t,i;const o=P(e)[0],r=["light","dark","auto"],n="mdui-theme-";return null!==(i=null===(t=Array.from(o.classList).find((e=>r.map((e=>n+e)).includes(e))))||void 0===t?void 0:t.slice(11))&&void 0!==i?i:"light"},e.observeResize=Ci,e.prompt=t=>{const i=Object.assign({},Kn,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,t)=>{let n=!1;const s=Mr({...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):Rr(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 Rr(t)?t.then((()=>{n=!0})):!1!==t&&(n=!0),t})()}}]});P(s).on("close",(()=>{n?e(r.value):t()}))}))},e.removeColorScheme=(e=document.documentElement)=>{Gn(e)},e.setColorScheme=(e,t)=>{const i=Nn(e);Wn(i,t)},e.setTheme=(e,t=document.documentElement)=>{const i=P(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=P(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,(()=>{var o;if("onActionClick"===e){const e=(null!==(o=t.onActionClick)&&void 0!==o?o:x).call(i,i);Rr(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&&(Xn=void 0,Er(Yn+t.queue))})),t.queue?Xn?Tr(Yn+t.queue,(()=>{i.open=!0,Xn=i})):(setTimeout((()=>{i.open=!0})),Xn=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}}}));