tasmota-esp-web-tools 9.0.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ewt-littlefs-manager.d.ts +43 -0
- package/dist/components/ewt-littlefs-manager.js +819 -0
- package/dist/flash.js +4 -30
- package/dist/install-dialog.d.ts +11 -0
- package/dist/install-dialog.js +336 -0
- package/dist/partition.d.ts +26 -0
- package/dist/partition.js +129 -0
- package/dist/util/esp32s2-reconnect.d.ts +22 -0
- package/dist/util/esp32s2-reconnect.js +45 -0
- package/dist/util/partition.d.ts +4 -0
- package/dist/util/partition.js +59 -0
- package/{js/modules/index-BK6drzlv.js → dist/web/index-t2Vsxqjj.js} +1 -1
- package/dist/web/install-button.js +1 -1
- package/dist/web/{install-dialog-Xo7JovVA.js → install-dialog-CVebVk1R.js} +515 -36
- package/dist/web/{styles-ntwzvT31.js → styles-CWxbqh-J.js} +1 -1
- package/dist/web/wasm/littlefs/index.d.ts +91 -0
- package/dist/web/wasm/littlefs/index.js +611 -0
- package/dist/web/wasm/littlefs/littlefs.js +505 -0
- package/dist/web/wasm/littlefs/littlefs.wasm +0 -0
- package/{dist/web/index-BK6drzlv.js → js/modules/index-t2Vsxqjj.js} +1 -1
- package/js/modules/install-button.js +1 -1
- package/js/modules/{install-dialog-Xo7JovVA.js → install-dialog-CVebVk1R.js} +515 -36
- package/js/modules/{styles-ntwzvT31.js → styles-CWxbqh-J.js} +1 -1
- package/js/modules/wasm/littlefs/index.d.ts +91 -0
- package/js/modules/wasm/littlefs/index.js +611 -0
- package/js/modules/wasm/littlefs/littlefs.js +505 -0
- package/js/modules/wasm/littlefs/littlefs.wasm +0 -0
- package/package.json +3 -2
- package/.devcontainer/Dockerfile +0 -16
- package/.devcontainer/devcontainer.json +0 -21
- package/.github/dependabot.yml +0 -10
- package/.github/workflows/build_upload.yml +0 -78
- package/.github/workflows/ci.yml +0 -24
- package/.prettierignore +0 -1
- package/BAUD_RATE_CONFIGURATION.md +0 -291
- package/BAUD_RATE_IMPROVEMENT.md +0 -195
- package/CHANGELOG_IMPROVEMENTS.md +0 -246
- package/ESP32_S2_USB_RECONNECT.md +0 -108
- package/FINAL_SUMMARY.md +0 -153
- package/example-baud-rate.html +0 -276
- package/manifest-example-p4-variants.json +0 -61
- package/rollup.config.mjs +0 -36
- package/script/build +0 -8
- package/script/develop +0 -17
- package/src/components/ewt-button.ts +0 -25
- package/src/components/ewt-checkbox.ts +0 -14
- package/src/components/ewt-circular-progress.ts +0 -14
- package/src/components/ewt-console.ts +0 -166
- package/src/components/ewt-dialog.ts +0 -22
- package/src/components/ewt-formfield.ts +0 -14
- package/src/components/ewt-icon-button.ts +0 -14
- package/src/components/ewt-list-item.ts +0 -14
- package/src/components/ewt-select.ts +0 -23
- package/src/components/ewt-textfield.ts +0 -23
- package/src/components/svg.ts +0 -27
- package/src/connect.ts +0 -55
- package/src/const.ts +0 -122
- package/src/flash.ts +0 -361
- package/src/install-button.ts +0 -126
- package/src/install-dialog.ts +0 -1114
- package/src/no-port-picked/index.ts +0 -10
- package/src/no-port-picked/no-port-picked-dialog.ts +0 -167
- package/src/pages/ewt-page-message.ts +0 -39
- package/src/pages/ewt-page-progress.ts +0 -44
- package/src/styles.ts +0 -34
- package/src/util/chip-family-name.ts +0 -46
- package/src/util/console-color.ts +0 -284
- package/src/util/file-download.ts +0 -17
- package/src/util/fire-event.ts +0 -20
- package/src/util/line-break-transformer.ts +0 -20
- package/src/util/manifest.ts +0 -18
- package/src/util/sleep.ts +0 -2
- package/static/logos/2smart.png +0 -0
- package/static/logos/canairio.png +0 -0
- package/static/logos/clockwise.png +0 -0
- package/static/logos/espeasy.png +0 -0
- package/static/logos/esphome.svg +0 -1
- package/static/logos/luciferin_logo.png +0 -0
- package/static/logos/squeezelite-esp32.png +0 -0
- package/static/logos/tasmota.svg +0 -1
- package/static/logos/wled.png +0 -0
- package/static/screenshots/dashboard.png +0 -0
- package/static/screenshots/logs.png +0 -0
- package/static/social.png +0 -0
- package/tsconfig.json +0 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as e,o as t,_ as i,n,B as o,
|
|
1
|
+
import{l as e,o as t,_ as i,n,B as o,a as r,c as a,t as s,f as d,g as l,R as c,x as h,h as m,j as p,i as u,k as f,m as g,M as b,p as _,s as x,e as y,q as v,r as w,u as k,v as E,T as I,A as S,w as C,y as R,z as T,C as A,D as F,b as O,d as L}from"./styles-CWxbqh-J.js";function $(i,n,o){let r;return r={flatten:n},o?e({slot:i,flatten:n,selector:o}):t({descriptor:e=>({get(){var e,t;const i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector("slot:not([name])");return null!==(t=null==i?void 0:i.assignedNodes(r))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}var z,B;const D=null!==(B=null===(z=window.ShadyDOM)||void 0===z?void 0:z.inUse)&&void 0!==B&&B;class P extends o{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||D)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",e=>{this.dispatchEvent(new Event("change",e))})}}P.shadowRootOptions={mode:"open",delegatesFocus:!0},i([n({type:Boolean})],P.prototype,"disabled",void 0);class N extends P{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new c(()=>(this.shouldRenderRipple=!0,this.ripple.then(e=>this.rippleElement=e),this.ripple))}createAdapter(){return{}}update(e){const t=e.get("indeterminate"),i=e.get("checked"),n=e.get("disabled");if(void 0!==t||void 0!==i||void 0!==n){const e=this.calculateAnimationStateName(!!i,!!t,!!n),o=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${e}-${o}`}super.update(e)}calculateAnimationStateName(e,t,i){return i?"disabled":t?"indeterminate":e?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return h`<mwc-ripple
|
|
2
2
|
.disabled="${this.disabled}"
|
|
3
3
|
unbounded></mwc-ripple>`}render(){const e=this.indeterminate||this.checked,t={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":e,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},i=this.indeterminate?"mixed":void 0;return h`
|
|
4
4
|
<div class="mdc-checkbox mdc-checkbox--upgraded ${m(t)}">
|
|
@@ -34,12 +34,12 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
34
34
|
<div class="mdc-checkbox__mixedmark"></div>
|
|
35
35
|
</div>
|
|
36
36
|
${this.renderRipple()}
|
|
37
|
-
</div>`}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var e;return(null===(e=this.rippleElement)||void 0===e?void 0:e.isActive)||!1}}i([r(".mdc-checkbox")],P.prototype,"mdcRoot",void 0),i([r("input")],P.prototype,"formElement",void 0),i([n({type:Boolean,reflect:!0})],P.prototype,"checked",void 0),i([n({type:Boolean})],P.prototype,"indeterminate",void 0),i([n({type:Boolean,reflect:!0})],P.prototype,"disabled",void 0),i([n({type:String,reflect:!0})],P.prototype,"name",void 0),i([n({type:String})],P.prototype,"value",void 0),i([a,n({type:String,attribute:"aria-label"})],P.prototype,"ariaLabel",void 0),i([a,n({type:String,attribute:"aria-labelledby"})],P.prototype,"ariaLabelledBy",void 0),i([a,n({type:String,attribute:"aria-describedby"})],P.prototype,"ariaDescribedBy",void 0),i([n({type:Boolean})],P.prototype,"reducedTouchTarget",void 0),i([d()],P.prototype,"animationClass",void 0),i([d()],P.prototype,"shouldRenderRipple",void 0),i([d()],P.prototype,"focused",void 0),i([s("mwc-ripple")],P.prototype,"ripple",void 0),i([l({passive:!0})],P.prototype,"handleRippleTouchStart",null);const M=u`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`;class U extends P{}U.styles=[M],customElements.define("ewt-checkbox",U);class H{constructor(e){this.targetElement=e,this.state={bold:!1,italic:!1,underline:!1,strikethrough:!1,foregroundColor:null,backgroundColor:null,carriageReturn:!1,secret:!1}}logs(){return this.targetElement.innerText}addLine(e){const t=/(?:\x1B|\\x1B)(?:\[(.*?)[@-~]|\].*?(?:\x07|\x1B\\))/g;let i=0;this.state.carriageReturn&&("\n"!==e&&this.targetElement.removeChild(this.targetElement.lastChild),this.state.carriageReturn=!1),e.includes("\r")&&(this.state.carriageReturn=!0);const n=document.createElement("span");n.classList.add("line"),this.targetElement.appendChild(n);const o=e=>{if(""===e)return;const t=document.createElement("span");if(this.state.bold&&t.classList.add("log-bold"),this.state.italic&&t.classList.add("log-italic"),this.state.underline&&t.classList.add("log-underline"),this.state.strikethrough&&t.classList.add("log-strikethrough"),this.state.secret&&t.classList.add("log-secret"),null!==this.state.foregroundColor&&t.classList.add(`log-fg-${this.state.foregroundColor}`),null!==this.state.backgroundColor&&t.classList.add(`log-bg-${this.state.backgroundColor}`),t.appendChild(document.createTextNode(e)),n.appendChild(t),this.state.secret){const e=document.createElement("span");e.classList.add("log-secret-redacted"),e.appendChild(document.createTextNode("[redacted]")),n.appendChild(e)}};for(;;){const n=t.exec(e);if(null===n)break;const r=n.index;if(o(e.substring(i,r)),i=r+n[0].length,void 0!==n[1])for(const e of n[1].split(";"))switch(parseInt(e)){case 0:this.state.bold=!1,this.state.italic=!1,this.state.underline=!1,this.state.strikethrough=!1,this.state.foregroundColor=null,this.state.backgroundColor=null,this.state.secret=!1;break;case 1:this.state.bold=!0;break;case 3:this.state.italic=!0;break;case 4:this.state.underline=!0;break;case 5:this.state.secret=!0;break;case 6:this.state.secret=!1;break;case 9:this.state.strikethrough=!0;break;case 22:this.state.bold=!1;break;case 23:this.state.italic=!1;break;case 24:this.state.underline=!1;break;case 29:this.state.strikethrough=!1;break;case 30:this.state.foregroundColor="black";break;case 31:this.state.foregroundColor="red";break;case 32:this.state.foregroundColor="green";break;case 33:this.state.foregroundColor="yellow";break;case 34:this.state.foregroundColor="blue";break;case 35:this.state.foregroundColor="magenta";break;case 36:this.state.foregroundColor="cyan";break;case 37:this.state.foregroundColor="white";break;case 39:this.state.foregroundColor=null;break;case 41:this.state.backgroundColor="red";break;case 42:this.state.backgroundColor="green";break;case 43:this.state.backgroundColor="yellow";break;case 44:this.state.backgroundColor="blue";break;case 45:this.state.backgroundColor="magenta";break;case 46:this.state.backgroundColor="cyan";break;case 47:this.state.backgroundColor="white";break;case 40:case 49:this.state.backgroundColor=null}}const r=this.targetElement.scrollTop>this.targetElement.scrollHeight-this.targetElement.offsetHeight-50;o(e.substring(i)),r&&(this.targetElement.scrollTop=this.targetElement.scrollHeight)}}const V=e=>new Promise(t=>setTimeout(t,e));class W{constructor(){this.chunks=""}transform(e,t){this.chunks+=e;const i=this.chunks.split("\r\n");this.chunks=i.pop(),i.forEach(e=>t.enqueue(e+"\r\n"))}flush(e){e.enqueue(this.chunks)}}class X extends HTMLElement{constructor(){super(...arguments),this.allowInput=!0}logs(){var e;return(null===(e=this._console)||void 0===e?void 0:e.logs())||""}connectedCallback(){if(this._console)return;if(this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host, input {\n background-color: #1c1c1c;\n color: #ddd;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,\n monospace;\n line-height: 1.45;\n display: flex;\n flex-direction: column;\n }\n form {\n display: flex;\n align-items: center;\n padding: 0 8px 0 16px;\n }\n input {\n flex: 1;\n padding: 4px;\n margin: 0 8px;\n border: 0;\n outline: none;\n }\n \n .log {\n flex: 1;\n background-color: #1c1c1c;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,\n monospace;\n font-size: 12px;\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n border-radius: 3px;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n color: #ddd;\n }\n\n .log-bold {\n font-weight: bold;\n }\n .log-italic {\n font-style: italic;\n }\n .log-underline {\n text-decoration: underline;\n }\n .log-strikethrough {\n text-decoration: line-through;\n }\n .log-underline.log-strikethrough {\n text-decoration: underline line-through;\n }\n .log-secret {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .log-secret-redacted {\n opacity: 0;\n width: 1px;\n font-size: 1px;\n }\n .log-fg-black {\n color: rgb(128, 128, 128);\n }\n .log-fg-red {\n color: rgb(255, 0, 0);\n }\n .log-fg-green {\n color: rgb(0, 255, 0);\n }\n .log-fg-yellow {\n color: rgb(255, 255, 0);\n }\n .log-fg-blue {\n color: rgb(0, 0, 255);\n }\n .log-fg-magenta {\n color: rgb(255, 0, 255);\n }\n .log-fg-cyan {\n color: rgb(0, 255, 255);\n }\n .log-fg-white {\n color: rgb(187, 187, 187);\n }\n .log-bg-black {\n background-color: rgb(0, 0, 0);\n }\n .log-bg-red {\n background-color: rgb(255, 0, 0);\n }\n .log-bg-green {\n background-color: rgb(0, 255, 0);\n }\n .log-bg-yellow {\n background-color: rgb(255, 255, 0);\n }\n .log-bg-blue {\n background-color: rgb(0, 0, 255);\n }\n .log-bg-magenta {\n background-color: rgb(255, 0, 255);\n }\n .log-bg-cyan {\n background-color: rgb(0, 255, 255);\n }\n .log-bg-white {\n background-color: rgb(255, 255, 255);\n }\n\n </style>\n <div class="log"></div>\n ${this.allowInput?"<form>\n >\n <input autofocus>\n </form>\n ":""}\n `,this._console=new H(this.shadowRoot.querySelector("div")),this.allowInput){const e=this.shadowRoot.querySelector("input");this.addEventListener("click",()=>{var t;""===(null===(t=getSelection())||void 0===t?void 0:t.toString())&&e.focus()}),e.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),this._sendCommand())})}const e=new AbortController,t=this._connect(e.signal);this._cancelConnection=()=>(e.abort(),t)}async _connect(e){this.logger.debug("Starting console read loop");try{await this.port.readable.pipeThrough(new TextDecoderStream,{signal:e}).pipeThrough(new TransformStream(new W)).pipeTo(new WritableStream({write:e=>{this._console.addLine(e.replace("\r",""))}})),e.aborted||(this._console.addLine(""),this._console.addLine(""),this._console.addLine("Terminal disconnected"))}catch(e){this._console.addLine(""),this._console.addLine(""),this._console.addLine(`Terminal disconnected: ${e}`)}finally{await V(100),this.logger.debug("Finished console read loop")}}async _sendCommand(){const e=this.shadowRoot.querySelector("input"),t=e.value,i=new TextEncoder,n=this.port.writable.getWriter();await n.write(i.encode(t+"\r\n")),this._console.addLine(`> ${t}\r\n`),e.value="",e.focus();try{n.releaseLock()}catch(e){console.error("Ignoring release lock error",e)}}async disconnect(){this._cancelConnection&&(await this._cancelConnection(),this._cancelConnection=void 0)}async reset(){this.logger.debug("Triggering reset."),await this.port.setSignals({dataTerminalReady:!1,requestToSend:!0}),await this.port.setSignals({dataTerminalReady:!1,requestToSend:!1}),await new Promise(e=>setTimeout(e,1e3))}}customElements.define("ewt-console",X);var q={ROOT:"mdc-form-field"},Y={LABEL_SELECTOR:".mdc-form-field > label"},G=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.click=function(){n.handleClick()},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},t.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame(function(){e.adapter.deactivateInputRipple()})},t}(b);class j extends o{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=G}createAdapter(){return{registerInteractionHandler:(e,t)=>{this.labelEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.labelEl.removeEventListener(e,t)},activateInputRipple:async()=>{const e=this.input;if(e instanceof N){const t=await e.ripple;t&&t.startPress()}},deactivateInputRipple:async()=>{const e=this.input;if(e instanceof N){const t=await e.ripple;t&&t.endPress()}}}}get input(){var e,t;return null!==(t=null===(e=this.slottedInputs)||void 0===e?void 0:e[0])&&void 0!==t?t:null}render(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return h`
|
|
37
|
+
</div>`}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var e;return(null===(e=this.rippleElement)||void 0===e?void 0:e.isActive)||!1}}i([r(".mdc-checkbox")],N.prototype,"mdcRoot",void 0),i([r("input")],N.prototype,"formElement",void 0),i([n({type:Boolean,reflect:!0})],N.prototype,"checked",void 0),i([n({type:Boolean})],N.prototype,"indeterminate",void 0),i([n({type:Boolean,reflect:!0})],N.prototype,"disabled",void 0),i([n({type:String,reflect:!0})],N.prototype,"name",void 0),i([n({type:String})],N.prototype,"value",void 0),i([a,n({type:String,attribute:"aria-label"})],N.prototype,"ariaLabel",void 0),i([a,n({type:String,attribute:"aria-labelledby"})],N.prototype,"ariaLabelledBy",void 0),i([a,n({type:String,attribute:"aria-describedby"})],N.prototype,"ariaDescribedBy",void 0),i([n({type:Boolean})],N.prototype,"reducedTouchTarget",void 0),i([s()],N.prototype,"animationClass",void 0),i([s()],N.prototype,"shouldRenderRipple",void 0),i([s()],N.prototype,"focused",void 0),i([d("mwc-ripple")],N.prototype,"ripple",void 0),i([l({passive:!0})],N.prototype,"handleRippleTouchStart",null);const M=u`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`;class U extends N{}U.styles=[M],customElements.define("ewt-checkbox",U);class H{constructor(e){this.targetElement=e,this.state={bold:!1,italic:!1,underline:!1,strikethrough:!1,foregroundColor:null,backgroundColor:null,carriageReturn:!1,secret:!1}}logs(){return this.targetElement.innerText}addLine(e){const t=/(?:\x1B|\\x1B)(?:\[(.*?)[@-~]|\].*?(?:\x07|\x1B\\))/g;let i=0;this.state.carriageReturn&&("\n"!==e&&this.targetElement.removeChild(this.targetElement.lastChild),this.state.carriageReturn=!1),e.includes("\r")&&(this.state.carriageReturn=!0);const n=document.createElement("span");n.classList.add("line"),this.targetElement.appendChild(n);const o=e=>{if(""===e)return;const t=document.createElement("span");if(this.state.bold&&t.classList.add("log-bold"),this.state.italic&&t.classList.add("log-italic"),this.state.underline&&t.classList.add("log-underline"),this.state.strikethrough&&t.classList.add("log-strikethrough"),this.state.secret&&t.classList.add("log-secret"),null!==this.state.foregroundColor&&t.classList.add(`log-fg-${this.state.foregroundColor}`),null!==this.state.backgroundColor&&t.classList.add(`log-bg-${this.state.backgroundColor}`),t.appendChild(document.createTextNode(e)),n.appendChild(t),this.state.secret){const e=document.createElement("span");e.classList.add("log-secret-redacted"),e.appendChild(document.createTextNode("[redacted]")),n.appendChild(e)}};for(;;){const n=t.exec(e);if(null===n)break;const r=n.index;if(o(e.substring(i,r)),i=r+n[0].length,void 0!==n[1])for(const e of n[1].split(";"))switch(parseInt(e)){case 0:this.state.bold=!1,this.state.italic=!1,this.state.underline=!1,this.state.strikethrough=!1,this.state.foregroundColor=null,this.state.backgroundColor=null,this.state.secret=!1;break;case 1:this.state.bold=!0;break;case 3:this.state.italic=!0;break;case 4:this.state.underline=!0;break;case 5:this.state.secret=!0;break;case 6:this.state.secret=!1;break;case 9:this.state.strikethrough=!0;break;case 22:this.state.bold=!1;break;case 23:this.state.italic=!1;break;case 24:this.state.underline=!1;break;case 29:this.state.strikethrough=!1;break;case 30:this.state.foregroundColor="black";break;case 31:this.state.foregroundColor="red";break;case 32:this.state.foregroundColor="green";break;case 33:this.state.foregroundColor="yellow";break;case 34:this.state.foregroundColor="blue";break;case 35:this.state.foregroundColor="magenta";break;case 36:this.state.foregroundColor="cyan";break;case 37:this.state.foregroundColor="white";break;case 39:this.state.foregroundColor=null;break;case 41:this.state.backgroundColor="red";break;case 42:this.state.backgroundColor="green";break;case 43:this.state.backgroundColor="yellow";break;case 44:this.state.backgroundColor="blue";break;case 45:this.state.backgroundColor="magenta";break;case 46:this.state.backgroundColor="cyan";break;case 47:this.state.backgroundColor="white";break;case 40:case 49:this.state.backgroundColor=null}}const r=this.targetElement.scrollTop>this.targetElement.scrollHeight-this.targetElement.offsetHeight-50;o(e.substring(i)),r&&(this.targetElement.scrollTop=this.targetElement.scrollHeight)}}const V=e=>new Promise(t=>setTimeout(t,e));class W{constructor(){this.chunks=""}transform(e,t){this.chunks+=e;const i=this.chunks.split("\r\n");this.chunks=i.pop(),i.forEach(e=>t.enqueue(e+"\r\n"))}flush(e){e.enqueue(this.chunks)}}class Y extends HTMLElement{constructor(){super(...arguments),this.allowInput=!0}logs(){var e;return(null===(e=this._console)||void 0===e?void 0:e.logs())||""}connectedCallback(){if(this._console)return;if(this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host, input {\n background-color: #1c1c1c;\n color: #ddd;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,\n monospace;\n line-height: 1.45;\n display: flex;\n flex-direction: column;\n }\n form {\n display: flex;\n align-items: center;\n padding: 0 8px 0 16px;\n }\n input {\n flex: 1;\n padding: 4px;\n margin: 0 8px;\n border: 0;\n outline: none;\n }\n \n .log {\n flex: 1;\n background-color: #1c1c1c;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,\n monospace;\n font-size: 12px;\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n border-radius: 3px;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n color: #ddd;\n }\n\n .log-bold {\n font-weight: bold;\n }\n .log-italic {\n font-style: italic;\n }\n .log-underline {\n text-decoration: underline;\n }\n .log-strikethrough {\n text-decoration: line-through;\n }\n .log-underline.log-strikethrough {\n text-decoration: underline line-through;\n }\n .log-secret {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .log-secret-redacted {\n opacity: 0;\n width: 1px;\n font-size: 1px;\n }\n .log-fg-black {\n color: rgb(128, 128, 128);\n }\n .log-fg-red {\n color: rgb(255, 0, 0);\n }\n .log-fg-green {\n color: rgb(0, 255, 0);\n }\n .log-fg-yellow {\n color: rgb(255, 255, 0);\n }\n .log-fg-blue {\n color: rgb(0, 0, 255);\n }\n .log-fg-magenta {\n color: rgb(255, 0, 255);\n }\n .log-fg-cyan {\n color: rgb(0, 255, 255);\n }\n .log-fg-white {\n color: rgb(187, 187, 187);\n }\n .log-bg-black {\n background-color: rgb(0, 0, 0);\n }\n .log-bg-red {\n background-color: rgb(255, 0, 0);\n }\n .log-bg-green {\n background-color: rgb(0, 255, 0);\n }\n .log-bg-yellow {\n background-color: rgb(255, 255, 0);\n }\n .log-bg-blue {\n background-color: rgb(0, 0, 255);\n }\n .log-bg-magenta {\n background-color: rgb(255, 0, 255);\n }\n .log-bg-cyan {\n background-color: rgb(0, 255, 255);\n }\n .log-bg-white {\n background-color: rgb(255, 255, 255);\n }\n\n </style>\n <div class="log"></div>\n ${this.allowInput?"<form>\n >\n <input autofocus>\n </form>\n ":""}\n `,this._console=new H(this.shadowRoot.querySelector("div")),this.allowInput){const e=this.shadowRoot.querySelector("input");this.addEventListener("click",()=>{var t;""===(null===(t=getSelection())||void 0===t?void 0:t.toString())&&e.focus()}),e.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),this._sendCommand())})}const e=new AbortController,t=this._connect(e.signal);this._cancelConnection=()=>(e.abort(),t)}async _connect(e){this.logger.debug("Starting console read loop");try{await this.port.readable.pipeThrough(new TextDecoderStream,{signal:e}).pipeThrough(new TransformStream(new W)).pipeTo(new WritableStream({write:e=>{this._console.addLine(e.replace("\r",""))}})),e.aborted||(this._console.addLine(""),this._console.addLine(""),this._console.addLine("Terminal disconnected"))}catch(e){this._console.addLine(""),this._console.addLine(""),this._console.addLine(`Terminal disconnected: ${e}`)}finally{await V(100),this.logger.debug("Finished console read loop")}}async _sendCommand(){const e=this.shadowRoot.querySelector("input"),t=e.value,i=new TextEncoder,n=this.port.writable.getWriter();await n.write(i.encode(t+"\r\n")),this._console.addLine(`> ${t}\r\n`),e.value="",e.focus();try{n.releaseLock()}catch(e){console.error("Ignoring release lock error",e)}}async disconnect(){this._cancelConnection&&(await this._cancelConnection(),this._cancelConnection=void 0)}async reset(){this.logger.debug("Triggering reset."),await this.port.setSignals({dataTerminalReady:!1,requestToSend:!0}),await this.port.setSignals({dataTerminalReady:!1,requestToSend:!1}),await new Promise(e=>setTimeout(e,1e3))}}customElements.define("ewt-console",Y);var j={ROOT:"mdc-form-field"},X={LABEL_SELECTOR:".mdc-form-field > label"},q=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.click=function(){n.handleClick()},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return j},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},t.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame(function(){e.adapter.deactivateInputRipple()})},t}(b);class G extends o{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=q}createAdapter(){return{registerInteractionHandler:(e,t)=>{this.labelEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.labelEl.removeEventListener(e,t)},activateInputRipple:async()=>{const e=this.input;if(e instanceof P){const t=await e.ripple;t&&t.startPress()}},deactivateInputRipple:async()=>{const e=this.input;if(e instanceof P){const t=await e.ripple;t&&t.endPress()}}}}get input(){var e,t;return null!==(t=null===(e=this.slottedInputs)||void 0===e?void 0:e[0])&&void 0!==t?t:null}render(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return h`
|
|
38
38
|
<div class="mdc-form-field ${m(e)}">
|
|
39
39
|
<slot></slot>
|
|
40
40
|
<label class="mdc-label"
|
|
41
41
|
@click="${this._labelClick}">${this.label}</label>
|
|
42
|
-
</div>`}click(){this._labelClick()}_labelClick(){const e=this.input;e&&(e.focus(),e.click())}}i([n({type:Boolean})],
|
|
42
|
+
</div>`}click(){this._labelClick()}_labelClick(){const e=this.input;e&&(e.focus(),e.click())}}i([n({type:Boolean})],G.prototype,"alignEnd",void 0),i([n({type:Boolean})],G.prototype,"spaceBetween",void 0),i([n({type:Boolean})],G.prototype,"nowrap",void 0),i([n({type:String}),_(async function(e){var t;null===(t=this.input)||void 0===t||t.setAttribute("aria-label",e)})],G.prototype,"label",void 0),i([r(".mdc-form-field")],G.prototype,"mdcRoot",void 0),i([$("",!0,"*")],G.prototype,"slottedInputs",void 0),i([r("label")],G.prototype,"labelEl",void 0);const K=u`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`;class Z extends G{}Z.styles=[K],customElements.define("ewt-formfield",Z);class Q extends x{constructor(){super(...arguments),this.disabled=!1,this.icon="",this.shouldRenderRipple=!1,this.rippleHandlers=new c(()=>(this.shouldRenderRipple=!0,this.ripple))}renderRipple(){return this.shouldRenderRipple?h`
|
|
43
43
|
<mwc-ripple
|
|
44
44
|
.disabled="${this.disabled}"
|
|
45
45
|
unbounded>
|
|
@@ -61,14 +61,14 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
61
61
|
<span
|
|
62
62
|
><slot></slot
|
|
63
63
|
></span>
|
|
64
|
-
</button>`}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}i([n({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),i([n({type:String})],Q.prototype,"icon",void 0),i([a,n({type:String,attribute:"aria-label"})],Q.prototype,"ariaLabel",void 0),i([a,n({type:String,attribute:"aria-haspopup"})],Q.prototype,"ariaHasPopup",void 0),i([r("button")],Q.prototype,"buttonElement",void 0),i([
|
|
64
|
+
</button>`}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}i([n({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),i([n({type:String})],Q.prototype,"icon",void 0),i([a,n({type:String,attribute:"aria-label"})],Q.prototype,"ariaLabel",void 0),i([a,n({type:String,attribute:"aria-haspopup"})],Q.prototype,"ariaHasPopup",void 0),i([r("button")],Q.prototype,"buttonElement",void 0),i([d("mwc-ripple")],Q.prototype,"ripple",void 0),i([s()],Q.prototype,"shouldRenderRipple",void 0),i([l({passive:!0})],Q.prototype,"handleRippleMouseDown",null),i([l({passive:!0})],Q.prototype,"handleRippleTouchStart",null);const J=u`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{display:none}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:48px;max-width:48px}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}:host{display:inline-block;outline:none}:host([disabled]){pointer-events:none}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block}:host{--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;class ee extends Q{}ee.styles=[J],customElements.define("ewt-icon-button",ee);var te={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},ie={NOTCH_ELEMENT_PADDING:8},ne={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},oe=function(e){function t(i){return e.call(this,g(g({},t.defaultAdapter),i))||this}return f(t,e),Object.defineProperty(t,"strings",{get:function(){return te},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return ne},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ie},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),t.prototype.notch=function(e){var i=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=ie.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(i)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(b);class re extends o{constructor(){super(...arguments),this.mdcFoundationClass=oe,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:e=>this.mdcRoot.classList.add(e),removeClass:e=>this.mdcRoot.classList.remove(e),setNotchWidthProperty:e=>this.notchElement.style.setProperty("width",`${e}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(e,t){this.mdcFoundation&&(e&&void 0!==t?this.mdcFoundation.notch(t):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const e=m({"mdc-notched-outline--notched":this.open});return h`
|
|
65
65
|
<span class="mdc-notched-outline ${e}">
|
|
66
66
|
<span class="mdc-notched-outline__leading"></span>
|
|
67
67
|
<span class="mdc-notched-outline__notch">
|
|
68
68
|
<slot></slot>
|
|
69
69
|
</span>
|
|
70
70
|
<span class="mdc-notched-outline__trailing"></span>
|
|
71
|
-
</span>`}}i([r(".mdc-notched-outline")],re.prototype,"mdcRoot",void 0),i([n({type:Number})],re.prototype,"width",void 0),i([n({type:Boolean,reflect:!0})],re.prototype,"open",void 0),i([r(".mdc-notched-outline__notch")],re.prototype,"notchElement",void 0);const ae=u`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`;let de=class extends re{};de.styles=[ae],de=i([v("mwc-notched-outline")],de);var se={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},le=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.shakeAnimationEndHandler=function(){n.handleShakeAnimationEnd()},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return se},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var i=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.float=function(e){var i=t.cssClasses,n=i.LABEL_FLOAT_ABOVE,o=i.LABEL_SHAKE;e?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(o))},t.prototype.setRequired=function(e){var i=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.handleShakeAnimationEnd=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(b);const ce=y(class extends w{constructor(e){switch(super(e),this.foundation=null,this.previousPart=null,e.type){case k.ATTRIBUTE:case k.PROPERTY:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(e,[t]){if(e!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-floating-label");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),getWidth:()=>e.scrollWidth,registerInteractionHandler:(t,i)=>{e.addEventListener(t,i)},deregisterInteractionHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new le(i),this.foundation.init()}return this.render(t)}render(e){return this.foundation}});var he={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},me=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.transitionEndHandler=function(e){n.handleTransitionEnd(e)},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return he},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},t.prototype.activate=function(){this.adapter.removeClass(he.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(he.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(he.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(he.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(he.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(he.LINE_RIPPLE_DEACTIVATING))},t}(b);const pe=y(class extends w{constructor(e){switch(super(e),this.previousPart=null,this.foundation=null,e.type){case k.ATTRIBUTE:case k.PROPERTY:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(e,t){if(this.previousPart!==e){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-line-ripple");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),hasClass:t=>e.classList.contains(t),setStyle:(t,i)=>e.style.setProperty(t,i),registerEventHandler:(t,i)=>{e.addEventListener(t,i)},deregisterEventHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new me(i),this.foundation.init()}return this.render()}render(){return this.foundation}});var ue={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},fe={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},ge={LABEL_SCALE:.75},be=["pattern","min","max","required","step","minlength","maxlength"],_e=["color","date","datetime-local","month","range","time","week"],xe=["mousedown","touchstart"],ve=["click","keydown"],ye=function(e){function t(i,n){void 0===n&&(n={});var o=e.call(this,g(g({},t.defaultAdapter),i))||this;return o.isFocused=!1,o.receivedUserInput=!1,o.valid=!0,o.useNativeValidation=!0,o.validateOnValueChange=!0,o.helperText=n.helperText,o.characterCounter=n.characterCounter,o.leadingIcon=n.leadingIcon,o.trailingIcon=n.trailingIcon,o.inputFocusHandler=function(){o.activateFocus()},o.inputBlurHandler=function(){o.deactivateFocus()},o.inputInputHandler=function(){o.handleInput()},o.setPointerXOffset=function(e){o.setTransformOrigin(e)},o.textFieldInteractionHandler=function(){o.handleTextFieldInteraction()},o.validationAttributeChangeHandler=function(e){o.handleValidationAttributeChange(e)},o}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return fe},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ue},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return _e.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e,t,i,n;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var o=E(xe),r=o.next();!r.done;r=o.next()){var a=r.value;this.adapter.registerInputInteractionHandler(a,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}try{for(var d=E(ve),s=d.next();!s.done;s=d.next()){a=s.value;this.adapter.registerTextFieldInteractionHandler(a,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},t.prototype.destroy=function(){var e,t,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var o=E(xe),r=o.next();!r.done;r=o.next()){var a=r.value;this.adapter.deregisterInputInteractionHandler(a,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}try{for(var d=E(ve),s=d.next();!s.done;s=d.next()){a=s.value;this.adapter.deregisterTextFieldInteractionHandler(a,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some(function(e){return be.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)}),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*ge.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,i=t?t[0]:e,n=i.target.getBoundingClientRect(),o=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(o)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},t.prototype.getValue=function(){return this.getNativeInput().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},t.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},t.prototype.isDisabled=function(){return this.getNativeInput().disabled},t.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},t.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},t.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},t.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},t.prototype.styleValidity=function(e){var i=t.cssClasses.INVALID;if(e?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var n=this.helperText.isVisible(),o=this.helperText.getId();n&&o?this.adapter.setInputAttr(ue.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(ue.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused=function(e){var i=t.cssClasses.FOCUSED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.styleDisabled=function(e){var i=t.cssClasses,n=i.DISABLED,o=i.INVALID;e?(this.adapter.addClass(n),this.adapter.removeClass(o)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},t.prototype.styleFloating=function(e){var i=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(b);const we={},ke=y(class extends w{constructor(e){if(super(e),e.type!==k.PROPERTY&&e.type!==k.ATTRIBUTE&&e.type!==k.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===I||t===S)return t;const i=e.element,n=e.name;if(e.type===k.PROPERTY){if(t===i[n])return I}else if(e.type===k.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(n))return I}else if(e.type===k.ATTRIBUTE&&i.getAttribute(n)===t+"")return I;return((e,t=we)=>{e._$AH=t})(e),t}}),Ee=["touchstart","touchmove","scroll","mousewheel"],Ie=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class Se extends N{constructor(){super(...arguments),this.mdcFoundationClass=ye,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=Ie(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&-1!==this.maxLength,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return h`
|
|
71
|
+
</span>`}}i([r(".mdc-notched-outline")],re.prototype,"mdcRoot",void 0),i([n({type:Number})],re.prototype,"width",void 0),i([n({type:Boolean,reflect:!0})],re.prototype,"open",void 0),i([r(".mdc-notched-outline__notch")],re.prototype,"notchElement",void 0);const ae=u`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`;let se=class extends re{};se.styles=[ae],se=i([y("mwc-notched-outline")],se);var de={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},le=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.shakeAnimationEndHandler=function(){n.handleShakeAnimationEnd()},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return de},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var i=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.float=function(e){var i=t.cssClasses,n=i.LABEL_FLOAT_ABOVE,o=i.LABEL_SHAKE;e?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(o))},t.prototype.setRequired=function(e){var i=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.handleShakeAnimationEnd=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(b);const ce=v(class extends w{constructor(e){switch(super(e),this.foundation=null,this.previousPart=null,e.type){case k.ATTRIBUTE:case k.PROPERTY:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(e,[t]){if(e!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-floating-label");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),getWidth:()=>e.scrollWidth,registerInteractionHandler:(t,i)=>{e.addEventListener(t,i)},deregisterInteractionHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new le(i),this.foundation.init()}return this.render(t)}render(e){return this.foundation}});var he={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},me=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.transitionEndHandler=function(e){n.handleTransitionEnd(e)},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return he},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},t.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},t.prototype.activate=function(){this.adapter.removeClass(he.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(he.LINE_RIPPLE_ACTIVE)},t.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},t.prototype.deactivate=function(){this.adapter.addClass(he.LINE_RIPPLE_DEACTIVATING)},t.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(he.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(he.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(he.LINE_RIPPLE_DEACTIVATING))},t}(b);const pe=v(class extends w{constructor(e){switch(super(e),this.previousPart=null,this.foundation=null,e.type){case k.ATTRIBUTE:case k.PROPERTY:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(e,t){if(this.previousPart!==e){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-line-ripple");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),hasClass:t=>e.classList.contains(t),setStyle:(t,i)=>e.style.setProperty(t,i),registerEventHandler:(t,i)=>{e.addEventListener(t,i)},deregisterEventHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new me(i),this.foundation.init()}return this.render()}render(){return this.foundation}});var ue={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},fe={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},ge={LABEL_SCALE:.75},be=["pattern","min","max","required","step","minlength","maxlength"],_e=["color","date","datetime-local","month","range","time","week"],xe=["mousedown","touchstart"],ye=["click","keydown"],ve=function(e){function t(i,n){void 0===n&&(n={});var o=e.call(this,g(g({},t.defaultAdapter),i))||this;return o.isFocused=!1,o.receivedUserInput=!1,o.valid=!0,o.useNativeValidation=!0,o.validateOnValueChange=!0,o.helperText=n.helperText,o.characterCounter=n.characterCounter,o.leadingIcon=n.leadingIcon,o.trailingIcon=n.trailingIcon,o.inputFocusHandler=function(){o.activateFocus()},o.inputBlurHandler=function(){o.deactivateFocus()},o.inputInputHandler=function(){o.handleInput()},o.setPointerXOffset=function(e){o.setTransformOrigin(e)},o.textFieldInteractionHandler=function(){o.handleTextFieldInteraction()},o.validationAttributeChangeHandler=function(e){o.handleValidationAttributeChange(e)},o}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return fe},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ue},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return _e.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e,t,i,n;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var o=E(xe),r=o.next();!r.done;r=o.next()){var a=r.value;this.adapter.registerInputInteractionHandler(a,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}try{for(var s=E(ye),d=s.next();!d.done;d=s.next()){a=d.value;this.adapter.registerTextFieldInteractionHandler(a,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},t.prototype.destroy=function(){var e,t,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var o=E(xe),r=o.next();!r.done;r=o.next()){var a=r.value;this.adapter.deregisterInputInteractionHandler(a,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}try{for(var s=E(ye),d=s.next();!d.done;d=s.next()){a=d.value;this.adapter.deregisterTextFieldInteractionHandler(a,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},t.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},t.prototype.handleValidationAttributeChange=function(e){var t=this;e.some(function(e){return be.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)}),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*ge.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},t.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},t.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,i=t?t[0]:e,n=i.target.getBoundingClientRect(),o=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(o)}},t.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},t.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},t.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},t.prototype.getValue=function(){return this.getNativeInput().value},t.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},t.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},t.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},t.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},t.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},t.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},t.prototype.isDisabled=function(){return this.getNativeInput().disabled},t.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},t.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},t.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},t.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},t.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},t.prototype.styleValidity=function(e){var i=t.cssClasses.INVALID;if(e?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var n=this.helperText.isVisible(),o=this.helperText.getId();n&&o?this.adapter.setInputAttr(ue.ARIA_DESCRIBEDBY,o):this.adapter.removeInputAttr(ue.ARIA_DESCRIBEDBY)}},t.prototype.styleFocused=function(e){var i=t.cssClasses.FOCUSED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.styleDisabled=function(e){var i=t.cssClasses,n=i.DISABLED,o=i.INVALID;e?(this.adapter.addClass(n),this.adapter.removeClass(o)):this.adapter.removeClass(n),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},t.prototype.styleFloating=function(e){var i=t.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},t}(b);const we={},ke=v(class extends w{constructor(e){if(super(e),e.type!==k.PROPERTY&&e.type!==k.ATTRIBUTE&&e.type!==k.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===I||t===S)return t;const i=e.element,n=e.name;if(e.type===k.PROPERTY){if(t===i[n])return I}else if(e.type===k.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(n))return I}else if(e.type===k.ATTRIBUTE&&i.getAttribute(n)===t+"")return I;return((e,t=we)=>{e._$AH=t})(e),t}}),Ee=["touchstart","touchmove","scroll","mousewheel"],Ie=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class Se extends P{constructor(){super(...arguments),this.mdcFoundationClass=ve,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=Ie(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&-1!==this.maxLength,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return h`
|
|
72
72
|
<label class="mdc-text-field ${m(i)}">
|
|
73
73
|
${this.renderRipple()}
|
|
74
74
|
${this.outlined?this.renderOutline():this.renderLabel()}
|
|
@@ -93,11 +93,11 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
93
93
|
.floatingLabelFoundation=${ce(this.label)}
|
|
94
94
|
id="label">${this.label}</span>
|
|
95
95
|
`:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(e,t=!1){return h`<i class="material-icons mdc-text-field__icon ${m({"mdc-text-field__icon--leading":!t,"mdc-text-field__icon--trailing":t})}">${e}</i>`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(e,t=!1){return h`<span class="mdc-text-field__affix ${m({"mdc-text-field__affix--prefix":!t,"mdc-text-field__affix--suffix":t})}">
|
|
96
|
-
${e}</span>`}renderInput(e){const t=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,n=this.autocapitalize?this.autocapitalize:void 0,o=this.validationMessage&&!this.isUiValid,r=this.label?"label":void 0,a=e?"helper-text":void 0,
|
|
96
|
+
${e}</span>`}renderInput(e){const t=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,n=this.autocapitalize?this.autocapitalize:void 0,o=this.validationMessage&&!this.isUiValid,r=this.label?"label":void 0,a=e?"helper-text":void 0,s=this.focused||this.helperPersistent||o?"helper-text":void 0;return h`
|
|
97
97
|
<input
|
|
98
98
|
aria-labelledby=${p(r)}
|
|
99
99
|
aria-controls="${p(a)}"
|
|
100
|
-
aria-describedby="${p(
|
|
100
|
+
aria-describedby="${p(s)}"
|
|
101
101
|
class="mdc-text-field__input"
|
|
102
102
|
type="${this.type}"
|
|
103
103
|
.value="${ke(this.value)}"
|
|
@@ -128,7 +128,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
128
128
|
${this.renderCharCounter(t)}
|
|
129
129
|
</div>`:""}renderCharCounter(e){const t=Math.min(this.value.length,this.maxLength);return e?h`
|
|
130
130
|
<span class="mdc-text-field-character-counter"
|
|
131
|
-
>${t} / ${this.maxLength}</span>`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=Ie(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver(t=>{e((e=>e.map(e=>e.attributeName).filter(e=>e))(t))});return t.observe(this.formElement,{attributes:!0}),t},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},C(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in Ee}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await(null===(e=this.outlineElement)||void 0===e?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(e=this.outlineElement)||void 0===e||e.updateComplete.then(()=>{var e;this.outlineWidth=(null===(e=this.labelElement)||void 0===e?void 0:e.floatingLabelFoundation.getWidth())||0})}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e)return void(this.outlineOpen=!1);const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}i([r(".mdc-text-field")],Se.prototype,"mdcRoot",void 0),i([r("input")],Se.prototype,"formElement",void 0),i([r(".mdc-floating-label")],Se.prototype,"labelElement",void 0),i([r(".mdc-line-ripple")],Se.prototype,"lineRippleElement",void 0),i([r("mwc-notched-outline")],Se.prototype,"outlineElement",void 0),i([r(".mdc-notched-outline__notch")],Se.prototype,"notchElement",void 0),i([n({type:String})],Se.prototype,"value",void 0),i([n({type:String})],Se.prototype,"type",void 0),i([n({type:String})],Se.prototype,"placeholder",void 0),i([n({type:String}),_(function(e,t){void 0!==t&&this.label!==t&&this.layout()})],Se.prototype,"label",void 0),i([n({type:String})],Se.prototype,"icon",void 0),i([n({type:String})],Se.prototype,"iconTrailing",void 0),i([n({type:Boolean,reflect:!0})],Se.prototype,"disabled",void 0),i([n({type:Boolean})],Se.prototype,"required",void 0),i([n({type:Number})],Se.prototype,"minLength",void 0),i([n({type:Number})],Se.prototype,"maxLength",void 0),i([n({type:Boolean,reflect:!0}),_(function(e,t){void 0!==t&&this.outlined!==t&&this.layout()})],Se.prototype,"outlined",void 0),i([n({type:String})],Se.prototype,"helper",void 0),i([n({type:Boolean})],Se.prototype,"validateOnInitialRender",void 0),i([n({type:String})],Se.prototype,"validationMessage",void 0),i([n({type:Boolean})],Se.prototype,"autoValidate",void 0),i([n({type:String})],Se.prototype,"pattern",void 0),i([n({type:String})],Se.prototype,"min",void 0),i([n({type:String})],Se.prototype,"max",void 0),i([n({type:String})],Se.prototype,"step",void 0),i([n({type:Number})],Se.prototype,"size",void 0),i([n({type:Boolean})],Se.prototype,"helperPersistent",void 0),i([n({type:Boolean})],Se.prototype,"charCounter",void 0),i([n({type:Boolean})],Se.prototype,"endAligned",void 0),i([n({type:String})],Se.prototype,"prefix",void 0),i([n({type:String})],Se.prototype,"suffix",void 0),i([n({type:String})],Se.prototype,"name",void 0),i([n({type:String})],Se.prototype,"inputMode",void 0),i([n({type:Boolean})],Se.prototype,"readOnly",void 0),i([n({type:String})],Se.prototype,"autocapitalize",void 0),i([d()],Se.prototype,"outlineOpen",void 0),i([d()],Se.prototype,"outlineWidth",void 0),i([d()],Se.prototype,"isUiValid",void 0),i([d()],Se.prototype,"focused",void 0),i([l({passive:!0})],Se.prototype,"handleInputChange",null);const Ce=u`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{background-color:transparent;background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;class Re extends Se{}Re.styles=[Ce,u`
|
|
131
|
+
>${t} / ${this.maxLength}</span>`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=Ie(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver(t=>{e((e=>e.map(e=>e.attributeName).filter(e=>e))(t))});return t.observe(this.formElement,{attributes:!0}),t},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},C(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in Ee}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await(null===(e=this.outlineElement)||void 0===e?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(e=this.outlineElement)||void 0===e||e.updateComplete.then(()=>{var e;this.outlineWidth=(null===(e=this.labelElement)||void 0===e?void 0:e.floatingLabelFoundation.getWidth())||0})}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e)return void(this.outlineOpen=!1);const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}i([r(".mdc-text-field")],Se.prototype,"mdcRoot",void 0),i([r("input")],Se.prototype,"formElement",void 0),i([r(".mdc-floating-label")],Se.prototype,"labelElement",void 0),i([r(".mdc-line-ripple")],Se.prototype,"lineRippleElement",void 0),i([r("mwc-notched-outline")],Se.prototype,"outlineElement",void 0),i([r(".mdc-notched-outline__notch")],Se.prototype,"notchElement",void 0),i([n({type:String})],Se.prototype,"value",void 0),i([n({type:String})],Se.prototype,"type",void 0),i([n({type:String})],Se.prototype,"placeholder",void 0),i([n({type:String}),_(function(e,t){void 0!==t&&this.label!==t&&this.layout()})],Se.prototype,"label",void 0),i([n({type:String})],Se.prototype,"icon",void 0),i([n({type:String})],Se.prototype,"iconTrailing",void 0),i([n({type:Boolean,reflect:!0})],Se.prototype,"disabled",void 0),i([n({type:Boolean})],Se.prototype,"required",void 0),i([n({type:Number})],Se.prototype,"minLength",void 0),i([n({type:Number})],Se.prototype,"maxLength",void 0),i([n({type:Boolean,reflect:!0}),_(function(e,t){void 0!==t&&this.outlined!==t&&this.layout()})],Se.prototype,"outlined",void 0),i([n({type:String})],Se.prototype,"helper",void 0),i([n({type:Boolean})],Se.prototype,"validateOnInitialRender",void 0),i([n({type:String})],Se.prototype,"validationMessage",void 0),i([n({type:Boolean})],Se.prototype,"autoValidate",void 0),i([n({type:String})],Se.prototype,"pattern",void 0),i([n({type:String})],Se.prototype,"min",void 0),i([n({type:String})],Se.prototype,"max",void 0),i([n({type:String})],Se.prototype,"step",void 0),i([n({type:Number})],Se.prototype,"size",void 0),i([n({type:Boolean})],Se.prototype,"helperPersistent",void 0),i([n({type:Boolean})],Se.prototype,"charCounter",void 0),i([n({type:Boolean})],Se.prototype,"endAligned",void 0),i([n({type:String})],Se.prototype,"prefix",void 0),i([n({type:String})],Se.prototype,"suffix",void 0),i([n({type:String})],Se.prototype,"name",void 0),i([n({type:String})],Se.prototype,"inputMode",void 0),i([n({type:Boolean})],Se.prototype,"readOnly",void 0),i([n({type:String})],Se.prototype,"autocapitalize",void 0),i([s()],Se.prototype,"outlineOpen",void 0),i([s()],Se.prototype,"outlineWidth",void 0),i([s()],Se.prototype,"isUiValid",void 0),i([s()],Se.prototype,"focused",void 0),i([l({passive:!0})],Se.prototype,"handleInputChange",null);const Ce=u`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{background-color:transparent;background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;class Re extends Se{}Re.styles=[Ce,u`
|
|
132
132
|
.mdc-floating-label {
|
|
133
133
|
line-height: 1.15em;
|
|
134
134
|
}
|
|
@@ -155,7 +155,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
155
155
|
<span class="mdc-deprecated-list-item__secondary-text">
|
|
156
156
|
<slot name="secondary"></slot>
|
|
157
157
|
</span>
|
|
158
|
-
`}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(e,t){const i=()=>{window.removeEventListener(e,i),this.rippleHandlers.endPress()};window.addEventListener(e,i),this.rippleHandlers.startPress(t)}fireRequestSelected(e,t){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:t,selected:e}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const e of this.listeners)for(const t of e.eventNames)e.target.addEventListener(t,e.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)for(const t of e.eventNames)e.target.removeEventListener(t,e.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const e=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(e)}}i([r("slot")],Te.prototype,"slotElement",void 0),i([s("mwc-ripple")],Te.prototype,"ripple",void 0),i([n({type:String})],Te.prototype,"value",void 0),i([n({type:String,reflect:!0})],Te.prototype,"group",void 0),i([n({type:Number,reflect:!0})],Te.prototype,"tabindex",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){e?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")})],Te.prototype,"disabled",void 0),i([n({type:Boolean,reflect:!0})],Te.prototype,"twoline",void 0),i([n({type:Boolean,reflect:!0})],Te.prototype,"activated",void 0),i([n({type:String,reflect:!0})],Te.prototype,"graphic",void 0),i([n({type:Boolean})],Te.prototype,"multipleGraphics",void 0),i([n({type:Boolean})],Te.prototype,"hasMeta",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){e?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")})],Te.prototype,"noninteractive",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){const t=this.getAttribute("role"),i="gridcell"===t||"option"===t||"row"===t||"tab"===t;i&&e?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(e,"property")})],Te.prototype,"selected",void 0),i([d()],Te.prototype,"shouldRenderRipple",void 0),i([d()],Te.prototype,"_managingList",void 0);const Ae=u`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;let Oe=class extends Te{};Oe.styles=[Ae],Oe=i([v("mwc-list-item")],Oe);var Fe="Unknown",Le="Backspace",Be="Enter",ze="Spacebar",De="PageUp",$e="PageDown",Ne="End",Pe="Home",Me="ArrowLeft",Ue="ArrowUp",He="ArrowRight",Ve="ArrowDown",We="Delete",Xe="Escape",qe="Tab",Ye=new Set;Ye.add(Le),Ye.add(Be),Ye.add(ze),Ye.add(De),Ye.add($e),Ye.add(Ne),Ye.add(Pe),Ye.add(Me),Ye.add(Ue),Ye.add(He),Ye.add(Ve),Ye.add(We),Ye.add(Xe),Ye.add(qe);var Ge=8,je=13,Ke=32,Ze=33,Qe=34,Je=35,et=36,tt=37,it=38,nt=39,ot=40,rt=46,at=27,dt=9,st=new Map;st.set(Ge,Le),st.set(je,Be),st.set(Ke,ze),st.set(Ze,De),st.set(Qe,$e),st.set(Je,Ne),st.set(et,Pe),st.set(tt,Me),st.set(it,Ue),st.set(nt,He),st.set(ot,Ve),st.set(rt,We),st.set(at,Xe),st.set(dt,qe);var lt,ct,ht=new Set;function mt(e){var t=e.key;if(Ye.has(t))return t;var i=st.get(e.keyCode);return i||Fe}ht.add(De),ht.add($e),ht.add(Ne),ht.add(Pe),ht.add(Me),ht.add(Ue),ht.add(He),ht.add(Ve);var pt="mdc-list-item--activated",ut="mdc-list-item",ft="mdc-list-item--disabled",gt="mdc-list-item--selected",bt="mdc-list-item__text",_t="mdc-list-item__primary-text",xt="mdc-list";(lt={})[""+pt]="mdc-list-item--activated",lt[""+ut]="mdc-list-item",lt[""+ft]="mdc-list-item--disabled",lt[""+gt]="mdc-list-item--selected",lt[""+_t]="mdc-list-item__primary-text",lt[""+xt]="mdc-list";var vt=((ct={})[""+pt]="mdc-deprecated-list-item--activated",ct[""+ut]="mdc-deprecated-list-item",ct[""+ft]="mdc-deprecated-list-item--disabled",ct[""+gt]="mdc-deprecated-list-item--selected",ct[""+bt]="mdc-deprecated-list-item__text",ct[""+_t]="mdc-deprecated-list-item__primary-text",ct[""+xt]="mdc-deprecated-list",ct),yt={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+ut+" button:not(:disabled),\n ."+ut+" a,\n ."+vt[ut]+" button:not(:disabled),\n ."+vt[ut]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+ut+" button:not(:disabled),\n ."+ut+" a,\n ."+ut+' input[type="radio"]:not(:disabled),\n .'+ut+' input[type="checkbox"]:not(:disabled),\n .'+vt[ut]+" button:not(:disabled),\n ."+vt[ut]+" a,\n ."+vt[ut]+' input[type="radio"]:not(:disabled),\n .'+vt[ut]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},wt={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300};const kt=(e,t)=>e-t,Et=["input","button","textarea","select"];function It(e){return e instanceof Set}const St=e=>{const t=e===wt.UNSET_INDEX?new Set:e;return It(t)?new Set(t):new Set([t])};class Ct extends b{constructor(e){super(Object.assign(Object.assign({},Ct.defaultAdapter),e)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=wt.UNSET_INDEX,this.focusedItemIndex_=wt.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return yt}static get numbers(){return wt}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(e){this.wrapFocus_=e}setMulti(e){this.isMulti_=e;const t=this.selectedIndex_;if(e){if(!It(t)){const e=t===wt.UNSET_INDEX;this.selectedIndex_=e?new Set:new Set([t])}}else if(It(t))if(t.size){const e=Array.from(t).sort(kt);this.selectedIndex_=e[0]}else this.selectedIndex_=wt.UNSET_INDEX}setVerticalOrientation(e){this.isVertical_=e}setUseActivatedClass(e){this.useActivatedClass_=e}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(e){this.isIndexValid_(e)&&(this.isMulti_?this.setMultiSelectionAtIndex_(St(e)):this.setSingleSelectionAtIndex_(e))}handleFocusIn(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,0)}handleFocusOut(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,-1),setTimeout(()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()},0)}handleKeydown(e,t,i){const n="ArrowLeft"===mt(e),o="ArrowUp"===mt(e),r="ArrowRight"===mt(e),a="ArrowDown"===mt(e),d="Home"===mt(e),s="End"===mt(e),l="Enter"===mt(e),c="Spacebar"===mt(e);if(this.adapter.isRootFocused())return void(o||s?(e.preventDefault(),this.focusLastElement()):(a||d)&&(e.preventDefault(),this.focusFirstElement()));let h,m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=i,m<0))){if(this.isVertical_&&a||!this.isVertical_&&r)this.preventDefaultEvent(e),h=this.focusNextElement(m);else if(this.isVertical_&&o||!this.isVertical_&&n)this.preventDefaultEvent(e),h=this.focusPrevElement(m);else if(d)this.preventDefaultEvent(e),h=this.focusFirstElement();else if(s)this.preventDefaultEvent(e),h=this.focusLastElement();else if((l||c)&&t){const t=e.target;if(t&&"A"===t.tagName&&l)return;this.preventDefaultEvent(e),this.setSelectedIndexOnAction_(m,!0)}this.focusedItemIndex_=m,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}handleSingleSelection(e,t,i){e!==wt.UNSET_INDEX&&(this.setSelectedIndexOnAction_(e,t,i),this.setTabindexAtIndex_(e),this.focusedItemIndex_=e)}focusNextElement(e){let t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.adapter.focusItemAtIndex(t),t}focusPrevElement(e){let t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(t),t}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const e=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(e),e}setEnabled(e,t){this.isIndexValid_(e)&&this.adapter.setDisabledStateForElementIndex(e,!t)}preventDefaultEvent(e){const t=`${e.target.tagName}`.toLowerCase();-1===Et.indexOf(t)&&e.preventDefault()}setSingleSelectionAtIndex_(e,t=!0){this.selectedIndex_!==e&&(this.selectedIndex_!==wt.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0),this.setAriaForSingleSelectionAtIndex_(e),this.selectedIndex_=e,this.adapter.notifySelected(e))}setMultiSelectionAtIndex_(e,t=!0){const i=((e,t)=>{const i=Array.from(e),n=Array.from(t),o={added:[],removed:[]},r=i.sort(kt),a=n.sort(kt);let d=0,s=0;for(;d<r.length||s<a.length;){const e=r[d],t=a[s];e!==t?void 0!==e&&(void 0===t||e<t)?(o.removed.push(e),d++):void 0!==t&&(void 0===e||t<e)&&(o.added.push(t),s++):(d++,s++)}return o})(St(this.selectedIndex_),e);if(i.removed.length||i.added.length){for(const e of i.removed)t&&this.adapter.setSelectedStateForElementIndex(e,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!1);for(const e of i.added)t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0);this.selectedIndex_=e,this.adapter.notifySelected(e,i)}}setAriaForSingleSelectionAtIndex_(e){this.selectedIndex_===wt.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,yt.ARIA_CURRENT));const t=null!==this.ariaCurrentAttrValue_,i=t?yt.ARIA_CURRENT:yt.ARIA_SELECTED;this.selectedIndex_!==wt.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,i,"false");const n=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,i,n)}setTabindexAtIndex_(e){this.focusedItemIndex_===wt.UNSET_INDEX&&0!==e?this.adapter.setTabIndexForElementIndex(0,-1):this.focusedItemIndex_>=0&&this.focusedItemIndex_!==e&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(e,0)}setTabindexToFirstSelectedItem_(){let e=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==wt.UNSET_INDEX?e=this.selectedIndex_:It(this.selectedIndex_)&&this.selectedIndex_.size>0&&(e=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(e)}isIndexValid_(e){if(e instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===e.size)return!0;{let t=!1;for(const i of e)if(t=this.isIndexInRange_(i),t)break;return t}}if("number"==typeof e){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return e===wt.UNSET_INDEX||this.isIndexInRange_(e)}return!1}isIndexInRange_(e){const t=this.adapter.getListItemCount();return e>=0&&e<t}setSelectedIndexOnAction_(e,t,i){if(this.adapter.getDisabledStateForElementIndex(e))return;let n=e;if(this.isMulti_&&(n=new Set([e])),this.isIndexValid_(n)){if(this.isMulti_)this.toggleMultiAtIndex(e,i,t);else if(t||i)this.setSingleSelectionAtIndex_(e,t);else{this.selectedIndex_===e&&this.setSingleSelectionAtIndex_(wt.UNSET_INDEX)}t&&this.adapter.notifyAction(e)}}toggleMultiAtIndex(e,t,i=!0){let n=!1;n=void 0===t?!this.adapter.getSelectedStateForElementIndex(e):t;const o=St(this.selectedIndex_);n?o.add(e):o.delete(e),this.setMultiSelectionAtIndex_(o,i)}}const Rt=e=>e.hasAttribute("mwc-list-item");function Tt(){const e=this.itemsReadyResolver;this.itemsReady=new Promise(e=>this.itemsReadyResolver=e),e()}class At extends o{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=Ct,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const e=function(e,t=50){let i;return function(n=!0){clearTimeout(i),i=setTimeout(()=>{e(n)},t)}}(this.layout.bind(this));this.debouncedLayout=(t=!0)=>{Tt.call(this),e(t)}}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.itemsReady,e}get items(){return this.items_}updateItems(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[],i=[];for(const e of t)Rt(e)&&(i.push(e),e._managingList=this),e.hasAttribute("divider")&&!e.hasAttribute("role")&&e.setAttribute("role","separator");this.items_=i;const n=new Set;if(this.items_.forEach((e,t)=>{this.itemRoles?e.setAttribute("role",this.itemRoles):e.removeAttribute("role"),e.selected&&n.add(t)}),this.multi)this.select(n);else{const e=n.size?n.entries().next().value[1]:-1;this.select(e)}const o=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(o)}get selected(){const e=this.index;if(!It(e))return-1===e?null:this.items[e];const t=[];for(const i of e)t.push(this.items[i]);return t}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const e=null===this.innerRole?void 0:this.innerRole,t=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return h`
|
|
158
|
+
`}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(e,t){const i=()=>{window.removeEventListener(e,i),this.rippleHandlers.endPress()};window.addEventListener(e,i),this.rippleHandlers.startPress(t)}fireRequestSelected(e,t){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:t,selected:e}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const e of this.listeners)for(const t of e.eventNames)e.target.addEventListener(t,e.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)for(const t of e.eventNames)e.target.removeEventListener(t,e.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const e=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(e)}}i([r("slot")],Te.prototype,"slotElement",void 0),i([d("mwc-ripple")],Te.prototype,"ripple",void 0),i([n({type:String})],Te.prototype,"value",void 0),i([n({type:String,reflect:!0})],Te.prototype,"group",void 0),i([n({type:Number,reflect:!0})],Te.prototype,"tabindex",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){e?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")})],Te.prototype,"disabled",void 0),i([n({type:Boolean,reflect:!0})],Te.prototype,"twoline",void 0),i([n({type:Boolean,reflect:!0})],Te.prototype,"activated",void 0),i([n({type:String,reflect:!0})],Te.prototype,"graphic",void 0),i([n({type:Boolean})],Te.prototype,"multipleGraphics",void 0),i([n({type:Boolean})],Te.prototype,"hasMeta",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){e?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")})],Te.prototype,"noninteractive",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){const t=this.getAttribute("role"),i="gridcell"===t||"option"===t||"row"===t||"tab"===t;i&&e?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(e,"property")})],Te.prototype,"selected",void 0),i([s()],Te.prototype,"shouldRenderRipple",void 0),i([s()],Te.prototype,"_managingList",void 0);const Ae=u`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;let Fe=class extends Te{};Fe.styles=[Ae],Fe=i([y("mwc-list-item")],Fe);var Oe="Unknown",Le="Backspace",$e="Enter",ze="Spacebar",Be="PageUp",De="PageDown",Pe="End",Ne="Home",Me="ArrowLeft",Ue="ArrowUp",He="ArrowRight",Ve="ArrowDown",We="Delete",Ye="Escape",je="Tab",Xe=new Set;Xe.add(Le),Xe.add($e),Xe.add(ze),Xe.add(Be),Xe.add(De),Xe.add(Pe),Xe.add(Ne),Xe.add(Me),Xe.add(Ue),Xe.add(He),Xe.add(Ve),Xe.add(We),Xe.add(Ye),Xe.add(je);var qe=8,Ge=13,Ke=32,Ze=33,Qe=34,Je=35,et=36,tt=37,it=38,nt=39,ot=40,rt=46,at=27,st=9,dt=new Map;dt.set(qe,Le),dt.set(Ge,$e),dt.set(Ke,ze),dt.set(Ze,Be),dt.set(Qe,De),dt.set(Je,Pe),dt.set(et,Ne),dt.set(tt,Me),dt.set(it,Ue),dt.set(nt,He),dt.set(ot,Ve),dt.set(rt,We),dt.set(at,Ye),dt.set(st,je);var lt,ct,ht=new Set;function mt(e){var t=e.key;if(Xe.has(t))return t;var i=dt.get(e.keyCode);return i||Oe}ht.add(Be),ht.add(De),ht.add(Pe),ht.add(Ne),ht.add(Me),ht.add(Ue),ht.add(He),ht.add(Ve);var pt="mdc-list-item--activated",ut="mdc-list-item",ft="mdc-list-item--disabled",gt="mdc-list-item--selected",bt="mdc-list-item__text",_t="mdc-list-item__primary-text",xt="mdc-list";(lt={})[""+pt]="mdc-list-item--activated",lt[""+ut]="mdc-list-item",lt[""+ft]="mdc-list-item--disabled",lt[""+gt]="mdc-list-item--selected",lt[""+_t]="mdc-list-item__primary-text",lt[""+xt]="mdc-list";var yt=((ct={})[""+pt]="mdc-deprecated-list-item--activated",ct[""+ut]="mdc-deprecated-list-item",ct[""+ft]="mdc-deprecated-list-item--disabled",ct[""+gt]="mdc-deprecated-list-item--selected",ct[""+bt]="mdc-deprecated-list-item__text",ct[""+_t]="mdc-deprecated-list-item__primary-text",ct[""+xt]="mdc-deprecated-list",ct),vt={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+ut+" button:not(:disabled),\n ."+ut+" a,\n ."+yt[ut]+" button:not(:disabled),\n ."+yt[ut]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+ut+" button:not(:disabled),\n ."+ut+" a,\n ."+ut+' input[type="radio"]:not(:disabled),\n .'+ut+' input[type="checkbox"]:not(:disabled),\n .'+yt[ut]+" button:not(:disabled),\n ."+yt[ut]+" a,\n ."+yt[ut]+' input[type="radio"]:not(:disabled),\n .'+yt[ut]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},wt={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300};const kt=(e,t)=>e-t,Et=["input","button","textarea","select"];function It(e){return e instanceof Set}const St=e=>{const t=e===wt.UNSET_INDEX?new Set:e;return It(t)?new Set(t):new Set([t])};class Ct extends b{constructor(e){super(Object.assign(Object.assign({},Ct.defaultAdapter),e)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=wt.UNSET_INDEX,this.focusedItemIndex_=wt.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return vt}static get numbers(){return wt}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(e){this.wrapFocus_=e}setMulti(e){this.isMulti_=e;const t=this.selectedIndex_;if(e){if(!It(t)){const e=t===wt.UNSET_INDEX;this.selectedIndex_=e?new Set:new Set([t])}}else if(It(t))if(t.size){const e=Array.from(t).sort(kt);this.selectedIndex_=e[0]}else this.selectedIndex_=wt.UNSET_INDEX}setVerticalOrientation(e){this.isVertical_=e}setUseActivatedClass(e){this.useActivatedClass_=e}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(e){this.isIndexValid_(e)&&(this.isMulti_?this.setMultiSelectionAtIndex_(St(e)):this.setSingleSelectionAtIndex_(e))}handleFocusIn(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,0)}handleFocusOut(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,-1),setTimeout(()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()},0)}handleKeydown(e,t,i){const n="ArrowLeft"===mt(e),o="ArrowUp"===mt(e),r="ArrowRight"===mt(e),a="ArrowDown"===mt(e),s="Home"===mt(e),d="End"===mt(e),l="Enter"===mt(e),c="Spacebar"===mt(e);if(this.adapter.isRootFocused())return void(o||d?(e.preventDefault(),this.focusLastElement()):(a||s)&&(e.preventDefault(),this.focusFirstElement()));let h,m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=i,m<0))){if(this.isVertical_&&a||!this.isVertical_&&r)this.preventDefaultEvent(e),h=this.focusNextElement(m);else if(this.isVertical_&&o||!this.isVertical_&&n)this.preventDefaultEvent(e),h=this.focusPrevElement(m);else if(s)this.preventDefaultEvent(e),h=this.focusFirstElement();else if(d)this.preventDefaultEvent(e),h=this.focusLastElement();else if((l||c)&&t){const t=e.target;if(t&&"A"===t.tagName&&l)return;this.preventDefaultEvent(e),this.setSelectedIndexOnAction_(m,!0)}this.focusedItemIndex_=m,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}handleSingleSelection(e,t,i){e!==wt.UNSET_INDEX&&(this.setSelectedIndexOnAction_(e,t,i),this.setTabindexAtIndex_(e),this.focusedItemIndex_=e)}focusNextElement(e){let t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.adapter.focusItemAtIndex(t),t}focusPrevElement(e){let t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(t),t}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const e=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(e),e}setEnabled(e,t){this.isIndexValid_(e)&&this.adapter.setDisabledStateForElementIndex(e,!t)}preventDefaultEvent(e){const t=`${e.target.tagName}`.toLowerCase();-1===Et.indexOf(t)&&e.preventDefault()}setSingleSelectionAtIndex_(e,t=!0){this.selectedIndex_!==e&&(this.selectedIndex_!==wt.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0),this.setAriaForSingleSelectionAtIndex_(e),this.selectedIndex_=e,this.adapter.notifySelected(e))}setMultiSelectionAtIndex_(e,t=!0){const i=((e,t)=>{const i=Array.from(e),n=Array.from(t),o={added:[],removed:[]},r=i.sort(kt),a=n.sort(kt);let s=0,d=0;for(;s<r.length||d<a.length;){const e=r[s],t=a[d];e!==t?void 0!==e&&(void 0===t||e<t)?(o.removed.push(e),s++):void 0!==t&&(void 0===e||t<e)&&(o.added.push(t),d++):(s++,d++)}return o})(St(this.selectedIndex_),e);if(i.removed.length||i.added.length){for(const e of i.removed)t&&this.adapter.setSelectedStateForElementIndex(e,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!1);for(const e of i.added)t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0);this.selectedIndex_=e,this.adapter.notifySelected(e,i)}}setAriaForSingleSelectionAtIndex_(e){this.selectedIndex_===wt.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,vt.ARIA_CURRENT));const t=null!==this.ariaCurrentAttrValue_,i=t?vt.ARIA_CURRENT:vt.ARIA_SELECTED;this.selectedIndex_!==wt.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,i,"false");const n=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,i,n)}setTabindexAtIndex_(e){this.focusedItemIndex_===wt.UNSET_INDEX&&0!==e?this.adapter.setTabIndexForElementIndex(0,-1):this.focusedItemIndex_>=0&&this.focusedItemIndex_!==e&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(e,0)}setTabindexToFirstSelectedItem_(){let e=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==wt.UNSET_INDEX?e=this.selectedIndex_:It(this.selectedIndex_)&&this.selectedIndex_.size>0&&(e=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(e)}isIndexValid_(e){if(e instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===e.size)return!0;{let t=!1;for(const i of e)if(t=this.isIndexInRange_(i),t)break;return t}}if("number"==typeof e){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return e===wt.UNSET_INDEX||this.isIndexInRange_(e)}return!1}isIndexInRange_(e){const t=this.adapter.getListItemCount();return e>=0&&e<t}setSelectedIndexOnAction_(e,t,i){if(this.adapter.getDisabledStateForElementIndex(e))return;let n=e;if(this.isMulti_&&(n=new Set([e])),this.isIndexValid_(n)){if(this.isMulti_)this.toggleMultiAtIndex(e,i,t);else if(t||i)this.setSingleSelectionAtIndex_(e,t);else{this.selectedIndex_===e&&this.setSingleSelectionAtIndex_(wt.UNSET_INDEX)}t&&this.adapter.notifyAction(e)}}toggleMultiAtIndex(e,t,i=!0){let n=!1;n=void 0===t?!this.adapter.getSelectedStateForElementIndex(e):t;const o=St(this.selectedIndex_);n?o.add(e):o.delete(e),this.setMultiSelectionAtIndex_(o,i)}}const Rt=e=>e.hasAttribute("mwc-list-item");function Tt(){const e=this.itemsReadyResolver;this.itemsReady=new Promise(e=>this.itemsReadyResolver=e),e()}class At extends o{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=Ct,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const e=function(e,t=50){let i;return function(n=!0){clearTimeout(i),i=setTimeout(()=>{e(n)},t)}}(this.layout.bind(this));this.debouncedLayout=(t=!0)=>{Tt.call(this),e(t)}}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.itemsReady,e}get items(){return this.items_}updateItems(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[],i=[];for(const e of t)Rt(e)&&(i.push(e),e._managingList=this),e.hasAttribute("divider")&&!e.hasAttribute("role")&&e.setAttribute("role","separator");this.items_=i;const n=new Set;if(this.items_.forEach((e,t)=>{this.itemRoles?e.setAttribute("role",this.itemRoles):e.removeAttribute("role"),e.selected&&n.add(t)}),this.multi)this.select(n);else{const e=n.size?n.entries().next().value[1]:-1;this.select(e)}const o=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(o)}get selected(){const e=this.index;if(!It(e))return-1===e?null:this.items[e];const t=[];for(const i of e)t.push(this.items[i]);return t}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const e=null===this.innerRole?void 0:this.innerRole,t=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return h`
|
|
159
159
|
<!-- @ts-ignore -->
|
|
160
160
|
<ul
|
|
161
161
|
tabindex=${i}
|
|
@@ -172,15 +172,15 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
172
172
|
</ul>
|
|
173
173
|
`}renderPlaceholder(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[];return void 0!==this.emptyMessage&&0===t.length?h`
|
|
174
174
|
<mwc-list-item noninteractive>${this.emptyMessage}</mwc-list-item>
|
|
175
|
-
`:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusIn(e,t)}}onFocusOut(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusOut(e,t)}}onKeydown(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e),i=e.target,n=Rt(i);this.mdcFoundation.handleKeydown(e,n,t)}}onRequestSelected(e){if(this.mdcFoundation){let t=this.getIndexOfTarget(e);if(-1===t&&(this.layout(),t=this.getIndexOfTarget(e),-1===t))return;if(this.items[t].disabled)return;const i=e.detail.selected,n=e.detail.source;this.mdcFoundation.handleSingleSelection(t,"interaction"===n,i),e.stopPropagation()}}getIndexOfTarget(e){const t=this.items,i=e.composedPath();for(const e of i){let i=-1;if(R(e)&&Rt(e)&&(i=t.indexOf(e)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(e,t)=>{if(!this.mdcRoot)return"";const i=this.items[e];return i?i.getAttribute(t):""},setAttributeForElementIndex:(e,t,i)=>{if(!this.mdcRoot)return;const n=this.items[e];n&&n.setAttribute(t,i)},focusItemAtIndex:e=>{const t=this.items[e];t&&t.focus()},setTabIndexForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.tabindex=t)},notifyAction:e=>{const t={bubbles:!0,composed:!0};t.detail={index:e};const i=new CustomEvent("action",t);this.dispatchEvent(i)},notifySelected:(e,t)=>{const i={bubbles:!0,composed:!0};i.detail={index:e,diff:t};const n=new CustomEvent("selected",i);this.dispatchEvent(n)},isFocusInsideList:()=>T(this),isRootFocused:()=>{const e=this.mdcRoot;return e.getRootNode().activeElement===e},setDisabledStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.disabled=t)},getDisabledStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.disabled},setSelectedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.selected=t)},getSelectedStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.selected},setActivatedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.activated=t)}},this.mdcAdapter}selectUi(e,t=!1){const i=this.items[e];i&&(i.selected=!0,i.activated=t)}deselectUi(e){const t=this.items[e];t&&(t.selected=!1,t.activated=!1)}select(e){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(e)}toggle(e,t){this.multi&&this.mdcFoundation.toggleMultiAtIndex(e,t)}onListItemConnected(e){const t=e.target;this.layout(-1===this.items.indexOf(t))}layout(e=!0){e&&this.updateItems();const t=this.items[0];for(const e of this.items)e.tabindex=-1;t&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=t):t.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const e=A();if(!e.length)return-1;for(let t=e.length-1;t>=0;t--){const i=e[t];if(Rt(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(e){for(const e of this.items)if(0===e.tabindex){e.tabindex=-1;break}this.items[e].tabindex=0,this.items[e].focus()}focus(){const e=this.mdcRoot;e&&e.focus()}blur(){const e=this.mdcRoot;e&&e.blur()}}i([n({type:String})],At.prototype,"emptyMessage",void 0),i([r(".mdc-deprecated-list")],At.prototype,"mdcRoot",void 0),i([B("",!0,"*")],At.prototype,"assignedElements",void 0),i([B("",!0,'[tabindex="0"]')],At.prototype,"tabbableElements",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(e)})],At.prototype,"activatable",void 0),i([n({type:Boolean}),_(function(e,t){this.mdcFoundation&&this.mdcFoundation.setMulti(e),void 0!==t&&this.layout()})],At.prototype,"multi",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(e)})],At.prototype,"wrapFocus",void 0),i([n({type:String}),_(function(e,t){void 0!==t&&this.updateItems()})],At.prototype,"itemRoles",void 0),i([n({type:String})],At.prototype,"innerRole",void 0),i([n({type:String})],At.prototype,"innerAriaLabel",void 0),i([n({type:Boolean})],At.prototype,"rootTabbable",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){var t,i;if(e){const e=null!==(i=null===(t=this.tabbableElements)||void 0===t?void 0:t[0])&&void 0!==i?i:null;this.previousTabindex=e,e&&e.setAttribute("tabindex","-1")}else!e&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)})],At.prototype,"noninteractive",void 0);const Ot=u`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;let Ft=class extends At{};Ft.styles=[Ot],Ft=i([v("mwc-list")],Ft);var Lt,Bt,zt={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},Dt={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},$t={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(Lt||(Lt={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(Bt||(Bt={}));var Nt=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.isSurfaceOpen=!1,n.isQuickOpen=!1,n.isHoistedElement=!1,n.isFixedPosition=!1,n.isHorizontallyCenteredOnViewport=!1,n.maxHeight=0,n.openBottomBias=0,n.openAnimationEndTimerId=0,n.closeAnimationEndTimerId=0,n.animationRequestId=0,n.anchorCorner=Bt.TOP_START,n.originCorner=Bt.TOP_START,n.anchorMargin={top:0,right:0,bottom:0,left:0},n.position={x:0,y:0},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return zt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Dt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return $t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return Bt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,i=e.ROOT,n=e.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(n)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^Lt.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.isFixed=function(){return this.isFixedPosition},t.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},t.prototype.setIsHorizontallyCenteredOnViewport=function(e){this.isHorizontallyCenteredOnViewport=e},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.setMaxHeight=function(e){this.maxHeight=e},t.prototype.setOpenBottomBias=function(e){this.openBottomBias=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.adapter.addClass(t.cssClasses.OPEN),e.openAnimationEndTimerId=setTimeout(function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()},$t.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var i=this;if(void 0===e&&(e=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){i.adapter.removeClass(t.cssClasses.OPEN),i.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout(function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()},$t.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()}},t.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},t.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},t.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),n=this.getMenuSurfaceMaxHeight(i),o=this.hasBit(i,Lt.BOTTOM)?"bottom":"top",r=this.hasBit(i,Lt.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(i),d=this.getVerticalOriginOffset(i),s=this.measurements,l=s.anchorSize,c=s.surfaceSize,h=((e={})[r]=a,e[o]=d,e);l.width/c.width>$t.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(h),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(h),this.adapter.setMaxHeight(n?n+"px":""),this.hasBit(i,Lt.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),n=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:i.width-e.right,bottom:i.height-e.bottom,left:e.left},viewportSize:i,windowScroll:n}},t.prototype.getoriginCorner=function(){var e,i,n=this.originCorner,o=this.measurements,r=o.viewportDistance,a=o.anchorSize,d=o.surfaceSize,s=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,Lt.BOTTOM)?(e=r.top-s+this.anchorMargin.bottom,i=r.bottom-s-this.anchorMargin.bottom):(e=r.top-s+this.anchorMargin.top,i=r.bottom-s+a.height-this.anchorMargin.top),!(i-d.height>0)&&e>i+this.openBottomBias&&(n=this.setBit(n,Lt.BOTTOM));var l,c,h=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,Lt.FLIP_RTL),p=this.hasBit(this.anchorCorner,Lt.RIGHT)||this.hasBit(n,Lt.RIGHT),u=!1;(u=h&&m?!p:p)?(l=r.left+a.width+this.anchorMargin.right,c=r.right-this.anchorMargin.right):(l=r.left+this.anchorMargin.left,c=r.right+a.width-this.anchorMargin.left);var f=l-d.width>0,g=c-d.width>0,b=this.hasBit(n,Lt.FLIP_RTL)&&this.hasBit(n,Lt.RIGHT);return g&&b&&h||!f&&b?n=this.unsetBit(n,Lt.RIGHT):(f&&u&&h||f&&!u&&p||!g&&l>=c)&&(n=this.setBit(n,Lt.RIGHT)),n},t.prototype.getMenuSurfaceMaxHeight=function(e){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,n=0,o=this.hasBit(e,Lt.BOTTOM),r=this.hasBit(this.anchorCorner,Lt.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return o?(n=i.top+this.anchorMargin.top-a,r||(n+=this.measurements.anchorSize.height)):(n=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(n-=this.measurements.anchorSize.height)),n},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,Lt.RIGHT),n=this.hasBit(this.anchorCorner,Lt.RIGHT);if(i){var o=n?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return n?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,Lt.BOTTOM),n=this.hasBit(this.anchorCorner,Lt.BOTTOM);return i?n?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:n?t.height+this.anchorMargin.bottom:this.anchorMargin.top},t.prototype.adjustPositionForHoistedElement=function(e){var t,i,n=this.measurements,o=n.windowScroll,r=n.viewportDistance,a=n.surfaceSize,d=n.viewportSize,s=Object.keys(e);try{for(var l=E(s),c=l.next();!c.done;c=l.next()){var h=c.value,m=e[h]||0;!this.isHorizontallyCenteredOnViewport||"left"!==h&&"right"!==h?(m+=r[h],this.isFixedPosition||("top"===h?m+=o.y:"bottom"===h?m-=o.y:"left"===h?m+=o.x:m-=o.x),e[h]=m):e[h]=(d.width-a.width)/2}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this,t=this.adapter.isFocused(),i=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,n=i.activeElement&&this.adapter.isElementInContainer(i.activeElement);(t||n)&&setTimeout(function(){e.adapter.restoreFocus()},$t.TOUCH_EVENT_WAIT_MS)},t.prototype.hasBit=function(e,t){return Boolean(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(b);const Pt={TOP_LEFT:Bt.TOP_LEFT,TOP_RIGHT:Bt.TOP_RIGHT,BOTTOM_LEFT:Bt.BOTTOM_LEFT,BOTTOM_RIGHT:Bt.BOTTOM_RIGHT,TOP_START:Bt.TOP_START,TOP_END:Bt.TOP_END,BOTTOM_START:Bt.BOTTOM_START,BOTTOM_END:Bt.BOTTOM_END};class Mt extends o{constructor(){super(...arguments),this.mdcFoundationClass=Nt,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=Bt.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){return this.renderSurface()}renderSurface(){const e=this.getRootClasses(),t=this.getRootStyles();return h`
|
|
175
|
+
`:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusIn(e,t)}}onFocusOut(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusOut(e,t)}}onKeydown(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e),i=e.target,n=Rt(i);this.mdcFoundation.handleKeydown(e,n,t)}}onRequestSelected(e){if(this.mdcFoundation){let t=this.getIndexOfTarget(e);if(-1===t&&(this.layout(),t=this.getIndexOfTarget(e),-1===t))return;if(this.items[t].disabled)return;const i=e.detail.selected,n=e.detail.source;this.mdcFoundation.handleSingleSelection(t,"interaction"===n,i),e.stopPropagation()}}getIndexOfTarget(e){const t=this.items,i=e.composedPath();for(const e of i){let i=-1;if(R(e)&&Rt(e)&&(i=t.indexOf(e)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(e,t)=>{if(!this.mdcRoot)return"";const i=this.items[e];return i?i.getAttribute(t):""},setAttributeForElementIndex:(e,t,i)=>{if(!this.mdcRoot)return;const n=this.items[e];n&&n.setAttribute(t,i)},focusItemAtIndex:e=>{const t=this.items[e];t&&t.focus()},setTabIndexForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.tabindex=t)},notifyAction:e=>{const t={bubbles:!0,composed:!0};t.detail={index:e};const i=new CustomEvent("action",t);this.dispatchEvent(i)},notifySelected:(e,t)=>{const i={bubbles:!0,composed:!0};i.detail={index:e,diff:t};const n=new CustomEvent("selected",i);this.dispatchEvent(n)},isFocusInsideList:()=>T(this),isRootFocused:()=>{const e=this.mdcRoot;return e.getRootNode().activeElement===e},setDisabledStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.disabled=t)},getDisabledStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.disabled},setSelectedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.selected=t)},getSelectedStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.selected},setActivatedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.activated=t)}},this.mdcAdapter}selectUi(e,t=!1){const i=this.items[e];i&&(i.selected=!0,i.activated=t)}deselectUi(e){const t=this.items[e];t&&(t.selected=!1,t.activated=!1)}select(e){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(e)}toggle(e,t){this.multi&&this.mdcFoundation.toggleMultiAtIndex(e,t)}onListItemConnected(e){const t=e.target;this.layout(-1===this.items.indexOf(t))}layout(e=!0){e&&this.updateItems();const t=this.items[0];for(const e of this.items)e.tabindex=-1;t&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=t):t.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const e=A();if(!e.length)return-1;for(let t=e.length-1;t>=0;t--){const i=e[t];if(Rt(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(e){for(const e of this.items)if(0===e.tabindex){e.tabindex=-1;break}this.items[e].tabindex=0,this.items[e].focus()}focus(){const e=this.mdcRoot;e&&e.focus()}blur(){const e=this.mdcRoot;e&&e.blur()}}i([n({type:String})],At.prototype,"emptyMessage",void 0),i([r(".mdc-deprecated-list")],At.prototype,"mdcRoot",void 0),i([$("",!0,"*")],At.prototype,"assignedElements",void 0),i([$("",!0,'[tabindex="0"]')],At.prototype,"tabbableElements",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(e)})],At.prototype,"activatable",void 0),i([n({type:Boolean}),_(function(e,t){this.mdcFoundation&&this.mdcFoundation.setMulti(e),void 0!==t&&this.layout()})],At.prototype,"multi",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(e)})],At.prototype,"wrapFocus",void 0),i([n({type:String}),_(function(e,t){void 0!==t&&this.updateItems()})],At.prototype,"itemRoles",void 0),i([n({type:String})],At.prototype,"innerRole",void 0),i([n({type:String})],At.prototype,"innerAriaLabel",void 0),i([n({type:Boolean})],At.prototype,"rootTabbable",void 0),i([n({type:Boolean,reflect:!0}),_(function(e){var t,i;if(e){const e=null!==(i=null===(t=this.tabbableElements)||void 0===t?void 0:t[0])&&void 0!==i?i:null;this.previousTabindex=e,e&&e.setAttribute("tabindex","-1")}else!e&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)})],At.prototype,"noninteractive",void 0);const Ft=u`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;let Ot=class extends At{};Ot.styles=[Ft],Ot=i([y("mwc-list")],Ot);var Lt,$t,zt={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},Bt={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Dt={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(Lt||(Lt={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}($t||($t={}));var Pt=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.isSurfaceOpen=!1,n.isQuickOpen=!1,n.isHoistedElement=!1,n.isFixedPosition=!1,n.isHorizontallyCenteredOnViewport=!1,n.maxHeight=0,n.openBottomBias=0,n.openAnimationEndTimerId=0,n.closeAnimationEndTimerId=0,n.animationRequestId=0,n.anchorCorner=$t.TOP_START,n.originCorner=$t.TOP_START,n.anchorMargin={top:0,right:0,bottom:0,left:0},n.position={x:0,y:0},n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return zt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Bt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Dt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return $t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,i=e.ROOT,n=e.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(n)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^Lt.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.isFixed=function(){return this.isFixedPosition},t.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},t.prototype.setIsHorizontallyCenteredOnViewport=function(e){this.isHorizontallyCenteredOnViewport=e},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.setMaxHeight=function(e){this.maxHeight=e},t.prototype.setOpenBottomBias=function(e){this.openBottomBias=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.adapter.addClass(t.cssClasses.OPEN),e.openAnimationEndTimerId=setTimeout(function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()},Dt.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var i=this;if(void 0===e&&(e=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){i.adapter.removeClass(t.cssClasses.OPEN),i.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout(function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()},Dt.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()}},t.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},t.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},t.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),n=this.getMenuSurfaceMaxHeight(i),o=this.hasBit(i,Lt.BOTTOM)?"bottom":"top",r=this.hasBit(i,Lt.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(i),s=this.getVerticalOriginOffset(i),d=this.measurements,l=d.anchorSize,c=d.surfaceSize,h=((e={})[r]=a,e[o]=s,e);l.width/c.width>Dt.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(h),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(h),this.adapter.setMaxHeight(n?n+"px":""),this.hasBit(i,Lt.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),n=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:i.width-e.right,bottom:i.height-e.bottom,left:e.left},viewportSize:i,windowScroll:n}},t.prototype.getoriginCorner=function(){var e,i,n=this.originCorner,o=this.measurements,r=o.viewportDistance,a=o.anchorSize,s=o.surfaceSize,d=t.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,Lt.BOTTOM)?(e=r.top-d+this.anchorMargin.bottom,i=r.bottom-d-this.anchorMargin.bottom):(e=r.top-d+this.anchorMargin.top,i=r.bottom-d+a.height-this.anchorMargin.top),!(i-s.height>0)&&e>i+this.openBottomBias&&(n=this.setBit(n,Lt.BOTTOM));var l,c,h=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,Lt.FLIP_RTL),p=this.hasBit(this.anchorCorner,Lt.RIGHT)||this.hasBit(n,Lt.RIGHT),u=!1;(u=h&&m?!p:p)?(l=r.left+a.width+this.anchorMargin.right,c=r.right-this.anchorMargin.right):(l=r.left+this.anchorMargin.left,c=r.right+a.width-this.anchorMargin.left);var f=l-s.width>0,g=c-s.width>0,b=this.hasBit(n,Lt.FLIP_RTL)&&this.hasBit(n,Lt.RIGHT);return g&&b&&h||!f&&b?n=this.unsetBit(n,Lt.RIGHT):(f&&u&&h||f&&!u&&p||!g&&l>=c)&&(n=this.setBit(n,Lt.RIGHT)),n},t.prototype.getMenuSurfaceMaxHeight=function(e){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,n=0,o=this.hasBit(e,Lt.BOTTOM),r=this.hasBit(this.anchorCorner,Lt.BOTTOM),a=t.numbers.MARGIN_TO_EDGE;return o?(n=i.top+this.anchorMargin.top-a,r||(n+=this.measurements.anchorSize.height)):(n=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(n-=this.measurements.anchorSize.height)),n},t.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,Lt.RIGHT),n=this.hasBit(this.anchorCorner,Lt.RIGHT);if(i){var o=n?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return n?t.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,Lt.BOTTOM),n=this.hasBit(this.anchorCorner,Lt.BOTTOM);return i?n?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:n?t.height+this.anchorMargin.bottom:this.anchorMargin.top},t.prototype.adjustPositionForHoistedElement=function(e){var t,i,n=this.measurements,o=n.windowScroll,r=n.viewportDistance,a=n.surfaceSize,s=n.viewportSize,d=Object.keys(e);try{for(var l=E(d),c=l.next();!c.done;c=l.next()){var h=c.value,m=e[h]||0;!this.isHorizontallyCenteredOnViewport||"left"!==h&&"right"!==h?(m+=r[h],this.isFixedPosition||("top"===h?m+=o.y:"bottom"===h?m-=o.y:"left"===h?m+=o.x:m-=o.x),e[h]=m):e[h]=(s.width-a.width)/2}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}},t.prototype.maybeRestoreFocus=function(){var e=this,t=this.adapter.isFocused(),i=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,n=i.activeElement&&this.adapter.isElementInContainer(i.activeElement);(t||n)&&setTimeout(function(){e.adapter.restoreFocus()},Dt.TOUCH_EVENT_WAIT_MS)},t.prototype.hasBit=function(e,t){return Boolean(e&t)},t.prototype.setBit=function(e,t){return e|t},t.prototype.unsetBit=function(e,t){return e^t},t.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},t}(b);const Nt={TOP_LEFT:$t.TOP_LEFT,TOP_RIGHT:$t.TOP_RIGHT,BOTTOM_LEFT:$t.BOTTOM_LEFT,BOTTOM_RIGHT:$t.BOTTOM_RIGHT,TOP_START:$t.TOP_START,TOP_END:$t.TOP_END,BOTTOM_START:$t.BOTTOM_START,BOTTOM_END:$t.BOTTOM_END};class Mt extends o{constructor(){super(...arguments),this.mdcFoundationClass=Pt,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=$t.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){return this.renderSurface()}renderSurface(){const e=this.getRootClasses(),t=this.getRootStyles();return h`
|
|
176
176
|
<div
|
|
177
177
|
class=${m(e)}
|
|
178
|
-
style="${
|
|
178
|
+
style="${F(t)}"
|
|
179
179
|
@keydown=${this.onKeydown}
|
|
180
180
|
@opened=${this.registerBodyClick}
|
|
181
181
|
@closed=${this.deregisterBodyClick}>
|
|
182
182
|
${this.renderContent()}
|
|
183
|
-
</div>`}getRootClasses(){return{"mdc-menu-surface":!0,"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth}}getRootStyles(){return{top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin}}renderContent(){return h`<slot></slot>`}createAdapter(){return Object.assign(Object.assign({},C(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(e)},notifyClosing:()=>{const e=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},notifyOpen:()=>{const e=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(e)},notifyOpening:()=>{const e=new CustomEvent("opening",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>T(this),saveFocus:()=>{const e=A(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;-1===e.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}onOpenChanged(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():void 0!==t&&this.mdcFoundation.close())}close(){this.open=!1}show(){this.open=!0}}i([r(".mdc-menu-surface")],Mt.prototype,"mdcRoot",void 0),i([r("slot")],Mt.prototype,"slotElement",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(e)})],Mt.prototype,"absolute",void 0),i([n({type:Boolean})],Mt.prototype,"fullwidth",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(e)})],Mt.prototype,"fixed",void 0),i([n({type:Number}),_(function(e){this.mdcFoundation&&null!==this.y&&null!==e&&(this.mdcFoundation.setAbsolutePosition(e,this.y),this.mdcFoundation.setAnchorMargin({left:e,top:this.y,right:-e,bottom:this.y}))})],Mt.prototype,"x",void 0),i([n({type:Number}),_(function(e){this.mdcFoundation&&null!==this.x&&null!==e&&(this.mdcFoundation.setAbsolutePosition(this.x,e),this.mdcFoundation.setAnchorMargin({left:this.x,top:e,right:-this.x,bottom:e}))})],Mt.prototype,"y",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(e)})],Mt.prototype,"quick",void 0),i([n({type:Boolean,reflect:!0}),_(function(e,t){this.onOpenChanged(e,t)})],Mt.prototype,"open",void 0),i([n({type:Boolean})],Mt.prototype,"stayOpenOnBodyClick",void 0),i([d(),_(function(e){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(e)})],Mt.prototype,"bitwiseCorner",void 0),i([n({type:String}),_(function(e){if(this.mdcFoundation){const t="START"===e||"END"===e,i=null===this.previousMenuCorner,n=!i&&e!==this.previousMenuCorner;t&&(n||i&&"END"===e)&&(this.bitwiseCorner=this.bitwiseCorner^Lt.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=e)}})],Mt.prototype,"menuCorner",void 0),i([n({type:String}),_(function(e){if(this.mdcFoundation&&e){let t=Pt[e];"END"===this.menuCorner&&(t^=Lt.RIGHT),this.bitwiseCorner=t}})],Mt.prototype,"corner",void 0),i([d()],Mt.prototype,"styleTop",void 0),i([d()],Mt.prototype,"styleLeft",void 0),i([d()],Mt.prototype,"styleRight",void 0),i([d()],Mt.prototype,"styleBottom",void 0),i([d()],Mt.prototype,"styleMaxHeight",void 0),i([d()],Mt.prototype,"styleTransformOrigin",void 0);const Ut=u`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;let Ht=class extends Mt{};Ht.styles=[Ut],Ht=i([v("mwc-menu-surface")],Ht);var Vt,Wt={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Xt={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},qt={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(Vt||(Vt={}));var Yt=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.closeAnimationEndTimerId=0,n.defaultFocusState=Vt.LIST_ROOT,n.selectedIndex=-1,n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Wt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Xt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return qt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var t=e.key,i=e.keyCode;("Tab"===t||9===i)&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var t=this,i=this.adapter.getElementIndex(e);if(!(i<0)){this.adapter.notifySelected({index:i});var n="true"===this.adapter.getAttributeFromElementAtIndex(i,Xt.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(n),this.closeAnimationEndTimerId=setTimeout(function(){var i=t.adapter.getElementIndex(e);i>=0&&t.adapter.isSelectableItemAtIndex(i)&&t.setSelectedIndex(i)},Nt.numbers.TRANSITION_CLOSE_DURATION)}},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case Vt.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Vt.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Vt.NONE:break;default:this.adapter.focusListRoot()}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,Xt.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,Wt.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,Wt.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,Xt.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=e},t.prototype.setEnabled=function(e,t){this.validatedIndex(e),t?(this.adapter.removeClassFromElementAtIndex(e,ft),this.adapter.addAttributeToElementAtIndex(e,Xt.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,ft),this.adapter.addAttributeToElementAtIndex(e,Xt.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e<t))throw new Error("MDCMenuFoundation: No list item at specified index.")},t}(b);class Gt extends o{constructor(){super(...arguments),this.mdcFoundationClass=Yt,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_||(this.listElement_=this.renderRoot.querySelector("mwc-list")),this.listElement_}get items(){const e=this.listElement;return e?e.items:[]}get index(){const e=this.listElement;return e?e.index:-1}get selected(){const e=this.listElement;return e?e.selected:null}render(){return this.renderSurface()}renderSurface(){const e=this.getSurfaceClasses();return h`
|
|
183
|
+
</div>`}getRootClasses(){return{"mdc-menu-surface":!0,"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth}}getRootStyles(){return{top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin}}renderContent(){return h`<slot></slot>`}createAdapter(){return Object.assign(Object.assign({},C(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(e)},notifyClosing:()=>{const e=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},notifyOpen:()=>{const e=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(e)},notifyOpening:()=>{const e=new CustomEvent("opening",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>T(this),saveFocus:()=>{const e=A(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;-1===e.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}onOpenChanged(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():void 0!==t&&this.mdcFoundation.close())}close(){this.open=!1}show(){this.open=!0}}i([r(".mdc-menu-surface")],Mt.prototype,"mdcRoot",void 0),i([r("slot")],Mt.prototype,"slotElement",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(e)})],Mt.prototype,"absolute",void 0),i([n({type:Boolean})],Mt.prototype,"fullwidth",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(e)})],Mt.prototype,"fixed",void 0),i([n({type:Number}),_(function(e){this.mdcFoundation&&null!==this.y&&null!==e&&(this.mdcFoundation.setAbsolutePosition(e,this.y),this.mdcFoundation.setAnchorMargin({left:e,top:this.y,right:-e,bottom:this.y}))})],Mt.prototype,"x",void 0),i([n({type:Number}),_(function(e){this.mdcFoundation&&null!==this.x&&null!==e&&(this.mdcFoundation.setAbsolutePosition(this.x,e),this.mdcFoundation.setAnchorMargin({left:this.x,top:e,right:-this.x,bottom:e}))})],Mt.prototype,"y",void 0),i([n({type:Boolean}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(e)})],Mt.prototype,"quick",void 0),i([n({type:Boolean,reflect:!0}),_(function(e,t){this.onOpenChanged(e,t)})],Mt.prototype,"open",void 0),i([n({type:Boolean})],Mt.prototype,"stayOpenOnBodyClick",void 0),i([s(),_(function(e){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(e)})],Mt.prototype,"bitwiseCorner",void 0),i([n({type:String}),_(function(e){if(this.mdcFoundation){const t="START"===e||"END"===e,i=null===this.previousMenuCorner,n=!i&&e!==this.previousMenuCorner;t&&(n||i&&"END"===e)&&(this.bitwiseCorner=this.bitwiseCorner^Lt.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=e)}})],Mt.prototype,"menuCorner",void 0),i([n({type:String}),_(function(e){if(this.mdcFoundation&&e){let t=Nt[e];"END"===this.menuCorner&&(t^=Lt.RIGHT),this.bitwiseCorner=t}})],Mt.prototype,"corner",void 0),i([s()],Mt.prototype,"styleTop",void 0),i([s()],Mt.prototype,"styleLeft",void 0),i([s()],Mt.prototype,"styleRight",void 0),i([s()],Mt.prototype,"styleBottom",void 0),i([s()],Mt.prototype,"styleMaxHeight",void 0),i([s()],Mt.prototype,"styleTransformOrigin",void 0);const Ut=u`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;let Ht=class extends Mt{};Ht.styles=[Ut],Ht=i([y("mwc-menu-surface")],Ht);var Vt,Wt={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Yt={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},jt={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(Vt||(Vt={}));var Xt=function(e){function t(i){var n=e.call(this,g(g({},t.defaultAdapter),i))||this;return n.closeAnimationEndTimerId=0,n.defaultFocusState=Vt.LIST_ROOT,n.selectedIndex=-1,n}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return Wt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Yt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return jt},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var t=e.key,i=e.keyCode;("Tab"===t||9===i)&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var t=this,i=this.adapter.getElementIndex(e);if(!(i<0)){this.adapter.notifySelected({index:i});var n="true"===this.adapter.getAttributeFromElementAtIndex(i,Yt.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(n),this.closeAnimationEndTimerId=setTimeout(function(){var i=t.adapter.getElementIndex(e);i>=0&&t.adapter.isSelectableItemAtIndex(i)&&t.setSelectedIndex(i)},Pt.numbers.TRANSITION_CLOSE_DURATION)}},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case Vt.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Vt.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Vt.NONE:break;default:this.adapter.focusListRoot()}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,Yt.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,Wt.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,Wt.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,Yt.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=e},t.prototype.setEnabled=function(e,t){this.validatedIndex(e),t?(this.adapter.removeClassFromElementAtIndex(e,ft),this.adapter.addAttributeToElementAtIndex(e,Yt.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,ft),this.adapter.addAttributeToElementAtIndex(e,Yt.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e<t))throw new Error("MDCMenuFoundation: No list item at specified index.")},t}(b);class qt extends o{constructor(){super(...arguments),this.mdcFoundationClass=Xt,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_||(this.listElement_=this.renderRoot.querySelector("mwc-list")),this.listElement_}get items(){const e=this.listElement;return e?e.items:[]}get index(){const e=this.listElement;return e?e.index:-1}get selected(){const e=this.listElement;return e?e.selected:null}render(){return this.renderSurface()}renderSurface(){const e=this.getSurfaceClasses();return h`
|
|
184
184
|
<mwc-menu-surface
|
|
185
185
|
?hidden=${!this.open}
|
|
186
186
|
.anchor=${this.anchor}
|
|
@@ -211,7 +211,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
211
211
|
.activatable=${this.activatable}
|
|
212
212
|
@action=${this.onAction}>
|
|
213
213
|
<slot></slot>
|
|
214
|
-
</mwc-list>`}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?this.forceGroupSelection&&!n.selected&&i.toggle(e,!0):n.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?n.selected&&i.toggle(e,!1):n.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const n=this.listElement;if(!n)return;const o=n.items[e];o&&o.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&n.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const n=i.items[e];return n?n.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let n=0;n<t.items.length;n++){if(n===e)continue;const o=t.items[n];if(o.selected&&o.group===i.group)return n}return-1},isSelectableItemAtIndex:e=>{const t=this.listElement;if(!t)return!1;const i=t.items[e];return!!i&&i.hasAttribute("group")}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,n=t.items[i];n&&this.mdcFoundation.handleItemAction(n)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}i([r(".mdc-menu")],Gt.prototype,"mdcRoot",void 0),i([r("slot")],Gt.prototype,"slotElement",void 0),i([n({type:Object})],Gt.prototype,"anchor",void 0),i([n({type:Boolean,reflect:!0})],Gt.prototype,"open",void 0),i([n({type:Boolean})],Gt.prototype,"quick",void 0),i([n({type:Boolean})],Gt.prototype,"wrapFocus",void 0),i([n({type:String})],Gt.prototype,"innerRole",void 0),i([n({type:String})],Gt.prototype,"innerAriaLabel",void 0),i([n({type:String})],Gt.prototype,"corner",void 0),i([n({type:Number})],Gt.prototype,"x",void 0),i([n({type:Number})],Gt.prototype,"y",void 0),i([n({type:Boolean})],Gt.prototype,"absolute",void 0),i([n({type:Boolean})],Gt.prototype,"multi",void 0),i([n({type:Boolean})],Gt.prototype,"activatable",void 0),i([n({type:Boolean})],Gt.prototype,"fixed",void 0),i([n({type:Boolean})],Gt.prototype,"forceGroupSelection",void 0),i([n({type:Boolean})],Gt.prototype,"fullwidth",void 0),i([n({type:String})],Gt.prototype,"menuCorner",void 0),i([n({type:Boolean})],Gt.prototype,"stayOpenOnBodyClick",void 0),i([n({type:String}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(Vt[e])})],Gt.prototype,"defaultFocus",void 0);const jt=u`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;let Kt=class extends Gt{};Kt.styles=[jt],Kt=i([v("mwc-menu")],Kt);var Zt=["input","button","textarea","select"],Qt=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===Zt.indexOf(i)&&e.preventDefault()}};function Jt(e,t){for(var i=new Map,n=0;n<e;n++){var o=t(n).trim();if(o){var r=o[0].toLowerCase();i.has(r)||i.set(r,[]),i.get(r).push({text:o.toLowerCase(),index:n})}}return i.forEach(function(e){e.sort(function(e,t){return e.index-t.index})}),i}function ei(e,t){var i,n=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,d=e.skipFocus,s=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){!function(e){e.typeaheadBuffer=""}(t)},wt.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+n,i=1===t.typeaheadBuffer.length?function(e,t,i,n){var o=n.typeaheadBuffer[0],r=e.get(o);if(!r)return-1;if(o===n.currentFirstChar&&r[n.sortedIndexCursor].index===t){n.sortedIndexCursor=(n.sortedIndexCursor+1)%r.length;var a=r[n.sortedIndexCursor].index;if(!i(a))return a}n.currentFirstChar=o;var d,s=-1;for(d=0;d<r.length;d++)if(!i(r[d].index)){s=d;break}for(;d<r.length;d++)if(r[d].index>t&&!i(r[d].index)){s=d;break}if(-1!==s)return n.sortedIndexCursor=s,r[n.sortedIndexCursor].index;return-1}(r,a,s,t):function(e,t,i){var n=i.typeaheadBuffer[0],o=e.get(n);if(!o)return-1;var r=o[i.sortedIndexCursor];if(0===r.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(r.index))return r.index;var a=(i.sortedIndexCursor+1)%o.length,d=-1;for(;a!==i.sortedIndexCursor;){var s=o[a],l=0===s.text.lastIndexOf(i.typeaheadBuffer,0),c=!t(s.index);if(l&&c){d=a;break}a=(a+1)%o.length}if(-1!==d)return i.sortedIndexCursor=d,o[i.sortedIndexCursor].index;return-1}(r,s,t),-1===i||d||o(i),i}function ti(e){return e.typeaheadBuffer.length>0}var ii={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},ni={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},oi={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},ri=function(e){function t(i,n){void 0===n&&(n={});var o=e.call(this,g(g({},t.defaultAdapter),i))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=oi.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=n.leadingIcon,o.helperText=n.helperText,o}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ii},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oi},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ni},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),e>=this.adapter.getMenuItemCount()||(e===oi.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),i||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var i=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(i,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==oi.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(ii.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(ii.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass(ii.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(ii.FOCUSED),i=e||t,n=this.adapter.hasClass(ii.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(n)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},t.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},t.prototype.handleMenuClosed=function(){this.adapter.removeClass(ii.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(ii.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(ii.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(ii.FOCUSED)){var t=mt(e)===Be,i=mt(e)===ze,n=mt(e)===Ue,o=mt(e)===Ve;if(!(e.ctrlKey||e.metaKey)&&(!i&&e.key&&1===e.key.length||i&&this.adapter.isTypeaheadInProgress())){var r=i?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void e.preventDefault()}(t||i||n||o)&&(this.openMenu(),e.preventDefault())}},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(ii.FOCUSED);if(e){var i=oi.LABEL_SCALE,n=this.adapter.getLabelWidth()*i;this.adapter.notchOutline(n)}else t||this.adapter.closeOutline()}},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},t.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},t.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(ii.INVALID),this.adapter.removeMenuClass(ii.MENU_INVALID)):(this.adapter.addClass(ii.INVALID),this.adapter.addMenuClass(ii.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(ii.REQUIRED)&&!this.adapter.hasClass(ii.DISABLED)?this.getSelectedIndex()!==oi.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(ii.REQUIRED):this.adapter.removeClass(ii.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},t.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},t.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner(Bt.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(ii.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(ii.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(ii.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(ii.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),i=this.helperText.getId();t&&i?this.adapter.setSelectAnchorAttr(ni.ARIA_DESCRIBEDBY,i):this.adapter.removeSelectAnchorAttr(ni.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},oi.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(b);const ai=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class di extends N{constructor(){super(...arguments),this.mdcFoundationClass=ri,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=ai()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const e=this.menuElement;return e?e.selected:null}get index(){const e=this.menuElement;return e?e.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const e={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},t=this.label?"label":void 0,i=this.shouldRenderHelperText?"helper-text":void 0;return h`
|
|
214
|
+
</mwc-list>`}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?this.forceGroupSelection&&!n.selected&&i.toggle(e,!0):n.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?n.selected&&i.toggle(e,!1):n.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const n=this.listElement;if(!n)return;const o=n.items[e];o&&o.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&n.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const n=i.items[e];return n?n.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let n=0;n<t.items.length;n++){if(n===e)continue;const o=t.items[n];if(o.selected&&o.group===i.group)return n}return-1},isSelectableItemAtIndex:e=>{const t=this.listElement;if(!t)return!1;const i=t.items[e];return!!i&&i.hasAttribute("group")}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,n=t.items[i];n&&this.mdcFoundation.handleItemAction(n)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}i([r(".mdc-menu")],qt.prototype,"mdcRoot",void 0),i([r("slot")],qt.prototype,"slotElement",void 0),i([n({type:Object})],qt.prototype,"anchor",void 0),i([n({type:Boolean,reflect:!0})],qt.prototype,"open",void 0),i([n({type:Boolean})],qt.prototype,"quick",void 0),i([n({type:Boolean})],qt.prototype,"wrapFocus",void 0),i([n({type:String})],qt.prototype,"innerRole",void 0),i([n({type:String})],qt.prototype,"innerAriaLabel",void 0),i([n({type:String})],qt.prototype,"corner",void 0),i([n({type:Number})],qt.prototype,"x",void 0),i([n({type:Number})],qt.prototype,"y",void 0),i([n({type:Boolean})],qt.prototype,"absolute",void 0),i([n({type:Boolean})],qt.prototype,"multi",void 0),i([n({type:Boolean})],qt.prototype,"activatable",void 0),i([n({type:Boolean})],qt.prototype,"fixed",void 0),i([n({type:Boolean})],qt.prototype,"forceGroupSelection",void 0),i([n({type:Boolean})],qt.prototype,"fullwidth",void 0),i([n({type:String})],qt.prototype,"menuCorner",void 0),i([n({type:Boolean})],qt.prototype,"stayOpenOnBodyClick",void 0),i([n({type:String}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(Vt[e])})],qt.prototype,"defaultFocus",void 0);const Gt=u`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;let Kt=class extends qt{};Kt.styles=[Gt],Kt=i([y("mwc-menu")],Kt);var Zt=["input","button","textarea","select"],Qt=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===Zt.indexOf(i)&&e.preventDefault()}};function Jt(e,t){for(var i=new Map,n=0;n<e;n++){var o=t(n).trim();if(o){var r=o[0].toLowerCase();i.has(r)||i.set(r,[]),i.get(r).push({text:o.toLowerCase(),index:n})}}return i.forEach(function(e){e.sort(function(e,t){return e.index-t.index})}),i}function ei(e,t){var i,n=e.nextChar,o=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,a=e.focusedItemIndex,s=e.skipFocus,d=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function(){!function(e){e.typeaheadBuffer=""}(t)},wt.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+n,i=1===t.typeaheadBuffer.length?function(e,t,i,n){var o=n.typeaheadBuffer[0],r=e.get(o);if(!r)return-1;if(o===n.currentFirstChar&&r[n.sortedIndexCursor].index===t){n.sortedIndexCursor=(n.sortedIndexCursor+1)%r.length;var a=r[n.sortedIndexCursor].index;if(!i(a))return a}n.currentFirstChar=o;var s,d=-1;for(s=0;s<r.length;s++)if(!i(r[s].index)){d=s;break}for(;s<r.length;s++)if(r[s].index>t&&!i(r[s].index)){d=s;break}if(-1!==d)return n.sortedIndexCursor=d,r[n.sortedIndexCursor].index;return-1}(r,a,d,t):function(e,t,i){var n=i.typeaheadBuffer[0],o=e.get(n);if(!o)return-1;var r=o[i.sortedIndexCursor];if(0===r.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(r.index))return r.index;var a=(i.sortedIndexCursor+1)%o.length,s=-1;for(;a!==i.sortedIndexCursor;){var d=o[a],l=0===d.text.lastIndexOf(i.typeaheadBuffer,0),c=!t(d.index);if(l&&c){s=a;break}a=(a+1)%o.length}if(-1!==s)return i.sortedIndexCursor=s,o[i.sortedIndexCursor].index;return-1}(r,d,t),-1===i||s||o(i),i}function ti(e){return e.typeaheadBuffer.length>0}var ii={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},ni={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},oi={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},ri=function(e){function t(i,n){void 0===n&&(n={});var o=e.call(this,g(g({},t.defaultAdapter),i))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=oi.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=n.leadingIcon,o.helperText=n.helperText,o}return f(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ii},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return oi},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return ni},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),t.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},t.prototype.setSelectedIndex=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),e>=this.adapter.getMenuItemCount()||(e===oi.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),i||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},t.prototype.setValue=function(e,t){void 0===t&&(t=!1);var i=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(i,!1,t)},t.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==oi.UNSET_INDEX?t[e]:""},t.prototype.getDisabled=function(){return this.disabled},t.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(ii.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(ii.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},t.prototype.openMenu=function(){this.adapter.addClass(ii.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},t.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},t.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(ii.FOCUSED),i=e||t,n=this.adapter.hasClass(ii.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(n)}},t.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},t.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},t.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},t.prototype.handleMenuClosed=function(){this.adapter.removeClass(ii.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},t.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(ii.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},t.prototype.handleFocus=function(){this.adapter.addClass(ii.FOCUSED),this.layout(),this.adapter.activateBottomLine()},t.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},t.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},t.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(ii.FOCUSED)){var t=mt(e)===$e,i=mt(e)===ze,n=mt(e)===Ue,o=mt(e)===Ve;if(!(e.ctrlKey||e.metaKey)&&(!i&&e.key&&1===e.key.length||i&&this.adapter.isTypeaheadInProgress())){var r=i?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void e.preventDefault()}(t||i||n||o)&&(this.openMenu(),e.preventDefault())}},t.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(ii.FOCUSED);if(e){var i=oi.LABEL_SCALE,n=this.adapter.getLabelWidth()*i;this.adapter.notchOutline(n)}else t||this.adapter.closeOutline()}},t.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},t.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},t.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},t.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},t.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(ii.INVALID),this.adapter.removeMenuClass(ii.MENU_INVALID)):(this.adapter.addClass(ii.INVALID),this.adapter.addMenuClass(ii.MENU_INVALID)),this.syncHelperTextValidity(e)},t.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(ii.REQUIRED)&&!this.adapter.hasClass(ii.DISABLED)?this.getSelectedIndex()!==oi.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},t.prototype.setRequired=function(e){e?this.adapter.addClass(ii.REQUIRED):this.adapter.removeClass(ii.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},t.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},t.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner($t.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(ii.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(ii.INVALID)),this.layout(),this.layoutOptions()},t.prototype.blur=function(){this.adapter.removeClass(ii.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(ii.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},t.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),i=this.helperText.getId();t&&i?this.adapter.setSelectAnchorAttr(ni.ARIA_DESCRIBEDBY,i):this.adapter.removeSelectAnchorAttr(ni.ARIA_DESCRIBEDBY)}},t.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout(function(){e.recentlyClicked=!1},oi.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},t}(b);const ai=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class si extends P{constructor(){super(...arguments),this.mdcFoundationClass=ri,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=ai()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const e=this.menuElement;return e?e.selected:null}get index(){const e=this.menuElement;return e?e.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const e={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},t=this.label?"label":void 0,i=this.shouldRenderHelperText?"helper-text":void 0;return h`
|
|
215
215
|
<div
|
|
216
216
|
class="mdc-select ${m(e)}">
|
|
217
217
|
<input
|
|
@@ -297,14 +297,371 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
297
297
|
`}renderHelperText(){if(!this.shouldRenderHelperText)return S;const e=this.validationMessage&&!this.isUiValid;return h`
|
|
298
298
|
<p
|
|
299
299
|
class="mdc-select-helper-text ${m({"mdc-select-helper-text--validation-msg":e})}"
|
|
300
|
-
id="helper-text">${e?this.validationMessage:this.helper}</p>`}createAdapter(){return Object.assign(Object.assign({},C(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map(e=>e.value)},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>ti(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},n=ei(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=ai(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise(e=>requestAnimationFrame(e)),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=Jt(this.items.length,e=>this.items[e].text)}onItemsUpdated(){this.sortedIndexByFirstChar=Jt(this.items.length,e=>this.items[e].text)}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i<this.items.length;i++){if(this.items[i].value===e){t=i;break}}this.valueSetDirectly=!0,this.select(t),this.mdcFoundation.handleChange()}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)e.target.removeEventListener(e.name,e.cb)}focus(){const e=new CustomEvent("focus"),t=this.anchorElement;t&&(t.dispatchEvent(e),t.focus())}blur(){const e=new CustomEvent("blur"),t=this.anchorElement;t&&(t.dispatchEvent(e),t.blur())}onFocus(){this.mdcFoundation&&this.mdcFoundation.handleFocus()}onBlur(){this.mdcFoundation&&this.mdcFoundation.handleBlur();const e=this.menuElement;e&&!e.open&&this.reportValidity()}onClick(e){if(this.mdcFoundation){this.focus();const t=e.target.getBoundingClientRect();let i=0;i="touches"in e?e.touches[0].clientX:e.clientX;const n=i-t.left;this.mdcFoundation.handleClick(n)}}onKeydown(e){const t=mt(e)===Ue,i=mt(e)===Ve;if(i||t){const n=t&&this.index>0,o=i&&this.index<this.items.length-1;return n?this.select(this.index-1):o&&this.select(this.index+1),e.preventDefault(),void this.mdcFoundation.openMenu()}this.mdcFoundation.handleKeydown(e)}handleTypeahead(e){if(!this.menuElement)return;const t=this.menuElement.getFocusedItemIndex(),i=R(e.target)?e.target:null;!function(e,t){var i=e.event,n=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,d=e.isItemAtIndexDisabled,s="ArrowLeft"===mt(i),l="ArrowUp"===mt(i),c="ArrowRight"===mt(i),h="ArrowDown"===mt(i),m="Home"===mt(i),p="End"===mt(i),u="Enter"===mt(i),f="Spacebar"===mt(i);i.altKey||i.ctrlKey||i.metaKey||s||l||c||h||m||p||u||(f||1!==i.key.length?f&&(n&&Qt(i),n&&ti(t)&&ei({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:d},t)):(Qt(i),ei({focusItemAtIndex:r,focusedItemIndex:o,nextChar:i.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:d},t)))}({event:e,focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled},this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const n=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(n),!this.outlined)return;this.outlineOpen=n,await this.updateComplete;const o=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=o)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}i([r(".mdc-select")],di.prototype,"mdcRoot",void 0),i([r(".formElement")],di.prototype,"formElement",void 0),i([r("slot")],di.prototype,"slotElement",void 0),i([r("select")],di.prototype,"nativeSelectElement",void 0),i([r("input")],di.prototype,"nativeInputElement",void 0),i([r(".mdc-line-ripple")],di.prototype,"lineRippleElement",void 0),i([r(".mdc-floating-label")],di.prototype,"labelElement",void 0),i([r("mwc-notched-outline")],di.prototype,"outlineElement",void 0),i([r(".mdc-menu")],di.prototype,"menuElement",void 0),i([r(".mdc-select__anchor")],di.prototype,"anchorElement",void 0),i([n({type:Boolean,attribute:"disabled",reflect:!0}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)})],di.prototype,"disabled",void 0),i([n({type:Boolean}),_(function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)})],di.prototype,"outlined",void 0),i([n({type:String}),_(function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)})],di.prototype,"label",void 0),i([d()],di.prototype,"outlineOpen",void 0),i([d()],di.prototype,"outlineWidth",void 0),i([n({type:String}),_(function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}})],di.prototype,"value",void 0),i([n()],di.prototype,"name",void 0),i([d()],di.prototype,"selectedText",void 0),i([n({type:String})],di.prototype,"icon",void 0),i([d()],di.prototype,"menuOpen",void 0),i([n({type:String})],di.prototype,"helper",void 0),i([n({type:Boolean})],di.prototype,"validateOnInitialRender",void 0),i([n({type:String})],di.prototype,"validationMessage",void 0),i([n({type:Boolean})],di.prototype,"required",void 0),i([n({type:Boolean})],di.prototype,"naturalMenuWidth",void 0),i([d()],di.prototype,"isUiValid",void 0),i([n({type:Boolean})],di.prototype,"fixedMenuPosition",void 0),i([l({capture:!0})],di.prototype,"handleTypeahead",null);const si=u`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select__menu::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}}@media screen and (forced-colors: active)and (forced-colors: active),screen and (-ms-high-contrast: active)and (forced-colors: active){.mdc-select__menu::before{border-color:CanvasText}}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;class li extends di{}li.styles=[si,u`
|
|
300
|
+
id="helper-text">${e?this.validationMessage:this.helper}</p>`}createAdapter(){return Object.assign(Object.assign({},C(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map(e=>e.value)},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>ti(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},n=ei(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=ai(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise(e=>requestAnimationFrame(e)),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=Jt(this.items.length,e=>this.items[e].text)}onItemsUpdated(){this.sortedIndexByFirstChar=Jt(this.items.length,e=>this.items[e].text)}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i<this.items.length;i++){if(this.items[i].value===e){t=i;break}}this.valueSetDirectly=!0,this.select(t),this.mdcFoundation.handleChange()}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)e.target.removeEventListener(e.name,e.cb)}focus(){const e=new CustomEvent("focus"),t=this.anchorElement;t&&(t.dispatchEvent(e),t.focus())}blur(){const e=new CustomEvent("blur"),t=this.anchorElement;t&&(t.dispatchEvent(e),t.blur())}onFocus(){this.mdcFoundation&&this.mdcFoundation.handleFocus()}onBlur(){this.mdcFoundation&&this.mdcFoundation.handleBlur();const e=this.menuElement;e&&!e.open&&this.reportValidity()}onClick(e){if(this.mdcFoundation){this.focus();const t=e.target.getBoundingClientRect();let i=0;i="touches"in e?e.touches[0].clientX:e.clientX;const n=i-t.left;this.mdcFoundation.handleClick(n)}}onKeydown(e){const t=mt(e)===Ue,i=mt(e)===Ve;if(i||t){const n=t&&this.index>0,o=i&&this.index<this.items.length-1;return n?this.select(this.index-1):o&&this.select(this.index+1),e.preventDefault(),void this.mdcFoundation.openMenu()}this.mdcFoundation.handleKeydown(e)}handleTypeahead(e){if(!this.menuElement)return;const t=this.menuElement.getFocusedItemIndex(),i=R(e.target)?e.target:null,n={event:e,focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled};!function(e,t){var i=e.event,n=e.isTargetListItem,o=e.focusedItemIndex,r=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,s=e.isItemAtIndexDisabled,d="ArrowLeft"===mt(i),l="ArrowUp"===mt(i),c="ArrowRight"===mt(i),h="ArrowDown"===mt(i),m="Home"===mt(i),p="End"===mt(i),u="Enter"===mt(i),f="Spacebar"===mt(i);i.altKey||i.ctrlKey||i.metaKey||d||l||c||h||m||p||u||(f||1!==i.key.length?f&&(n&&Qt(i),n&&ti(t)&&ei({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},t)):(Qt(i),ei({focusItemAtIndex:r,focusedItemIndex:o,nextChar:i.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},t)))}(n,this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const n=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(n),!this.outlined)return;this.outlineOpen=n,await this.updateComplete;const o=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=o)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}i([r(".mdc-select")],si.prototype,"mdcRoot",void 0),i([r(".formElement")],si.prototype,"formElement",void 0),i([r("slot")],si.prototype,"slotElement",void 0),i([r("select")],si.prototype,"nativeSelectElement",void 0),i([r("input")],si.prototype,"nativeInputElement",void 0),i([r(".mdc-line-ripple")],si.prototype,"lineRippleElement",void 0),i([r(".mdc-floating-label")],si.prototype,"labelElement",void 0),i([r("mwc-notched-outline")],si.prototype,"outlineElement",void 0),i([r(".mdc-menu")],si.prototype,"menuElement",void 0),i([r(".mdc-select__anchor")],si.prototype,"anchorElement",void 0),i([n({type:Boolean,attribute:"disabled",reflect:!0}),_(function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)})],si.prototype,"disabled",void 0),i([n({type:Boolean}),_(function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)})],si.prototype,"outlined",void 0),i([n({type:String}),_(function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)})],si.prototype,"label",void 0),i([s()],si.prototype,"outlineOpen",void 0),i([s()],si.prototype,"outlineWidth",void 0),i([n({type:String}),_(function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}})],si.prototype,"value",void 0),i([n()],si.prototype,"name",void 0),i([s()],si.prototype,"selectedText",void 0),i([n({type:String})],si.prototype,"icon",void 0),i([s()],si.prototype,"menuOpen",void 0),i([n({type:String})],si.prototype,"helper",void 0),i([n({type:Boolean})],si.prototype,"validateOnInitialRender",void 0),i([n({type:String})],si.prototype,"validationMessage",void 0),i([n({type:Boolean})],si.prototype,"required",void 0),i([n({type:Boolean})],si.prototype,"naturalMenuWidth",void 0),i([s()],si.prototype,"isUiValid",void 0),i([n({type:Boolean})],si.prototype,"fixedMenuPosition",void 0),i([l({capture:!0})],si.prototype,"handleTypeahead",null);const di=u`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select__menu::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}}@media screen and (forced-colors: active)and (forced-colors: active),screen and (-ms-high-contrast: active)and (forced-colors: active){.mdc-select__menu::before{border-color:CanvasText}}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;class li extends si{}li.styles=[di,u`
|
|
301
301
|
.mdc-floating-label {
|
|
302
302
|
line-height: 1.15em;
|
|
303
303
|
}
|
|
304
|
-
`],customElements.define("ewt-select",li);class ci extends Te{}ci.styles=[Ae],customElements.define("ewt-list-item",ci);
|
|
304
|
+
`],customElements.define("ewt-select",li);class ci extends Te{}ci.styles=[Ae],customElements.define("ewt-list-item",ci);let hi=null,mi=null;let pi=class extends x{constructor(){super(...arguments),this.logger=console,this._currentPath="/",this._files=[],this._fs=null,this._blockSize=4096,this._usage={capacityBytes:0,usedBytes:0,freeBytes:0},this._diskVersion="",this._busy=!1,this._selectedFile=null,this._flashProgress=0,this._isFlashing=!1}async connectedCallback(){super.connectedCallback(),await this._openFilesystem()}disconnectedCallback(){super.disconnectedCallback(),this._cleanup()}async _openFilesystem(){try{this._busy=!0,this.logger.log(`Reading LittleFS partition "${this.partition.name}" (${this._formatSize(this.partition.size)})...`);const e=await this.espStub.readFlash(this.partition.offset,this.partition.size);this.logger.log("Mounting LittleFS filesystem...");const{createLittleFSFromImage:t,formatDiskVersion:i}=await async function(){if(mi)return mi;if(!hi){const e=new URL(import.meta.url),t=e.href.substring(0,e.href.lastIndexOf("/")+1);hi=t+"wasm/littlefs/"}try{const e=hi+"index.js";return console.log("[LittleFS] Loading module from:",e),mi=await import(e),mi}catch(e){console.error("[LittleFS] Failed to load from calculated path:",hi,e);try{return mi=await import("./wasm/littlefs/index.js"),mi}catch(t){throw console.error("[LittleFS] Fallback import also failed:",t),new Error(`Failed to load LittleFS module: ${e}`)}}}(),n=[4096,2048,1024,512];let o=null,r=0;for(const i of n)try{const n={blockSize:i,blockCount:Math.floor(this.partition.size/i)};hi&&(n.wasmURL=new URL("littlefs.wasm",hi).href),o=await t(e,n),o.list("/"),r=i,this.logger.log(`Successfully mounted LittleFS with block size ${i}`);break}catch(e){o=null}if(!o)throw new Error("Failed to mount LittleFS with any block size");this._fs=o,this._blockSize=r;try{const e=o.getDiskVersion();this._diskVersion=i(e)}catch(e){this._diskVersion=""}this._refreshFiles(),this.logger.log("LittleFS filesystem opened successfully")}catch(e){this.logger.error(`Failed to open LittleFS: ${e.message||e}`),this.onClose&&this.onClose()}finally{this._busy=!1}}_refreshFiles(){if(this._fs)try{const e=this._fs.list("/"),t=this._estimateUsage(e),i=this.partition.size;this._usage={capacityBytes:i,usedBytes:t,freeBytes:i-t};const n=this._fs.list(this._currentPath);n.sort((e,t)=>"dir"===e.type&&"dir"!==t.type?-1:"dir"!==e.type&&"dir"===t.type?1:e.path.localeCompare(t.path)),this._files=n}catch(e){this.logger.error(`Failed to refresh file list: ${e.message||e}`)}}_estimateUsage(e){const t=this._blockSize||4096;let i=2*t;for(const n of e||[])if("dir"===n.type)i+=t;else{i+=Math.max(1,Math.ceil((n.size||0)/t))*t+t}return i}_formatSize(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(2)} KB`:`${(e/1048576).toFixed(2)} MB`}_navigateUp(){if("/"===this._currentPath||!this._currentPath)return;const e=this._currentPath.split("/").filter(Boolean);e.pop(),this._currentPath="/"+e.join("/"),"/"===this._currentPath||this._currentPath.endsWith("/")||(this._currentPath+="/"),this._refreshFiles()}_navigateTo(e){this._currentPath=e,this._refreshFiles()}async _uploadFile(){if(this._fs&&this._selectedFile)try{this._busy=!0,this.logger.log(`Uploading file "${this._selectedFile.name}"...`);const e=await this._selectedFile.arrayBuffer(),t=new Uint8Array(e);let i=this._currentPath;i.endsWith("/")||(i+="/"),i+=this._selectedFile.name;const n=i.split("/").filter(Boolean);if(n.length>1){let e="";for(let t=0;t<n.length-1;t++){e+=`/${n[t]}`;try{this._fs.mkdir(e)}catch(e){}}}"function"==typeof this._fs.writeFile?this._fs.writeFile(i,t):"function"==typeof this._fs.addFile&&this._fs.addFile(i,t);const o=this._fs.readFile(i);this.logger.log(`✓ File written: ${o.length} bytes at ${i}`);const r=this._selectedFile.name;this._selectedFile=null,this._refreshFiles(),this.logger.log(`File "${r}" uploaded successfully`)}catch(e){this.logger.error(`Failed to upload file: ${e.message||e}`)}finally{this._busy=!1}}_createFolder(){if(!this._fs)return;const e=prompt("Enter directory name:");if(e&&e.trim())try{let t=this._currentPath;t.endsWith("/")||(t+="/"),t+=e.trim(),this._fs.mkdir(t),this._refreshFiles(),this.logger.log(`Directory "${e}" created successfully`)}catch(e){this.logger.error(`Failed to create directory: ${e.message||e}`)}}async _downloadFile(e){if(this._fs)try{this.logger.log(`Downloading file "${e}"...`);const t=this._fs.readFile(e),i=e.split("/").filter(Boolean).pop()||"file.bin",n=new Blob([t],{type:"application/octet-stream"}),o=URL.createObjectURL(n),r=document.createElement("a");r.href=o,r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(o),this.logger.log(`File "${i}" downloaded successfully`)}catch(e){this.logger.error(`Failed to download file: ${e.message||e}`)}}_deleteFile(e,t){if(!this._fs)return;const i=e.split("/").filter(Boolean).pop()||e;if(confirm(`Delete ${t} "${i}"?`))try{"dir"===t?this._fs.delete(e,{recursive:!0}):this._fs.deleteFile(e),this._refreshFiles(),this.logger.log(`${"dir"===t?"Directory":"File"} "${i}" deleted successfully`)}catch(e){this.logger.error(`Failed to delete ${t}: ${e.message||e}`)}}async _backupImage(){if(this._fs)try{this.logger.log("Creating LittleFS backup image...");const e=this._fs.toImage(),t=`${this.partition.name}_littlefs_backup.bin`,i=new Blob([e],{type:"application/octet-stream"}),n=URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n),this.logger.log(`LittleFS backup saved as "${t}"`)}catch(e){this.logger.error(`Failed to backup LittleFS: ${e.message||e}`)}}async _writeToFlash(){if(!this._fs)return;if(confirm(`Write modified LittleFS to flash?\n\nPartition: ${this.partition.name}\nOffset: 0x${this.partition.offset.toString(16)}\nSize: ${this._formatSize(this.partition.size)}\n\nThis will overwrite the current filesystem on the device!`))try{this._busy=!0,this._isFlashing=!0,this._flashProgress=0,this.logger.log("Creating LittleFS image...");const e=this._fs.toImage();if(this.logger.log(`Image created: ${this._formatSize(e.length)}`),e.length>this.partition.size)return void this.logger.error(`Image size (${this._formatSize(e.length)}) exceeds partition size (${this._formatSize(this.partition.size)})`);this.logger.log(`Writing ${this._formatSize(e.length)} to partition "${this.partition.name}" at 0x${this.partition.offset.toString(16)}...`);const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);await this.espStub.flashData(t,(e,t)=>{const i=Math.floor(e/t*100);this._flashProgress=i,this.logger.log(`Writing: ${i}%`)},this.partition.offset),this.logger.log("✓ LittleFS successfully written to flash!"),this.logger.log("To use the new filesystem, reset your device.")}catch(e){this.logger.error(`Failed to write LittleFS to flash: ${e.message||e}`)}finally{this._busy=!1,this._isFlashing=!1,this._flashProgress=0}}_cleanup(){this._fs&&(this._fs=null)}_handleFileSelect(e){var t;const i=e.target;this._selectedFile=(null===(t=i.files)||void 0===t?void 0:t[0])||null}render(){const e=Math.round(this._usage.usedBytes/this._usage.capacityBytes*100);return h`
|
|
305
|
+
<div class="littlefs-manager">
|
|
306
|
+
<h3>LittleFS Filesystem Manager</h3>
|
|
307
|
+
|
|
308
|
+
<div class="littlefs-info">
|
|
309
|
+
<div class="littlefs-partition-info">
|
|
310
|
+
<strong>Partition:</strong> ${this.partition.name}
|
|
311
|
+
<span class="littlefs-size"
|
|
312
|
+
>(${this._formatSize(this.partition.size)})</span
|
|
313
|
+
>
|
|
314
|
+
</div>
|
|
315
|
+
<div class="littlefs-usage">
|
|
316
|
+
<div class="usage-bar">
|
|
317
|
+
<div
|
|
318
|
+
class="usage-fill ${this._isFlashing?"flashing":""}"
|
|
319
|
+
style="width: ${this._isFlashing?this._flashProgress:e}%"
|
|
320
|
+
></div>
|
|
321
|
+
</div>
|
|
322
|
+
<div class="usage-text">
|
|
323
|
+
${this._isFlashing?h`<span class="flash-status">
|
|
324
|
+
⚡ Writing to flash: ${this._flashProgress}%
|
|
325
|
+
</span>`:h`<span
|
|
326
|
+
>Used: ${this._formatSize(this._usage.usedBytes)} /
|
|
327
|
+
${this._formatSize(this._usage.capacityBytes)}
|
|
328
|
+
(${e}%)</span
|
|
329
|
+
>
|
|
330
|
+
${this._diskVersion?h`<span class="disk-version"
|
|
331
|
+
>${this._diskVersion}</span
|
|
332
|
+
>`:""}`}
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
<div class="littlefs-controls">
|
|
338
|
+
<ewt-button
|
|
339
|
+
label="Refresh"
|
|
340
|
+
@click=${this._refreshFiles}
|
|
341
|
+
?disabled=${this._busy}
|
|
342
|
+
></ewt-button>
|
|
343
|
+
<ewt-button
|
|
344
|
+
label="Backup Image"
|
|
345
|
+
@click=${this._backupImage}
|
|
346
|
+
?disabled=${this._busy}
|
|
347
|
+
></ewt-button>
|
|
348
|
+
<ewt-button
|
|
349
|
+
label="Write to Flash"
|
|
350
|
+
@click=${this._writeToFlash}
|
|
351
|
+
?disabled=${this._busy}
|
|
352
|
+
></ewt-button>
|
|
353
|
+
<ewt-button
|
|
354
|
+
label="Close"
|
|
355
|
+
@click=${()=>{this._cleanup(),this.onClose&&this.onClose()}}
|
|
356
|
+
?disabled=${this._busy}
|
|
357
|
+
></ewt-button>
|
|
358
|
+
</div>
|
|
359
|
+
|
|
360
|
+
<div class="littlefs-breadcrumb">
|
|
361
|
+
<ewt-button
|
|
362
|
+
label="↑ Up"
|
|
363
|
+
@click=${this._navigateUp}
|
|
364
|
+
?disabled=${"/"===this._currentPath||this._busy}
|
|
365
|
+
></ewt-button>
|
|
366
|
+
<span>${this._currentPath||"/"}</span>
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
<div class="littlefs-file-upload">
|
|
370
|
+
<input
|
|
371
|
+
type="file"
|
|
372
|
+
@change=${this._handleFileSelect}
|
|
373
|
+
?disabled=${this._busy}
|
|
374
|
+
/>
|
|
375
|
+
<ewt-button
|
|
376
|
+
label="Upload File"
|
|
377
|
+
@click=${this._uploadFile}
|
|
378
|
+
?disabled=${!this._selectedFile||this._busy}
|
|
379
|
+
></ewt-button>
|
|
380
|
+
<ewt-button
|
|
381
|
+
label="New Folder"
|
|
382
|
+
@click=${this._createFolder}
|
|
383
|
+
?disabled=${this._busy}
|
|
384
|
+
></ewt-button>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
<div class="littlefs-files">
|
|
388
|
+
<table class="file-table">
|
|
389
|
+
<thead>
|
|
390
|
+
<tr>
|
|
391
|
+
<th>Name</th>
|
|
392
|
+
<th>Type</th>
|
|
393
|
+
<th>Size</th>
|
|
394
|
+
<th>Actions</th>
|
|
395
|
+
</tr>
|
|
396
|
+
</thead>
|
|
397
|
+
<tbody>
|
|
398
|
+
${0===this._files.length?h`
|
|
399
|
+
<tr>
|
|
400
|
+
<td colspan="4" class="empty-state">
|
|
401
|
+
No files in this directory
|
|
402
|
+
</td>
|
|
403
|
+
</tr>
|
|
404
|
+
`:this._files.map(e=>h`
|
|
405
|
+
<tr>
|
|
406
|
+
<td>
|
|
407
|
+
<div
|
|
408
|
+
class="file-name ${"dir"===e.type?"clickable":""}"
|
|
409
|
+
@click=${"dir"===e.type?()=>this._navigateTo(e.path):null}
|
|
410
|
+
>
|
|
411
|
+
<span class="file-icon"
|
|
412
|
+
>${"dir"===e.type?"📁":"📄"}</span
|
|
413
|
+
>
|
|
414
|
+
<span
|
|
415
|
+
>${e.path.split("/").filter(Boolean).pop()||"/"}</span
|
|
416
|
+
>
|
|
417
|
+
</div>
|
|
418
|
+
</td>
|
|
419
|
+
<td>${"dir"===e.type?"Directory":"File"}</td>
|
|
420
|
+
<td>
|
|
421
|
+
${"file"===e.type?this._formatSize(e.size):"-"}
|
|
422
|
+
</td>
|
|
423
|
+
<td>
|
|
424
|
+
<div class="file-actions">
|
|
425
|
+
${"file"===e.type?h`
|
|
426
|
+
<ewt-button
|
|
427
|
+
label="Download"
|
|
428
|
+
@click=${()=>this._downloadFile(e.path)}
|
|
429
|
+
?disabled=${this._busy}
|
|
430
|
+
></ewt-button>
|
|
431
|
+
`:""}
|
|
432
|
+
<ewt-button
|
|
433
|
+
class="danger"
|
|
434
|
+
label="Delete"
|
|
435
|
+
@click=${()=>this._deleteFile(e.path,e.type)}
|
|
436
|
+
?disabled=${this._busy}
|
|
437
|
+
></ewt-button>
|
|
438
|
+
</div>
|
|
439
|
+
</td>
|
|
440
|
+
</tr>
|
|
441
|
+
`)}
|
|
442
|
+
</tbody>
|
|
443
|
+
</table>
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
`}};pi.styles=u`
|
|
447
|
+
:host {
|
|
448
|
+
display: block;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.littlefs-manager {
|
|
452
|
+
width: 100%;
|
|
453
|
+
max-width: 100%;
|
|
454
|
+
margin: 0 auto;
|
|
455
|
+
padding: 15px;
|
|
456
|
+
border: 2px solid var(--mdc-theme-primary, #03a9f4);
|
|
457
|
+
border-radius: 10px;
|
|
458
|
+
background-color: rgba(3, 169, 244, 0.05);
|
|
459
|
+
box-sizing: border-box;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
h3 {
|
|
463
|
+
margin: 0 0 15px 0;
|
|
464
|
+
color: var(--mdc-theme-primary, #03a9f4);
|
|
465
|
+
font-size: 18px;
|
|
466
|
+
font-weight: 600;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.littlefs-info {
|
|
470
|
+
margin-bottom: 15px;
|
|
471
|
+
padding: 12px;
|
|
472
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
473
|
+
border-radius: 8px;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.littlefs-partition-info {
|
|
477
|
+
margin-bottom: 10px;
|
|
478
|
+
font-size: 13px;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.littlefs-size {
|
|
482
|
+
color: #666;
|
|
483
|
+
margin-left: 8px;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.littlefs-usage {
|
|
487
|
+
margin-top: 8px;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.usage-bar {
|
|
491
|
+
width: 100%;
|
|
492
|
+
height: 18px;
|
|
493
|
+
background-color: #e0e0e0;
|
|
494
|
+
border-radius: 10px;
|
|
495
|
+
overflow: hidden;
|
|
496
|
+
margin-bottom: 6px;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.usage-fill {
|
|
500
|
+
height: 100%;
|
|
501
|
+
background: linear-gradient(
|
|
502
|
+
90deg,
|
|
503
|
+
var(--mdc-theme-primary, #03a9f4) 0%,
|
|
504
|
+
var(--mdc-theme-primary, #03a9f4) 100%
|
|
505
|
+
);
|
|
506
|
+
transition: width 0.3s ease;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.usage-fill.flashing {
|
|
510
|
+
background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
|
|
511
|
+
animation: pulse 1s ease-in-out infinite;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@keyframes pulse {
|
|
515
|
+
0%,
|
|
516
|
+
100% {
|
|
517
|
+
opacity: 1;
|
|
518
|
+
}
|
|
519
|
+
50% {
|
|
520
|
+
opacity: 0.7;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.flash-status {
|
|
525
|
+
font-weight: 600;
|
|
526
|
+
color: #ff5722;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.usage-text {
|
|
530
|
+
display: flex;
|
|
531
|
+
justify-content: space-between;
|
|
532
|
+
align-items: center;
|
|
533
|
+
font-size: 12px;
|
|
534
|
+
color: #555;
|
|
535
|
+
flex-wrap: wrap;
|
|
536
|
+
gap: 5px;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.disk-version {
|
|
540
|
+
font-size: 11px;
|
|
541
|
+
padding: 2px 6px;
|
|
542
|
+
background-color: var(--mdc-theme-primary, #03a9f4);
|
|
543
|
+
color: white;
|
|
544
|
+
border-radius: 4px;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.littlefs-controls {
|
|
548
|
+
display: flex;
|
|
549
|
+
gap: 8px;
|
|
550
|
+
margin-bottom: 15px;
|
|
551
|
+
flex-wrap: wrap;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.littlefs-breadcrumb {
|
|
555
|
+
display: flex;
|
|
556
|
+
align-items: center;
|
|
557
|
+
gap: 8px;
|
|
558
|
+
margin-bottom: 12px;
|
|
559
|
+
padding: 8px;
|
|
560
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
561
|
+
border-radius: 8px;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.littlefs-breadcrumb span {
|
|
565
|
+
font-family: monospace;
|
|
566
|
+
font-size: 13px;
|
|
567
|
+
color: #333;
|
|
568
|
+
overflow: hidden;
|
|
569
|
+
text-overflow: ellipsis;
|
|
570
|
+
white-space: nowrap;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.littlefs-file-upload {
|
|
574
|
+
display: flex;
|
|
575
|
+
gap: 8px;
|
|
576
|
+
margin-bottom: 12px;
|
|
577
|
+
align-items: center;
|
|
578
|
+
flex-wrap: wrap;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.littlefs-file-upload input[type="file"] {
|
|
582
|
+
flex: 1;
|
|
583
|
+
min-width: 150px;
|
|
584
|
+
padding: 4px;
|
|
585
|
+
border: 2px solid #ccc;
|
|
586
|
+
border-radius: 8px;
|
|
587
|
+
font-size: 13px;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.littlefs-files {
|
|
591
|
+
max-height: 350px;
|
|
592
|
+
overflow-y: auto;
|
|
593
|
+
overflow-x: auto;
|
|
594
|
+
border: 1px solid #ccc;
|
|
595
|
+
border-radius: 8px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.file-table {
|
|
599
|
+
width: 100%;
|
|
600
|
+
min-width: 500px;
|
|
601
|
+
border-collapse: collapse;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.file-table thead {
|
|
605
|
+
position: sticky;
|
|
606
|
+
top: 0;
|
|
607
|
+
background-color: #f5f5f5;
|
|
608
|
+
z-index: 10;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.file-table th {
|
|
612
|
+
padding: 8px;
|
|
613
|
+
text-align: left;
|
|
614
|
+
font-weight: 600;
|
|
615
|
+
border-bottom: 2px solid #ccc;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.file-table td {
|
|
619
|
+
padding: 8px 10px;
|
|
620
|
+
border-bottom: 1px solid #e0e0e0;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.file-table tbody tr:hover {
|
|
624
|
+
background-color: rgba(3, 169, 244, 0.1);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.file-table .empty-state {
|
|
628
|
+
text-align: center;
|
|
629
|
+
color: #999;
|
|
630
|
+
padding: 30px;
|
|
631
|
+
font-style: italic;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.file-name {
|
|
635
|
+
display: flex;
|
|
636
|
+
align-items: center;
|
|
637
|
+
gap: 8px;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.file-name.clickable {
|
|
641
|
+
cursor: pointer;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.file-name.clickable:hover {
|
|
645
|
+
color: var(--mdc-theme-primary, #03a9f4);
|
|
646
|
+
text-decoration: underline;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.file-icon {
|
|
650
|
+
font-size: 16px;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.file-actions {
|
|
654
|
+
display: flex;
|
|
655
|
+
gap: 5px;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.danger {
|
|
659
|
+
--mdc-theme-primary: var(--improv-danger-color, #db4437);
|
|
660
|
+
}
|
|
661
|
+
`,i([n({type:Object})],pi.prototype,"partition",void 0),i([n({type:Object})],pi.prototype,"espStub",void 0),i([n({type:Function})],pi.prototype,"logger",void 0),i([n({type:Function})],pi.prototype,"onClose",void 0),i([s()],pi.prototype,"_currentPath",void 0),i([s()],pi.prototype,"_files",void 0),i([s()],pi.prototype,"_fs",void 0),i([s()],pi.prototype,"_blockSize",void 0),i([s()],pi.prototype,"_usage",void 0),i([s()],pi.prototype,"_diskVersion",void 0),i([s()],pi.prototype,"_busy",void 0),i([s()],pi.prototype,"_selectedFile",void 0),i([s()],pi.prototype,"_flashProgress",void 0),i([s()],pi.prototype,"_isFlashing",void 0),pi=i([y("ewt-littlefs-manager")],pi);class ui extends x{constructor(){super(...arguments),this.indeterminate=!1,this.progress=0,this.density=0,this.closed=!1}open(){this.closed=!1}close(){this.closed=!0}render(){const e={"mdc-circular-progress--closed":this.closed,"mdc-circular-progress--indeterminate":this.indeterminate},t=48+4*this.density,i={width:`${t}px`,height:`${t}px`};return h`
|
|
305
662
|
<div
|
|
306
663
|
class="mdc-circular-progress ${m(e)}"
|
|
307
|
-
style="${
|
|
664
|
+
style="${F(i)}"
|
|
308
665
|
role="progressbar"
|
|
309
666
|
aria-label="${p(this.ariaLabel)}"
|
|
310
667
|
aria-valuemin="0"
|
|
@@ -357,7 +714,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
357
714
|
stroke-dashoffset="${o}"
|
|
358
715
|
stroke-width="${r}"></circle>
|
|
359
716
|
</svg>
|
|
360
|
-
</div>`}update(e){super.update(e),e.has("progress")&&(this.progress>1&&(this.progress=1),this.progress<0&&(this.progress=0))}}i([n({type:Boolean,reflect:!0})],
|
|
717
|
+
</div>`}update(e){super.update(e),e.has("progress")&&(this.progress>1&&(this.progress=1),this.progress<0&&(this.progress=0))}}i([n({type:Boolean,reflect:!0})],ui.prototype,"indeterminate",void 0),i([n({type:Number,reflect:!0})],ui.prototype,"progress",void 0),i([n({type:Number,reflect:!0})],ui.prototype,"density",void 0),i([n({type:Boolean,reflect:!0})],ui.prototype,"closed",void 0),i([a,n({type:String,attribute:"aria-label"})],ui.prototype,"ariaLabel",void 0);const fi=u`.mdc-circular-progress__determinate-circle,.mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-theme-primary, #6200ee)}.mdc-circular-progress__determinate-track{stroke:transparent}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:transparent}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}:host{display:inline-flex}.mdc-circular-progress__determinate-track{stroke:transparent;stroke:var(--mdc-circular-progress-track-color, transparent)}`;class gi extends ui{}gi.styles=[fi],customElements.define("ewt-circular-progress",gi);class bi extends x{render(){return h`
|
|
361
718
|
<div>
|
|
362
719
|
<ewt-circular-progress
|
|
363
720
|
active
|
|
@@ -368,7 +725,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
368
725
|
${void 0!==this.progress?h`<div>${this.progress}%</div>`:""}
|
|
369
726
|
</div>
|
|
370
727
|
${this.label}
|
|
371
|
-
`}}
|
|
728
|
+
`}}bi.styles=u`
|
|
372
729
|
:host {
|
|
373
730
|
display: flex;
|
|
374
731
|
flex-direction: column;
|
|
@@ -377,10 +734,10 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
377
734
|
ewt-circular-progress {
|
|
378
735
|
margin-bottom: 16px;
|
|
379
736
|
}
|
|
380
|
-
`,i([n()],
|
|
737
|
+
`,i([n()],bi.prototype,"label",void 0),i([n()],bi.prototype,"progress",void 0),customElements.define("ewt-page-progress",bi);class _i extends x{render(){return h`
|
|
381
738
|
<div class="icon">${this.icon}</div>
|
|
382
739
|
${this.label}
|
|
383
|
-
`}}
|
|
740
|
+
`}}_i.styles=u`
|
|
384
741
|
:host {
|
|
385
742
|
display: flex;
|
|
386
743
|
flex-direction: column;
|
|
@@ -394,27 +751,27 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
394
751
|
ewt-circular-progress {
|
|
395
752
|
margin-bottom: 16px;
|
|
396
753
|
}
|
|
397
|
-
`,i([n()],
|
|
754
|
+
`,i([n()],_i.prototype,"icon",void 0),i([n()],_i.prototype,"label",void 0),customElements.define("ewt-page-message",_i);const xi=O`
|
|
398
755
|
<svg width="24" height="24" viewBox="0 0 24 24">
|
|
399
756
|
<path
|
|
400
757
|
d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
|
|
401
758
|
/>
|
|
402
759
|
</svg>
|
|
403
|
-
`,
|
|
760
|
+
`,yi=O`
|
|
404
761
|
<svg viewBox="0 0 24 24" title="Software">
|
|
405
762
|
<path
|
|
406
763
|
fill="currentColor"
|
|
407
764
|
d="M9.5,8.5L11,10L8,13L11,16L9.5,17.5L5,13L9.5,8.5M14.5,17.5L13,16L16,13L13,10L14.5,8.5L19,13L14.5,17.5M21,2H3A2,2 0 0,0 1,4V20A2,2 0 0,0 3,22H21A2,2 0 0,0 23,20V4A2,2 0 0,0 21,2M21,20H3V6H21V20Z"
|
|
408
765
|
/>
|
|
409
766
|
</svg>
|
|
410
|
-
`,
|
|
767
|
+
`,vi=O`
|
|
411
768
|
<svg viewBox="0 0 24 24" title="Chipset">
|
|
412
769
|
<path
|
|
413
770
|
fill="currentColor"
|
|
414
771
|
d="M6,4H18V5H21V7H18V9H21V11H18V13H21V15H18V17H21V19H18V20H6V19H3V17H6V15H3V13H6V11H3V9H6V7H3V5H6V4M11,15V18H12V15H11M13,15V18H14V15H13M15,15V18H16V15H15Z"
|
|
415
772
|
/>
|
|
416
773
|
</svg>
|
|
417
|
-
`,xi=["I".charCodeAt(0),"M".charCodeAt(0),"P".charCodeAt(0),"R".charCodeAt(0),"O".charCodeAt(0),"V".charCodeAt(0),1];var vi,yi;!function(e){e[e.CURRENT_STATE=1]="CURRENT_STATE",e[e.ERROR_STATE=2]="ERROR_STATE",e[e.RPC=3]="RPC",e[e.RPC_RESULT=4]="RPC_RESULT"}(vi||(vi={})),function(e){e[e.READY=2]="READY",e[e.PROVISIONING=3]="PROVISIONING",e[e.PROVISIONED=4]="PROVISIONED"}(yi||(yi={}));const wi={0:"NO_ERROR",1:"INVALID_RPC_PACKET",2:"UNKNOWN_RPC_COMMAND",3:"UNABLE_TO_CONNECT",254:"TIMEOUT",255:"UNKNOWN_ERROR"};class ki extends Error{constructor(){super("Port is not ready")}}const Ei=e=>"["+e.map(e=>((e,t=2)=>{let i=e.toString(16).toUpperCase();return i.startsWith("-")?"-0x"+i.substring(1).padStart(t,"0"):"0x"+i.padStart(t,"0")})(e)).join(", ")+"]";class Ii extends EventTarget{constructor(e,t){if(super(),this.port=e,this.logger=t,this.error=0,null===e.readable)throw new Error("Port is not readable");if(null===e.writable)throw new Error("Port is not writable")}async initialize(e=1e3){var t;if(this.logger.log("Initializing Improv Serial"),this._processInput(),await(t=1e3,new Promise(e=>setTimeout(e,t))),void 0===this._reader)throw new ki;try{await new Promise(async(t,i)=>{setTimeout(()=>i(new Error("Improv Wi-Fi Serial not detected")),e),await this.requestCurrentState(),t(void 0)}),await this.requestInfo()}catch(e){throw await this.close(),e}return this.info}async close(){this._reader&&await new Promise(e=>{this._reader.cancel(),this.addEventListener("disconnect",e,{once:!0})})}async requestCurrentState(){let e;try{await new Promise(async(t,i)=>{this.addEventListener("state-changed",t,{once:!0});e=this._sendRPCWithResponse(2,[]),e.catch(e=>{this.removeEventListener("state-changed",t),i(e)})})}catch(e){throw this._rpcFeedback=void 0,new Error(`Error fetching current state: ${e}`)}if(this.state!==yi.PROVISIONED)return void(this._rpcFeedback=void 0);const t=await e;this.nextUrl=t[0]}async requestInfo(e){const t=await this._sendRPCWithResponse(3,[],e);this.info={firmware:t[0],version:t[1],name:t[3],chipFamily:t[2]}}async provision(e,t,i){const n=new TextEncoder,o=n.encode(e),r=n.encode(t),a=[o.length,...o,r.length,...r],d=await this._sendRPCWithResponse(1,a,i);this.nextUrl=d[0]}async scan(){const e=(await this._sendRPCWithMultipleResponses(4,[])).map(([e,t,i])=>({name:e,rssi:parseInt(t),secured:"YES"===i}));return e.sort((e,t)=>e.name.toLocaleLowerCase().localeCompare(t.name.toLocaleLowerCase())),e}_sendRPC(e,t){this.writePacketToStream(vi.RPC,[e,t.length,...t])}async _sendRPCWithResponse(e,t,i){if(this._rpcFeedback)throw new Error("Only 1 RPC command that requires feedback can be active");return await this._awaitRPCResultWithTimeout(new Promise((i,n)=>{this._rpcFeedback={command:e,resolve:i,reject:n},this._sendRPC(e,t)}),i)}async _sendRPCWithMultipleResponses(e,t,i){if(this._rpcFeedback)throw new Error("Only 1 RPC command that requires feedback can be active");return await this._awaitRPCResultWithTimeout(new Promise((i,n)=>{this._rpcFeedback={command:e,resolve:i,reject:n,receivedData:[]},this._sendRPC(e,t)}),i)}async _awaitRPCResultWithTimeout(e,t){return t?await new Promise((i,n)=>{const o=setTimeout(()=>this._setError(254),t);e.finally(()=>clearTimeout(o)),e.then(i,n)}):await e}async _processInput(){this.logger.debug("Starting read loop"),this._reader=this.port.readable.getReader();try{let e,t=[],i=0;for(;;){const{value:n,done:o}=await this._reader.read();if(o)break;if(n&&0!==n.length)for(const o of n){if(!1===e){10===o&&(e=void 0);continue}if(!0===e){t.push(o),t.length===i&&(this._handleIncomingPacket(t),e=void 0,t=[]);continue}if(10===o){t=[];continue}if(t.push(o),9!==t.length)continue;if(e="IMPROV"===String.fromCharCode(...t.slice(0,6)),!e){t=[];continue}i=9+t[8]+1}}}catch(e){this.logger.error("Error while reading serial port",e)}finally{this._reader.releaseLock(),this._reader=void 0}this.logger.debug("Finished read loop"),this.dispatchEvent(new Event("disconnect"))}_handleIncomingPacket(e){const t=e.slice(6),i=t[0],n=t[1],o=t[2],r=t.slice(3,3+o);if(this.logger.debug("PROCESS",{version:i,packetType:n,packetLength:o,data:Ei(r)}),1!==i)return void this.logger.error("Received unsupported version",i);let a=t[3+o],d=0;for(let t=0;t<e.length-1;t++)d+=e[t];if(d&=255,d===a)if(n===vi.CURRENT_STATE)this.state=r[0],this.dispatchEvent(new CustomEvent("state-changed",{detail:this.state}));else if(n===vi.ERROR_STATE)this._setError(r[0]);else if(n===vi.RPC_RESULT){if(!this._rpcFeedback)return void this.logger.error("Received result while not waiting for one");const e=r[0];if(e!==this._rpcFeedback.command)return void this.logger.error(`Received result for command ${e} but expected ${this._rpcFeedback.command}`);const t=[],i=r[1];let n=2;for(;n<2+i;)t.push(String.fromCodePoint(...r.slice(n+1,n+r[n]+1))),n+=r[n]+1;"receivedData"in this._rpcFeedback?t.length>0?this._rpcFeedback.receivedData.push(t):(this._rpcFeedback.resolve(this._rpcFeedback.receivedData),this._rpcFeedback=void 0):(this._rpcFeedback.resolve(t),this._rpcFeedback=void 0)}else this.logger.error("Unable to handle packet",t);else this.logger.error(`Received invalid checksum ${a}. Expected ${d}`)}async writePacketToStream(e,t){const i=new Uint8Array([...xi,e,t.length,...t,0,0]);i[i.length-2]=255&i.reduce((e,t)=>e+t,0),i[i.length-1]=10,this.logger.debug("Writing to stream:",Ei(new Array(...i)));const n=this.port.writable.getWriter();await n.write(i);try{n.releaseLock()}catch(e){console.error("Ignoring release lock error",e)}}_setError(e){this.error=e,e>0&&this._rpcFeedback&&(this._rpcFeedback.reject(wi[e]||`UNKNOWN_ERROR (${e})`),this._rpcFeedback=void 0),this.dispatchEvent(new CustomEvent("error-changed",{detail:this.error}))}}const Si=e=>{let t=[192];for(const i of e)219==i?t=t.concat([219,221]):192==i?t=t.concat([219,220]):t.push(i);return t.push(192),t},Ci=e=>{const t=[];for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);n<=255&&t.push(n)}return t},Ri=e=>"["+e.map(e=>Ti(e)).join(", ")+"]",Ti=(e,t=2)=>{const i=e.toString(16).toUpperCase();return i.startsWith("-")?"-0x"+i.substring(1).padStart(t,"0"):"0x"+i.padStart(t,"0")},Ai=e=>new Promise(t=>setTimeout(t,e)),Oi={18:"256KB",19:"512KB",20:"1MB",21:"2MB",22:"4MB",23:"8MB",24:"16MB",25:"32MB",26:"64MB",27:"128MB",28:"256MB",32:"64MB",33:"128MB",34:"256MB",50:"256KB",51:"512KB",52:"1MB",53:"2MB",54:"4MB",55:"8MB",56:"16MB",57:"32MB",58:"64MB"},Fi=115200,Li=1343410176,Bi=Ci(" UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU"),zi=33382,Di=50,$i=12882,Ni=12883,Pi=12994,Mi=12995,Ui=12997,Hi=12998,Vi=207969,Wi=12914,Xi=12916,qi=12917,Yi=12928,Gi=12849,ji={5:{name:"ESP32-C3",family:Mi},9:{name:"ESP32-S3",family:Ni},12:{name:"ESP32-C2",family:Pi},13:{name:"ESP32-C6",family:Hi},16:{name:"ESP32-H2",family:Wi},18:{name:"ESP32-P4",family:Yi},20:{name:"ESP32-C61",family:Vi},23:{name:"ESP32-C5",family:Ui},25:{name:"ESP32-H21",family:qi},28:{name:"ESP32-H4",family:Xi},32:{name:"ESP32-S31",family:Gi}},Ki={4293968129:{name:"ESP8266",family:zi},15736195:{name:"ESP32",family:Di},1990:{name:"ESP32-S2",family:$i}},Zi=3e3,Qi=15e4,Ji=100,en=(e,t)=>{const i=Math.floor(e*(t/486));return i<Zi?Zi:i},tn=e=>{switch(e){case Di:return{regBase:1072963584,baseFuse:1073061888,macFuse:1073061888,usrOffs:28,usr1Offs:32,usr2Offs:36,mosiDlenOffs:40,misoDlenOffs:44,w0Offs:128,uartDateReg:1610612856,flashOffs:4096};case $i:return{regBase:1061167104,baseFuse:1061265408,macFuse:1061265476,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612856,flashOffs:4096};case Ni:return{regBase:1610620928,usrOffs:24,baseFuse:1610641408,macFuse:1610641476,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612864,flashOffs:0};case zi:return{regBase:1610613248,usrOffs:28,baseFuse:1072693328,macFuse:1072693328,usr1Offs:32,usr2Offs:36,mosiDlenOffs:-1,misoDlenOffs:-1,w0Offs:64,uartDateReg:1610612856,flashOffs:0};case Pi:case Mi:return{regBase:1610620928,baseFuse:1610647552,macFuse:1610647620,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Ui:return{regBase:1610625024,baseFuse:1611352064,macFuse:1611352132,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:8192};case Hi:return{regBase:1610625024,baseFuse:1611335680,macFuse:1611335748,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Vi:return{regBase:1610625024,baseFuse:1611352064,macFuse:1611352132,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Wi:return{regBase:1610625024,baseFuse:1611335680,macFuse:1611335748,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Xi:return{regBase:1611239424,baseFuse:1611339776,macFuse:1611339844,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610686588,flashOffs:8192};case qi:return{regBase:1610625024,baseFuse:1611350016,macFuse:1611350084,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Yi:return{regBase:1342754816,baseFuse:Li,macFuse:1343410244,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1343004812,flashOffs:8192};case Gi:return{regBase:542113792,baseFuse:544296960,macFuse:544297028,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:540582028,flashOffs:8192};default:return{regBase:-1,baseFuse:-1,macFuse:-1,usrOffs:-1,usr1Offs:-1,usr2Offs:-1,mosiDlenOffs:-1,misoDlenOffs:-1,w0Offs:-1,uartDateReg:-1,flashOffs:-1}}};class nn extends Error{constructor(e){super(e),this.name="SlipReadError"}}const on=async(e,t)=>{let i;return e==Xi||e==qi||e==Gi?null:(e==Di?i=await import("./esp32-CijhsJH1.js"):e==$i?i=await import("./esp32s2-IiDBtXxo.js"):e==Ni?i=await import("./esp32s3-6yv5yxum.js"):e==zi?i=await import("./esp8266-CUwxJpGa.js"):e==Pi?i=await import("./esp32c2-C17SM4gO.js"):e==Mi?i=await import("./esp32c3-DxRGijbg.js"):e==Ui?i=await import("./esp32c5-3mDOIGa4.js"):e==Hi?i=await import("./esp32c6-h6U0SQTm.js"):e==Vi?i=await import("./esp32c61-BKtexhPZ.js"):e==Wi?i=await import("./esp32h2-RtuWSEmP.js"):e==Yi&&(i=null!=t&&t>=300?await import("./esp32p4r3-CpHBYEwI.js"):await import("./esp32p4-5nkIjxqJ.js")),{...i,text:Ci(atob(i.text)),data:Ci(atob(i.data))})};function rn(e){let t=e.length;for(;--t>=0;)e[t]=0}const an=256,dn=286,sn=30,ln=15,cn=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),hn=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),mn=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),pn=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),un=new Array(576);rn(un);const fn=new Array(60);rn(fn);const gn=new Array(512);rn(gn);const bn=new Array(256);rn(bn);const _n=new Array(29);rn(_n);const xn=new Array(sn);function vn(e,t,i,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}let yn,wn,kn;function En(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}rn(xn);const In=e=>e<256?gn[e]:gn[256+(e>>>7)],Sn=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Cn=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,Sn(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Rn=(e,t,i)=>{Cn(e,i[2*t],i[2*t+1])},Tn=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},An=(e,t,i)=>{const n=new Array(16);let o,r,a=0;for(o=1;o<=ln;o++)a=a+i[o-1]<<1,n[o]=a;for(r=0;r<=t;r++){let t=e[2*r+1];0!==t&&(e[2*r]=Tn(n[t]++,t))}},On=e=>{let t;for(t=0;t<dn;t++)e.dyn_ltree[2*t]=0;for(t=0;t<sn;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Fn=e=>{e.bi_valid>8?Sn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ln=(e,t,i,n)=>{const o=2*t,r=2*i;return e[o]<e[r]||e[o]===e[r]&&n[t]<=n[i]},Bn=(e,t,i)=>{const n=e.heap[i];let o=i<<1;for(;o<=e.heap_len&&(o<e.heap_len&&Ln(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!Ln(t,n,e.heap[o],e.depth));)e.heap[i]=e.heap[o],i=o,o<<=1;e.heap[i]=n},zn=(e,t,i)=>{let n,o,r,a,d=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+d++],n+=(255&e.pending_buf[e.sym_buf+d++])<<8,o=e.pending_buf[e.sym_buf+d++],0===n?Rn(e,o,t):(r=bn[o],Rn(e,r+an+1,t),a=cn[r],0!==a&&(o-=_n[r],Cn(e,o,a)),n--,r=In(n),Rn(e,r,i),a=hn[r],0!==a&&(n-=xn[r],Cn(e,n,a)))}while(d<e.sym_next);Rn(e,256,t)},Dn=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,r=t.stat_desc.elems;let a,d,s,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<r;a++)0!==i[2*a]?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):i[2*a+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=l<2?++l:0,i[2*s]=1,e.depth[s]=0,e.opt_len--,o&&(e.static_len-=n[2*s+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Bn(e,i,a);s=r;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Bn(e,i,1),d=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=d,i[2*s]=i[2*a]+i[2*d],e.depth[s]=(e.depth[a]>=e.depth[d]?e.depth[a]:e.depth[d])+1,i[2*a+1]=i[2*d+1]=s,e.heap[1]=s++,Bn(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,c,h,m,p,u,f=0;for(m=0;m<=ln;m++)e.bl_count[m]=0;for(i[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)c=e.heap[l],m=i[2*i[2*c+1]+1]+1,m>s&&(m=s,f++),i[2*c+1]=m,c>n||(e.bl_count[m]++,p=0,c>=d&&(p=a[c-d]),u=i[2*c],e.opt_len+=u*(m+p),r&&(e.static_len+=u*(o[2*c+1]+p)));if(0!==f){do{for(m=s-1;0===e.bl_count[m];)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(m=s;0!==m;m--)for(c=e.bl_count[m];0!==c;)h=e.heap[--l],h>n||(i[2*h+1]!==m&&(e.opt_len+=(m-i[2*h+1])*i[2*h],i[2*h+1]=m),c--)}})(e,t),An(i,l,e.bl_count)},$n=(e,t,i)=>{let n,o,r=-1,a=t[1],d=0,s=7,l=4;for(0===a&&(s=138,l=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)o=a,a=t[2*(n+1)+1],++d<s&&o===a||(d<l?e.bl_tree[2*o]+=d:0!==o?(o!==r&&e.bl_tree[2*o]++,e.bl_tree[32]++):d<=10?e.bl_tree[34]++:e.bl_tree[36]++,d=0,r=o,0===a?(s=138,l=3):o===a?(s=6,l=3):(s=7,l=4))},Nn=(e,t,i)=>{let n,o,r=-1,a=t[1],d=0,s=7,l=4;for(0===a&&(s=138,l=3),n=0;n<=i;n++)if(o=a,a=t[2*(n+1)+1],!(++d<s&&o===a)){if(d<l)do{Rn(e,o,e.bl_tree)}while(0!==--d);else 0!==o?(o!==r&&(Rn(e,o,e.bl_tree),d--),Rn(e,16,e.bl_tree),Cn(e,d-3,2)):d<=10?(Rn(e,17,e.bl_tree),Cn(e,d-3,3)):(Rn(e,18,e.bl_tree),Cn(e,d-11,7));d=0,r=o,0===a?(s=138,l=3):o===a?(s=6,l=3):(s=7,l=4)}};let Pn=!1;const Mn=(e,t,i,n)=>{Cn(e,0+(n?1:0),3),Fn(e),Sn(e,i),Sn(e,~i),i&&e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i};var Un=e=>{Pn||((()=>{let e,t,i,n,o;const r=new Array(16);for(i=0,n=0;n<28;n++)for(_n[n]=i,e=0;e<1<<cn[n];e++)bn[i++]=n;for(bn[i-1]=n,o=0,n=0;n<16;n++)for(xn[n]=o,e=0;e<1<<hn[n];e++)gn[o++]=n;for(o>>=7;n<sn;n++)for(xn[n]=o<<7,e=0;e<1<<hn[n]-7;e++)gn[256+o++]=n;for(t=0;t<=ln;t++)r[t]=0;for(e=0;e<=143;)un[2*e+1]=8,e++,r[8]++;for(;e<=255;)un[2*e+1]=9,e++,r[9]++;for(;e<=279;)un[2*e+1]=7,e++,r[7]++;for(;e<=287;)un[2*e+1]=8,e++,r[8]++;for(An(un,287,r),e=0;e<sn;e++)fn[2*e+1]=5,fn[2*e]=Tn(e,5);yn=new vn(un,cn,257,dn,ln),wn=new vn(fn,hn,0,sn,ln),kn=new vn(new Array(0),mn,0,19,7)})(),Pn=!0),e.l_desc=new En(e.dyn_ltree,yn),e.d_desc=new En(e.dyn_dtree,wn),e.bl_desc=new En(e.bl_tree,kn),e.bi_buf=0,e.bi_valid=0,On(e)},Hn=(e,t,i,n)=>{let o,r,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<an;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Dn(e,e.l_desc),Dn(e,e.d_desc),a=(e=>{let t;for($n(e,e.dyn_ltree,e.l_desc.max_code),$n(e,e.dyn_dtree,e.d_desc.max_code),Dn(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*pn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=o&&(o=r)):o=r=i+5,i+4<=o&&-1!==t?Mn(e,t,i,n):4===e.strategy||r===o?(Cn(e,2+(n?1:0),3),zn(e,un,fn)):(Cn(e,4+(n?1:0),3),((e,t,i,n)=>{let o;for(Cn(e,t-257,5),Cn(e,i-1,5),Cn(e,n-4,4),o=0;o<n;o++)Cn(e,e.bl_tree[2*pn[o]+1],3);Nn(e,e.dyn_ltree,t-1),Nn(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),zn(e,e.dyn_ltree,e.dyn_dtree)),On(e),n&&Fn(e)},Vn=(e,t,i)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=i,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(bn[i]+an+1)]++,e.dyn_dtree[2*In(t)]++),e.sym_next===e.sym_end),Wn=e=>{Cn(e,2,3),Rn(e,256,un),(e=>{16===e.bi_valid?(Sn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},Xn={_tr_init:Un,_tr_stored_block:Mn,_tr_flush_block:Hn,_tr_tally:Vn,_tr_align:Wn};var qn=(e,t,i,n)=>{let o=65535&e,r=e>>>16&65535,a=0;for(;0!==i;){a=i>2e3?2e3:i,i-=a;do{o=o+t[n++]|0,r=r+o|0}while(--a);o%=65521,r%=65521}return o|r<<16};const Yn=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Gn=(e,t,i,n)=>{const o=Yn,r=n+i;e^=-1;for(let i=n;i<r;i++)e=e>>>8^o[255&(e^t[i])];return-1^e},jn={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Kn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Zn,_tr_stored_block:Qn,_tr_flush_block:Jn,_tr_tally:eo,_tr_align:to}=Xn,{Z_NO_FLUSH:io,Z_PARTIAL_FLUSH:no,Z_FULL_FLUSH:oo,Z_FINISH:ro,Z_BLOCK:ao,Z_OK:so,Z_STREAM_END:lo,Z_STREAM_ERROR:co,Z_DATA_ERROR:ho,Z_BUF_ERROR:mo,Z_DEFAULT_COMPRESSION:po,Z_FILTERED:uo,Z_HUFFMAN_ONLY:fo,Z_RLE:go,Z_FIXED:bo,Z_DEFAULT_STRATEGY:_o,Z_UNKNOWN:xo,Z_DEFLATED:vo}=Kn,yo=258,wo=262,ko=42,Eo=113,Io=666,So=(e,t)=>(e.msg=jn[t],t),Co=e=>2*e-(e>4?9:0),Ro=e=>{let t=e.length;for(;--t>=0;)e[t]=0},To=e=>{let t,i,n,o=e.w_size;t=e.hash_size,n=t;do{i=e.head[--n],e.head[n]=i>=o?i-o:0}while(--t);t=o,n=t;do{i=e.prev[--n],e.prev[n]=i>=o?i-o:0}while(--t)};let Ao=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const Oo=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},Fo=(e,t)=>{Jn(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Oo(e.strm)},Lo=(e,t)=>{e.pending_buf[e.pending++]=t},Bo=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},zo=(e,t,i,n)=>{let o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),i),1===e.state.wrap?e.adler=qn(e.adler,t,o,i):2===e.state.wrap&&(e.adler=Gn(e.adler,t,o,i)),e.next_in+=o,e.total_in+=o,o)},Do=(e,t)=>{let i,n,o=e.max_chain_length,r=e.strstart,a=e.prev_length,d=e.nice_match;const s=e.strstart>e.w_size-wo?e.strstart-(e.w_size-wo):0,l=e.window,c=e.w_mask,h=e.prev,m=e.strstart+yo;let p=l[r+a-1],u=l[r+a];e.prev_length>=e.good_match&&(o>>=2),d>e.lookahead&&(d=e.lookahead);do{if(i=t,l[i+a]===u&&l[i+a-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do{}while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<m);if(n=yo-(m-r),r=m-yo,n>a){if(e.match_start=t,a=n,n>=d)break;p=l[r+a-1],u=l[r+a]}}}while((t=h[t&c])>s&&0!==--o);return a<=e.lookahead?a:e.lookahead},$o=e=>{const t=e.w_size;let i,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-wo)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),To(e),n+=t),0===e.strm.avail_in)break;if(i=zo(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=Ao(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=Ao(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<wo&&0!==e.strm.avail_in)},No=(e,t)=>{let i,n,o,r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,d=e.strm.avail_in;do{if(i=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o)break;if(o=e.strm.avail_out-o,n=e.strstart-e.block_start,i>n+e.strm.avail_in&&(i=n+e.strm.avail_in),i>o&&(i=o),i<r&&(0===i&&t!==ro||t===io||i!==n+e.strm.avail_in))break;a=t===ro&&i===n+e.strm.avail_in?1:0,Qn(e,0,0,a),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,Oo(e.strm),n&&(n>i&&(n=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,i-=n),i&&(zo(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(0===a);return d-=e.strm.avail_in,d&&(d>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=d&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-d,e.strm.next_in),e.strstart),e.strstart+=d,e.insert+=d>e.w_size-e.insert?e.w_size-e.insert:d),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==io&&t!==ro&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(zo(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,r=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=r||(n||t===ro)&&t!==io&&0===e.strm.avail_in&&n<=o)&&(i=n>o?o:n,a=t===ro&&0===e.strm.avail_in&&i===n?1:0,Qn(e,e.block_start,i,a),e.block_start+=i,Oo(e.strm)),a?3:1)},Po=(e,t)=>{let i,n;for(;;){if(e.lookahead<wo){if($o(e),e.lookahead<wo&&t===io)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=Ao(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-wo&&(e.match_length=Do(e,i)),e.match_length>=3)if(n=eo(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Ao(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Ao(e,e.ins_h,e.window[e.strstart+1]);else n=eo(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Fo(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===ro?(Fo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Fo(e,!1),0===e.strm.avail_out)?1:2},Mo=(e,t)=>{let i,n,o;for(;;){if(e.lookahead<wo){if($o(e),e.lookahead<wo&&t===io)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=Ao(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-wo&&(e.match_length=Do(e,i),e.match_length<=5&&(e.strategy===uo||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=eo(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=Ao(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Fo(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=eo(e,0,e.window[e.strstart-1]),n&&Fo(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=eo(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===ro?(Fo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Fo(e,!1),0===e.strm.avail_out)?1:2};function Uo(e,t,i,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=o}const Ho=[new Uo(0,0,0,0,No),new Uo(4,4,8,4,Po),new Uo(4,5,16,8,Po),new Uo(4,6,32,32,Po),new Uo(4,4,16,16,Mo),new Uo(8,16,32,32,Mo),new Uo(8,16,128,128,Mo),new Uo(8,32,128,256,Mo),new Uo(32,128,258,1024,Mo),new Uo(32,258,258,4096,Mo)];function Vo(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vo,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ro(this.dyn_ltree),Ro(this.dyn_dtree),Ro(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ro(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ro(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Wo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ko&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Eo&&t.status!==Io?1:0},Xo=e=>{if(Wo(e))return So(e,co);e.total_in=e.total_out=0,e.data_type=xo;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?ko:Eo,e.adler=2===t.wrap?0:1,t.last_flush=-2,Zn(t),so},qo=e=>{const t=Xo(e);return t===so&&(e=>{e.window_size=2*e.w_size,Ro(e.head),e.max_lazy_match=Ho[e.level].max_lazy,e.good_match=Ho[e.level].good_length,e.nice_match=Ho[e.level].nice_length,e.max_chain_length=Ho[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Yo=(e,t,i,n,o,r)=>{if(!e)return co;let a=1;if(t===po&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||i!==vo||n<8||n>15||t<0||t>9||r<0||r>bo||8===n&&1!==a)return So(e,co);8===n&&(n=9);const d=new Vo;return e.state=d,d.strm=e,d.status=ko,d.wrap=a,d.gzhead=null,d.w_bits=n,d.w_size=1<<d.w_bits,d.w_mask=d.w_size-1,d.hash_bits=o+7,d.hash_size=1<<d.hash_bits,d.hash_mask=d.hash_size-1,d.hash_shift=~~((d.hash_bits+3-1)/3),d.window=new Uint8Array(2*d.w_size),d.head=new Uint16Array(d.hash_size),d.prev=new Uint16Array(d.w_size),d.lit_bufsize=1<<o+6,d.pending_buf_size=4*d.lit_bufsize,d.pending_buf=new Uint8Array(d.pending_buf_size),d.sym_buf=d.lit_bufsize,d.sym_end=3*(d.lit_bufsize-1),d.level=t,d.strategy=r,d.method=i,qo(e)};var Go=(e,t)=>{if(Wo(e)||t>ao||t<0)return e?So(e,co):co;const i=e.state;if(!e.output||0!==e.avail_in&&!e.input||i.status===Io&&t!==ro)return So(e,0===e.avail_out?mo:co);const n=i.last_flush;if(i.last_flush=t,0!==i.pending){if(Oo(e),0===e.avail_out)return i.last_flush=-1,so}else if(0===e.avail_in&&Co(t)<=Co(n)&&t!==ro)return So(e,mo);if(i.status===Io&&0!==e.avail_in)return So(e,mo);if(i.status===ko&&0===i.wrap&&(i.status=Eo),i.status===ko){let t=vo+(i.w_bits-8<<4)<<8,n=-1;if(n=i.strategy>=fo||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,Bo(i,t),0!==i.strstart&&(Bo(i,e.adler>>>16),Bo(i,65535&e.adler)),e.adler=1,i.status=Eo,Oo(e),0!==i.pending)return i.last_flush=-1,so}if(57===i.status)if(e.adler=0,Lo(i,31),Lo(i,139),Lo(i,8),i.gzhead)Lo(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Lo(i,255&i.gzhead.time),Lo(i,i.gzhead.time>>8&255),Lo(i,i.gzhead.time>>16&255),Lo(i,i.gzhead.time>>24&255),Lo(i,9===i.level?2:i.strategy>=fo||i.level<2?4:0),Lo(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(Lo(i,255&i.gzhead.extra.length),Lo(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Gn(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69;else if(Lo(i,0),Lo(i,0),Lo(i,0),Lo(i,0),Lo(i,0),Lo(i,9===i.level?2:i.strategy>=fo||i.level<2?4:0),Lo(i,3),i.status=Eo,Oo(e),0!==i.pending)return i.last_flush=-1,so;if(69===i.status){if(i.gzhead.extra){let t=i.pending,n=(65535&i.gzhead.extra.length)-i.gzindex;for(;i.pending+n>i.pending_buf_size;){let o=i.pending_buf_size-i.pending;if(i.pending_buf.set(i.gzhead.extra.subarray(i.gzindex,i.gzindex+o),i.pending),i.pending=i.pending_buf_size,i.gzhead.hcrc&&i.pending>t&&(e.adler=Gn(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex+=o,Oo(e),0!==i.pending)return i.last_flush=-1,so;t=0,n-=o}let o=new Uint8Array(i.gzhead.extra);i.pending_buf.set(o.subarray(i.gzindex,i.gzindex+n),i.pending),i.pending+=n,i.gzhead.hcrc&&i.pending>t&&(e.adler=Gn(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex=0}i.status=73}if(73===i.status){if(i.gzhead.name){let t,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(e.adler=Gn(e.adler,i.pending_buf,i.pending-n,n)),Oo(e),0!==i.pending)return i.last_flush=-1,so;n=0}t=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,Lo(i,t)}while(0!==t);i.gzhead.hcrc&&i.pending>n&&(e.adler=Gn(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex=0}i.status=91}if(91===i.status){if(i.gzhead.comment){let t,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(e.adler=Gn(e.adler,i.pending_buf,i.pending-n,n)),Oo(e),0!==i.pending)return i.last_flush=-1,so;n=0}t=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,Lo(i,t)}while(0!==t);i.gzhead.hcrc&&i.pending>n&&(e.adler=Gn(e.adler,i.pending_buf,i.pending-n,n))}i.status=103}if(103===i.status){if(i.gzhead.hcrc){if(i.pending+2>i.pending_buf_size&&(Oo(e),0!==i.pending))return i.last_flush=-1,so;Lo(i,255&e.adler),Lo(i,e.adler>>8&255),e.adler=0}if(i.status=Eo,Oo(e),0!==i.pending)return i.last_flush=-1,so}if(0!==e.avail_in||0!==i.lookahead||t!==io&&i.status!==Io){let n=0===i.level?No(i,t):i.strategy===fo?((e,t)=>{let i;for(;;){if(0===e.lookahead&&($o(e),0===e.lookahead)){if(t===io)return 1;break}if(e.match_length=0,i=eo(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(Fo(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===ro?(Fo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Fo(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===go?((e,t)=>{let i,n,o,r;const a=e.window;for(;;){if(e.lookahead<=yo){if($o(e),e.lookahead<=yo&&t===io)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){r=e.strstart+yo;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<r);e.match_length=yo-(r-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=eo(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=eo(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(Fo(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===ro?(Fo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Fo(e,!1),0===e.strm.avail_out)?1:2})(i,t):Ho[i.level].func(i,t);if(3!==n&&4!==n||(i.status=Io),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),so;if(2===n&&(t===no?to(i):t!==ao&&(Qn(i,0,0,!1),t===oo&&(Ro(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),Oo(e),0===e.avail_out))return i.last_flush=-1,so}return t!==ro?so:i.wrap<=0?lo:(2===i.wrap?(Lo(i,255&e.adler),Lo(i,e.adler>>8&255),Lo(i,e.adler>>16&255),Lo(i,e.adler>>24&255),Lo(i,255&e.total_in),Lo(i,e.total_in>>8&255),Lo(i,e.total_in>>16&255),Lo(i,e.total_in>>24&255)):(Bo(i,e.adler>>>16),Bo(i,65535&e.adler)),Oo(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?so:lo)},jo=(e,t)=>{let i=t.length;if(Wo(e))return co;const n=e.state,o=n.wrap;if(2===o||1===o&&n.status!==ko||n.lookahead)return co;if(1===o&&(e.adler=qn(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===o&&(Ro(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const r=e.avail_in,a=e.next_in,d=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,$o(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Ao(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,$o(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=d,e.avail_in=r,n.wrap=o,so},Ko={deflateInit:(e,t)=>Yo(e,t,vo,15,8,_o),deflateInit2:Yo,deflateReset:qo,deflateResetKeep:Xo,deflateSetHeader:(e,t)=>Wo(e)||2!==e.state.wrap?co:(e.state.gzhead=t,so),deflate:Go,deflateEnd:e=>{if(Wo(e))return co;const t=e.state.status;return e.state=null,t===Eo?So(e,ho):so},deflateSetDictionary:jo,deflateInfo:"pako deflate (from Nodeca project)"};const Zo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Qo=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Zo(i,t)&&(e[t]=i[t])}}return e},Jo=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,o=e.length;t<o;t++){let o=e[t];i.set(o,n),n+=o.length}return i};let er=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){er=!1}const tr=new Uint8Array(256);for(let e=0;e<256;e++)tr[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;tr[254]=tr[254]=1;var ir=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,o,r,a=e.length,d=0;for(o=0;o<a;o++)i=e.charCodeAt(o),55296==(64512&i)&&o+1<a&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),o++)),d+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(d),r=0,o=0;r<d;o++)i=e.charCodeAt(o),55296==(64512&i)&&o+1<a&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),o++)),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t};var nr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const or=Object.prototype.toString,{Z_NO_FLUSH:rr,Z_SYNC_FLUSH:ar,Z_FULL_FLUSH:dr,Z_FINISH:sr,Z_OK:lr,Z_STREAM_END:cr,Z_DEFAULT_COMPRESSION:hr,Z_DEFAULT_STRATEGY:mr,Z_DEFLATED:pr}=Kn;function ur(e){this.options=Qo({level:hr,method:pr,chunkSize:16384,windowBits:15,memLevel:8,strategy:mr},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nr,this.strm.avail_out=0;let i=Ko.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==lr)throw new Error(jn[i]);if(t.header&&Ko.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?ir(t.dictionary):"[object ArrayBuffer]"===or.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=Ko.deflateSetDictionary(this.strm,e),i!==lr)throw new Error(jn[i]);this._dict_set=!0}}ur.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let o,r;if(this.ended)return!1;for(r=t===~~t?t:!0===t?sr:rr,"string"==typeof e?i.input=ir(e):"[object ArrayBuffer]"===or.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(r===ar||r===dr)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(o=Ko.deflate(i,r),o===cr)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),o=Ko.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===lr;if(0!==i.avail_out){if(r>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},ur.prototype.onData=function(e){this.chunks.push(e)},ur.prototype.onEnd=function(e){e===lr&&(this.result=Jo(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var fr={deflate:function(e,t){const i=new ur(t);if(i.push(e,!0),i.err)throw i.msg||jn[i.err];return i.result}};const{deflate:gr}=fr;var br=gr;const _r={b:{u:DataView.prototype.getInt8,p:DataView.prototype.setInt8,bytes:1},B:{u:DataView.prototype.getUint8,p:DataView.prototype.setUint8,bytes:1},h:{u:DataView.prototype.getInt16,p:DataView.prototype.setInt16,bytes:2},H:{u:DataView.prototype.getUint16,p:DataView.prototype.setUint16,bytes:2},i:{u:DataView.prototype.getInt32,p:DataView.prototype.setInt32,bytes:4},I:{u:DataView.prototype.getUint32,p:DataView.prototype.setUint32,bytes:4}},xr=(e,...t)=>{let i=0;if(e.replace(/[<>]/,"").length!=t.length)throw"Pack format to Argument count mismatch";const n=[];let o=!0;for(let n=0;n<e.length;n++)"<"==e[n]?o=!0:">"==e[n]?o=!1:(r(e[n],t[i]),i++);function r(e,t){if(!(e in _r))throw"Unhandled character '"+e+"' in pack format";const i=_r[e].bytes,r=new DataView(new ArrayBuffer(i));_r[e].p.bind(r)(0,t,o);for(let e=0;e<i;e++)n.push(r.getUint8(e))}return n},vr=(e,t)=>{let i=0;const n=[];let o=!0;for(const t of e)"<"==t?o=!0:">"==t?o=!1:r(t);function r(e){if(!(e in _r))throw"Unhandled character '"+e+"' in unpack format";const r=_r[e].bytes,a=new DataView(new ArrayBuffer(r));for(let e=0;e<r;e++)a.setUint8(e,255&t[i+e]);const d=_r[e].u.bind(a);n.push(d(0,o)),i+=r}return n};class yr extends EventTarget{constructor(e,t,i){super(),this.port=e,this.logger=t,this._parent=i,this.chipName=null,this.chipRevision=null,this.chipVariant=null,this._efuses=new Array(4).fill(0),this._flashsize=4194304,this.debug=!1,this.IS_STUB=!1,this.connected=!0,this.flashSize=null,this._currentBaudRate=Fi,this._isESP32S2NativeUSB=!1,this._initializationSucceeded=!1,this.state_DTR=!1}get _inputBuffer(){return this._parent?this._parent._inputBuffer:this.__inputBuffer}get _totalBytesRead(){return this._parent?this._parent._totalBytesRead:this.__totalBytesRead||0}set _totalBytesRead(e){this._parent?this._parent._totalBytesRead=e:this.__totalBytesRead=e}detectUSBSerialChip(e,t){const i={6790:{29986:{name:"CH340",maxBaudrate:460800},29987:{name:"CH340",maxBaudrate:460800},30084:{name:"CH340",maxBaudrate:460800},21795:{name:"CH341",maxBaudrate:2e6},21971:{name:"CH343",maxBaudrate:6e6},21972:{name:"CH9102",maxBaudrate:6e6},21976:{name:"CH9101",maxBaudrate:3e6}},4292:{6e4:{name:"CP2102(n)",maxBaudrate:3e6},60016:{name:"CP2105",maxBaudrate:2e6},60017:{name:"CP2108",maxBaudrate:2e6}},1027:{24577:{name:"FT232R",maxBaudrate:3e6},24592:{name:"FT2232",maxBaudrate:3e6},24593:{name:"FT4232",maxBaudrate:3e6},24596:{name:"FT232H",maxBaudrate:12e6},24597:{name:"FT230X",maxBaudrate:3e6}},12346:{2:{name:"ESP32-S2 Native USB",maxBaudrate:2e6},4097:{name:"ESP32 Native USB",maxBaudrate:2e6},4098:{name:"ESP32 Native USB",maxBaudrate:2e6},16386:{name:"ESP32 Native USB",maxBaudrate:2e6},4096:{name:"ESP32 Native USB",maxBaudrate:2e6}}}[e];return i&&i[t]?i[t]:{name:`Unknown (VID: 0x${e.toString(16)}, PID: 0x${t.toString(16)})`}}async initialize(){if(await this.hardReset(!0),!this._parent){this.__inputBuffer=[],this.__totalBytesRead=0;const e=this.port.getInfo();if(e.usbVendorId&&e.usbProductId){const t=this.detectUSBSerialChip(e.usbVendorId,e.usbProductId);this.logger.log(`USB-Serial: ${t.name} (VID: 0x${e.usbVendorId.toString(16)}, PID: 0x${e.usbProductId.toString(16)})`),t.maxBaudrate&&(this._maxUSBSerialBaudrate=t.maxBaudrate,this.logger.log(`Max baudrate: ${t.maxBaudrate}`)),12346===e.usbVendorId&&2===e.usbProductId&&(this._isESP32S2NativeUSB=!0)}this.readLoop()}await this.flushSerialBuffers(),await this.sync(),await this.detectChip();const e=tn(this.getChipFamily()),t=e.macFuse;for(let e=0;e<4;e++)this._efuses[e]=await this.readRegister(t+4*e);this.logger.log(`Chip type ${this.chipName}`),this.logger.debug(`Bootloader flash offset: 0x${e.flashOffs.toString(16)}`),this._initializationSucceeded=!0}async detectChip(){try{const e=(await this.getSecurityInfo()).chipId,t=ji[e];if(t)return this.chipName=t.name,this.chipFamily=t.family,this.chipFamily===Yi&&(this.chipRevision=await this.getChipRevision(),this.logger.debug(`ESP32-P4 revision: ${this.chipRevision}`),this.chipRevision>=300?this.chipVariant="rev300":this.chipVariant="rev0",this.logger.debug(`ESP32-P4 variant: ${this.chipVariant}`)),void this.logger.debug(`Detected chip via IMAGE_CHIP_ID: ${e} (${this.chipName})`);this.logger.debug(`Unknown IMAGE_CHIP_ID: ${e}, falling back to magic value detection`)}catch(e){this.logger.debug(`GET_SECURITY_INFO failed, using magic value detection: ${e}`),this._inputBuffer.length=0,await Ai(Ji);try{await this.sync()}catch(e){this.logger.debug(`Re-sync after GET_SECURITY_INFO failure: ${e}`)}}const e=await this.readRegister(1073745920),t=Ki[e>>>0];if(void 0===t)throw new Error(`Unknown Chip: Hex: ${Ti(e>>>0,8).toLowerCase()} Number: ${e}`);this.chipName=t.name,this.chipFamily=t.family,this.chipFamily===Yi&&(this.chipRevision=await this.getChipRevision(),this.logger.debug(`ESP32-P4 revision: ${this.chipRevision}`),this.chipRevision>=300?this.chipVariant="rev300":this.chipVariant="rev0",this.logger.debug(`ESP32-P4 variant: ${this.chipVariant}`)),this.logger.debug(`Detected chip via magic value: ${Ti(e>>>0,8)} (${this.chipName})`)}async getChipRevision(){if(this.chipFamily!==Yi)return 0;const e=await this.readRegister(1343410252);return 100*((e>>23&1)<<2|e>>4&3)+(15&e)}async getSecurityInfo(){const[,e]=await this.checkCommand(20,[],0);if(0===e.length)throw new Error("GET_SECURITY_INFO not supported or returned empty response");if(e.length<12)throw new Error(`Invalid security info response length: ${e.length} (expected at least 12 bytes)`);return{flags:vr("<I",e.slice(0,4))[0],flashCryptCnt:e[4],keyPurposes:Array.from(e.slice(5,12)),chipId:e.length>=16?vr("<I",e.slice(12,16))[0]:0,apiVersion:e.length>=20?vr("<I",e.slice(16,20))[0]:0}}async readLoop(){this.debug&&this.logger.debug("Starting read loop"),this._reader=this.port.readable.getReader();try{let e=!0;for(;e;){const{value:t,done:i}=await this._reader.read();if(i){this._reader.releaseLock(),e=!1;break}if(!t||0===t.length)continue;const n=Array.from(t);Array.prototype.push.apply(this._inputBuffer,n),this._totalBytesRead+=t.length}}catch{this.logger.error("Read loop got disconnected")}this.connected=!1,this._isESP32S2NativeUSB&&!this._initializationSucceeded&&(this.logger.log("ESP32-S2 Native USB detected - requesting port reselection"),this.dispatchEvent(new CustomEvent("esp32s2-usb-reconnect",{detail:{message:"ESP32-S2 Native USB requires port reselection"}}))),this.dispatchEvent(new Event("disconnect")),this.logger.debug("Finished read loop")}sleep(e=100){return new Promise(t=>setTimeout(t,e))}async setRTS(e){await this.port.setSignals({requestToSend:e}),await this.setDTR(this.state_DTR)}async setDTR(e){this.state_DTR=e,await this.port.setSignals({dataTerminalReady:e})}async hardReset(e=!1){e?4097===this.port.getInfo().usbProductId?(await this.setDTR(!1),await this.setRTS(!1),await this.sleep(100),await this.setDTR(!0),await this.setRTS(!1),await this.sleep(100),await this.setRTS(!0),await this.setDTR(!1),await this.setRTS(!0),await this.sleep(100),await this.setDTR(!1),await this.setRTS(!1),this.logger.log("USB MCU reset.")):(await this.setDTR(!1),await this.setRTS(!0),await this.sleep(100),await this.setDTR(!0),await this.setRTS(!1),await this.sleep(50),await this.setDTR(!1),this.logger.log("DTR/RTS USB serial chip reset.")):(await this.setRTS(!0),await this.sleep(100),await this.setRTS(!1),this.logger.log("Hard reset.")),await new Promise(e=>setTimeout(e,1e3))}macAddr(){const e=new Array(6).fill(0),t=this._efuses[0],i=this._efuses[1],n=this._efuses[2],o=this._efuses[3];let r;if(this.chipFamily==zi){if(0!=o)r=[o>>16&255,o>>8&255,255&o];else if(i>>16&255){if(1!=(i>>16&255))throw new Error("Couldnt determine OUI");r=[172,208,116]}else r=[24,254,52];e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=i>>8&255,e[4]=255&i,e[5]=t>>24&255}else if(this.chipFamily==Di)e[0]=n>>8&255,e[1]=255&n,e[2]=i>>24&255,e[3]=i>>16&255,e[4]=i>>8&255,e[5]=255&i;else{if(this.chipFamily!=$i&&this.chipFamily!=Ni&&this.chipFamily!=Pi&&this.chipFamily!=Mi&&this.chipFamily!=Ui&&this.chipFamily!=Hi&&this.chipFamily!=Vi&&this.chipFamily!=Wi&&this.chipFamily!=Xi&&this.chipFamily!=qi&&this.chipFamily!=Yi&&this.chipFamily!=Gi)throw new Error("Unknown chip family");e[0]=i>>8&255,e[1]=255&i,e[2]=t>>24&255,e[3]=t>>16&255,e[4]=t>>8&255,e[5]=255&t}return e}async readRegister(e){this.debug&&this.logger.debug("Reading from Register "+Ti(e,8));const t=xr("<I",e);await this.sendCommand(10,t);const[i]=await this.getResponse(10);return i}async checkCommand(e,t,i=0,n=3e3){n=Math.min(n,3e5),await this.sendCommand(e,t,i);const[o,r]=await this.getResponse(e,n);if(null===r)throw new Error("Didn't get enough status bytes");let a=r,d=0;if(this.IS_STUB||this.chipFamily==zi?d=2:[Di,$i,Ni,Pi,Mi,Ui,Hi,Vi,Wi,Xi,qi,Yi,Gi].includes(this.chipFamily)||20===e?d=4:[2,4].includes(a.length)&&(d=a.length),a.length<d)throw new Error("Didn't get enough status bytes");const s=a.slice(-d,a.length);if(a=a.slice(0,-d),this.debug&&(this.logger.debug("status",s),this.logger.debug("value",o),this.logger.debug("data",a)),1==s[0])throw 5==s[1]?new Error("Invalid (unsupported) command "+Ti(e)):new Error("Command failure error code "+Ti(s[1]));return[o,a]}async sendCommand(e,t,i=0){const n=Si([...xr("<BBHI",0,e,t.length,i),...t]);this.debug&&this.logger.debug(`Writing ${n.length} byte${1==n.length?"":"s"}:`,n),await this.writeToStream(n)}async readPacket(e){let t=null,i=!1,n=[];for(;;){const o=Date.now();for(n=[];Date.now()-o<e;){if(this._inputBuffer.length>0){n.push(this._inputBuffer.shift());break}await Ai(1)}if(0==n.length){throw new nn("Timed out waiting for packet "+(null===t?"header":"content"))}this.debug&&this.logger.debug("Read "+n.length+" bytes: "+Ri(n));for(const e of n)if(null===t){if(192!=e)throw this.debug&&(this.logger.debug("Read invalid data: "+Ri(n)),this.logger.debug("Remaining data in serial buffer: "+Ri(this._inputBuffer))),new nn("Invalid head of packet ("+Ti(e)+")");t=[]}else if(i)if(i=!1,220==e)t.push(192);else{if(221!=e)throw this.debug&&(this.logger.debug("Read invalid data: "+Ri(n)),this.logger.debug("Remaining data in serial buffer: "+Ri(this._inputBuffer))),new nn("Invalid SLIP escape (0xdb, "+Ti(e)+")");t.push(219)}else if(219==e)i=!0;else{if(192==e)return this.debug&&this.logger.debug("Received full packet: "+Ri(t)),t;t.push(e)}}throw new nn("Invalid state")}async getResponse(e,t=3e3){for(let i=0;i<100;i++){const i=await this.readPacket(t);if(i.length<8)continue;const[n,o,,r]=vr("<BBHI",i.slice(0,8));if(1!=n)continue;const a=i.slice(8);if(null==e||o==e)return[r,a];if(0!=a[0]&&5==a[1])throw this._inputBuffer.length=0,new Error(`Invalid (unsupported) command ${Ti(e)}`)}throw"Response doesn't match request"}checksum(e,t=239){for(const i of e)t^=i;return t}async setBaudrate(e){if(this.chipFamily==zi)throw new Error("Changing baud rate is not supported on the ESP8266");try{const t=xr("<II",e,this.IS_STUB?Fi:0);await this.checkCommand(15,t)}catch(t){throw this.logger.error(`Baudrate change error: ${t}`),new Error(`Unable to change the baud rate to ${e}: No response from set baud rate command.`)}this._parent?await this._parent.reconfigurePort(e):await this.reconfigurePort(e),this._parent?this._parent._currentBaudRate=e:this._currentBaudRate=e;const t=this._parent?this._parent._maxUSBSerialBaudrate:this._maxUSBSerialBaudrate;t&&e>t&&(this.logger.log(`⚠️ WARNING: Baudrate ${e} exceeds USB-Serial chip limit (${t})!`),this.logger.log("⚠️ This may cause data corruption or connection failures!")),this.logger.log(`Changed baud rate to ${e}`)}async reconfigurePort(e){var t;try{await(null===(t=this._reader)||void 0===t?void 0:t.cancel()),await this.port.close(),await this.port.open({baudRate:e}),await this.flushSerialBuffers(),this.readLoop()}catch(t){throw this.logger.error(`Reconfigure port error: ${t}`),new Error(`Unable to change the baud rate to ${e}: ${t}`)}}async sync(){for(let e=0;e<5;e++){this._inputBuffer.length=0;if(await this._sync())return await Ai(Ji),!0;await Ai(Ji)}throw new Error("Couldn't sync to ESP. Try resetting.")}async _sync(){await this.sendCommand(8,Bi);for(let e=0;e<8;e++)try{const[,e]=await this.getResponse(8,Ji);if(e.length>1&&0==e[0]&&0==e[1])return!0}catch{}return!1}getFlashWriteSize(){return this.IS_STUB?16384:1024}async flashData(e,t,i=0,n=!1){if(e.byteLength>=8){const t=Array.from(new Uint8Array(e,0,4)),i=t[0],n=t[2],o=t[3];this.logger.log(`Image header, Magic=${Ti(i)}, FlashMode=${Ti(n)}, FlashSizeFreq=${Ti(o)}`)}const o=e.byteLength;let r,a=0,d=Zi;n?(r=br(new Uint8Array(e),{level:9}).buffer,a=r.byteLength,this.logger.log(`Writing data with filesize: ${o}. Compressed Size: ${a}`),d=await this.flashDeflBegin(o,a,i)):(this.logger.log(`Writing data with filesize: ${o}`),r=e,await this.flashBegin(o,i));let s=[],l=0,c=0,h=0;const m=Date.now(),p=this.getFlashWriteSize(),u=n?a:o;for(;u-h>0;)this.debug&&this.logger.log(`Writing at ${Ti(i+l*p,8)} `),u-h>=p?s=Array.from(new Uint8Array(r,h,p)):(s=Array.from(new Uint8Array(r,h,u-h)),n||(s=s.concat(new Array(p-s.length).fill(255)))),n?await this.flashDeflBlock(s,l,d):await this.flashBlock(s,l),l+=1,c+=n?Math.round(s.length*o/a):s.length,h+=p,t(Math.min(c,o),o);this.logger.log("Took "+(Date.now()-m)+"ms to write "+u+" bytes"),this.IS_STUB&&(await this.flashBegin(0,0),n?await this.flashDeflFinish():await this.flashFinish())}async flashBlock(e,t,i=3e3){await this.checkCommand(3,xr("<IIII",e.length,t,0,0).concat(e),this.checksum(e),i)}async flashDeflBlock(e,t,i=3e3){await this.checkCommand(17,xr("<IIII",e.length,t,0,0).concat(e),this.checksum(e),i)}async flashBegin(e=0,t=0,i=!1){let n;await this.flushSerialBuffers();const o=this.getFlashWriteSize();!this.IS_STUB&&[Di,$i,Ni,Pi,Mi,Ui,Hi,Vi,Wi,Xi,qi,Yi,Gi].includes(this.chipFamily)&&await this.checkCommand(13,new Array(8).fill(0));const r=Math.floor((e+o-1)/o);n=this.chipFamily==zi?this.getEraseSize(t,e):e;const a=this.IS_STUB?Zi:en(3e4,e),d=Date.now();let s=xr("<IIII",n,r,o,t);return this.chipFamily!=Di&&this.chipFamily!=$i&&this.chipFamily!=Ni&&this.chipFamily!=Pi&&this.chipFamily!=Mi&&this.chipFamily!=Ui&&this.chipFamily!=Hi&&this.chipFamily!=Vi&&this.chipFamily!=Wi&&this.chipFamily!=Xi&&this.chipFamily!=qi&&this.chipFamily!=Yi&&this.chipFamily!=Gi||(s=s.concat(xr("<I",i?1:0))),this.logger.log("Erase size "+n+", blocks "+r+", block size "+Ti(o,4)+", offset "+Ti(t,4)+", encrypted "+(i?"yes":"no")),await this.checkCommand(2,s,0,a),0==e||this.IS_STUB||this.logger.log("Took "+(Date.now()-d)+"ms to erase "+r+" bytes"),r}async flashDeflBegin(e=0,t=0,i=0){const n=this.getFlashWriteSize(),o=Math.floor((t+n-1)/n),r=Math.floor((e+n-1)/n);let a=0,d=0;this.IS_STUB?(a=e,d=en(3e4,a)):(a=r*n,d=Zi);const s=xr("<IIII",a,o,n,i);return await this.checkCommand(16,s,0,d),d}async flashFinish(){const e=xr("<I",1);await this.checkCommand(4,e)}async flashDeflFinish(){const e=xr("<I",1);await this.checkCommand(18,e)}getBootloaderOffset(){return tn(this.getChipFamily()).flashOffs}async flashId(){return await this.runSpiFlashCommand(159,[],24)}getChipFamily(){return this._parent?this._parent.chipFamily:this.chipFamily}async writeRegister(e,t,i=4294967295,n=0,o=0){let r=xr("<IIII",e,t,i,n);o>0&&(r=r.concat(xr("<IIII",tn(this.getChipFamily()).uartDateReg,0,0,o))),await this.checkCommand(9,r)}async setDataLengths(e,t,i){if(-1!=e.mosiDlenOffs){const n=e.regBase+e.mosiDlenOffs,o=e.regBase+e.misoDlenOffs;t>0&&await this.writeRegister(n,t-1),i>0&&await this.writeRegister(o,i-1)}else{const n=e.regBase+e.usr1Offs,o=(0==i?0:i-1)<<8|(0==t?0:t-1)<<17;await this.writeRegister(n,o)}}async waitDone(e,t){for(let i=0;i<10;i++){if(0==(await this.readRegister(e)&t))return}throw Error("SPI command did not complete in time")}async runSpiFlashCommand(e,t,i=0){const n=tn(this.getChipFamily()),o=n.regBase,r=o,a=o+n.usrOffs,d=o+n.usr2Offs,s=o+n.w0Offs,l=1<<18;if(i>32)throw new Error("Reading more than 32 bits back from a SPI flash operation is unsupported");if(t.length>64)throw new Error("Writing more than 64 bytes of data with one SPI command is unsupported");const c=8*t.length,h=await this.readRegister(a),m=await this.readRegister(d);let p=1<<31;if(i>0&&(p|=268435456),c>0&&(p|=134217728),await this.setDataLengths(n,c,i),await this.writeRegister(a,p),await this.writeRegister(d,7<<28|e),0==c)await this.writeRegister(s,0);else{const e=(4-t.length%4)%4;t=t.concat(new Array(e).fill(0));const i=vr("I".repeat(Math.floor(t.length/4)),t);let n=s;this.logger.debug(`Words Length: ${i.length}`);for(const e of i)this.logger.debug(`Writing word ${Ti(e)} to register offset ${Ti(n)}`),await this.writeRegister(n,e),n+=4}await this.writeRegister(r,l),await this.waitDone(r,l);const u=await this.readRegister(s);return await this.writeRegister(a,h),await this.writeRegister(d,m),u}async detectFlashSize(){this.logger.log("Detecting Flash Size");const e=await this.flashId(),t=255&e,i=e>>16&255;this.logger.log(`FlashId: ${Ti(e)}`),this.logger.log(`Flash Manufacturer: ${t.toString(16)}`),this.logger.log(`Flash Device: ${(e>>8&255).toString(16)}${i.toString(16)}`),this.flashSize=Oi[i],this.logger.log(`Auto-detected Flash size: ${this.flashSize}`)}getEraseSize(e,t){const i=4096,n=Math.floor((t+i-1)/i);let o=16-Math.floor(e/i)%16;return n<o&&(o=n),n<2*o?Math.floor((n+1)/2*i):(n-o)*i}async memBegin(e,t,i,n){return await this.checkCommand(5,xr("<IIII",e,t,i,n))}async memBlock(e,t){return await this.checkCommand(7,xr("<IIII",e.length,t,0,0).concat(e),this.checksum(e))}async memFinish(e=0){const t=this.IS_STUB?Zi:500,i=xr("<II",0==e?1:0,e);return await this.checkCommand(6,i,0,t)}async runStub(e=!1){const t=await on(this.chipFamily,this.chipRevision);if(null===t)return this.logger.log(`Stub flasher is not yet supported on ${this.chipName}, using ROM loader`),this;const i=2048;this.logger.log("Uploading stub...");for(const e of["text","data"]){const n=t[e],o=t[`${e}_start`],r=n.length,a=Math.floor((r+i-1)/i);await this.memBegin(r,a,i,o);for(const e of Array(a).keys()){const t=e*i;let o=t+i;o>r&&(o=r),await this.memBlock(n.slice(t,o),e)}}await this.memFinish(t.entry);const n=await this.readPacket(500),o=String.fromCharCode(...n);if("OHAI"!=o)throw new Error("Failed to start stub. Unexpected response: "+o);this.logger.log("Stub is now running...");const r=new wr(this.port,this.logger,this);return e||await r.detectFlashSize(),r}async writeToStream(e){if(!this.port.writable)return void this.logger.debug("Port writable stream not available, skipping write");const t=this.port.writable.getWriter();await t.write(new Uint8Array(e));try{t.releaseLock()}catch(e){this.logger.error(`Ignoring release lock error: ${e}`)}}async disconnect(){this._parent?await this._parent.disconnect():this.port.writable?(await this.port.writable.getWriter().close(),await new Promise(e=>{this._reader||e(void 0),this.addEventListener("disconnect",e,{once:!0}),this._reader.cancel()}),this.connected=!1):this.logger.debug("Port already closed, skipping disconnect")}async reconnect(){if(this._parent)return void await this._parent.reconnect();if(this.logger.log("Reconnecting serial port..."),this.connected=!1,this.__inputBuffer=[],this._reader){try{await this._reader.cancel()}catch(e){this.logger.debug(`Reader cancel error: ${e}`)}this._reader=void 0}try{await this.port.close(),this.logger.log("Port closed")}catch(e){this.logger.debug(`Port close error: ${e}`)}this.logger.debug("Opening port...");try{await this.port.open({baudRate:Fi}),this.connected=!0}catch(e){throw new Error(`Failed to open port: ${e}`)}if(!this.port.readable||!this.port.writable)throw new Error(`Port streams not available after open (readable: ${!!this.port.readable}, writable: ${!!this.port.writable})`);const e=this.chipFamily,t=this.chipName,i=this.chipRevision,n=this.chipVariant,o=this.flashSize;if(await this.hardReset(!0),this._parent||(this.__inputBuffer=[],this.__totalBytesRead=0,this.readLoop()),await this.flushSerialBuffers(),await this.sync(),this.chipFamily=e,this.chipName=t,this.chipRevision=i,this.chipVariant=n,this.flashSize=o,this.logger.debug(`Reconnect complete (chip: ${this.chipName})`),!this.port.writable||!this.port.readable)throw new Error("Port not ready after reconnect");const r=await this.runStub(!0);if(this.logger.debug("Stub loaded"),this._currentBaudRate!==Fi&&(await r.setBaudrate(this._currentBaudRate),!this.port.writable||!this.port.readable))throw new Error(`Port not ready after baudrate change (readable: ${!!this.port.readable}, writable: ${!!this.port.writable})`);this.IS_STUB&&Object.assign(this,r),this.logger.debug("Reconnection successful")}async flushSerialBuffers(){this._parent||(this.__inputBuffer=[]),await Ai(Ji),this._parent||(this.__inputBuffer=[]),this.logger.debug("Serial buffers flushed")}async readFlash(e,t,i){if(!this.IS_STUB)throw new Error("Reading flash is only supported in stub mode. Please run runStub() first.");await this.flushSerialBuffers(),this.logger.log(`Reading ${t} bytes from flash at address 0x${e.toString(16)}...`);let n=new Uint8Array(0),o=e,r=t;for(;r>0;){const e=Math.min(65536,r);let a=!1,d=0;const s=3;for(;!a&&d<=s;)try{this.logger.debug(`Reading chunk at 0x${o.toString(16)}, size: 0x${e.toString(16)}`);const t=xr("<IIII",o,e,4096,1024),[i]=await this.checkCommand(210,t);if(0!=i)throw new Error("Failed to read memory: "+i);let r=new Uint8Array(0);for(;r.length<e;){let t;try{t=await this.readPacket(100)}catch(t){if(t instanceof nn&&(this.logger.debug(`SLIP read error at ${r.length} bytes: ${t.message}`),r.length>=e))break;throw t}if(t&&t.length>0){const e=new Uint8Array(t),i=new Uint8Array(r.length+e.length);i.set(r),i.set(e,r.length),r=i;const n=xr("<I",r.length),o=Si(n);await this.writeToStream(o)}}const d=new Uint8Array(n.length+r.length);d.set(n),d.set(r,n.length),n=d,a=!0}catch(e){if(d++,!(e instanceof nn&&e.message.includes("Timed out")))throw e;if(!(d<=s))throw new Error(`Failed to read chunk at 0x${o.toString(16)} after ${s} retries: ${e}`);this.logger.log(`⚠️ Timeout error at 0x${o.toString(16)}. Reconnecting and retrying (attempt ${d}/${s})...`);try{await this.reconnect()}catch(e){throw new Error(`Reconnect failed: ${e}`)}}i&&i(new Uint8Array(e),n.length,t),o+=e,r-=e,this.logger.debug(`Total progress: 0x${n.length.toString(16)} from 0x${t.toString(16)} bytes`)}return this.logger.debug(`Successfully read ${n.length} bytes from flash`),n}}class wr extends yr{constructor(){super(...arguments),this.IS_STUB=!0}async memBegin(e,t,i,n){const o=await on(this.chipFamily,this.chipRevision);if(null===o)return[0,[]];const r=n,a=n+e;this.logger.debug(`Load range: ${Ti(r,8)}-${Ti(a,8)}`),this.logger.debug(`Stub data: ${Ti(o.data_start,8)}, len: ${o.data.length}, text: ${Ti(o.text_start,8)}, len: ${o.text.length}`);for(const[e,t]of[[o.data_start,o.data_start+o.data.length],[o.text_start,o.text_start+o.text.length]])if(r<t&&a>e)throw new Error("Software loader is resident at "+Ti(e,8)+"-"+Ti(t,8)+". Can't load binary at overlapping address range "+Ti(r,8)+"-"+Ti(a,8)+". Try changing the binary loading address.");return[0,[]]}async eraseFlash(){await this.checkCommand(208,[],0,Qi)}}const kr=async(e,t,i,n,o,r,a)=>{let d,s,l,c=null,h=!1;const m=(e=>{const t=e.getInfo();return 12346===t.usbVendorId&&2===t.usbProductId})(t),p=t=>e({...t,manifest:d,build:s,chipFamily:l,chipVariant:c});var u=null,f="";try{u=JSON.parse(n)}catch{f=new URL(n,location.toString()).toString(),u=fetch(f).then(e=>e.json())}const g=new yr(t,i);window.esploader=g;const b=()=>{h=!0,i.log("ESP32-S2 Native USB disconnect detected - reconnection required")};m&&(g.addEventListener("esp32s2-usb-reconnect",b),i.log("ESP32-S2 Native USB detected - monitoring for port switch"));const _=()=>{m&&g.removeEventListener("esp32s2-usb-reconnect",b)};p({state:"initializing",message:"Initializing...",details:{done:!1}});try{await g.initialize()}catch(e){if(i.error(e),m&&(h||String(e).includes("reconnect required"))){_();try{await t.close()}catch{}try{await t.forget()}catch{}return void p({state:"esp32_s2_usb_reconnect",message:"ESP32-S2 USB port changed - please select the new port",details:{oldPort:t}})}return _(),p({state:"error",message:"Failed to initialize. Try resetting your device or holding the BOOT button while clicking INSTALL.",details:{error:"failed_initialize",details:e}}),void(g.connected&&await g.disconnect())}l=(e=>{switch(e.chipFamily){case Di:return"ESP32";case $i:return"ESP32-S2";case Ni:return"ESP32-S3";case Pi:return"ESP32-C2";case Mi:return"ESP32-C3";case Ui:return"ESP32-C5";case Hi:return"ESP32-C6";case Vi:return"ESP32-C61";case Wi:return"ESP32-H2";case Yi:return"ESP32-P4";case zi:return"ESP8266";default:return"Unknown Chip"}})(g),c=g.chipVariant,p({state:"initializing",message:`Initialized. Found ${l}${c?` (${c})`:""}`,details:{done:!0}}),p({state:"manifest",message:"Fetching manifest...",details:{done:!1}});try{d=await u}catch(e){return _(),p({state:"error",message:`Unable to fetch manifest: ${e}`,details:{error:"fetch_manifest_failed",details:e}}),void await g.disconnect()}if(s=d.builds.find(e=>e.chipFamily===l&&(void 0===e.chipVariant||e.chipVariant===c)),p({state:"manifest",message:`Found manifest for ${d.name}`,details:{done:!0}}),!s){const e=c?`${l} (${c})`:l;return _(),p({state:"error",message:`Your ${e} board is not supported.`,details:{error:"not_supported",details:e}}),void await g.disconnect()}p({state:"preparing",message:"Preparing installation...",details:{done:!1}});const x=s.parts.map(async e=>{if(0==r.length){const t=new URL(e.path,f).toString(),i=await fetch(t);if(!i.ok)throw new Error(`Downlading firmware ${e.path} failed: ${i.status}`);return i.arrayBuffer()}return r}),v=await g.runStub();if(void 0!==a&&a>115200)try{await v.setBaudrate(a)}catch(e){i.log(`Could not change baud rate to ${a}: ${e.message}`)}const y=[];let w=0;for(const e of x)try{const t=await e;y.push(t instanceof ArrayBuffer?new Uint8Array(t):t),w+=t.byteLength}catch(e){return _(),p({state:"error",message:e.message,details:{error:"failed_firmware_download",details:e.message}}),void await g.disconnect()}p({state:"preparing",message:"Installation prepared",details:{done:!0}}),o&&(p({state:"erasing",message:"Erasing device...",details:{done:!1}}),await v.eraseFlash(),p({state:"erasing",message:"Device erased",details:{done:!0}}));let k=0;p({state:"writing",message:`Writing progress: ${k}%`,details:{bytesTotal:w,bytesWritten:0,percentage:k}});let E=0;for(const e of s.parts){const t=y.shift(),i=t instanceof Uint8Array?new Uint8Array(t).buffer:t;try{await v.flashData(i,e=>{const t=Math.floor((E+e)/w*100);t!==k&&(k=t,p({state:"writing",message:`Writing progress: ${t}%`,details:{bytesTotal:w,bytesWritten:E+e,percentage:t}}))},e.offset,!0)}catch(e){return _(),p({state:"error",message:e.message,details:{error:"write_failed",details:e}}),void await g.disconnect()}E+=t.byteLength}p({state:"writing",message:"Writing complete",details:{bytesTotal:w,bytesWritten:E,percentage:100}}),await V(100),console.log("DISCONNECT"),await g.disconnect(),console.log("HARD RESET"),await g.hardReset(),_(),p({state:"finished",message:"All done!"})},Er=(e,t="")=>{const i=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(i);((e,t="")=>{const i=document.createElement("a");i.target="_blank",i.href=e,i.download=t,document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i)})(n,t),setTimeout(()=>URL.revokeObjectURL(n),0)};class Ir extends x{constructor(){super(...arguments),this.logger=console,this._state="DASHBOARD",this._installErase=!1,this._installConfirmed=!1,this._provisionForce=!1,this._wasProvisioned=!1,this._busy=!1,this._esp32s2ReconnectInProgress=!1,this._selectedSsid=-1,this._handleDisconnect=()=>{this._state="ERROR",this._error="Disconnected"}}render(){if(!this.port)return h``;let e,t,i=!1,n=!1;return void 0===this._client&&"INSTALL"!==this._state&&"LOGS"!==this._state?this._error?[e,t,i]=this._renderError(this._error):(t=this._renderProgress("Connecting"),i=!0):"INSTALL"===this._state?[e,t,i,n]=this._renderInstall():"ASK_ERASE"===this._state?[e,t]=this._renderAskErase():"ERROR"===this._state?[e,t,i]=this._renderError(this._error):"DASHBOARD"===this._state?[e,t,i,n]=this._client?this._renderDashboard():this._renderDashboardNoImprov():"PROVISION"===this._state?[e,t,i]=this._renderProvision():"LOGS"===this._state&&([e,t,i]=this._renderLogs()),h`
|
|
774
|
+
`,wi=["I".charCodeAt(0),"M".charCodeAt(0),"P".charCodeAt(0),"R".charCodeAt(0),"O".charCodeAt(0),"V".charCodeAt(0),1];var ki,Ei;!function(e){e[e.CURRENT_STATE=1]="CURRENT_STATE",e[e.ERROR_STATE=2]="ERROR_STATE",e[e.RPC=3]="RPC",e[e.RPC_RESULT=4]="RPC_RESULT"}(ki||(ki={})),function(e){e[e.READY=2]="READY",e[e.PROVISIONING=3]="PROVISIONING",e[e.PROVISIONED=4]="PROVISIONED"}(Ei||(Ei={}));const Ii={0:"NO_ERROR",1:"INVALID_RPC_PACKET",2:"UNKNOWN_RPC_COMMAND",3:"UNABLE_TO_CONNECT",254:"TIMEOUT",255:"UNKNOWN_ERROR"};class Si extends Error{constructor(){super("Port is not ready")}}const Ci=e=>"["+e.map(e=>((e,t=2)=>{let i=e.toString(16).toUpperCase();return i.startsWith("-")?"-0x"+i.substring(1).padStart(t,"0"):"0x"+i.padStart(t,"0")})(e)).join(", ")+"]";class Ri extends EventTarget{constructor(e,t){if(super(),this.port=e,this.logger=t,this.error=0,null===e.readable)throw new Error("Port is not readable");if(null===e.writable)throw new Error("Port is not writable")}async initialize(e=1e3){var t;if(this.logger.log("Initializing Improv Serial"),this._processInput(),await(t=1e3,new Promise(e=>setTimeout(e,t))),void 0===this._reader)throw new Si;try{await new Promise(async(t,i)=>{setTimeout(()=>i(new Error("Improv Wi-Fi Serial not detected")),e),await this.requestCurrentState(),t(void 0)}),await this.requestInfo()}catch(e){throw await this.close(),e}return this.info}async close(){this._reader&&await new Promise(e=>{this._reader.cancel(),this.addEventListener("disconnect",e,{once:!0})})}async requestCurrentState(){let e;try{await new Promise(async(t,i)=>{this.addEventListener("state-changed",t,{once:!0});e=this._sendRPCWithResponse(2,[]),e.catch(e=>{this.removeEventListener("state-changed",t),i(e)})})}catch(e){throw this._rpcFeedback=void 0,new Error(`Error fetching current state: ${e}`)}if(this.state!==Ei.PROVISIONED)return void(this._rpcFeedback=void 0);const t=await e;this.nextUrl=t[0]}async requestInfo(e){const t=await this._sendRPCWithResponse(3,[],e);this.info={firmware:t[0],version:t[1],name:t[3],chipFamily:t[2]}}async provision(e,t,i){const n=new TextEncoder,o=n.encode(e),r=n.encode(t),a=[o.length,...o,r.length,...r],s=await this._sendRPCWithResponse(1,a,i);this.nextUrl=s[0]}async scan(){const e=(await this._sendRPCWithMultipleResponses(4,[])).map(([e,t,i])=>({name:e,rssi:parseInt(t),secured:"YES"===i}));return e.sort((e,t)=>e.name.toLocaleLowerCase().localeCompare(t.name.toLocaleLowerCase())),e}_sendRPC(e,t){this.writePacketToStream(ki.RPC,[e,t.length,...t])}async _sendRPCWithResponse(e,t,i){if(this._rpcFeedback)throw new Error("Only 1 RPC command that requires feedback can be active");return await this._awaitRPCResultWithTimeout(new Promise((i,n)=>{this._rpcFeedback={command:e,resolve:i,reject:n},this._sendRPC(e,t)}),i)}async _sendRPCWithMultipleResponses(e,t,i){if(this._rpcFeedback)throw new Error("Only 1 RPC command that requires feedback can be active");return await this._awaitRPCResultWithTimeout(new Promise((i,n)=>{this._rpcFeedback={command:e,resolve:i,reject:n,receivedData:[]},this._sendRPC(e,t)}),i)}async _awaitRPCResultWithTimeout(e,t){return t?await new Promise((i,n)=>{const o=setTimeout(()=>this._setError(254),t);e.finally(()=>clearTimeout(o)),e.then(i,n)}):await e}async _processInput(){this.logger.debug("Starting read loop"),this._reader=this.port.readable.getReader();try{let e,t=[],i=0;for(;;){const{value:n,done:o}=await this._reader.read();if(o)break;if(n&&0!==n.length)for(const o of n){if(!1===e){10===o&&(e=void 0);continue}if(!0===e){t.push(o),t.length===i&&(this._handleIncomingPacket(t),e=void 0,t=[]);continue}if(10===o){t=[];continue}if(t.push(o),9!==t.length)continue;if(e="IMPROV"===String.fromCharCode(...t.slice(0,6)),!e){t=[];continue}i=9+t[8]+1}}}catch(e){this.logger.error("Error while reading serial port",e)}finally{this._reader.releaseLock(),this._reader=void 0}this.logger.debug("Finished read loop"),this.dispatchEvent(new Event("disconnect"))}_handleIncomingPacket(e){const t=e.slice(6),i=t[0],n=t[1],o=t[2],r=t.slice(3,3+o);if(this.logger.debug("PROCESS",{version:i,packetType:n,packetLength:o,data:Ci(r)}),1!==i)return void this.logger.error("Received unsupported version",i);let a=t[3+o],s=0;for(let t=0;t<e.length-1;t++)s+=e[t];if(s&=255,s===a)if(n===ki.CURRENT_STATE)this.state=r[0],this.dispatchEvent(new CustomEvent("state-changed",{detail:this.state}));else if(n===ki.ERROR_STATE)this._setError(r[0]);else if(n===ki.RPC_RESULT){if(!this._rpcFeedback)return void this.logger.error("Received result while not waiting for one");const e=r[0];if(e!==this._rpcFeedback.command)return void this.logger.error(`Received result for command ${e} but expected ${this._rpcFeedback.command}`);const t=[],i=r[1];let n=2;for(;n<2+i;)t.push(String.fromCodePoint(...r.slice(n+1,n+r[n]+1))),n+=r[n]+1;"receivedData"in this._rpcFeedback?t.length>0?this._rpcFeedback.receivedData.push(t):(this._rpcFeedback.resolve(this._rpcFeedback.receivedData),this._rpcFeedback=void 0):(this._rpcFeedback.resolve(t),this._rpcFeedback=void 0)}else this.logger.error("Unable to handle packet",t);else this.logger.error(`Received invalid checksum ${a}. Expected ${s}`)}async writePacketToStream(e,t){const i=new Uint8Array([...wi,e,t.length,...t,0,0]);i[i.length-2]=255&i.reduce((e,t)=>e+t,0),i[i.length-1]=10,this.logger.debug("Writing to stream:",Ci(new Array(...i)));const n=this.port.writable.getWriter();await n.write(i);try{n.releaseLock()}catch(e){console.error("Ignoring release lock error",e)}}_setError(e){this.error=e,e>0&&this._rpcFeedback&&(this._rpcFeedback.reject(Ii[e]||`UNKNOWN_ERROR (${e})`),this._rpcFeedback=void 0),this.dispatchEvent(new CustomEvent("error-changed",{detail:this.error}))}}const Ti=e=>{let t=[192];for(const i of e)219==i?t=t.concat([219,221]):192==i?t=t.concat([219,220]):t.push(i);return t.push(192),t},Ai=e=>{const t=[];for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);n<=255&&t.push(n)}return t},Fi=e=>"["+e.map(e=>Oi(e)).join(", ")+"]",Oi=(e,t=2)=>{const i=e.toString(16).toUpperCase();return i.startsWith("-")?"-0x"+i.substring(1).padStart(t,"0"):"0x"+i.padStart(t,"0")},Li=e=>new Promise(t=>setTimeout(t,e)),$i={18:"256KB",19:"512KB",20:"1MB",21:"2MB",22:"4MB",23:"8MB",24:"16MB",25:"32MB",26:"64MB",27:"128MB",28:"256MB",32:"64MB",33:"128MB",34:"256MB",50:"256KB",51:"512KB",52:"1MB",53:"2MB",54:"4MB",55:"8MB",56:"16MB",57:"32MB",58:"64MB"},zi=115200,Bi=1343410176,Di=Ai(" UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU"),Pi=33382,Ni=50,Mi=12882,Ui=12883,Hi=12994,Vi=12995,Wi=12997,Yi=12998,ji=207969,Xi=12914,qi=12916,Gi=12917,Ki=12928,Zi=12849,Qi={5:{name:"ESP32-C3",family:Vi},9:{name:"ESP32-S3",family:Ui},12:{name:"ESP32-C2",family:Hi},13:{name:"ESP32-C6",family:Yi},16:{name:"ESP32-H2",family:Xi},18:{name:"ESP32-P4",family:Ki},20:{name:"ESP32-C61",family:ji},23:{name:"ESP32-C5",family:Wi},25:{name:"ESP32-H21",family:Gi},28:{name:"ESP32-H4",family:qi},32:{name:"ESP32-S31",family:Zi}},Ji={4293968129:{name:"ESP8266",family:Pi},15736195:{name:"ESP32",family:Ni},1990:{name:"ESP32-S2",family:Mi}},en=3e3,tn=15e4,nn=100,on=(e,t)=>{const i=Math.floor(e*(t/486));return i<en?en:i},rn=e=>{switch(e){case Ni:return{regBase:1072963584,baseFuse:1073061888,macFuse:1073061888,usrOffs:28,usr1Offs:32,usr2Offs:36,mosiDlenOffs:40,misoDlenOffs:44,w0Offs:128,uartDateReg:1610612856,flashOffs:4096};case Mi:return{regBase:1061167104,baseFuse:1061265408,macFuse:1061265476,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612856,flashOffs:4096};case Ui:return{regBase:1610620928,usrOffs:24,baseFuse:1610641408,macFuse:1610641476,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612864,flashOffs:0};case Pi:return{regBase:1610613248,usrOffs:28,baseFuse:1072693328,macFuse:1072693328,usr1Offs:32,usr2Offs:36,mosiDlenOffs:-1,misoDlenOffs:-1,w0Offs:64,uartDateReg:1610612856,flashOffs:0};case Hi:case Vi:return{regBase:1610620928,baseFuse:1610647552,macFuse:1610647620,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Wi:return{regBase:1610625024,baseFuse:1611352064,macFuse:1611352132,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:8192};case Yi:return{regBase:1610625024,baseFuse:1611335680,macFuse:1611335748,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case ji:return{regBase:1610625024,baseFuse:1611352064,macFuse:1611352132,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Xi:return{regBase:1610625024,baseFuse:1611335680,macFuse:1611335748,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case qi:return{regBase:1611239424,baseFuse:1611339776,macFuse:1611339844,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610686588,flashOffs:8192};case Gi:return{regBase:1610625024,baseFuse:1611350016,macFuse:1611350084,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1610612860,flashOffs:0};case Ki:return{regBase:1342754816,baseFuse:Bi,macFuse:1343410244,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:1343004812,flashOffs:8192};case Zi:return{regBase:542113792,baseFuse:544296960,macFuse:544297028,usrOffs:24,usr1Offs:28,usr2Offs:32,mosiDlenOffs:36,misoDlenOffs:40,w0Offs:88,uartDateReg:540582028,flashOffs:8192};default:return{regBase:-1,baseFuse:-1,macFuse:-1,usrOffs:-1,usr1Offs:-1,usr2Offs:-1,mosiDlenOffs:-1,misoDlenOffs:-1,w0Offs:-1,uartDateReg:-1,flashOffs:-1}}};class an extends Error{constructor(e){super(e),this.name="SlipReadError"}}const sn=async(e,t)=>{let i;return e==qi||e==Gi||e==Zi?null:(e==Ni?i=await import("./esp32-CijhsJH1.js"):e==Mi?i=await import("./esp32s2-IiDBtXxo.js"):e==Ui?i=await import("./esp32s3-6yv5yxum.js"):e==Pi?i=await import("./esp8266-CUwxJpGa.js"):e==Hi?i=await import("./esp32c2-C17SM4gO.js"):e==Vi?i=await import("./esp32c3-DxRGijbg.js"):e==Wi?i=await import("./esp32c5-3mDOIGa4.js"):e==Yi?i=await import("./esp32c6-h6U0SQTm.js"):e==ji?i=await import("./esp32c61-BKtexhPZ.js"):e==Xi?i=await import("./esp32h2-RtuWSEmP.js"):e==Ki&&(i=null!=t&&t>=300?await import("./esp32p4r3-CpHBYEwI.js"):await import("./esp32p4-5nkIjxqJ.js")),{...i,text:Ai(atob(i.text)),data:Ai(atob(i.data))})};function dn(e){let t=e.length;for(;--t>=0;)e[t]=0}const ln=256,cn=286,hn=30,mn=15,pn=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),un=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),fn=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),gn=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bn=new Array(576);dn(bn);const _n=new Array(60);dn(_n);const xn=new Array(512);dn(xn);const yn=new Array(256);dn(yn);const vn=new Array(29);dn(vn);const wn=new Array(hn);function kn(e,t,i,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}let En,In,Sn;function Cn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}dn(wn);const Rn=e=>e<256?xn[e]:xn[256+(e>>>7)],Tn=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},An=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,Tn(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Fn=(e,t,i)=>{An(e,i[2*t],i[2*t+1])},On=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},Ln=(e,t,i)=>{const n=new Array(16);let o,r,a=0;for(o=1;o<=mn;o++)a=a+i[o-1]<<1,n[o]=a;for(r=0;r<=t;r++){let t=e[2*r+1];0!==t&&(e[2*r]=On(n[t]++,t))}},$n=e=>{let t;for(t=0;t<cn;t++)e.dyn_ltree[2*t]=0;for(t=0;t<hn;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},zn=e=>{e.bi_valid>8?Tn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Bn=(e,t,i,n)=>{const o=2*t,r=2*i;return e[o]<e[r]||e[o]===e[r]&&n[t]<=n[i]},Dn=(e,t,i)=>{const n=e.heap[i];let o=i<<1;for(;o<=e.heap_len&&(o<e.heap_len&&Bn(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!Bn(t,n,e.heap[o],e.depth));)e.heap[i]=e.heap[o],i=o,o<<=1;e.heap[i]=n},Pn=(e,t,i)=>{let n,o,r,a,s=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+s++],n+=(255&e.pending_buf[e.sym_buf+s++])<<8,o=e.pending_buf[e.sym_buf+s++],0===n?Fn(e,o,t):(r=yn[o],Fn(e,r+ln+1,t),a=pn[r],0!==a&&(o-=vn[r],An(e,o,a)),n--,r=Rn(n),Fn(e,r,i),a=un[r],0!==a&&(n-=wn[r],An(e,n,a)))}while(s<e.sym_next);Fn(e,256,t)},Nn=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,r=t.stat_desc.elems;let a,s,d,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<r;a++)0!==i[2*a]?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):i[2*a+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=l<2?++l:0,i[2*d]=1,e.depth[d]=0,e.opt_len--,o&&(e.static_len-=n[2*d+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Dn(e,i,a);d=r;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Dn(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,i[2*d]=i[2*a]+i[2*s],e.depth[d]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,i[2*a+1]=i[2*s+1]=d,e.heap[1]=d++,Dn(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,d=t.stat_desc.max_length;let l,c,h,m,p,u,f=0;for(m=0;m<=mn;m++)e.bl_count[m]=0;for(i[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)c=e.heap[l],m=i[2*i[2*c+1]+1]+1,m>d&&(m=d,f++),i[2*c+1]=m,c>n||(e.bl_count[m]++,p=0,c>=s&&(p=a[c-s]),u=i[2*c],e.opt_len+=u*(m+p),r&&(e.static_len+=u*(o[2*c+1]+p)));if(0!==f){do{for(m=d-1;0===e.bl_count[m];)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[d]--,f-=2}while(f>0);for(m=d;0!==m;m--)for(c=e.bl_count[m];0!==c;)h=e.heap[--l],h>n||(i[2*h+1]!==m&&(e.opt_len+=(m-i[2*h+1])*i[2*h],i[2*h+1]=m),c--)}})(e,t),Ln(i,l,e.bl_count)},Mn=(e,t,i)=>{let n,o,r=-1,a=t[1],s=0,d=7,l=4;for(0===a&&(d=138,l=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)o=a,a=t[2*(n+1)+1],++s<d&&o===a||(s<l?e.bl_tree[2*o]+=s:0!==o?(o!==r&&e.bl_tree[2*o]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,r=o,0===a?(d=138,l=3):o===a?(d=6,l=3):(d=7,l=4))},Un=(e,t,i)=>{let n,o,r=-1,a=t[1],s=0,d=7,l=4;for(0===a&&(d=138,l=3),n=0;n<=i;n++)if(o=a,a=t[2*(n+1)+1],!(++s<d&&o===a)){if(s<l)do{Fn(e,o,e.bl_tree)}while(0!==--s);else 0!==o?(o!==r&&(Fn(e,o,e.bl_tree),s--),Fn(e,16,e.bl_tree),An(e,s-3,2)):s<=10?(Fn(e,17,e.bl_tree),An(e,s-3,3)):(Fn(e,18,e.bl_tree),An(e,s-11,7));s=0,r=o,0===a?(d=138,l=3):o===a?(d=6,l=3):(d=7,l=4)}};let Hn=!1;const Vn=(e,t,i,n)=>{An(e,0+(n?1:0),3),zn(e),Tn(e,i),Tn(e,~i),i&&e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i};var Wn=e=>{Hn||((()=>{let e,t,i,n,o;const r=new Array(16);for(i=0,n=0;n<28;n++)for(vn[n]=i,e=0;e<1<<pn[n];e++)yn[i++]=n;for(yn[i-1]=n,o=0,n=0;n<16;n++)for(wn[n]=o,e=0;e<1<<un[n];e++)xn[o++]=n;for(o>>=7;n<hn;n++)for(wn[n]=o<<7,e=0;e<1<<un[n]-7;e++)xn[256+o++]=n;for(t=0;t<=mn;t++)r[t]=0;for(e=0;e<=143;)bn[2*e+1]=8,e++,r[8]++;for(;e<=255;)bn[2*e+1]=9,e++,r[9]++;for(;e<=279;)bn[2*e+1]=7,e++,r[7]++;for(;e<=287;)bn[2*e+1]=8,e++,r[8]++;for(Ln(bn,287,r),e=0;e<hn;e++)_n[2*e+1]=5,_n[2*e]=On(e,5);En=new kn(bn,pn,257,cn,mn),In=new kn(_n,un,0,hn,mn),Sn=new kn(new Array(0),fn,0,19,7)})(),Hn=!0),e.l_desc=new Cn(e.dyn_ltree,En),e.d_desc=new Cn(e.dyn_dtree,In),e.bl_desc=new Cn(e.bl_tree,Sn),e.bi_buf=0,e.bi_valid=0,$n(e)},Yn=(e,t,i,n)=>{let o,r,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<ln;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Nn(e,e.l_desc),Nn(e,e.d_desc),a=(e=>{let t;for(Mn(e,e.dyn_ltree,e.l_desc.max_code),Mn(e,e.dyn_dtree,e.d_desc.max_code),Nn(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*gn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=o&&(o=r)):o=r=i+5,i+4<=o&&-1!==t?Vn(e,t,i,n):4===e.strategy||r===o?(An(e,2+(n?1:0),3),Pn(e,bn,_n)):(An(e,4+(n?1:0),3),((e,t,i,n)=>{let o;for(An(e,t-257,5),An(e,i-1,5),An(e,n-4,4),o=0;o<n;o++)An(e,e.bl_tree[2*gn[o]+1],3);Un(e,e.dyn_ltree,t-1),Un(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Pn(e,e.dyn_ltree,e.dyn_dtree)),$n(e),n&&zn(e)},jn=(e,t,i)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=i,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(yn[i]+ln+1)]++,e.dyn_dtree[2*Rn(t)]++),e.sym_next===e.sym_end),Xn=e=>{An(e,2,3),Fn(e,256,bn),(e=>{16===e.bi_valid?(Tn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},qn={_tr_init:Wn,_tr_stored_block:Vn,_tr_flush_block:Yn,_tr_tally:jn,_tr_align:Xn};var Gn=(e,t,i,n)=>{let o=65535&e,r=e>>>16&65535,a=0;for(;0!==i;){a=i>2e3?2e3:i,i-=a;do{o=o+t[n++]|0,r=r+o|0}while(--a);o%=65521,r%=65521}return o|r<<16};const Kn=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Zn=(e,t,i,n)=>{const o=Kn,r=n+i;e^=-1;for(let i=n;i<r;i++)e=e>>>8^o[255&(e^t[i])];return-1^e},Qn={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Jn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:eo,_tr_stored_block:to,_tr_flush_block:io,_tr_tally:no,_tr_align:oo}=qn,{Z_NO_FLUSH:ro,Z_PARTIAL_FLUSH:ao,Z_FULL_FLUSH:so,Z_FINISH:lo,Z_BLOCK:co,Z_OK:ho,Z_STREAM_END:mo,Z_STREAM_ERROR:po,Z_DATA_ERROR:uo,Z_BUF_ERROR:fo,Z_DEFAULT_COMPRESSION:go,Z_FILTERED:bo,Z_HUFFMAN_ONLY:_o,Z_RLE:xo,Z_FIXED:yo,Z_DEFAULT_STRATEGY:vo,Z_UNKNOWN:wo,Z_DEFLATED:ko}=Jn,Eo=258,Io=262,So=42,Co=113,Ro=666,To=(e,t)=>(e.msg=Qn[t],t),Ao=e=>2*e-(e>4?9:0),Fo=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Oo=e=>{let t,i,n,o=e.w_size;t=e.hash_size,n=t;do{i=e.head[--n],e.head[n]=i>=o?i-o:0}while(--t);t=o,n=t;do{i=e.prev[--n],e.prev[n]=i>=o?i-o:0}while(--t)};let Lo=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const $o=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},zo=(e,t)=>{io(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,$o(e.strm)},Bo=(e,t)=>{e.pending_buf[e.pending++]=t},Do=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Po=(e,t,i,n)=>{let o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),i),1===e.state.wrap?e.adler=Gn(e.adler,t,o,i):2===e.state.wrap&&(e.adler=Zn(e.adler,t,o,i)),e.next_in+=o,e.total_in+=o,o)},No=(e,t)=>{let i,n,o=e.max_chain_length,r=e.strstart,a=e.prev_length,s=e.nice_match;const d=e.strstart>e.w_size-Io?e.strstart-(e.w_size-Io):0,l=e.window,c=e.w_mask,h=e.prev,m=e.strstart+Eo;let p=l[r+a-1],u=l[r+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+a]===u&&l[i+a-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do{}while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<m);if(n=Eo-(m-r),r=m-Eo,n>a){if(e.match_start=t,a=n,n>=s)break;p=l[r+a-1],u=l[r+a]}}}while((t=h[t&c])>d&&0!==--o);return a<=e.lookahead?a:e.lookahead},Mo=e=>{const t=e.w_size;let i,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Io)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Oo(e),n+=t),0===e.strm.avail_in)break;if(i=Po(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=Lo(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=Lo(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<Io&&0!==e.strm.avail_in)},Uo=(e,t)=>{let i,n,o,r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;do{if(i=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o)break;if(o=e.strm.avail_out-o,n=e.strstart-e.block_start,i>n+e.strm.avail_in&&(i=n+e.strm.avail_in),i>o&&(i=o),i<r&&(0===i&&t!==lo||t===ro||i!==n+e.strm.avail_in))break;a=t===lo&&i===n+e.strm.avail_in?1:0,to(e,0,0,a),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,$o(e.strm),n&&(n>i&&(n=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,i-=n),i&&(Po(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(0===a);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==ro&&t!==lo&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Po(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,r=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=r||(n||t===lo)&&t!==ro&&0===e.strm.avail_in&&n<=o)&&(i=n>o?o:n,a=t===lo&&0===e.strm.avail_in&&i===n?1:0,to(e,e.block_start,i,a),e.block_start+=i,$o(e.strm)),a?3:1)},Ho=(e,t)=>{let i,n;for(;;){if(e.lookahead<Io){if(Mo(e),e.lookahead<Io&&t===ro)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=Lo(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-Io&&(e.match_length=No(e,i)),e.match_length>=3)if(n=no(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Lo(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Lo(e,e.ins_h,e.window[e.strstart+1]);else n=no(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(zo(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===lo?(zo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zo(e,!1),0===e.strm.avail_out)?1:2},Vo=(e,t)=>{let i,n,o;for(;;){if(e.lookahead<Io){if(Mo(e),e.lookahead<Io&&t===ro)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=Lo(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-Io&&(e.match_length=No(e,i),e.match_length<=5&&(e.strategy===bo||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=no(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=Lo(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(zo(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=no(e,0,e.window[e.strstart-1]),n&&zo(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=no(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===lo?(zo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zo(e,!1),0===e.strm.avail_out)?1:2};function Wo(e,t,i,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=o}const Yo=[new Wo(0,0,0,0,Uo),new Wo(4,4,8,4,Ho),new Wo(4,5,16,8,Ho),new Wo(4,6,32,32,Ho),new Wo(4,4,16,16,Vo),new Wo(8,16,32,32,Vo),new Wo(8,16,128,128,Vo),new Wo(8,32,128,256,Vo),new Wo(32,128,258,1024,Vo),new Wo(32,258,258,4096,Vo)];function jo(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ko,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Fo(this.dyn_ltree),Fo(this.dyn_dtree),Fo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Fo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Fo(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Xo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==So&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Co&&t.status!==Ro?1:0},qo=e=>{if(Xo(e))return To(e,po);e.total_in=e.total_out=0,e.data_type=wo;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?So:Co,e.adler=2===t.wrap?0:1,t.last_flush=-2,eo(t),ho},Go=e=>{const t=qo(e);return t===ho&&(e=>{e.window_size=2*e.w_size,Fo(e.head),e.max_lazy_match=Yo[e.level].max_lazy,e.good_match=Yo[e.level].good_length,e.nice_match=Yo[e.level].nice_length,e.max_chain_length=Yo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Ko=(e,t,i,n,o,r)=>{if(!e)return po;let a=1;if(t===go&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||i!==ko||n<8||n>15||t<0||t>9||r<0||r>yo||8===n&&1!==a)return To(e,po);8===n&&(n=9);const s=new jo;return e.state=s,s.strm=e,s.status=So,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=t,s.strategy=r,s.method=i,Go(e)};var Zo=(e,t)=>{if(Xo(e)||t>co||t<0)return e?To(e,po):po;const i=e.state;if(!e.output||0!==e.avail_in&&!e.input||i.status===Ro&&t!==lo)return To(e,0===e.avail_out?fo:po);const n=i.last_flush;if(i.last_flush=t,0!==i.pending){if($o(e),0===e.avail_out)return i.last_flush=-1,ho}else if(0===e.avail_in&&Ao(t)<=Ao(n)&&t!==lo)return To(e,fo);if(i.status===Ro&&0!==e.avail_in)return To(e,fo);if(i.status===So&&0===i.wrap&&(i.status=Co),i.status===So){let t=ko+(i.w_bits-8<<4)<<8,n=-1;if(n=i.strategy>=_o||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,Do(i,t),0!==i.strstart&&(Do(i,e.adler>>>16),Do(i,65535&e.adler)),e.adler=1,i.status=Co,$o(e),0!==i.pending)return i.last_flush=-1,ho}if(57===i.status)if(e.adler=0,Bo(i,31),Bo(i,139),Bo(i,8),i.gzhead)Bo(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Bo(i,255&i.gzhead.time),Bo(i,i.gzhead.time>>8&255),Bo(i,i.gzhead.time>>16&255),Bo(i,i.gzhead.time>>24&255),Bo(i,9===i.level?2:i.strategy>=_o||i.level<2?4:0),Bo(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(Bo(i,255&i.gzhead.extra.length),Bo(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Zn(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69;else if(Bo(i,0),Bo(i,0),Bo(i,0),Bo(i,0),Bo(i,0),Bo(i,9===i.level?2:i.strategy>=_o||i.level<2?4:0),Bo(i,3),i.status=Co,$o(e),0!==i.pending)return i.last_flush=-1,ho;if(69===i.status){if(i.gzhead.extra){let t=i.pending,n=(65535&i.gzhead.extra.length)-i.gzindex;for(;i.pending+n>i.pending_buf_size;){let o=i.pending_buf_size-i.pending;if(i.pending_buf.set(i.gzhead.extra.subarray(i.gzindex,i.gzindex+o),i.pending),i.pending=i.pending_buf_size,i.gzhead.hcrc&&i.pending>t&&(e.adler=Zn(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex+=o,$o(e),0!==i.pending)return i.last_flush=-1,ho;t=0,n-=o}let o=new Uint8Array(i.gzhead.extra);i.pending_buf.set(o.subarray(i.gzindex,i.gzindex+n),i.pending),i.pending+=n,i.gzhead.hcrc&&i.pending>t&&(e.adler=Zn(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex=0}i.status=73}if(73===i.status){if(i.gzhead.name){let t,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(e.adler=Zn(e.adler,i.pending_buf,i.pending-n,n)),$o(e),0!==i.pending)return i.last_flush=-1,ho;n=0}t=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,Bo(i,t)}while(0!==t);i.gzhead.hcrc&&i.pending>n&&(e.adler=Zn(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex=0}i.status=91}if(91===i.status){if(i.gzhead.comment){let t,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(e.adler=Zn(e.adler,i.pending_buf,i.pending-n,n)),$o(e),0!==i.pending)return i.last_flush=-1,ho;n=0}t=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,Bo(i,t)}while(0!==t);i.gzhead.hcrc&&i.pending>n&&(e.adler=Zn(e.adler,i.pending_buf,i.pending-n,n))}i.status=103}if(103===i.status){if(i.gzhead.hcrc){if(i.pending+2>i.pending_buf_size&&($o(e),0!==i.pending))return i.last_flush=-1,ho;Bo(i,255&e.adler),Bo(i,e.adler>>8&255),e.adler=0}if(i.status=Co,$o(e),0!==i.pending)return i.last_flush=-1,ho}if(0!==e.avail_in||0!==i.lookahead||t!==ro&&i.status!==Ro){let n=0===i.level?Uo(i,t):i.strategy===_o?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(Mo(e),0===e.lookahead)){if(t===ro)return 1;break}if(e.match_length=0,i=no(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(zo(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===lo?(zo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zo(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===xo?((e,t)=>{let i,n,o,r;const a=e.window;for(;;){if(e.lookahead<=Eo){if(Mo(e),e.lookahead<=Eo&&t===ro)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){r=e.strstart+Eo;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<r);e.match_length=Eo-(r-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=no(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=no(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(zo(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===lo?(zo(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zo(e,!1),0===e.strm.avail_out)?1:2})(i,t):Yo[i.level].func(i,t);if(3!==n&&4!==n||(i.status=Ro),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),ho;if(2===n&&(t===ao?oo(i):t!==co&&(to(i,0,0,!1),t===so&&(Fo(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),$o(e),0===e.avail_out))return i.last_flush=-1,ho}return t!==lo?ho:i.wrap<=0?mo:(2===i.wrap?(Bo(i,255&e.adler),Bo(i,e.adler>>8&255),Bo(i,e.adler>>16&255),Bo(i,e.adler>>24&255),Bo(i,255&e.total_in),Bo(i,e.total_in>>8&255),Bo(i,e.total_in>>16&255),Bo(i,e.total_in>>24&255)):(Do(i,e.adler>>>16),Do(i,65535&e.adler)),$o(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?ho:mo)},Qo=(e,t)=>{let i=t.length;if(Xo(e))return po;const n=e.state,o=n.wrap;if(2===o||1===o&&n.status!==So||n.lookahead)return po;if(1===o&&(e.adler=Gn(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===o&&(Fo(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const r=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,Mo(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Lo(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Mo(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=s,e.avail_in=r,n.wrap=o,ho},Jo={deflateInit:(e,t)=>Ko(e,t,ko,15,8,vo),deflateInit2:Ko,deflateReset:Go,deflateResetKeep:qo,deflateSetHeader:(e,t)=>Xo(e)||2!==e.state.wrap?po:(e.state.gzhead=t,ho),deflate:Zo,deflateEnd:e=>{if(Xo(e))return po;const t=e.state.status;return e.state=null,t===Co?To(e,uo):ho},deflateSetDictionary:Qo,deflateInfo:"pako deflate (from Nodeca project)"};const er=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var tr=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)er(i,t)&&(e[t]=i[t])}}return e},ir=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,o=e.length;t<o;t++){let o=e[t];i.set(o,n),n+=o.length}return i};let nr=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){nr=!1}const or=new Uint8Array(256);for(let e=0;e<256;e++)or[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;or[254]=or[254]=1;var rr=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,o,r,a=e.length,s=0;for(o=0;o<a;o++)i=e.charCodeAt(o),55296==(64512&i)&&o+1<a&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),o++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),r=0,o=0;r<s;o++)i=e.charCodeAt(o),55296==(64512&i)&&o+1<a&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),o++)),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t};var ar=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const sr=Object.prototype.toString,{Z_NO_FLUSH:dr,Z_SYNC_FLUSH:lr,Z_FULL_FLUSH:cr,Z_FINISH:hr,Z_OK:mr,Z_STREAM_END:pr,Z_DEFAULT_COMPRESSION:ur,Z_DEFAULT_STRATEGY:fr,Z_DEFLATED:gr}=Jn;function br(e){this.options=tr({level:ur,method:gr,chunkSize:16384,windowBits:15,memLevel:8,strategy:fr},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ar,this.strm.avail_out=0;let i=Jo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==mr)throw new Error(Qn[i]);if(t.header&&Jo.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?rr(t.dictionary):"[object ArrayBuffer]"===sr.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=Jo.deflateSetDictionary(this.strm,e),i!==mr)throw new Error(Qn[i]);this._dict_set=!0}}br.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let o,r;if(this.ended)return!1;for(r=t===~~t?t:!0===t?hr:dr,"string"==typeof e?i.input=rr(e):"[object ArrayBuffer]"===sr.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(r===lr||r===cr)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(o=Jo.deflate(i,r),o===pr)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),o=Jo.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===mr;if(0!==i.avail_out){if(r>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},br.prototype.onData=function(e){this.chunks.push(e)},br.prototype.onEnd=function(e){e===mr&&(this.result=ir(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _r={deflate:function(e,t){const i=new br(t);if(i.push(e,!0),i.err)throw i.msg||Qn[i.err];return i.result}};const{deflate:xr}=_r;var yr=xr;const vr={b:{u:DataView.prototype.getInt8,p:DataView.prototype.setInt8,bytes:1},B:{u:DataView.prototype.getUint8,p:DataView.prototype.setUint8,bytes:1},h:{u:DataView.prototype.getInt16,p:DataView.prototype.setInt16,bytes:2},H:{u:DataView.prototype.getUint16,p:DataView.prototype.setUint16,bytes:2},i:{u:DataView.prototype.getInt32,p:DataView.prototype.setInt32,bytes:4},I:{u:DataView.prototype.getUint32,p:DataView.prototype.setUint32,bytes:4}},wr=(e,...t)=>{let i=0;if(e.replace(/[<>]/,"").length!=t.length)throw"Pack format to Argument count mismatch";const n=[];let o=!0;for(let n=0;n<e.length;n++)"<"==e[n]?o=!0:">"==e[n]?o=!1:(r(e[n],t[i]),i++);function r(e,t){if(!(e in vr))throw"Unhandled character '"+e+"' in pack format";const i=vr[e].bytes,r=new DataView(new ArrayBuffer(i));vr[e].p.bind(r)(0,t,o);for(let e=0;e<i;e++)n.push(r.getUint8(e))}return n},kr=(e,t)=>{let i=0;const n=[];let o=!0;for(const t of e)"<"==t?o=!0:">"==t?o=!1:r(t);function r(e){if(!(e in vr))throw"Unhandled character '"+e+"' in unpack format";const r=vr[e].bytes,a=new DataView(new ArrayBuffer(r));for(let e=0;e<r;e++)a.setUint8(e,255&t[i+e]);const s=vr[e].u.bind(a);n.push(s(0,o)),i+=r}return n};class Er extends EventTarget{constructor(e,t,i){super(),this.port=e,this.logger=t,this._parent=i,this.chipName=null,this.chipRevision=null,this.chipVariant=null,this._efuses=new Array(4).fill(0),this._flashsize=4194304,this.debug=!1,this.IS_STUB=!1,this.connected=!0,this.flashSize=null,this._currentBaudRate=zi,this._isESP32S2NativeUSB=!1,this._initializationSucceeded=!1,this.state_DTR=!1}get _inputBuffer(){return this._parent?this._parent._inputBuffer:this.__inputBuffer}get _totalBytesRead(){return this._parent?this._parent._totalBytesRead:this.__totalBytesRead||0}set _totalBytesRead(e){this._parent?this._parent._totalBytesRead=e:this.__totalBytesRead=e}detectUSBSerialChip(e,t){const i={6790:{29986:{name:"CH340",maxBaudrate:460800},29987:{name:"CH340",maxBaudrate:460800},30084:{name:"CH340",maxBaudrate:460800},21795:{name:"CH341",maxBaudrate:2e6},21971:{name:"CH343",maxBaudrate:6e6},21972:{name:"CH9102",maxBaudrate:6e6},21976:{name:"CH9101",maxBaudrate:3e6}},4292:{6e4:{name:"CP2102(n)",maxBaudrate:3e6},60016:{name:"CP2105",maxBaudrate:2e6},60017:{name:"CP2108",maxBaudrate:2e6}},1027:{24577:{name:"FT232R",maxBaudrate:3e6},24592:{name:"FT2232",maxBaudrate:3e6},24593:{name:"FT4232",maxBaudrate:3e6},24596:{name:"FT232H",maxBaudrate:12e6},24597:{name:"FT230X",maxBaudrate:3e6}},12346:{2:{name:"ESP32-S2 Native USB",maxBaudrate:2e6},4097:{name:"ESP32 Native USB",maxBaudrate:2e6},4098:{name:"ESP32 Native USB",maxBaudrate:2e6},16386:{name:"ESP32 Native USB",maxBaudrate:2e6},4096:{name:"ESP32 Native USB",maxBaudrate:2e6}}}[e];return i&&i[t]?i[t]:{name:`Unknown (VID: 0x${e.toString(16)}, PID: 0x${t.toString(16)})`}}async initialize(){if(await this.hardReset(!0),!this._parent){this.__inputBuffer=[],this.__totalBytesRead=0;const e=this.port.getInfo();if(e.usbVendorId&&e.usbProductId){const t=this.detectUSBSerialChip(e.usbVendorId,e.usbProductId);this.logger.log(`USB-Serial: ${t.name} (VID: 0x${e.usbVendorId.toString(16)}, PID: 0x${e.usbProductId.toString(16)})`),t.maxBaudrate&&(this._maxUSBSerialBaudrate=t.maxBaudrate,this.logger.log(`Max baudrate: ${t.maxBaudrate}`)),12346===e.usbVendorId&&2===e.usbProductId&&(this._isESP32S2NativeUSB=!0)}this.readLoop()}await this.flushSerialBuffers(),await this.sync(),await this.detectChip();const e=rn(this.getChipFamily()),t=e.macFuse;for(let e=0;e<4;e++)this._efuses[e]=await this.readRegister(t+4*e);this.logger.log(`Chip type ${this.chipName}`),this.logger.debug(`Bootloader flash offset: 0x${e.flashOffs.toString(16)}`),this._initializationSucceeded=!0}async detectChip(){try{const e=(await this.getSecurityInfo()).chipId,t=Qi[e];if(t)return this.chipName=t.name,this.chipFamily=t.family,this.chipFamily===Ki&&(this.chipRevision=await this.getChipRevision(),this.logger.debug(`ESP32-P4 revision: ${this.chipRevision}`),this.chipRevision>=300?this.chipVariant="rev300":this.chipVariant="rev0",this.logger.debug(`ESP32-P4 variant: ${this.chipVariant}`)),void this.logger.debug(`Detected chip via IMAGE_CHIP_ID: ${e} (${this.chipName})`);this.logger.debug(`Unknown IMAGE_CHIP_ID: ${e}, falling back to magic value detection`)}catch(e){this.logger.debug(`GET_SECURITY_INFO failed, using magic value detection: ${e}`),this._inputBuffer.length=0,await Li(nn);try{await this.sync()}catch(e){this.logger.debug(`Re-sync after GET_SECURITY_INFO failure: ${e}`)}}const e=await this.readRegister(1073745920),t=Ji[e>>>0];if(void 0===t)throw new Error(`Unknown Chip: Hex: ${Oi(e>>>0,8).toLowerCase()} Number: ${e}`);this.chipName=t.name,this.chipFamily=t.family,this.chipFamily===Ki&&(this.chipRevision=await this.getChipRevision(),this.logger.debug(`ESP32-P4 revision: ${this.chipRevision}`),this.chipRevision>=300?this.chipVariant="rev300":this.chipVariant="rev0",this.logger.debug(`ESP32-P4 variant: ${this.chipVariant}`)),this.logger.debug(`Detected chip via magic value: ${Oi(e>>>0,8)} (${this.chipName})`)}async getChipRevision(){if(this.chipFamily!==Ki)return 0;const e=await this.readRegister(1343410252);return 100*((e>>23&1)<<2|e>>4&3)+(15&e)}async getSecurityInfo(){const[,e]=await this.checkCommand(20,[],0);if(0===e.length)throw new Error("GET_SECURITY_INFO not supported or returned empty response");if(e.length<12)throw new Error(`Invalid security info response length: ${e.length} (expected at least 12 bytes)`);return{flags:kr("<I",e.slice(0,4))[0],flashCryptCnt:e[4],keyPurposes:Array.from(e.slice(5,12)),chipId:e.length>=16?kr("<I",e.slice(12,16))[0]:0,apiVersion:e.length>=20?kr("<I",e.slice(16,20))[0]:0}}async readLoop(){this.debug&&this.logger.debug("Starting read loop"),this._reader=this.port.readable.getReader();try{let e=!0;for(;e;){const{value:t,done:i}=await this._reader.read();if(i){this._reader.releaseLock(),e=!1;break}if(!t||0===t.length)continue;const n=Array.from(t);Array.prototype.push.apply(this._inputBuffer,n),this._totalBytesRead+=t.length}}catch{this.logger.error("Read loop got disconnected")}this.connected=!1,this._isESP32S2NativeUSB&&!this._initializationSucceeded&&(this.logger.log("ESP32-S2 Native USB detected - requesting port reselection"),this.dispatchEvent(new CustomEvent("esp32s2-usb-reconnect",{detail:{message:"ESP32-S2 Native USB requires port reselection"}}))),this.dispatchEvent(new Event("disconnect")),this.logger.debug("Finished read loop")}sleep(e=100){return new Promise(t=>setTimeout(t,e))}async setRTS(e){await this.port.setSignals({requestToSend:e}),await this.setDTR(this.state_DTR)}async setDTR(e){this.state_DTR=e,await this.port.setSignals({dataTerminalReady:e})}async hardReset(e=!1){e?4097===this.port.getInfo().usbProductId?(await this.setDTR(!1),await this.setRTS(!1),await this.sleep(100),await this.setDTR(!0),await this.setRTS(!1),await this.sleep(100),await this.setRTS(!0),await this.setDTR(!1),await this.setRTS(!0),await this.sleep(100),await this.setDTR(!1),await this.setRTS(!1),this.logger.log("USB MCU reset.")):(await this.setDTR(!1),await this.setRTS(!0),await this.sleep(100),await this.setDTR(!0),await this.setRTS(!1),await this.sleep(50),await this.setDTR(!1),this.logger.log("DTR/RTS USB serial chip reset.")):(await this.setRTS(!0),await this.sleep(100),await this.setRTS(!1),this.logger.log("Hard reset.")),await new Promise(e=>setTimeout(e,1e3))}macAddr(){const e=new Array(6).fill(0),t=this._efuses[0],i=this._efuses[1],n=this._efuses[2],o=this._efuses[3];let r;if(this.chipFamily==Pi){if(0!=o)r=[o>>16&255,o>>8&255,255&o];else if(i>>16&255){if(1!=(i>>16&255))throw new Error("Couldnt determine OUI");r=[172,208,116]}else r=[24,254,52];e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=i>>8&255,e[4]=255&i,e[5]=t>>24&255}else if(this.chipFamily==Ni)e[0]=n>>8&255,e[1]=255&n,e[2]=i>>24&255,e[3]=i>>16&255,e[4]=i>>8&255,e[5]=255&i;else{if(this.chipFamily!=Mi&&this.chipFamily!=Ui&&this.chipFamily!=Hi&&this.chipFamily!=Vi&&this.chipFamily!=Wi&&this.chipFamily!=Yi&&this.chipFamily!=ji&&this.chipFamily!=Xi&&this.chipFamily!=qi&&this.chipFamily!=Gi&&this.chipFamily!=Ki&&this.chipFamily!=Zi)throw new Error("Unknown chip family");e[0]=i>>8&255,e[1]=255&i,e[2]=t>>24&255,e[3]=t>>16&255,e[4]=t>>8&255,e[5]=255&t}return e}async readRegister(e){this.debug&&this.logger.debug("Reading from Register "+Oi(e,8));const t=wr("<I",e);await this.sendCommand(10,t);const[i]=await this.getResponse(10);return i}async checkCommand(e,t,i=0,n=3e3){n=Math.min(n,3e5),await this.sendCommand(e,t,i);const[o,r]=await this.getResponse(e,n);if(null===r)throw new Error("Didn't get enough status bytes");let a=r,s=0;if(this.IS_STUB||this.chipFamily==Pi?s=2:[Ni,Mi,Ui,Hi,Vi,Wi,Yi,ji,Xi,qi,Gi,Ki,Zi].includes(this.chipFamily)||20===e?s=4:[2,4].includes(a.length)&&(s=a.length),a.length<s)throw new Error("Didn't get enough status bytes");const d=a.slice(-s,a.length);if(a=a.slice(0,-s),this.debug&&(this.logger.debug("status",d),this.logger.debug("value",o),this.logger.debug("data",a)),1==d[0])throw 5==d[1]?new Error("Invalid (unsupported) command "+Oi(e)):new Error("Command failure error code "+Oi(d[1]));return[o,a]}async sendCommand(e,t,i=0){const n=Ti([...wr("<BBHI",0,e,t.length,i),...t]);this.debug&&this.logger.debug(`Writing ${n.length} byte${1==n.length?"":"s"}:`,n),await this.writeToStream(n)}async readPacket(e){let t=null,i=!1,n=[];for(;;){const o=Date.now();for(n=[];Date.now()-o<e;){if(this._inputBuffer.length>0){n.push(this._inputBuffer.shift());break}await Li(1)}if(0==n.length){throw new an("Timed out waiting for packet "+(null===t?"header":"content"))}this.debug&&this.logger.debug("Read "+n.length+" bytes: "+Fi(n));for(const e of n)if(null===t){if(192!=e)throw this.debug&&(this.logger.debug("Read invalid data: "+Fi(n)),this.logger.debug("Remaining data in serial buffer: "+Fi(this._inputBuffer))),new an("Invalid head of packet ("+Oi(e)+")");t=[]}else if(i)if(i=!1,220==e)t.push(192);else{if(221!=e)throw this.debug&&(this.logger.debug("Read invalid data: "+Fi(n)),this.logger.debug("Remaining data in serial buffer: "+Fi(this._inputBuffer))),new an("Invalid SLIP escape (0xdb, "+Oi(e)+")");t.push(219)}else if(219==e)i=!0;else{if(192==e)return this.debug&&this.logger.debug("Received full packet: "+Fi(t)),t;t.push(e)}}throw new an("Invalid state")}async getResponse(e,t=3e3){for(let i=0;i<100;i++){const i=await this.readPacket(t);if(i.length<8)continue;const[n,o,,r]=kr("<BBHI",i.slice(0,8));if(1!=n)continue;const a=i.slice(8);if(null==e||o==e)return[r,a];if(0!=a[0]&&5==a[1])throw this._inputBuffer.length=0,new Error(`Invalid (unsupported) command ${Oi(e)}`)}throw"Response doesn't match request"}checksum(e,t=239){for(const i of e)t^=i;return t}async setBaudrate(e){if(this.chipFamily==Pi)throw new Error("Changing baud rate is not supported on the ESP8266");try{const t=wr("<II",e,this.IS_STUB?zi:0);await this.checkCommand(15,t)}catch(t){throw this.logger.error(`Baudrate change error: ${t}`),new Error(`Unable to change the baud rate to ${e}: No response from set baud rate command.`)}this._parent?await this._parent.reconfigurePort(e):await this.reconfigurePort(e),this._parent?this._parent._currentBaudRate=e:this._currentBaudRate=e;const t=this._parent?this._parent._maxUSBSerialBaudrate:this._maxUSBSerialBaudrate;t&&e>t&&(this.logger.log(`⚠️ WARNING: Baudrate ${e} exceeds USB-Serial chip limit (${t})!`),this.logger.log("⚠️ This may cause data corruption or connection failures!")),this.logger.log(`Changed baud rate to ${e}`)}async reconfigurePort(e){var t;try{await(null===(t=this._reader)||void 0===t?void 0:t.cancel()),await this.port.close(),await this.port.open({baudRate:e}),await this.flushSerialBuffers(),this.readLoop()}catch(t){throw this.logger.error(`Reconfigure port error: ${t}`),new Error(`Unable to change the baud rate to ${e}: ${t}`)}}async sync(){for(let e=0;e<5;e++){this._inputBuffer.length=0;if(await this._sync())return await Li(nn),!0;await Li(nn)}throw new Error("Couldn't sync to ESP. Try resetting.")}async _sync(){await this.sendCommand(8,Di);for(let e=0;e<8;e++)try{const[,e]=await this.getResponse(8,nn);if(e.length>1&&0==e[0]&&0==e[1])return!0}catch{}return!1}getFlashWriteSize(){return this.IS_STUB?16384:1024}async flashData(e,t,i=0,n=!1){if(e.byteLength>=8){const t=Array.from(new Uint8Array(e,0,4)),i=t[0],n=t[2],o=t[3];this.logger.log(`Image header, Magic=${Oi(i)}, FlashMode=${Oi(n)}, FlashSizeFreq=${Oi(o)}`)}const o=e.byteLength;let r,a=0,s=en;n?(r=yr(new Uint8Array(e),{level:9}).buffer,a=r.byteLength,this.logger.log(`Writing data with filesize: ${o}. Compressed Size: ${a}`),s=await this.flashDeflBegin(o,a,i)):(this.logger.log(`Writing data with filesize: ${o}`),r=e,await this.flashBegin(o,i));let d=[],l=0,c=0,h=0;const m=Date.now(),p=this.getFlashWriteSize(),u=n?a:o;for(;u-h>0;)this.debug&&this.logger.log(`Writing at ${Oi(i+l*p,8)} `),u-h>=p?d=Array.from(new Uint8Array(r,h,p)):(d=Array.from(new Uint8Array(r,h,u-h)),n||(d=d.concat(new Array(p-d.length).fill(255)))),n?await this.flashDeflBlock(d,l,s):await this.flashBlock(d,l),l+=1,c+=n?Math.round(d.length*o/a):d.length,h+=p,t(Math.min(c,o),o);this.logger.log("Took "+(Date.now()-m)+"ms to write "+u+" bytes"),this.IS_STUB&&(await this.flashBegin(0,0),n?await this.flashDeflFinish():await this.flashFinish())}async flashBlock(e,t,i=3e3){await this.checkCommand(3,wr("<IIII",e.length,t,0,0).concat(e),this.checksum(e),i)}async flashDeflBlock(e,t,i=3e3){await this.checkCommand(17,wr("<IIII",e.length,t,0,0).concat(e),this.checksum(e),i)}async flashBegin(e=0,t=0,i=!1){let n;await this.flushSerialBuffers();const o=this.getFlashWriteSize();!this.IS_STUB&&[Ni,Mi,Ui,Hi,Vi,Wi,Yi,ji,Xi,qi,Gi,Ki,Zi].includes(this.chipFamily)&&await this.checkCommand(13,new Array(8).fill(0));const r=Math.floor((e+o-1)/o);n=this.chipFamily==Pi?this.getEraseSize(t,e):e;const a=this.IS_STUB?en:on(3e4,e),s=Date.now();let d=wr("<IIII",n,r,o,t);return this.chipFamily!=Ni&&this.chipFamily!=Mi&&this.chipFamily!=Ui&&this.chipFamily!=Hi&&this.chipFamily!=Vi&&this.chipFamily!=Wi&&this.chipFamily!=Yi&&this.chipFamily!=ji&&this.chipFamily!=Xi&&this.chipFamily!=qi&&this.chipFamily!=Gi&&this.chipFamily!=Ki&&this.chipFamily!=Zi||(d=d.concat(wr("<I",i?1:0))),this.logger.log("Erase size "+n+", blocks "+r+", block size "+Oi(o,4)+", offset "+Oi(t,4)+", encrypted "+(i?"yes":"no")),await this.checkCommand(2,d,0,a),0==e||this.IS_STUB||this.logger.log("Took "+(Date.now()-s)+"ms to erase "+r+" bytes"),r}async flashDeflBegin(e=0,t=0,i=0){const n=this.getFlashWriteSize(),o=Math.floor((t+n-1)/n),r=Math.floor((e+n-1)/n);let a=0,s=0;this.IS_STUB?(a=e,s=on(3e4,a)):(a=r*n,s=en);const d=wr("<IIII",a,o,n,i);return await this.checkCommand(16,d,0,s),s}async flashFinish(){const e=wr("<I",1);await this.checkCommand(4,e)}async flashDeflFinish(){const e=wr("<I",1);await this.checkCommand(18,e)}getBootloaderOffset(){return rn(this.getChipFamily()).flashOffs}async flashId(){return await this.runSpiFlashCommand(159,[],24)}getChipFamily(){return this._parent?this._parent.chipFamily:this.chipFamily}async writeRegister(e,t,i=4294967295,n=0,o=0){let r=wr("<IIII",e,t,i,n);o>0&&(r=r.concat(wr("<IIII",rn(this.getChipFamily()).uartDateReg,0,0,o))),await this.checkCommand(9,r)}async setDataLengths(e,t,i){if(-1!=e.mosiDlenOffs){const n=e.regBase+e.mosiDlenOffs,o=e.regBase+e.misoDlenOffs;t>0&&await this.writeRegister(n,t-1),i>0&&await this.writeRegister(o,i-1)}else{const n=e.regBase+e.usr1Offs,o=(0==i?0:i-1)<<8|(0==t?0:t-1)<<17;await this.writeRegister(n,o)}}async waitDone(e,t){for(let i=0;i<10;i++){if(0==(await this.readRegister(e)&t))return}throw Error("SPI command did not complete in time")}async runSpiFlashCommand(e,t,i=0){const n=rn(this.getChipFamily()),o=n.regBase,r=o,a=o+n.usrOffs,s=o+n.usr2Offs,d=o+n.w0Offs,l=1<<18;if(i>32)throw new Error("Reading more than 32 bits back from a SPI flash operation is unsupported");if(t.length>64)throw new Error("Writing more than 64 bytes of data with one SPI command is unsupported");const c=8*t.length,h=await this.readRegister(a),m=await this.readRegister(s);let p=1<<31;if(i>0&&(p|=268435456),c>0&&(p|=134217728),await this.setDataLengths(n,c,i),await this.writeRegister(a,p),await this.writeRegister(s,7<<28|e),0==c)await this.writeRegister(d,0);else{const e=(4-t.length%4)%4;t=t.concat(new Array(e).fill(0));const i=kr("I".repeat(Math.floor(t.length/4)),t);let n=d;this.logger.debug(`Words Length: ${i.length}`);for(const e of i)this.logger.debug(`Writing word ${Oi(e)} to register offset ${Oi(n)}`),await this.writeRegister(n,e),n+=4}await this.writeRegister(r,l),await this.waitDone(r,l);const u=await this.readRegister(d);return await this.writeRegister(a,h),await this.writeRegister(s,m),u}async detectFlashSize(){this.logger.log("Detecting Flash Size");const e=await this.flashId(),t=255&e,i=e>>16&255;this.logger.log(`FlashId: ${Oi(e)}`),this.logger.log(`Flash Manufacturer: ${t.toString(16)}`),this.logger.log(`Flash Device: ${(e>>8&255).toString(16)}${i.toString(16)}`),this.flashSize=$i[i],this.logger.log(`Auto-detected Flash size: ${this.flashSize}`)}getEraseSize(e,t){const i=4096,n=Math.floor((t+i-1)/i);let o=16-Math.floor(e/i)%16;return n<o&&(o=n),n<2*o?Math.floor((n+1)/2*i):(n-o)*i}async memBegin(e,t,i,n){return await this.checkCommand(5,wr("<IIII",e,t,i,n))}async memBlock(e,t){return await this.checkCommand(7,wr("<IIII",e.length,t,0,0).concat(e),this.checksum(e))}async memFinish(e=0){const t=this.IS_STUB?en:500,i=wr("<II",0==e?1:0,e);return await this.checkCommand(6,i,0,t)}async runStub(e=!1){const t=await sn(this.chipFamily,this.chipRevision);if(null===t)return this.logger.log(`Stub flasher is not yet supported on ${this.chipName}, using ROM loader`),this;const i=2048;this.logger.log("Uploading stub...");for(const e of["text","data"]){const n=t[e],o=t[`${e}_start`],r=n.length,a=Math.floor((r+i-1)/i);await this.memBegin(r,a,i,o);for(const e of Array(a).keys()){const t=e*i;let o=t+i;o>r&&(o=r),await this.memBlock(n.slice(t,o),e)}}await this.memFinish(t.entry);const n=await this.readPacket(500),o=String.fromCharCode(...n);if("OHAI"!=o)throw new Error("Failed to start stub. Unexpected response: "+o);this.logger.log("Stub is now running...");const r=new Ir(this.port,this.logger,this);return e||await r.detectFlashSize(),r}async writeToStream(e){if(!this.port.writable)return void this.logger.debug("Port writable stream not available, skipping write");const t=this.port.writable.getWriter();await t.write(new Uint8Array(e));try{t.releaseLock()}catch(e){this.logger.error(`Ignoring release lock error: ${e}`)}}async disconnect(){this._parent?await this._parent.disconnect():this.port.writable?(await this.port.writable.getWriter().close(),await new Promise(e=>{this._reader||e(void 0),this.addEventListener("disconnect",e,{once:!0}),this._reader.cancel()}),this.connected=!1):this.logger.debug("Port already closed, skipping disconnect")}async reconnect(){if(this._parent)return void await this._parent.reconnect();if(this.logger.log("Reconnecting serial port..."),this.connected=!1,this.__inputBuffer=[],this._reader){try{await this._reader.cancel()}catch(e){this.logger.debug(`Reader cancel error: ${e}`)}this._reader=void 0}try{await this.port.close(),this.logger.log("Port closed")}catch(e){this.logger.debug(`Port close error: ${e}`)}this.logger.debug("Opening port...");try{await this.port.open({baudRate:zi}),this.connected=!0}catch(e){throw new Error(`Failed to open port: ${e}`)}if(!this.port.readable||!this.port.writable)throw new Error(`Port streams not available after open (readable: ${!!this.port.readable}, writable: ${!!this.port.writable})`);const e=this.chipFamily,t=this.chipName,i=this.chipRevision,n=this.chipVariant,o=this.flashSize;if(await this.hardReset(!0),this._parent||(this.__inputBuffer=[],this.__totalBytesRead=0,this.readLoop()),await this.flushSerialBuffers(),await this.sync(),this.chipFamily=e,this.chipName=t,this.chipRevision=i,this.chipVariant=n,this.flashSize=o,this.logger.debug(`Reconnect complete (chip: ${this.chipName})`),!this.port.writable||!this.port.readable)throw new Error("Port not ready after reconnect");const r=await this.runStub(!0);if(this.logger.debug("Stub loaded"),this._currentBaudRate!==zi&&(await r.setBaudrate(this._currentBaudRate),!this.port.writable||!this.port.readable))throw new Error(`Port not ready after baudrate change (readable: ${!!this.port.readable}, writable: ${!!this.port.writable})`);this.IS_STUB&&Object.assign(this,r),this.logger.debug("Reconnection successful")}async flushSerialBuffers(){this._parent||(this.__inputBuffer=[]),await Li(nn),this._parent||(this.__inputBuffer=[]),this.logger.debug("Serial buffers flushed")}async readFlash(e,t,i){if(!this.IS_STUB)throw new Error("Reading flash is only supported in stub mode. Please run runStub() first.");await this.flushSerialBuffers(),this.logger.log(`Reading ${t} bytes from flash at address 0x${e.toString(16)}...`);let n=new Uint8Array(0),o=e,r=t;for(;r>0;){const e=Math.min(65536,r);let a=!1,s=0;const d=3;for(;!a&&s<=d;)try{this.logger.debug(`Reading chunk at 0x${o.toString(16)}, size: 0x${e.toString(16)}`);const t=wr("<IIII",o,e,4096,1024),[i]=await this.checkCommand(210,t);if(0!=i)throw new Error("Failed to read memory: "+i);let r=new Uint8Array(0);for(;r.length<e;){let t;try{t=await this.readPacket(100)}catch(t){if(t instanceof an&&(this.logger.debug(`SLIP read error at ${r.length} bytes: ${t.message}`),r.length>=e))break;throw t}if(t&&t.length>0){const e=new Uint8Array(t),i=new Uint8Array(r.length+e.length);i.set(r),i.set(e,r.length),r=i;const n=wr("<I",r.length),o=Ti(n);await this.writeToStream(o)}}const s=new Uint8Array(n.length+r.length);s.set(n),s.set(r,n.length),n=s,a=!0}catch(e){if(s++,!(e instanceof an&&e.message.includes("Timed out")))throw e;if(!(s<=d))throw new Error(`Failed to read chunk at 0x${o.toString(16)} after ${d} retries: ${e}`);this.logger.log(`⚠️ Timeout error at 0x${o.toString(16)}. Reconnecting and retrying (attempt ${s}/${d})...`);try{await this.reconnect()}catch(e){throw new Error(`Reconnect failed: ${e}`)}}i&&i(new Uint8Array(e),n.length,t),o+=e,r-=e,this.logger.debug(`Total progress: 0x${n.length.toString(16)} from 0x${t.toString(16)} bytes`)}return this.logger.debug(`Successfully read ${n.length} bytes from flash`),n}}class Ir extends Er{constructor(){super(...arguments),this.IS_STUB=!0}async memBegin(e,t,i,n){const o=await sn(this.chipFamily,this.chipRevision);if(null===o)return[0,[]];const r=n,a=n+e;this.logger.debug(`Load range: ${Oi(r,8)}-${Oi(a,8)}`),this.logger.debug(`Stub data: ${Oi(o.data_start,8)}, len: ${o.data.length}, text: ${Oi(o.text_start,8)}, len: ${o.text.length}`);for(const[e,t]of[[o.data_start,o.data_start+o.data.length],[o.text_start,o.text_start+o.text.length]])if(r<t&&a>e)throw new Error("Software loader is resident at "+Oi(e,8)+"-"+Oi(t,8)+". Can't load binary at overlapping address range "+Oi(r,8)+"-"+Oi(a,8)+". Try changing the binary loading address.");return[0,[]]}async eraseFlash(){await this.checkCommand(208,[],0,tn)}}var Sr=Object.freeze({__proto__:null,CHIP_FAMILY_ESP32:Ni,CHIP_FAMILY_ESP32C2:Hi,CHIP_FAMILY_ESP32C3:Vi,CHIP_FAMILY_ESP32C5:Wi,CHIP_FAMILY_ESP32C6:Yi,CHIP_FAMILY_ESP32C61:ji,CHIP_FAMILY_ESP32H2:Xi,CHIP_FAMILY_ESP32H21:Gi,CHIP_FAMILY_ESP32H4:qi,CHIP_FAMILY_ESP32P4:Ki,CHIP_FAMILY_ESP32S2:Mi,CHIP_FAMILY_ESP32S3:Ui,CHIP_FAMILY_ESP32S31:Zi,CHIP_FAMILY_ESP8266:Pi,ESPLoader:Er});const Cr=e=>{const t=e.getInfo();return 12346===t.usbVendorId&&2===t.usbProductId},Rr=e=>{const t=e.message||String(e);return t.includes("sync")||t.includes("disconnect")||t.includes("reconnect required")},Tr=async e=>{try{await e.close()}catch(e){}try{await e.forget()}catch(e){}},Ar=async(e,t,i,n,o,r,a)=>{let s,d,l,c=null;const h=Cr(t),m=t=>e({...t,manifest:s,build:d,chipFamily:l,chipVariant:c});var p=null,u="";try{p=JSON.parse(n)}catch{u=new URL(n,location.toString()).toString(),p=fetch(u).then(e=>e.json())}const f=new Er(t,i);window.esploader=f;const g=()=>{i.log("ESP32-S2 Native USB disconnect detected - reconnection required")};h&&(f.addEventListener("esp32s2-usb-reconnect",g),i.log("ESP32-S2 Native USB detected - monitoring for port switch"));const b=()=>{h&&f.removeEventListener("esp32s2-usb-reconnect",g)};m({state:"initializing",message:"Initializing...",details:{done:!1}});try{await f.initialize()}catch(e){return i.error(e),h&&Rr(e)?(b(),await Tr(t),void m({state:"esp32_s2_usb_reconnect",message:"ESP32-S2 USB port changed - please select the new port",details:{oldPort:t}})):(b(),m({state:"error",message:"Failed to initialize. Try resetting your device or holding the BOOT button while clicking INSTALL.",details:{error:"failed_initialize",details:e}}),void(f.connected&&await f.disconnect()))}l=(e=>{switch(e.chipFamily){case Ni:return"ESP32";case Mi:return"ESP32-S2";case Ui:return"ESP32-S3";case Hi:return"ESP32-C2";case Vi:return"ESP32-C3";case Wi:return"ESP32-C5";case Yi:return"ESP32-C6";case ji:return"ESP32-C61";case Xi:return"ESP32-H2";case Ki:return"ESP32-P4";case Pi:return"ESP8266";default:return"Unknown Chip"}})(f),c=f.chipVariant,m({state:"initializing",message:`Initialized. Found ${l}${c?` (${c})`:""}`,details:{done:!0}}),m({state:"manifest",message:"Fetching manifest...",details:{done:!1}});try{s=await p}catch(e){return b(),m({state:"error",message:`Unable to fetch manifest: ${e}`,details:{error:"fetch_manifest_failed",details:e}}),void await f.disconnect()}if(d=s.builds.find(e=>e.chipFamily===l&&(void 0===e.chipVariant||e.chipVariant===c)),m({state:"manifest",message:`Found manifest for ${s.name}`,details:{done:!0}}),!d){const e=c?`${l} (${c})`:l;return b(),m({state:"error",message:`Your ${e} board is not supported.`,details:{error:"not_supported",details:e}}),void await f.disconnect()}m({state:"preparing",message:"Preparing installation...",details:{done:!1}});const _=d.parts.map(async e=>{if(0==r.length){const t=new URL(e.path,u).toString(),i=await fetch(t);if(!i.ok)throw new Error(`Downlading firmware ${e.path} failed: ${i.status}`);return i.arrayBuffer()}return r}),x=await f.runStub();if(void 0!==a&&a>115200)try{await x.setBaudrate(a)}catch(e){i.log(`Could not change baud rate to ${a}: ${e.message}`)}const y=[];let v=0;for(const e of _)try{const t=await e;y.push(t instanceof ArrayBuffer?new Uint8Array(t):t),v+=t.byteLength}catch(e){return b(),m({state:"error",message:e.message,details:{error:"failed_firmware_download",details:e.message}}),void await f.disconnect()}m({state:"preparing",message:"Installation prepared",details:{done:!0}}),o&&(m({state:"erasing",message:"Erasing device...",details:{done:!1}}),await x.eraseFlash(),m({state:"erasing",message:"Device erased",details:{done:!0}}));let w=0;m({state:"writing",message:`Writing progress: ${w}%`,details:{bytesTotal:v,bytesWritten:0,percentage:w}});let k=0;for(const e of d.parts){const t=y.shift(),i=t instanceof Uint8Array?new Uint8Array(t).buffer:t;try{await x.flashData(i,e=>{const t=Math.floor((k+e)/v*100);t!==w&&(w=t,m({state:"writing",message:`Writing progress: ${t}%`,details:{bytesTotal:v,bytesWritten:k+e,percentage:t}}))},e.offset,!0)}catch(e){return b(),m({state:"error",message:e.message,details:{error:"write_failed",details:e}}),void await f.disconnect()}k+=t.byteLength}m({state:"writing",message:"Writing complete",details:{bytesTotal:v,bytesWritten:k,percentage:100}}),await V(100),console.log("DISCONNECT"),await f.disconnect(),console.log("HARD RESET"),await f.hardReset(),b(),m({state:"finished",message:"All done!"})},Fr=(e,t="")=>{const i=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(i);((e,t="")=>{const i=document.createElement("a");i.target="_blank",i.href=e,i.download=t,document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i)})(n,t),setTimeout(()=>URL.revokeObjectURL(n),0)},Or={0:"app",1:"data"},Lr={0:"factory",16:"ota_0",17:"ota_1",18:"ota_2",19:"ota_3",20:"ota_4",21:"ota_5",22:"ota_6",23:"ota_7",24:"ota_8",25:"ota_9",26:"ota_10",27:"ota_11",28:"ota_12",29:"ota_13",30:"ota_14",31:"ota_15",32:"test"},$r={0:"ota",1:"phy",2:"nvs",3:"coredump",4:"nvs_keys",5:"efuse",128:"esphttpd",129:"fat",130:"spiffs"};function zr(e){if(e.length<32)return null;if(20650!==(65535&(e[0]|e[1]<<8)))return null;const t=e[2],i=e[3],n=e[4]|e[5]<<8|e[6]<<16|e[7]<<24,o=e[8]|e[9]<<8|e[10]<<16|e[11]<<24;let r="";for(let t=12;t<28&&0!==e[t];t++)r+=String.fromCharCode(e[t]);const a=e[28]|e[29]<<8|e[30]<<16|e[31]<<24,s=Or[t]||`unknown(0x${t.toString(16)})`;let d="";return d=0===t?Lr[i]||`unknown(0x${i.toString(16)})`:1===t?$r[i]||`unknown(0x${i.toString(16)})`:`0x${i.toString(16)}`,{name:r,type:t,subtype:i,offset:n,size:o,flags:a,typeName:s,subtypeName:d}}const Br="⚠️";class Dr extends x{constructor(){super(...arguments),this.logger=console,this._state="DASHBOARD",this._installErase=!1,this._installConfirmed=!1,this._provisionForce=!1,this._wasProvisioned=!1,this._busy=!1,this._esp32s2ReconnectInProgress=!1,this._selectedSsid=-1,this._handleDisconnect=()=>{this._state="ERROR",this._error="Disconnected"}}render(){if(!this.port)return h``;let e,t,i=!1,n=!1;return void 0===this._client&&"INSTALL"!==this._state&&"LOGS"!==this._state?this._error?[e,t,i]=this._renderError(this._error):(t=this._renderProgress("Connecting"),i=!0):"INSTALL"===this._state?[e,t,i,n]=this._renderInstall():"ASK_ERASE"===this._state?[e,t]=this._renderAskErase():"ERROR"===this._state?[e,t,i]=this._renderError(this._error):"DASHBOARD"===this._state?[e,t,i,n]=this._client?this._renderDashboard():this._renderDashboardNoImprov():"PROVISION"===this._state?[e,t,i]=this._renderProvision():"LOGS"===this._state?[e,t,i]=this._renderLogs():"PARTITIONS"===this._state?[e,t,i]=this._renderPartitions():"LITTLEFS"===this._state?[e,t,i,n]=this._renderLittleFS():"ESP32S2_RECONNECT"===this._state&&([e,t,i]=this._renderESP32S2Reconnect()),h`
|
|
418
775
|
<ewt-dialog
|
|
419
776
|
open
|
|
420
777
|
.heading=${e}
|
|
@@ -424,7 +781,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
424
781
|
>
|
|
425
782
|
${e&&n?h`
|
|
426
783
|
<ewt-icon-button dialogAction="close">
|
|
427
|
-
${
|
|
784
|
+
${xi}
|
|
428
785
|
</ewt-icon-button>
|
|
429
786
|
`:""}
|
|
430
787
|
${t}
|
|
@@ -435,7 +792,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
435
792
|
.progress=${t}
|
|
436
793
|
></ewt-page-progress>
|
|
437
794
|
`}_renderError(e){return["Error",h`
|
|
438
|
-
<ewt-page-message .icon=${
|
|
795
|
+
<ewt-page-message .icon=${Br} .label=${e}></ewt-page-message>
|
|
439
796
|
<ewt-button
|
|
440
797
|
slot="primaryAction"
|
|
441
798
|
dialogAction="ok"
|
|
@@ -443,11 +800,11 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
443
800
|
></ewt-button>
|
|
444
801
|
`,!1]}_renderDashboard(){const e=this._info.name;let t;return t=h`
|
|
445
802
|
<div class="table-row">
|
|
446
|
-
${
|
|
803
|
+
${yi}
|
|
447
804
|
<div>${this._info.firmware} ${this._info.version}</div>
|
|
448
805
|
</div>
|
|
449
806
|
<div class="table-row last">
|
|
450
|
-
${
|
|
807
|
+
${vi}
|
|
451
808
|
<div>${this._info.chipFamily}</div>
|
|
452
809
|
</div>
|
|
453
810
|
<div class="dashboard-buttons">
|
|
@@ -471,7 +828,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
471
828
|
</a>
|
|
472
829
|
</div>
|
|
473
830
|
`}
|
|
474
|
-
${this._manifest.home_assistant_domain&&this._client.state===
|
|
831
|
+
${this._manifest.home_assistant_domain&&this._client.state===Ei.PROVISIONED?h`
|
|
475
832
|
<div>
|
|
476
833
|
<a
|
|
477
834
|
href=${`https://my.home-assistant.io/redirect/config_flow_start/?domain=${this._manifest.home_assistant_domain}`}
|
|
@@ -484,8 +841,8 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
484
841
|
`:""}
|
|
485
842
|
<div>
|
|
486
843
|
<ewt-button
|
|
487
|
-
.label=${this._client.state===
|
|
488
|
-
@click=${()=>{this._state="PROVISION",this._client.state===
|
|
844
|
+
.label=${this._client.state===Ei.READY?"Connect to Wi-Fi":"Change Wi-Fi"}
|
|
845
|
+
@click=${()=>{this._state="PROVISION",this._client.state===Ei.PROVISIONED&&(this._provisionForce=!0)}}
|
|
489
846
|
></ewt-button>
|
|
490
847
|
</div>
|
|
491
848
|
<div>
|
|
@@ -494,6 +851,12 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
494
851
|
@click=${async()=>{const e=this._client;e&&(await this._closeClientWithoutEvents(e),await V(100)),this._client=void 0,this._state="LOGS"}}
|
|
495
852
|
></ewt-button>
|
|
496
853
|
</div>
|
|
854
|
+
<div>
|
|
855
|
+
<ewt-button
|
|
856
|
+
label="Manage Filesystem"
|
|
857
|
+
@click=${()=>{this._state="PARTITIONS",this._readPartitionTable()}}
|
|
858
|
+
></ewt-button>
|
|
859
|
+
</div>
|
|
497
860
|
${this._isSameFirmware&&this._manifest.funding_url?h`
|
|
498
861
|
<div>
|
|
499
862
|
<a
|
|
@@ -531,8 +894,15 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
531
894
|
@click=${async()=>{this._client=void 0,this._state="LOGS"}}
|
|
532
895
|
></ewt-button>
|
|
533
896
|
</div>
|
|
897
|
+
|
|
898
|
+
<div>
|
|
899
|
+
<ewt-button
|
|
900
|
+
label="Manage Filesystem"
|
|
901
|
+
@click=${()=>{this._state="PARTITIONS",this._readPartitionTable()}}
|
|
902
|
+
></ewt-button>
|
|
903
|
+
</div>
|
|
534
904
|
</div>
|
|
535
|
-
`,["Device Dashboard",e,!0,!0]}_renderProvision(){let e,t="Configure Wi-Fi",i=!1;if(this._busy)return[t,this._renderProgress(void 0===this._ssids?"Scanning for networks":"Trying to connect"),!0];if(this._provisionForce||this._client.state!==
|
|
905
|
+
`,["Device Dashboard",e,!0,!0]}_renderProvision(){let e,t="Configure Wi-Fi",i=!1;if(this._busy)return[t,this._renderProgress(void 0===this._ssids?"Scanning for networks":"Trying to connect"),!0];if(this._provisionForce||this._client.state!==Ei.PROVISIONED){let t;switch(this._client.error){case 3:t="Unable to connect";break;case 0:case 2:break;default:t=`Unknown error (${this._client.error})`}e=h`
|
|
536
906
|
<div>
|
|
537
907
|
Enter the credentials of the Wi-Fi network that you want your device
|
|
538
908
|
to connect to.
|
|
@@ -671,7 +1041,7 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
671
1041
|
></ewt-button>
|
|
672
1042
|
`}else"error"===this._installState.state?(e="Installation failed",t=h`
|
|
673
1043
|
<ewt-page-message
|
|
674
|
-
.icon=${
|
|
1044
|
+
.icon=${Br}
|
|
675
1045
|
.label=${this._installState.message}
|
|
676
1046
|
></ewt-page-message>
|
|
677
1047
|
<ewt-button
|
|
@@ -720,14 +1090,85 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
720
1090
|
<ewt-button
|
|
721
1091
|
slot="secondaryAction"
|
|
722
1092
|
label="Download Logs"
|
|
723
|
-
@click=${()=>{
|
|
1093
|
+
@click=${()=>{Fr(this.shadowRoot.querySelector("ewt-console").logs(),"esp-web-tools-logs.txt"),this.shadowRoot.querySelector("ewt-console").reset()}}
|
|
724
1094
|
></ewt-button>
|
|
725
1095
|
<ewt-button
|
|
726
1096
|
slot="secondaryAction"
|
|
727
1097
|
label="Reset Device"
|
|
728
1098
|
@click=${async()=>{await this.shadowRoot.querySelector("ewt-console").reset()}}
|
|
729
1099
|
></ewt-button>
|
|
730
|
-
`,["Logs",e,!1]}
|
|
1100
|
+
`,["Logs",e,!1]}_renderPartitions(){let e;return e=this._busy?this._renderProgress("Reading partition table..."):this._partitions&&0!==this._partitions.length?h`
|
|
1101
|
+
<div class="partition-list">
|
|
1102
|
+
<table class="partition-table">
|
|
1103
|
+
<thead>
|
|
1104
|
+
<tr>
|
|
1105
|
+
<th>Name</th>
|
|
1106
|
+
<th>Type</th>
|
|
1107
|
+
<th>SubType</th>
|
|
1108
|
+
<th>Offset</th>
|
|
1109
|
+
<th>Size</th>
|
|
1110
|
+
<th>Action</th>
|
|
1111
|
+
</tr>
|
|
1112
|
+
</thead>
|
|
1113
|
+
<tbody>
|
|
1114
|
+
${this._partitions.map(e=>h`
|
|
1115
|
+
<tr>
|
|
1116
|
+
<td>${e.name}</td>
|
|
1117
|
+
<td>${e.typeName}</td>
|
|
1118
|
+
<td>${e.subtypeName}</td>
|
|
1119
|
+
<td>0x${e.offset.toString(16)}</td>
|
|
1120
|
+
<td>${this._formatSize(e.size)}</td>
|
|
1121
|
+
<td>
|
|
1122
|
+
${1===e.type&&130===e.subtype?h`
|
|
1123
|
+
<ewt-button
|
|
1124
|
+
label="Open FS"
|
|
1125
|
+
@click=${()=>this._openFilesystem(e)}
|
|
1126
|
+
></ewt-button>
|
|
1127
|
+
`:""}
|
|
1128
|
+
</td>
|
|
1129
|
+
</tr>
|
|
1130
|
+
`)}
|
|
1131
|
+
</tbody>
|
|
1132
|
+
</table>
|
|
1133
|
+
</div>
|
|
1134
|
+
<ewt-button
|
|
1135
|
+
slot="primaryAction"
|
|
1136
|
+
label="Back"
|
|
1137
|
+
@click=${()=>{this._state="DASHBOARD"}}
|
|
1138
|
+
></ewt-button>
|
|
1139
|
+
`:h`
|
|
1140
|
+
<ewt-page-message
|
|
1141
|
+
.icon=${Br}
|
|
1142
|
+
label="No partitions found"
|
|
1143
|
+
></ewt-page-message>
|
|
1144
|
+
<ewt-button
|
|
1145
|
+
slot="primaryAction"
|
|
1146
|
+
label="Back"
|
|
1147
|
+
@click=${()=>{this._state="DASHBOARD"}}
|
|
1148
|
+
></ewt-button>
|
|
1149
|
+
`,["Partition Table",e,!1]}_renderLittleFS(){return[undefined,h`
|
|
1150
|
+
<ewt-littlefs-manager
|
|
1151
|
+
.partition=${this._selectedPartition}
|
|
1152
|
+
.espStub=${this._espStub}
|
|
1153
|
+
.logger=${this.logger}
|
|
1154
|
+
.onClose=${()=>{this._state="PARTITIONS"}}
|
|
1155
|
+
></ewt-littlefs-manager>
|
|
1156
|
+
`,!0,!0]}_renderESP32S2Reconnect(){return["ESP32-S2 USB Port Changed",h`
|
|
1157
|
+
<ewt-page-message
|
|
1158
|
+
.icon=${"⚠️"}
|
|
1159
|
+
.label=${"The ESP32-S2 has switched to USB CDC mode. Please select the new USB port to continue."}
|
|
1160
|
+
></ewt-page-message>
|
|
1161
|
+
<ewt-button
|
|
1162
|
+
slot="primaryAction"
|
|
1163
|
+
label="Select New Port"
|
|
1164
|
+
@click=${this._handleESP32S2ReconnectClick}
|
|
1165
|
+
></ewt-button>
|
|
1166
|
+
<ewt-button
|
|
1167
|
+
slot="secondaryAction"
|
|
1168
|
+
label="Cancel"
|
|
1169
|
+
@click=${()=>{this._state="DASHBOARD"}}
|
|
1170
|
+
></ewt-button>
|
|
1171
|
+
`,!1]}async _handleESP32S2ReconnectClick(){try{this._busy=!0,this.logger.log("Requesting new port selection...");const e=await navigator.serial.requestPort();await e.open({baudRate:115200}),this.logger.log("New port selected, updating..."),this.port=e,this._state="PARTITIONS",await this._readPartitionTable()}catch(e){"NotFoundError"===e.name?(this.logger.log("Port selection cancelled"),this._state="DASHBOARD"):(this._error=`Failed to reconnect: ${e.message}`,this._state="ERROR")}finally{this._busy=!1}}async _readPartitionTable(){this._busy=!0,this._partitions=void 0;try{this.logger.log("Reading partition table from 0x8000...");const{ESPLoader:e}=await Promise.resolve().then(function(){return Sr});let t=this.port,i=new e(t,{log:(e,...t)=>this.logger.log(e,...t),debug:(e,...t)=>{var i,n;return null===(n=(i=this.logger).debug)||void 0===n?void 0:n.call(i,e,...t)},error:(e,...t)=>this.logger.error(e,...t)});const n=async e=>{this.logger.log("ESP32-S2 USB reconnect event:",e.detail.message),await Tr(t),this.logger.log("Please select the new ESP32-S2 USB CDC port")};i.addEventListener("esp32s2-usb-reconnect",n,{once:!0}),this.logger.log("Initializing ESP loader...");try{await i.initialize(),this.logger.log("ESP loader initialized successfully")}catch(e){if(Cr(t)&&Rr(e))return this.logger.log("ESP32-S2 USB port changed - user needs to select new port"),await Tr(t),this._busy=!1,void(this._state="ESP32S2_RECONNECT");throw e}this.logger.log("Running stub...");const o=await i.runStub();this._espStub=o,await V(500),this.logger.log("Reading flash data...");const r=function(e){const t=[];for(let i=0;i<e.length;i+=32){const n=zr(e.slice(i,i+32));if(null===n)break;t.push(n)}return t}(await o.readFlash(32768,4096));0===r.length?(this.logger.error("No valid partition table found"),this._partitions=[]):(this.logger.log(`Found ${r.length} partition(s)`),this._partitions=r)}catch(e){this.logger.error(`Failed to read partition table: ${e.message||e}`),"Port selection cancelled"===e.message?this._error="Port selection cancelled":this._error=`Failed to read partition table: ${e.message||e}. Try resetting your device.`,this._state="ERROR"}finally{this._busy=!1}}async _openFilesystem(e){try{if(this._busy=!0,this.logger.log(`Detecting filesystem type for partition "${e.name}"...`),!this._espStub)throw new Error("ESP stub not available. Please reconnect.");const t=await async function(e,t,i,n=console){try{const o=Math.min(8192,i),r=await e.readFlash(t,o);if(r.length<32)return n.log("Partition too small, assuming SPIFFS"),"spiffs";if(new TextDecoder("ascii",{fatal:!1}).decode(r).includes("littlefs"))return n.log('✓ LittleFS detected: Found "littlefs" signature'),"littlefs";const a=new DataView(r.buffer,r.byteOffset,r.byteLength),s=[4096,2048,1024,512];for(const e of s)if(r.length>=2*e)try{for(let t=0;t<Math.min(e,r.length-4);t+=4){const e=a.getUint32(t,!0),i=1023&e;if((e>>20&4095)<=2047&&i>0&&i<=1022&&t+i+4<=r.length)return n.log("✓ LittleFS detected: Found valid metadata structure"),"littlefs"}}catch(e){}for(let e=0;e<Math.min(4096,r.length-4);e+=4){const t=a.getUint32(e,!0);if(538182953===t||538314025===t)return n.log("✓ SPIFFS detected: Found SPIFFS magic number"),"spiffs"}return n.log("⚠ No clear filesystem signature found, assuming SPIFFS"),"spiffs"}catch(e){return n.error(`Failed to detect filesystem type: ${e.message||e}`),"spiffs"}}(this._espStub,e.offset,e.size,this.logger);this.logger.log(`Detected filesystem: ${t}`),"littlefs"===t?(this._selectedPartition=e,this._state="LITTLEFS"):"spiffs"===t?(this.logger.error("SPIFFS support not yet implemented. Use LittleFS partitions."),this._error="SPIFFS support not yet implemented",this._state="ERROR"):(this.logger.error("Unknown filesystem type. Cannot open partition."),this._error="Unknown filesystem type",this._state="ERROR")}catch(e){this.logger.error(`Failed to open filesystem: ${e.message||e}`),this._error=`Failed to open filesystem: ${e.message||e}`,this._state="ERROR"}finally{this._busy=!1}}_formatSize(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(2)} KB`:`${(e/1048576).toFixed(2)} MB`}willUpdate(e){e.has("_state")&&("ERROR"!==this._state&&(this._error=void 0),"PROVISION"===this._state?(this._ssids=void 0,this._busy=!0,this._client.scan().then(e=>{this._busy=!1,this._ssids=e,this._selectedSsid=e.length?0:-1},()=>{this._busy=!1,this._ssids=null,this._selectedSsid=-1})):this._provisionForce=!1,"INSTALL"===this._state&&(this._installConfirmed=!1,this._installState=void 0))}firstUpdated(e){super.firstUpdated(e),this._initialize()}updated(e){super.updated(e),e.has("_state")&&this.setAttribute("state",this._state),"PROVISION"===this._state&&(e.has("_selectedSsid")&&-1===this._selectedSsid?this._focusFormElement("ewt-textfield[name=ssid]"):e.has("_ssids")&&this._focusFormElement())}_focusFormElement(e="ewt-textfield, ewt-select"){const t=this.shadowRoot.querySelector(e);t&&t.updateComplete.then(()=>setTimeout(()=>t.focus(),100))}async _initialize(e=!1){if(null===this.port.readable||null===this.port.writable)return this._state="ERROR",void(this._error="Serial port is not readable/writable. Close any other application using it and try again.");try{this._manifest=JSON.parse(this.manifestPath)}catch{try{this._manifest=await(async e=>{const t=new URL(e,location.toString()).toString(),i=await fetch(t),n=await i.json();return"new_install_skip_erase"in n&&(console.warn('Manifest option "new_install_skip_erase" is deprecated. Use "new_install_prompt_erase" instead.'),n.new_install_skip_erase&&(n.new_install_prompt_erase=!0)),n})(this.manifestPath)}catch(e){return this._state="ERROR",void(this._error="Failed to download manifest")}}if(0===this._manifest.new_install_improv_wait_time)return void(this._client=null);const t=new Ri(this.port,this.logger);t.addEventListener("state-changed",()=>{this.requestUpdate()}),t.addEventListener("error-changed",()=>this.requestUpdate());try{const i=e?void 0!==this._manifest.new_install_improv_wait_time?1e3*this._manifest.new_install_improv_wait_time:1e4:1e3;this._info=await t.initialize(i),this._client=t,t.addEventListener("disconnect",this._handleDisconnect)}catch(e){this._info=void 0,e instanceof Si?(this._state="ERROR",this._error="Serial port is not ready. Close any other application using it and try again."):(this._client=null,this.logger.error("Improv initialization failed.",e))}}_startInstall(e){this._state="INSTALL",this._installErase=e,this._installConfirmed=!1,this._esp32s2ReconnectInProgress=!1}async _handleESP32S2Reconnect(){if(this._esp32s2ReconnectInProgress)return this.logger.log("ESP32-S2 reconnect already in progress, ignoring"),this._error="Reconnection failed. Please try again manually.",void(this._state="ERROR");this._esp32s2ReconnectInProgress=!0;try{try{await this.port.close()}catch{}try{await this.port.forget()}catch{}const e=await navigator.serial.requestPort();await e.open({baudRate:115200}),this.port=e,this._installState=void 0,this._installConfirmed=!1,this._confirmInstall()}catch(e){if(this._esp32s2ReconnectInProgress=!1,"NotFoundError"===e.name)return void this.logger.log("User cancelled port selection");this._error=`Failed to reconnect: ${e.message}`,this._state="ERROR"}}async _confirmInstall(){this._installConfirmed=!0,this._installState=void 0,this._esp32s2ReconnectInProgress=!1,this._client&&await this._closeClientWithoutEvents(this._client),this._client=void 0,null!=this.firmwareFile?new Blob([this.firmwareFile]).arrayBuffer().then(e=>this._flashFilebuffer(new Uint8Array(e))):Ar(e=>{this._installState=e,"finished"===e.state&&V(100).then(()=>this._initialize(!0)).then(()=>this.requestUpdate())},this.port,this.logger,this.manifestPath,this._installErase,new Uint8Array(0),this.baudRate)}async _flashFilebuffer(e){Ar(e=>{this._installState=e,"finished"===e.state&&V(100).then(()=>this._initialize(!0)).then(()=>this.requestUpdate())},this.port,this.logger,this.manifestPath,this._installErase,e,this.baudRate)}async _doProvision(){this._busy=!0,this._wasProvisioned=this._client.state===Ei.PROVISIONED;const e=-1===this._selectedSsid?this.shadowRoot.querySelector("ewt-textfield[name=ssid]").value:this._ssids[this._selectedSsid].name,t=this.shadowRoot.querySelector("ewt-textfield[name=password]").value;try{await this._client.provision(e,t)}catch(e){return}finally{this._busy=!1,this._provisionForce=!1}}async _handleClose(){this._client&&await this._closeClientWithoutEvents(this._client),((e,t,i,n)=>{n=n||{};const o=new CustomEvent(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed,detail:i});e.dispatchEvent(o)})(this,"closed"),this.parentNode.removeChild(this)}get _isSameFirmware(){var e;return!!this._info&&((null===(e=this.overrides)||void 0===e?void 0:e.checkSameFirmware)?this.overrides.checkSameFirmware(this._manifest,this._info):this._info.firmware===this._manifest.name)}get _isSameVersion(){return this._isSameFirmware&&this._info.version===this._manifest.version}async _closeClientWithoutEvents(e){e.removeEventListener("disconnect",this._handleDisconnect),await e.close()}}Dr.styles=[L,u`
|
|
731
1172
|
:host {
|
|
732
1173
|
--mdc-dialog-max-width: 390px;
|
|
733
1174
|
}
|
|
@@ -785,4 +1226,42 @@ import{l as e,o as t,_ as i,n,B as o,i as r,a,t as d,e as s,b as l,R as c,x as h
|
|
|
785
1226
|
width: calc(80vw - 48px);
|
|
786
1227
|
height: 80vh;
|
|
787
1228
|
}
|
|
788
|
-
|
|
1229
|
+
:host([state="PARTITIONS"]) ewt-dialog {
|
|
1230
|
+
--mdc-dialog-max-width: 800px;
|
|
1231
|
+
}
|
|
1232
|
+
:host([state="LITTLEFS"]) ewt-dialog {
|
|
1233
|
+
--mdc-dialog-max-width: 95vw;
|
|
1234
|
+
--mdc-dialog-max-height: 90vh;
|
|
1235
|
+
}
|
|
1236
|
+
:host([state="LITTLEFS"]) .mdc-dialog__content {
|
|
1237
|
+
padding: 10px 20px;
|
|
1238
|
+
}
|
|
1239
|
+
:host([state="LITTLEFS"]) ewt-littlefs-manager {
|
|
1240
|
+
display: block;
|
|
1241
|
+
max-width: 100%;
|
|
1242
|
+
}
|
|
1243
|
+
.partition-list {
|
|
1244
|
+
max-height: 60vh;
|
|
1245
|
+
overflow-y: auto;
|
|
1246
|
+
}
|
|
1247
|
+
.partition-table {
|
|
1248
|
+
width: 100%;
|
|
1249
|
+
border-collapse: collapse;
|
|
1250
|
+
margin: 16px 0;
|
|
1251
|
+
}
|
|
1252
|
+
.partition-table th,
|
|
1253
|
+
.partition-table td {
|
|
1254
|
+
padding: 8px 12px;
|
|
1255
|
+
text-align: left;
|
|
1256
|
+
border: 1px solid #ccc;
|
|
1257
|
+
}
|
|
1258
|
+
.partition-table th {
|
|
1259
|
+
font-weight: 600;
|
|
1260
|
+
background-color: #f0f0f0;
|
|
1261
|
+
position: sticky;
|
|
1262
|
+
top: 0;
|
|
1263
|
+
}
|
|
1264
|
+
.partition-table tbody tr:hover {
|
|
1265
|
+
background-color: rgba(3, 169, 244, 0.1);
|
|
1266
|
+
}
|
|
1267
|
+
`],i([s()],Dr.prototype,"_client",void 0),i([s()],Dr.prototype,"_state",void 0),i([s()],Dr.prototype,"_installErase",void 0),i([s()],Dr.prototype,"_installConfirmed",void 0),i([s()],Dr.prototype,"_installState",void 0),i([s()],Dr.prototype,"_provisionForce",void 0),i([s()],Dr.prototype,"_error",void 0),i([s()],Dr.prototype,"_busy",void 0),i([s()],Dr.prototype,"_ssids",void 0),i([s()],Dr.prototype,"_selectedSsid",void 0),i([s()],Dr.prototype,"_partitions",void 0),i([s()],Dr.prototype,"_selectedPartition",void 0),i([s()],Dr.prototype,"_espStub",void 0),customElements.define("ewt-install-dialog",Dr);export{Dr as EwtInstallDialog};
|