@m3e/stepper 1.0.2 → 1.0.4

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/index.min.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2025 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
- import{css as t,LitElement as e,html as s,nothing as i}from"lit";import{Selected as o,KeyboardClick as r,Focusable as n,HtmlFor as l,Disabled as a,AttachInternals as c,Role as d,DesignToken as h}from"@m3e/core";import{addAriaReferencedId as p,removeAriaReferencedId as m,selectionManager as u,SelectionManager as v}from"@m3e/core/a11y";import{M3eBreakpointObserver as f,Breakpoint as b}from"@m3e/core/layout";function $(t,e,s,i){var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n}function y(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function g(t,e,s,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,s):o?o.value=s:e.set(t,s),s}"function"==typeof SuppressedError&&SuppressedError;
6
+ import{LitElement as t,html as e,css as s,nothing as i}from"lit";import{Role as o,Selected as r,KeyboardClick as n,Focusable as l,HtmlFor as a,Disabled as c,AttachInternals as d,DesignToken as h}from"@m3e/core";import{addAriaReferencedId as p,removeAriaReferencedId as m,selectionManager as u,SelectionManager as v}from"@m3e/core/a11y";import{M3eBreakpointObserver as f,Breakpoint as b}from"@m3e/core/layout";function $(t,e,s,i){var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n}function y(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function g(t,e,s,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(t,s):o?o.value=s:e.set(t,s),s}"function"==typeof SuppressedError&&SuppressedError;
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
@@ -41,12 +41,12 @@ const B={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:L},D=(t=B,e,
41
41
  * Copyright 2017 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
43
  */
44
- function K(t,e){return(e,s,i)=>((t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s))(e,s,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let F=class extends e{constructor(){super(...arguments),this.active=!1}connectedCallback(){this.role=this.role||"tabpanel",this.slot="panel",super.connectedCallback()}render(){return s`<m3e-collapsible ?open=${this.active}>
44
+ function K(t,e){return(e,s,i)=>((t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s))(e,s,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let F=class extends(o(t,"tabpanel")){constructor(){super(...arguments),this.active=!1}connectedCallback(){this.slot="panel",super.connectedCallback()}render(){return e`<m3e-collapsible ?open=${this.active}>
45
45
  <div class="content">
46
46
  <div><slot></slot></div>
47
47
  <slot name="actions"></slot>
48
48
  </div>
49
- </m3e-collapsible>`}};var J,X,G,Q,Y;F.styles=t`
49
+ </m3e-collapsible>`}};var J,X,G,Q,Y;F.styles=s`
50
50
  :host {
51
51
  display: block;
52
52
  }
@@ -65,32 +65,32 @@ function K(t,e){return(e,s,i)=>((t,e,s)=>(s.configurable=!0,s.enumerable=!0,Refl
65
65
  ::slotted([slot="actions"][end]) {
66
66
  justify-content: flex-end;
67
67
  }
68
- `,$([V()],F.prototype,"active",void 0),F=$([_("m3e-step-panel")],F);let tt=Y=class extends(o(r(n(l(a(c(d(e,"tab")))))))){constructor(){super(...arguments),J.add(this),X.set(this,t=>y(this,J,"m",Q).call(this,t)),this.optional=!1,this.editable=!1,this.completed=!1,this.invalid=!1,this.index=-1}get panel(){return this.control instanceof F?this.control:null}get stepper(){return this.closest("m3e-stepper")}reset(){this.invalid=!1,this.completed=!1,this.panel?.querySelector("form")?.reset()}attach(t){t instanceof F&&(t.id=t.id||"m3e-step-panel-"+Y.__nextId++,p(this,"aria-controls",t.id)),super.attach(t)}detach(){this.control?.id&&m(this,"aria-controls",this.control.id),super.detach()}connectedCallback(){this.slot="step",super.connectedCallback(),this.addEventListener("click",y(this,X,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",y(this,X,"f"))}update(t){super.update(t),t.has("selected")&&this.closest("m3e-stepper")?.[u].notifySelectionChange(this)}firstUpdated(t){super.firstUpdated(t),[this._focusRing,this._stateLayer,this._ripple].forEach(t=>t?.attach(this))}render(){const t=s`<slot name="hint">${this.optional?s`<span class="hint">(Optional)</span>`:i}</slot>`,e=s`<slot name="error">${t}</slot>`;return s` <m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
68
+ `,$([V()],F.prototype,"active",void 0),F=$([_("m3e-step-panel")],F);let tt=Y=class extends(r(n(l(a(c(d(o(t,"tab")))))))){constructor(){super(...arguments),J.add(this),X.set(this,t=>y(this,J,"m",Q).call(this,t)),this.optional=!1,this.editable=!1,this.completed=!1,this.invalid=!1,this.index=-1}get panel(){return this.control instanceof F?this.control:null}get stepper(){return this.closest("m3e-stepper")}reset(){this.invalid=!1,this.completed=!1,this.panel?.querySelector("form")?.reset()}attach(t){t instanceof F&&(t.id=t.id||"m3e-step-panel-"+Y.__nextId++,p(this,"aria-controls",t.id)),super.attach(t)}detach(){this.control?.id&&m(this,"aria-controls",this.control.id),super.detach()}connectedCallback(){this.slot="step",super.connectedCallback(),this.addEventListener("click",y(this,X,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",y(this,X,"f"))}update(t){super.update(t),t.has("selected")&&this.closest("m3e-stepper")?.[u].notifySelectionChange(this)}firstUpdated(t){super.firstUpdated(t),[this._focusRing,this._stateLayer,this._ripple].forEach(t=>t?.attach(this))}render(){const t=e`<slot name="hint">${this.optional?e`<span class="hint">(Optional)</span>`:i}</slot>`,s=e`<slot name="error">${t}</slot>`;return e` <m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
69
69
  <m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring>
70
70
  <m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>
71
71
  <div class="wrapper">
72
72
  <div class="icon" aria-hidden="true">${y(this,J,"m",G).call(this)}</div>
73
73
  <div class="label">
74
74
  <slot></slot>
75
- ${this.invalid?e:t}
75
+ ${this.invalid?s:t}
76
76
  </div>
77
- </div>`}};var et,st,it,ot;X=new WeakMap,J=new WeakSet,G=function(){if(!this.selected){if(this.invalid)return s`<slot name="error-icon">
77
+ </div>`}};var et,st,it,ot;X=new WeakMap,J=new WeakSet,G=function(){if(!this.selected){if(this.invalid)return e`<slot name="error-icon">
78
78
  <svg viewBox="0 -960 960 960" fill="currentColor">
79
79
  <path
80
80
  d="m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"
81
81
  />
82
82
  </svg>
83
- </slot>`;if(this.completed)return this.editable?s`<slot name="edit-icon">
83
+ </slot>`;if(this.completed)return this.editable?e`<slot name="edit-icon">
84
84
  <svg viewBox="0 -960 960 960" fill="currentColor">
85
85
  <path
86
86
  d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"
87
87
  />
88
88
  </svg>
89
- </slot>`:s`<slot name="done-icon">
89
+ </slot>`:e`<slot name="done-icon">
90
90
  <svg viewBox="0 -960 960 960" fill="currentColor">
91
91
  <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" />
92
92
  </svg>
93
- </slot>`}return s`<slot name="icon">${this.index+1}</slot>`},Q=function(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),t.defaultPrevented||this.selected||(this.selected=!0,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))?(this.closest("m3e-stepper")?.moveTo(this.index),this.dispatchEvent(new Event("change",{bubbles:!0}))):this.selected=!1)},tt.styles=t`
93
+ </slot>`}return e`<slot name="icon">${this.index+1}</slot>`},Q=function(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),t.defaultPrevented||this.selected||(this.selected=!0,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0,cancelable:!0}))&&this.closest("m3e-stepper")?.moveTo(this.index)?this.dispatchEvent(new Event("change",{bubbles:!0})):this.selected=!1)},tt.styles=s`
94
94
  :host {
95
95
  display: block;
96
96
  position: relative;
@@ -98,10 +98,11 @@ function K(t,e){return(e,s,i)=>((t,e,s)=>(s.configurable=!0,s.enumerable=!0,Refl
98
98
  min-width: 0px;
99
99
  border-radius: var(--m3e-step-shape, ${h.shape.corner.medium});
100
100
  padding: var(--m3e-step-padding, 1.5rem);
101
+ user-select: none;
102
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
101
103
  }
102
104
  :host(:not([aria-disabled="true"])) {
103
105
  cursor: pointer;
104
- user-select: none;
105
106
  }
106
107
  .icon {
107
108
  flex: none;
@@ -187,7 +188,7 @@ function K(t,e){return(e,s,i)=>((t,e,s)=>(s.configurable=!0,s.enumerable=!0,Refl
187
188
  :host([aria-disabled="true"]) .hint {
188
189
  color: color-mix(in srgb, var(--m3e-step-disabled-hint-color, ${h.color.onSurface}) 38%, transparent);
189
190
  }
190
- `,tt.__nextId=0,$([K(".focus-ring")],tt.prototype,"_focusRing",void 0),$([K(".state-layer")],tt.prototype,"_stateLayer",void 0),$([K(".ripple")],tt.prototype,"_ripple",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"optional",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"editable",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"completed",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"invalid",void 0),$([V()],tt.prototype,"index",void 0),tt=Y=$([_("m3e-step")],tt);class rt extends(c(e)){constructor(t){super(),et.add(this),st.set(this,t=>y(this,et,"m",ot).call(this,t)),it.set(this,void 0),g(this,it,t,"f")}connectedCallback(){this.role=this.role||"none",super.connectedCallback(),this.parentElement?.addEventListener("click",y(this,st,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.parentElement?.removeEventListener("click",y(this,st,"f"))}render(){return s`<slot></slot>`}}st=new WeakMap,it=new WeakMap,et=new WeakSet,ot=function(t){if(!t.defaultPrevented)switch(y(this,it,"f")){case"next":this.closest("m3e-stepper")?.moveNext();break;case"previous":this.closest("m3e-stepper")?.movePrevious();break;case"reset":this.closest("m3e-stepper")?.reset()}},rt.styles=t`
191
+ `,tt.__nextId=0,$([K(".focus-ring")],tt.prototype,"_focusRing",void 0),$([K(".state-layer")],tt.prototype,"_stateLayer",void 0),$([K(".ripple")],tt.prototype,"_ripple",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"optional",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"editable",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"completed",void 0),$([Z({type:Boolean,reflect:!0})],tt.prototype,"invalid",void 0),$([V()],tt.prototype,"index",void 0),tt=Y=$([_("m3e-step")],tt);class rt extends(d(t)){constructor(t){super(),et.add(this),st.set(this,t=>y(this,et,"m",ot).call(this,t)),it.set(this,void 0),g(this,it,t,"f")}connectedCallback(){super.connectedCallback(),this.parentElement?.addEventListener("click",y(this,st,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.parentElement?.removeEventListener("click",y(this,st,"f"))}render(){return e`<slot></slot>`}}st=new WeakMap,it=new WeakMap,et=new WeakSet,ot=function(t){if(!t.defaultPrevented)switch(y(this,it,"f")){case"next":this.closest("m3e-stepper")?.moveNext();break;case"previous":this.closest("m3e-stepper")?.movePrevious();break;case"reset":this.closest("m3e-stepper")?.reset()}},rt.styles=s`
191
192
  :host {
192
193
  display: contents;
193
194
  }
@@ -199,18 +200,18 @@ function K(t,e){return(e,s,i)=>((t,e,s)=>(s.configurable=!0,s.enumerable=!0,Refl
199
200
  * @license
200
201
  * Copyright 2017 Google LLC
201
202
  * SPDX-License-Identifier: BSD-3-Clause
202
- */;const nt=globalThis,lt=nt.trustedTypes,at=lt?lt.createPolicy("lit-html",{createHTML:t=>t}):void 0,ct="$lit$",dt=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+dt,pt=`<${ht}>`,mt=document,ut=()=>mt.createComment(""),vt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ft=Array.isArray,bt="[ \t\n\f\r]",$t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,gt=/>/g,_t=RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,wt=/"/g,Et=/^(?:script|style|textarea|title)$/i,xt=Symbol.for("lit-noChange"),St=Symbol.for("lit-nothing"),Pt=new WeakMap,Ct=mt.createTreeWalker(mt,129);function kt(t,e){if(!ft(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==at?at.createHTML(e):e}const Tt=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=$t;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,d=0;for(;d<s.length&&(n.lastIndex=d,a=n.exec(s),null!==a);)d=n.lastIndex,n===$t?"!--"===a[1]?n=yt:void 0!==a[1]?n=gt:void 0!==a[2]?(Et.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=_t):void 0!==a[3]&&(n=_t):n===_t?">"===a[0]?(n=o??$t,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?_t:'"'===a[3]?wt:At):n===wt||n===At?n=_t:n===yt||n===gt?n=$t:(n=_t,o=void 0);const h=n===_t&&t[e+1].startsWith("/>")?" ":"";r+=n===$t?s+pt:c>=0?(i.push(l),s.slice(0,c)+ct+s.slice(c)+dt+h):s+dt+(-2===c?e:h)}return[kt(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class Ot{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=Tt(t,e);if(this.el=Ot.createElement(a,s),Ct.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Ct.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(ct)){const e=c[r++],s=i.getAttribute(t).split(dt),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?zt:"?"===n[1]?Rt:"@"===n[1]?It:Nt}),i.removeAttribute(t)}else t.startsWith(dt)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(Et.test(i.tagName)){const t=i.textContent.split(dt),e=t.length-1;if(e>0){i.textContent=lt?lt.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],ut()),Ct.nextNode(),l.push({type:2,index:++o});i.append(t[e],ut())}}}else if(8===i.nodeType)if(i.data===ht)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(dt,t+1));)l.push({type:7,index:o}),t+=dt.length-1}o++}}static createElement(t,e){const s=mt.createElement("template");return s.innerHTML=t,s}}function Ut(t,e,s=t,i){if(e===xt)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const r=vt(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=Ut(t,o._$AS(t,e.values),o,i)),e}class Mt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??mt).importNode(e,!0);Ct.currentNode=i;let o=Ct.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Ht(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new jt(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=Ct.nextNode(),r++)}return Ct.currentNode=mt,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Ht{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=St,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ut(this,t,e),vt(t)?t===St||null==t||""===t?(this._$AH!==St&&this._$AR(),this._$AH=St):t!==this._$AH&&t!==xt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>ft(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==St&&vt(this._$AH)?this._$AA.nextSibling.data=t:this.T(mt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Ot.createElement(kt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Mt(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=Pt.get(t.strings);return void 0===e&&Pt.set(t.strings,e=new Ot(t)),e}k(t){ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new Ht(this.O(ut()),this.O(ut()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=St,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=St}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Ut(this,t,e,0),r=!vt(t)||t!==this._$AH&&t!==xt,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Ut(this,i[s+n],e,n),l===xt&&(l=this._$AH[n]),r||=!vt(l)||l!==this._$AH[n],l===St?t=St:t!==St&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===St?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class zt extends Nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===St?void 0:t}}class Rt extends Nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==St)}}class It extends Nt{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Ut(this,t,e,0)??St)===xt)return;const s=this._$AH,i=t===St&&s!==St||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==St&&(s===St||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class jt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Ut(this,t)}}const Lt=nt.litHtmlPolyfillSupport;Lt?.(Ot,Ht),(nt.litHtmlVersions??=[]).push("3.3.1");var qt,Wt,Bt,Dt,Zt,Vt,Kt,Ft,Jt,Xt;let Gt=class extends(c(e)){constructor(){super(...arguments),qt.add(this),Wt.set(this,void 0),this._selectedIndex=null,this[Xt]=(new v).withHomeAndEnd().withWrap().onSelectedItemsChange(()=>y(this,qt,"m",Kt).call(this)),this.headerPosition="above",this.labelPosition="end",this.linear=!1,this.orientation="horizontal"}get steps(){return this[u]?.items??[]}get selectedStep(){return null!==this._selectedIndex?this.steps[this._selectedIndex]??null:null}get selectedIndex(){return this._selectedIndex??-1}movePrevious(){return this.moveTo((this._selectedIndex??1)-1)}moveNext(){return this.moveTo((this._selectedIndex??-1)+1)}moveTo(t){const e=this.selectedStep;if(e&&e.index===t)return!0;if(t>=0&&t<this.steps.length){if(e){const s=y(this,qt,"m",Ft).call(this);if(this.linear)if(t<e.index){const e=this[u].items[t];if(!e||e.completed&&!e.editable)return!1}else if(t>e.index+1){const e=this[u].items[t];if(!e||!e.completed)return!1}else if(!s&&!e.optional)return!1;e.completed=!0}return this._selectedIndex=t,this[u].select(this.selectedStep),this.dispatchEvent(new Event("change",{bubbles:!0})),!0}return e&&(this[u].deselect(e),this.dispatchEvent(new Event("change",{bubbles:!0}))),!1}reset(){this.steps.forEach(t=>t.reset());const t=this.steps.find(t=>!t.disabled);t?this.moveTo(this.steps.indexOf(t)):this.moveTo(-1)}connectedCallback(){this.role=this.role||"none",super.connectedCallback(),this.classList.toggle("-no-animate",!0)}disconnectedCallback(){super.disconnectedCallback(),this._orientation=void 0,y(this,Wt,"f")?.call(this)}update(t){super.update(t),t.has("orientation")&&(y(this,Wt,"f")?.call(this),"auto"===this.orientation?g(this,Wt,f.observe([b.XSmall],t=>{this._orientation=t.get(b.XSmall)?"vertical":"horizontal",y(this,qt,"m",Jt).call(this)}),"f"):y(this,qt,"m",Jt).call(this)),t.has("_orientation")&&y(this,qt,"m",Jt).call(this)}render(){let t=null;return this.selectedStep?.panel&&(t=[...this.querySelectorAll("[slot='panel']")].indexOf(this.selectedStep.panel),-1===t&&(t=null)),this[u].vertical?s`${y(this,qt,"m",Bt).call(this)} <slot name="panel"></slot>`:s`${"above"===this.headerPosition?y(this,qt,"m",Bt).call(this):i}
203
+ */;const nt=globalThis,lt=nt.trustedTypes,at=lt?lt.createPolicy("lit-html",{createHTML:t=>t}):void 0,ct="$lit$",dt=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+dt,pt=`<${ht}>`,mt=document,ut=()=>mt.createComment(""),vt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ft=Array.isArray,bt="[ \t\n\f\r]",$t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,gt=/>/g,_t=RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,wt=/"/g,Et=/^(?:script|style|textarea|title)$/i,xt=Symbol.for("lit-noChange"),St=Symbol.for("lit-nothing"),Pt=new WeakMap,Ct=mt.createTreeWalker(mt,129);function kt(t,e){if(!ft(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==at?at.createHTML(e):e}const Tt=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=$t;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,d=0;for(;d<s.length&&(n.lastIndex=d,a=n.exec(s),null!==a);)d=n.lastIndex,n===$t?"!--"===a[1]?n=yt:void 0!==a[1]?n=gt:void 0!==a[2]?(Et.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=_t):void 0!==a[3]&&(n=_t):n===_t?">"===a[0]?(n=o??$t,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?_t:'"'===a[3]?wt:At):n===wt||n===At?n=_t:n===yt||n===gt?n=$t:(n=_t,o=void 0);const h=n===_t&&t[e+1].startsWith("/>")?" ":"";r+=n===$t?s+pt:c>=0?(i.push(l),s.slice(0,c)+ct+s.slice(c)+dt+h):s+dt+(-2===c?e:h)}return[kt(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class Ot{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=Tt(t,e);if(this.el=Ot.createElement(a,s),Ct.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Ct.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(ct)){const e=c[r++],s=i.getAttribute(t).split(dt),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?zt:"?"===n[1]?Rt:"@"===n[1]?It:Nt}),i.removeAttribute(t)}else t.startsWith(dt)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(Et.test(i.tagName)){const t=i.textContent.split(dt),e=t.length-1;if(e>0){i.textContent=lt?lt.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],ut()),Ct.nextNode(),l.push({type:2,index:++o});i.append(t[e],ut())}}}else if(8===i.nodeType)if(i.data===ht)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(dt,t+1));)l.push({type:7,index:o}),t+=dt.length-1}o++}}static createElement(t,e){const s=mt.createElement("template");return s.innerHTML=t,s}}function Ut(t,e,s=t,i){if(e===xt)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const r=vt(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=Ut(t,o._$AS(t,e.values),o,i)),e}class Mt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??mt).importNode(e,!0);Ct.currentNode=i;let o=Ct.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Ht(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new jt(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=Ct.nextNode(),r++)}return Ct.currentNode=mt,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Ht{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=St,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ut(this,t,e),vt(t)?t===St||null==t||""===t?(this._$AH!==St&&this._$AR(),this._$AH=St):t!==this._$AH&&t!==xt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>ft(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==St&&vt(this._$AH)?this._$AA.nextSibling.data=t:this.T(mt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Ot.createElement(kt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Mt(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=Pt.get(t.strings);return void 0===e&&Pt.set(t.strings,e=new Ot(t)),e}k(t){ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new Ht(this.O(ut()),this.O(ut()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=St,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=St}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Ut(this,t,e,0),r=!vt(t)||t!==this._$AH&&t!==xt,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Ut(this,i[s+n],e,n),l===xt&&(l=this._$AH[n]),r||=!vt(l)||l!==this._$AH[n],l===St?t=St:t!==St&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===St?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class zt extends Nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===St?void 0:t}}class Rt extends Nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==St)}}class It extends Nt{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Ut(this,t,e,0)??St)===xt)return;const s=this._$AH,i=t===St&&s!==St||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==St&&(s===St||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class jt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Ut(this,t)}}const Lt=nt.litHtmlPolyfillSupport;Lt?.(Ot,Ht),(nt.litHtmlVersions??=[]).push("3.3.1");var qt,Wt,Bt,Dt,Zt,Vt,Kt,Ft,Jt,Xt;let Gt=class extends(d(t)){constructor(){super(...arguments),qt.add(this),Wt.set(this,void 0),this._selectedIndex=null,this[Xt]=(new v).withHomeAndEnd().withWrap().onSelectedItemsChange(()=>y(this,qt,"m",Kt).call(this)),this.headerPosition="above",this.labelPosition="end",this.linear=!1,this.orientation="horizontal"}get steps(){return this[u]?.items??[]}get selectedStep(){return null!==this._selectedIndex?this.steps[this._selectedIndex]??null:null}get selectedIndex(){return this._selectedIndex??-1}movePrevious(){return this.moveTo((this._selectedIndex??1)-1)}moveNext(){return this.moveTo((this._selectedIndex??-1)+1)}moveTo(t){const e=this.selectedStep;if(e&&e.index===t)return!0;if(this.steps[t]?.disabled)return!1;if(t>=0&&t<this.steps.length){if(e){const s=y(this,qt,"m",Ft).call(this);if(this.linear)if(t<e.index){const e=this[u].items[t];if(!e||e.completed&&!e.editable)return!1}else if(t>e.index+1){const e=this[u].items[t];if(!e||!e.completed)return!1}else if(!s&&!e.optional)return!1;e.completed=!0}return this._selectedIndex=t,this[u].select(this.selectedStep),this.dispatchEvent(new Event("change",{bubbles:!0})),!0}return e&&(this[u].deselect(e),this.dispatchEvent(new Event("change",{bubbles:!0}))),!1}reset(){this.steps.forEach(t=>t.reset());const t=this.steps.find(t=>!t.disabled);t?this.moveTo(this.steps.indexOf(t)):this.moveTo(-1)}connectedCallback(){super.connectedCallback(),this.classList.toggle("-no-animate",!0)}disconnectedCallback(){super.disconnectedCallback(),this._orientation=void 0,y(this,Wt,"f")?.call(this)}update(t){super.update(t),t.has("orientation")&&(y(this,Wt,"f")?.call(this),"auto"===this.orientation?g(this,Wt,f.observe([b.XSmall],t=>{this._orientation=t.get(b.XSmall)?"vertical":"horizontal",y(this,qt,"m",Jt).call(this)}),"f"):y(this,qt,"m",Jt).call(this)),t.has("_orientation")&&y(this,qt,"m",Jt).call(this)}render(){let t=null;return this.selectedStep?.panel&&(t=[...this.querySelectorAll("[slot='panel']")].indexOf(this.selectedStep.panel),-1===t&&(t=null)),this[u].vertical?e`${y(this,qt,"m",Bt).call(this)} <slot name="panel"></slot>`:e`${"above"===this.headerPosition?y(this,qt,"m",Bt).call(this):i}
203
204
  <m3e-slide class="steps" .selectedIndex="${t}">
204
205
  <slot name="panel"></slot>
205
206
  </m3e-slide>
206
- ${"below"===this.headerPosition?y(this,qt,"m",Bt).call(this):i}`}};Wt=new WeakMap,qt=new WeakSet,Xt=u,Bt=function(){return s`<div
207
+ ${"below"===this.headerPosition?y(this,qt,"m",Bt).call(this):i}`}};Wt=new WeakMap,qt=new WeakSet,Xt=u,Bt=function(){return e`<div
207
208
  class="header"
208
209
  role="tablist"
209
210
  aria-orientation="${(t=>t??St)(this[u].vertical?"vertical":void 0)}"
210
211
  @change="${y(this,qt,"m",Dt)}"
211
212
  >
212
213
  <slot name="step" @slotchange="${y(this,qt,"m",Zt)}" @keydown="${y(this,qt,"m",Vt)}"></slot>
213
- </div>`},Dt=function(t){t.stopPropagation()},Zt=function(){const{added:t,removed:e}=this[u].setItems([...this.querySelectorAll("m3e-step")]);if(t.length>0||e.length>0){this.querySelectorAll(".-m3e-step-divider").forEach(t=>t.remove());for(let t=0;t<this[u].items.length;t++){const e=this[u].items[t];if(e.index=t,t>0){const t=document.createElement("div");t.ariaHidden="true",t.classList.add("-m3e-step-divider"),t.slot="step",e.insertAdjacentElement("beforebegin",t)}}y(this,qt,"m",Jt).call(this),0==this[u].selectedItems.length&&this[u].select(this[u].items.find(t=>!t.disabled))}},Vt=function(t){this[u].onKeyDown(t)},Kt=function(){const t=this[u].selectedItems[0];let e=t?this.steps.indexOf(t):null;-1===e&&(e=null),this._selectedIndex=e;for(const t of this[u].items)t.panel&&(t.panel.active=t.index===e);t&&this.matches(":focus-within")&&!t.matches(":focus")&&t.focus(),this.classList.contains("-no-animate")&&requestAnimationFrame(()=>this.classList.toggle("-no-animate",!1))},Ft=function(){let t=!1;return this.selectedStep&&(t=this.selectedStep.panel?.querySelector("form")?.checkValidity()??!0,this.selectedStep.optional&&(t=!0),this.selectedStep.invalid=!t),t},Jt=function(){this[u].vertical="vertical"===(this._orientation??this.orientation),this.classList.toggle("-vertical",this[u].vertical),this[u].vertical?this.steps.forEach((t,e)=>{t.style.order=`${e}`,t.panel&&(t.panel.style.order=`${e}`)}):this.steps.forEach(t=>{t.style.order="",t.panel&&(t.panel.style.order="")})},Gt.styles=t`
214
+ </div>`},Dt=function(t){t.stopPropagation()},Zt=function(){const{added:t,removed:e}=this[u].setItems([...this.querySelectorAll("m3e-step")]);if(t.length>0||e.length>0){this.querySelectorAll(".-m3e-step-divider").forEach(t=>t.remove());for(let t=0;t<this[u].items.length;t++){const e=this[u].items[t];if(e.index=t,t>0){const t=document.createElement("div");t.ariaHidden="true",t.classList.add("-m3e-step-divider"),t.slot="step",e.insertAdjacentElement("beforebegin",t)}}y(this,qt,"m",Jt).call(this),0==this[u].selectedItems.length&&this[u].select(this[u].items.find(t=>!t.disabled))}},Vt=function(t){this[u].onKeyDown(t)},Kt=function(){const t=this[u].selectedItems[0];let e=t?this.steps.indexOf(t):null;-1===e&&(e=null),this._selectedIndex=e;for(const t of this[u].items)t.panel&&(t.panel.active=t.index===e);t&&this.matches(":focus-within")&&!t.matches(":focus")&&t.focus(),this.classList.contains("-no-animate")&&requestAnimationFrame(()=>this.classList.toggle("-no-animate",!1))},Ft=function(){let t=!1;return this.selectedStep&&(t=this.selectedStep.panel?.querySelector("form")?.checkValidity()??!0,this.selectedStep.optional&&(t=!0),this.selectedStep.invalid=!t),t},Jt=function(){this[u].vertical="vertical"===(this._orientation??this.orientation),this.classList.toggle("-vertical",this[u].vertical),this[u].vertical?this.steps.forEach((t,e)=>{t.style.order=`${e}`,t.panel&&(t.panel.style.order=`${e}`)}):this.steps.forEach(t=>{t.style.order="",t.panel&&(t.panel.style.order="")})},Gt.styles=s`
214
215
  :host {
215
216
  display: flex;
216
217
  flex-direction: column;