@aurodesignsystem-dev/auro-formkit 0.0.0-pr1497.0 → 0.0.0-pr1497.2

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.
Files changed (132) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
  2. package/components/bibtemplate/dist/index.js +9 -1
  3. package/components/bibtemplate/dist/registered.js +9 -1
  4. package/components/checkbox/demo/css-only.html +57 -0
  5. package/components/checkbox/demo/css-only.md +146 -0
  6. package/components/checkbox/demo/customize.min.js +1 -1
  7. package/components/checkbox/demo/getting-started.min.js +1 -1
  8. package/components/checkbox/demo/index.min.js +1 -1
  9. package/components/checkbox/demo/pages.json +1 -1
  10. package/components/checkbox/demo/styles.min.css +1 -1
  11. package/components/checkbox/demo/why-checkbox.html +57 -0
  12. package/components/checkbox/demo/why-checkbox.md +86 -0
  13. package/components/checkbox/dist/index.js +1 -1
  14. package/components/checkbox/dist/registered.js +1 -1
  15. package/components/combobox/demo/css-only.html +57 -0
  16. package/components/combobox/demo/css-only.md +209 -0
  17. package/components/combobox/demo/customize.min.js +250 -16
  18. package/components/combobox/demo/getting-started.min.js +250 -16
  19. package/components/combobox/demo/index.min.js +250 -16
  20. package/components/combobox/demo/pages.json +1 -1
  21. package/components/combobox/demo/styles.min.css +1 -1
  22. package/components/combobox/demo/why-combobox.html +57 -0
  23. package/components/combobox/demo/why-combobox.md +113 -0
  24. package/components/combobox/dist/index.js +250 -16
  25. package/components/combobox/dist/registered.js +250 -16
  26. package/components/counter/demo/css-only.html +57 -0
  27. package/components/counter/demo/css-only.md +184 -0
  28. package/components/counter/demo/customize.min.js +249 -15
  29. package/components/counter/demo/index.min.js +249 -15
  30. package/components/counter/demo/keyboard-behavior.md +1 -0
  31. package/components/counter/demo/pages.json +1 -1
  32. package/components/counter/demo/styles.min.css +1 -1
  33. package/components/counter/demo/why-counter.html +57 -0
  34. package/components/counter/demo/why-counter.md +108 -0
  35. package/components/counter/dist/index.js +10 -2
  36. package/components/counter/dist/registered.js +10 -2
  37. package/components/datepicker/demo/accessibility.md +54 -3
  38. package/components/datepicker/demo/api.md +63 -53
  39. package/components/datepicker/demo/css-only.html +57 -0
  40. package/components/datepicker/demo/css-only.md +151 -0
  41. package/components/datepicker/demo/customize.html +2 -0
  42. package/components/datepicker/demo/customize.js +19 -0
  43. package/components/datepicker/demo/customize.md +56 -0
  44. package/components/datepicker/demo/customize.min.js +36147 -0
  45. package/components/datepicker/demo/design.md +3 -1
  46. package/components/datepicker/demo/index.js +5 -1
  47. package/components/datepicker/demo/index.md +104 -15
  48. package/components/datepicker/demo/index.min.js +2485 -261
  49. package/components/datepicker/demo/keyboard-behavior.md +201 -2
  50. package/components/datepicker/demo/pages.json +1 -1
  51. package/components/datepicker/demo/styles.min.css +1 -1
  52. package/components/datepicker/demo/voiceover.md +21 -12
  53. package/components/datepicker/demo/why-datepicker.html +57 -0
  54. package/components/datepicker/demo/why-datepicker.md +133 -0
  55. package/components/datepicker/dist/index.js +2348 -211
  56. package/components/datepicker/dist/registered.js +2348 -211
  57. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +113 -13
  58. package/components/datepicker/dist/src/auro-calendar-month.d.ts +38 -1
  59. package/components/datepicker/dist/src/auro-calendar.d.ts +258 -0
  60. package/components/datepicker/dist/src/auro-datepicker.d.ts +141 -41
  61. package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
  62. package/components/dropdown/demo/accessibility.md +11 -0
  63. package/components/dropdown/demo/api.md +1 -0
  64. package/components/dropdown/demo/css-only.html +57 -0
  65. package/components/dropdown/demo/css-only.md +219 -0
  66. package/components/dropdown/demo/customize.md +3 -0
  67. package/components/dropdown/demo/customize.min.js +239 -13
  68. package/components/dropdown/demo/getting-started.min.js +239 -13
  69. package/components/dropdown/demo/index.min.js +239 -13
  70. package/components/dropdown/demo/keyboard-behavior.md +1 -0
  71. package/components/dropdown/demo/pages.json +1 -1
  72. package/components/dropdown/demo/styles.min.css +1 -1
  73. package/components/dropdown/demo/why-dropdown.html +57 -0
  74. package/components/dropdown/demo/why-dropdown.md +97 -0
  75. package/components/dropdown/dist/auro-dropdown.d.ts +34 -1
  76. package/components/dropdown/dist/index.js +239 -13
  77. package/components/dropdown/dist/registered.js +239 -13
  78. package/components/form/demo/css-only.html +57 -0
  79. package/components/form/demo/css-only.md +156 -0
  80. package/components/form/demo/customize.min.js +3098 -259
  81. package/components/form/demo/getting-started.min.js +3098 -259
  82. package/components/form/demo/index.min.js +3098 -259
  83. package/components/form/demo/pages.json +1 -1
  84. package/components/form/demo/registerDemoDeps.min.js +3098 -259
  85. package/components/form/demo/styles.min.css +1 -1
  86. package/components/form/demo/why-form.html +57 -0
  87. package/components/form/demo/why-form.md +101 -0
  88. package/components/input/demo/css-only.html +57 -0
  89. package/components/input/demo/css-only.md +199 -0
  90. package/components/input/demo/customize.min.js +1 -1
  91. package/components/input/demo/getting-started.min.js +1 -1
  92. package/components/input/demo/index.min.js +1 -1
  93. package/components/input/demo/pages.json +1 -1
  94. package/components/input/demo/styles.min.css +1 -1
  95. package/components/input/demo/why-input.html +57 -0
  96. package/components/input/demo/why-input.md +121 -0
  97. package/components/input/dist/index.js +1 -1
  98. package/components/input/dist/registered.js +1 -1
  99. package/components/menu/demo/css-only.html +57 -0
  100. package/components/menu/demo/css-only.md +166 -0
  101. package/components/menu/demo/pages.json +1 -1
  102. package/components/menu/demo/styles.min.css +1 -1
  103. package/components/menu/demo/why-menu.html +57 -0
  104. package/components/menu/demo/why-menu.md +104 -0
  105. package/components/radio/demo/css-only.html +57 -0
  106. package/components/radio/demo/css-only.md +151 -0
  107. package/components/radio/demo/customize.min.js +1764 -0
  108. package/components/radio/demo/demo-support.min.js +55807 -0
  109. package/components/radio/demo/getting-started.js +1 -1
  110. package/components/radio/demo/getting-started.md +1 -1
  111. package/components/radio/demo/getting-started.min.js +1783 -0
  112. package/components/radio/demo/index.min.js +1 -1
  113. package/components/radio/demo/pages.json +1 -1
  114. package/components/radio/demo/styles.min.css +1 -1
  115. package/components/radio/demo/why-radio.html +57 -0
  116. package/components/radio/demo/why-radio.md +92 -0
  117. package/components/radio/dist/index.js +1 -1
  118. package/components/radio/dist/registered.js +1 -1
  119. package/components/select/demo/css-only.html +57 -0
  120. package/components/select/demo/css-only.md +203 -0
  121. package/components/select/demo/customize.min.js +249 -15
  122. package/components/select/demo/getting-started.min.js +249 -15
  123. package/components/select/demo/index.min.js +249 -15
  124. package/components/select/demo/keyboard-behavior.md +1 -0
  125. package/components/select/demo/pages.json +1 -1
  126. package/components/select/demo/styles.min.css +1 -1
  127. package/components/select/demo/why-select.html +57 -0
  128. package/components/select/demo/why-select.md +128 -0
  129. package/components/select/dist/index.js +249 -15
  130. package/components/select/dist/registered.js +249 -15
  131. package/custom-elements.json +1171 -92
  132. package/package.json +8 -8
@@ -0,0 +1,1764 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n$3(o,t,s$3)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b$1={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b$1){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.2");
13
+
14
+ /**
15
+ * @license
16
+ * Copyright 2017 Google LLC
17
+ * SPDX-License-Identifier: BSD-3-Clause
18
+ */
19
+ const t$1=globalThis,i$3=t=>t,s$2=t$1.trustedTypes,e$2=s$2?s$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",o$3=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$3,r=`<${n$1}>`,l$1=document,c=()=>l$1.createComment(""),a$1=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$1=Array.isArray,d=t=>u$1(t)||"function"==typeof t?.[Symbol.iterator],f="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l$1.createTreeWalker(l$1,129);function V(t,i){if(!u$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$2?e$2.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o$3+x):s+o$3+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t);}else t.startsWith(o$3)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o$3),i=t.length-1;if(i>0){r.textContent=s$2?s$2.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c());}}}else if(8===r.nodeType)if(r.data===n$1)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$3,t+1));)d.push({type:7,index:l}),t+=o$3.length-1;}l++;}}static createElement(t,i){const s=l$1.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a$1(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l$1).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l$1,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a$1(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(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!==A&&a$1(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$1.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u$1(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$3(t).nextSibling;i$3(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M(this,t,i,0),o=!a$1(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a$1(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class I extends H{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class L extends H{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&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 Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t);}}const B=t$1.litHtmlPolyfillSupport;B?.(S,k),(t$1.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{});}return h._$AI(t),h};
20
+
21
+ /**
22
+ * @license
23
+ * Copyright 2017 Google LLC
24
+ * SPDX-License-Identifier: BSD-3-Clause
25
+ */const s$1=globalThis;let i$2 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.2");
26
+
27
+ /**
28
+ * @license
29
+ * Copyright 2017 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */
32
+ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
33
+
34
+ /**
35
+ * @license
36
+ * Copyright 2018 Google LLC
37
+ * SPDX-License-Identifier: BSD-3-Clause
38
+ */const e=e$1(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter(s=>t[s]).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return E}});
39
+
40
+ /**
41
+ * @license
42
+ * Copyright 2018 Google LLC
43
+ * SPDX-License-Identifier: BSD-3-Clause
44
+ */const o$1=o=>o??A;
45
+
46
+ var focusVisible_min = {exports: {}};
47
+
48
+ var hasRequiredFocusVisible_min;
49
+
50
+ function requireFocusVisible_min () {
51
+ if (hasRequiredFocusVisible_min) return focusVisible_min.exports;
52
+ hasRequiredFocusVisible_min = 1;
53
+ (function (module, exports) {
54
+ !function(e,t){t();}(0,function(){function e(e){var t=true,n=false,o=null,d={text:true,search:true,url:true,tel:true,email:true,password:true,number:true,date:true,month:true,week:true,time:true,datetime:true,"datetime-local":true};function i(e){return !!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""));}function u(e){t=false;}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c);}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=false,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c));}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=true);},true),document.addEventListener("mousedown",u,true),document.addEventListener("pointerdown",u,true),document.addEventListener("touchstart",u,true),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=true),a());},true),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target);},true),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=true,window.clearTimeout(o),o=window.setTimeout(function(){n=false;},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")));},true),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""));}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready");}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",false,false,{});}window.dispatchEvent(t);}"undefined"!=typeof document&&e(document);});
55
+
56
+ } ());
57
+ return focusVisible_min.exports;
58
+ }
59
+
60
+ requireFocusVisible_min();
61
+
62
+ var styleCss$2 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;outline:unset}:host(.focus-visible) .displayFlex .inputGroup:focus-within{width:auto}:host(.focus-visible) .rdoGroup{display:block;padding-right:var(--ds-size-100, 0.5rem);outline:3px solid transparent}:host(.focus-visible) .rdoGroup .label:after{outline-width:1px;outline-style:solid}.rdoGroup{position:relative;padding-right:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-75, 0.375rem)}.rdoGroup:has(:enabled) .label:hover{cursor:pointer}.label{display:block;margin-left:var(--ds-size-300, 1.5rem)}.label:after{position:absolute;z-index:1;top:var(--ds-size-50, 0.25rem);left:var(--ds-size-50, 0.25rem);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));content:"";border-radius:50%;border:1px solid}.slotContent{display:block;margin-left:var(--ds-size-400, 2rem);padding-left:var(--ds-size-100, 0.5rem)}`;
63
+
64
+ var colorCss$2 = i$5`.label{color:var(--ds-auro-radio-label-color)}.label:after{background-color:var(--ds-auro-radio-btn-fill-color);border-color:var(--ds-auro-radio-btn-border-color);box-shadow:inset 0 0 0 3px var(--ds-auro-radio-btn-inset-color);outline-color:var(--ds-auro-radio-btn-border-color);-webkit-tap-highlight-color:var(--ds-auro-radio-tap-color)}:host([checked]){--ds-auro-radio-btn-inset-color: var(--ds-advanced-color-boolean-indicator, #ffffff);--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-istrue, #01426a);--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-istrue, #01426a)}:host([error]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([disabled]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-radio-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([checked][disabled]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host(.focus-visible){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-radio-label-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-radio-btn-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([onDark][checked]),:host([appearance=inverse][checked]){--ds-auro-radio-btn-inset-color: var(--ds-advanced-color-boolean-indicator-inverse, #00274a);--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff);--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff)}:host([onDark][error]),:host([appearance=inverse][error]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][checked][error]),:host([appearance=inverse][checked][error]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-radio-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][checked][disabled]),:host([appearance=inverse][checked][disabled]){--ds-auro-radio-btn-fill-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark].focus-visible),:host([appearance=inverse].focus-visible){--ds-auro-radio-btn-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
65
+
66
+ var tokenCss = i$5`:host{--ds-auro-radio-group-label-color: inherit;--ds-auro-radio-btn-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-radio-btn-fill-color: transparent;--ds-auro-radio-btn-inset-color: transparent;--ds-auro-radio-label-color: inherit;--ds-auro-radio-tap-color: transparent}`;
67
+
68
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
69
+ // See LICENSE in the project root for license information.
70
+
71
+ // ---------------------------------------------------------------------
72
+
73
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
74
+
75
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
76
+
77
+ /* eslint-disable jsdoc/require-param */
78
+
79
+ /**
80
+ * This will register a new custom element with the browser.
81
+ * @param {String} name - The name of the custom element.
82
+ * @param {Object} componentClass - The class to register as a custom element.
83
+ * @returns {void}
84
+ */
85
+ registerComponent(name, componentClass) {
86
+ if (!customElements.get(name)) {
87
+ customElements.define(name, class extends componentClass {});
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Finds and returns the closest HTML Element based on a selector.
93
+ * @returns {void}
94
+ */
95
+ closestElement(
96
+ selector, // selector like in .closest()
97
+ base = this, // extra functionality to skip a parent
98
+ __Closest = (el, found = el && el.closest(selector)) =>
99
+ !el || el === document || el === window
100
+ ? null // standard .closest() returns null for non-found selectors also
101
+ : found
102
+ ? found // found a selector INside this element
103
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
104
+ ) {
105
+ return __Closest(base);
106
+ }
107
+ /* eslint-enable jsdoc/require-param */
108
+
109
+ /**
110
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
111
+ * @param {Object} elem - The element to check.
112
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
113
+ * @returns {void}
114
+ */
115
+ handleComponentTagRename(elem, tagName) {
116
+ const tag = tagName.toLowerCase();
117
+ const elemTag = elem.tagName.toLowerCase();
118
+
119
+ if (elemTag !== tag) {
120
+ elem.setAttribute(tag, true);
121
+ }
122
+ }
123
+
124
+ /**
125
+ * Validates if an element is a specific Auro component.
126
+ * @param {Object} elem - The element to validate.
127
+ * @param {String} tagName - The name of the Auro component to check against.
128
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
129
+ */
130
+ elementMatch(elem, tagName) {
131
+ const tag = tagName.toLowerCase();
132
+ const elemTag = elem.tagName.toLowerCase();
133
+
134
+ return elemTag === tag || elem.hasAttribute(tag);
135
+ }
136
+
137
+ /**
138
+ * Gets the text content of a named slot.
139
+ * @returns {String}
140
+ * @private
141
+ */
142
+ getSlotText(elem, name) {
143
+ const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
144
+ const nodes = slot?.assignedNodes({ flatten: true }) || [];
145
+ const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
146
+
147
+ return text || null;
148
+ }
149
+ };
150
+
151
+ /* eslint-disable max-lines, no-underscore-dangle */
152
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
153
+ // See LICENSE in the project root for license information.
154
+
155
+
156
+ /**
157
+ * The `auro-radio` element is used to a button that allows the user to select one option from a set.
158
+ * @customElement auro-radio
159
+ *
160
+ * @event toggleSelected - Notifies that the component has toggled the checked/selected state.
161
+ * @event {CustomEvent<any>} change - (Deprecated) Notifies when checked value is changed.
162
+ * @event {InputEvent} input - Notifies when when checked value is changed by user's interface.
163
+ * @event focusSelected - Notifies that the component has gained focus.
164
+ * @event auroRadio-blur - Notifies that the component has lost focus.
165
+ * @event resetRadio - Notifies that the component has reset the checked/selected state.
166
+ * @event auroRadio-selected - Notifies that the component has been marked as checked/selected.
167
+ *
168
+ * @csspart radio - apply css to a specific checkbox.
169
+ * @csspart radio-input - apply css to a specific checkbox's input.
170
+ * @csspart radio-label - apply css to a specific checkbox's label.
171
+ */
172
+ class AuroRadio extends i$2 {
173
+ constructor() {
174
+ super();
175
+
176
+ this._initializeDefaults();
177
+ }
178
+
179
+ _initializeDefaults() {
180
+ this.appearance = "default";
181
+ this.checked = false;
182
+ this.disabled = false;
183
+ this.required = false;
184
+ this.error = false;
185
+ this.onDark = false;
186
+ this.touched = false;
187
+ this.role = 'radio';
188
+
189
+ /**
190
+ * @private
191
+ */
192
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
193
+ }
194
+
195
+ static get styles() {
196
+ return [
197
+ styleCss$2,
198
+ colorCss$2,
199
+ tokenCss
200
+ ];
201
+ }
202
+
203
+ // function to define props used within the scope of this component
204
+ static get properties() {
205
+ return {
206
+
207
+ /**
208
+ * Defines whether the component will be on lighter or darker backgrounds.
209
+ * @type {'default' | 'inverse'}
210
+ * @default 'default'
211
+ */
212
+ appearance: {
213
+ type: String,
214
+ reflect: true
215
+ },
216
+
217
+ /**
218
+ * If set to true, the radio button will be filled.
219
+ */
220
+ checked: {
221
+ type: Boolean,
222
+ reflect: true
223
+ },
224
+
225
+ /**
226
+ * If set to true, the radio button will be non-clickable.
227
+ */
228
+ disabled: {
229
+ type: Boolean,
230
+ reflect: true
231
+ },
232
+
233
+ /**
234
+ * If set to true, sets an error state on the radio button.
235
+ */
236
+ error: {
237
+ type: Boolean,
238
+ reflect: true
239
+ },
240
+
241
+ /**
242
+ * The id global attribute defines an identifier (ID) which must be unique in the whole document.
243
+ */
244
+ id: {
245
+ type: String,
246
+ reflect: true
247
+ },
248
+
249
+ /**
250
+ * ID for input node.
251
+ * @private
252
+ */
253
+ inputId: {
254
+ type: String,
255
+ reflect: false,
256
+ attribute: false
257
+ },
258
+
259
+ /**
260
+ * Label for the radio button.
261
+ */
262
+ label: { type: String },
263
+
264
+ /**
265
+ * Name for the radio button group.
266
+ */
267
+ name: { type: String },
268
+
269
+ /**
270
+ * DEPRECATED - use `appearance="inverse"` instead.
271
+ */
272
+ onDark: {
273
+ type: Boolean,
274
+ reflect: true
275
+ },
276
+
277
+ /**
278
+ * Defines element as required.
279
+ */
280
+ required: {
281
+ type: Boolean,
282
+ reflect: true
283
+ },
284
+
285
+ /**
286
+ * Don't add to api.md since changing of this can easily break a11y.
287
+ * @private
288
+ */
289
+ role: {
290
+ type: String,
291
+ reflect: true
292
+ },
293
+
294
+ /**
295
+ * Whether or not the radio button has been touched by the user.
296
+ * @private
297
+ */
298
+ touched: {
299
+ type: Boolean,
300
+ reflect: true,
301
+ attribute: false
302
+ },
303
+
304
+ /**
305
+ * The value of the radio button.
306
+ */
307
+ value: { type: String }
308
+ };
309
+ }
310
+
311
+ /**
312
+ * This will register this element with the browser.
313
+ * @param {string} [name="auro-radio"] - The name of the element that you want to register.
314
+ *
315
+ * @example
316
+ * AuroRadio.register("custom-radio") // This will resgiter this element to <custom-radio/>
317
+ *
318
+ */
319
+ static register(name = "auro-radio") {
320
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroRadio);
321
+ }
322
+
323
+ /**
324
+ * Method for handling content when change event is fired.
325
+ * @private
326
+ * @param {Event} event - The trigger event tied to this function.
327
+ * @returns {void}
328
+ */
329
+ handleChange(event) {
330
+ this.checked = event.target.checked;
331
+ const customEvent = new CustomEvent(event.type, event);
332
+ this.dispatchEvent(customEvent);
333
+ }
334
+
335
+ /**
336
+ * Method for handling content when input event is fired.
337
+ * @private
338
+ * @param {Event} event - The trigger event tied to this function.
339
+ * @returns {void}
340
+ */
341
+ handleInput(event) {
342
+ this.checked = event.target.checked;
343
+ this.dispatchEvent(new CustomEvent('toggleSelected', {
344
+ bubbles: true,
345
+ composed: true,
346
+ target: this
347
+ }));
348
+ }
349
+
350
+ /**
351
+ * Method for handling focus event.
352
+ * @private
353
+ * @param {Event} event - The trigger event tied to this function.
354
+ * @returns {void}
355
+ */
356
+ handleFocus(event) {
357
+ this.touched = true;
358
+ this.dispatchEvent(new CustomEvent('focusSelected', {
359
+ bubbles: true,
360
+ composed: true,
361
+ target: event.target
362
+ }));
363
+ }
364
+
365
+ /**
366
+ * Method for handling blur event.
367
+ * @private
368
+ * @param {Event} event - The trigger event tied to this function.
369
+ * @returns {void}
370
+ */
371
+ handleBlur(event) {
372
+ this.dispatchEvent(new CustomEvent('auroRadio-blur', {
373
+ bubbles: true,
374
+ composed: true,
375
+ target: event.target
376
+ }));
377
+ }
378
+
379
+ /**
380
+ * Resets component to initial state.
381
+ * @returns {void}
382
+ */
383
+ reset() {
384
+ this.touched = false;
385
+ this.checked = false;
386
+ this.error = false;
387
+ }
388
+
389
+ updated(changedProperties) {
390
+ if (changedProperties.has('required')) {
391
+ this.setAttribute('aria-required', this.isRequired(this.required));
392
+ }
393
+
394
+ if (changedProperties.has('disabled')) {
395
+ if (this.disabled) {
396
+ this.setAttribute('aria-disabled', '');
397
+ } else {
398
+ this.removeAttribute('aria-disabled');
399
+ }
400
+ }
401
+
402
+ if (changedProperties.has('checked')) {
403
+ this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
404
+ // eslint-disable-next-line no-magic-numbers
405
+ this.setAttribute('tabindex', this.checked ? 0 : -1);
406
+
407
+ this.dispatchEvent(new CustomEvent('resetRadio', {
408
+ bubbles: true,
409
+ composed: true
410
+ }));
411
+
412
+ if (this.checked) {
413
+ this.dispatchEvent(new CustomEvent('auroRadio-selected', {
414
+ bubbles: true,
415
+ composed: true
416
+ }));
417
+ }
418
+ }
419
+ }
420
+
421
+ /**
422
+ * Method for handling passing the required status to aria.
423
+ * @private
424
+ * @param {Boolean} required - The element's required attribute.
425
+ * @returns {void}
426
+ */
427
+ isRequired(required) {
428
+ if (required) {
429
+ return 'true';
430
+ }
431
+
432
+ return 'false';
433
+ }
434
+
435
+ firstUpdated() {
436
+ // Add the tag name as an attribute if it is different than the component name
437
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-radio');
438
+
439
+ this.addEventListener('focus', this.handleFocus);
440
+ this.addEventListener('blur', this.handleBlur);
441
+
442
+ this.input = this.shadowRoot.querySelector('input');
443
+
444
+ this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
445
+
446
+ this.addEventListener('click', () => {
447
+ this.input.click();
448
+ });
449
+ }
450
+
451
+ // function that renders the HTML and CSS into the scope of the component
452
+ render() {
453
+ const labelClasses = {
454
+ 'ods-inputLabel': true,
455
+ 'ods-inputLabel--radio': true,
456
+ 'label': true,
457
+ 'label--rdo': true,
458
+ 'errorBorder': this.error
459
+ };
460
+
461
+ return b`
462
+ <div class="ods-inputGroup rdoGroup body-default" part="radio">
463
+ <input
464
+ class="util_displayHidden ods-inputOption rdo--input"
465
+ part="radio-input"
466
+ @input="${this.handleInput}"
467
+ @change="${this.handleChange}"
468
+ ?disabled="${this.disabled}"
469
+ .checked="${this.checked}"
470
+ id="${this.inputId}"
471
+ name="${o$1(this.name)}"
472
+ type="radio"
473
+ .value="${this.value}"
474
+ aria-hidden="true"
475
+ tabindex="-1"
476
+ />
477
+
478
+ <label for="${this.inputId}" class="${e(labelClasses)}" part="radio-label">
479
+ <slot>${this.label}</slot>
480
+ </label>
481
+ </div>
482
+ <slot name="content" class="slotContent"></slot>
483
+ `;
484
+ }
485
+ }
486
+
487
+ /**
488
+ * @license
489
+ * Copyright 2020 Google LLC
490
+ * SPDX-License-Identifier: BSD-3-Clause
491
+ */
492
+ const a=Symbol.for(""),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(b);
493
+
494
+ var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}fieldset{all:unset}.displayFlex legend+slot{display:flex;white-space:nowrap}legend{margin-bottom:var(--ds-size-150, 0.75rem)}.hidden{display:none}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
495
+
496
+ var colorCss$1 = i$5`:host legend{color:var(--ds-auro-radio-group-label-color)}:host([disabled]){--ds-auro-radio-group-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]),:host([appearance=inverse]){--ds-auro-radio-group-label-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-radio-group-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
497
+
498
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
499
+ // See LICENSE in the project root for license information.
500
+
501
+
502
+ class AuroFormValidation {
503
+
504
+ constructor() {
505
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
506
+ }
507
+
508
+ /**
509
+ * Resets the element to its initial state.
510
+ * @private
511
+ * @param {object} elem - HTML element to reset.
512
+ * @returns {void}
513
+ */
514
+ reset(elem) {
515
+ elem.validity = undefined;
516
+ elem.value = undefined;
517
+ elem.touched = false;
518
+
519
+ // Resets the second value of the datepicker in range state
520
+ if (elem.valueEnd) {
521
+ elem.valueEnd = undefined;
522
+ }
523
+
524
+ // Resets selected option of element
525
+ if (elem.optionSelected) {
526
+ elem.optionSelected = undefined;
527
+ }
528
+
529
+ // Runs validation to handle error attribute
530
+ this.validate(elem);
531
+ }
532
+
533
+ /**
534
+ * Validates the attributes of a given element based on predefined validation rules.
535
+ *
536
+ * @param {HTMLElement} elem - The element to be validated.
537
+ * @returns {void}
538
+ *
539
+ * @example
540
+ * // Assuming `inputElement` is a reference to an input element in the DOM
541
+ * validateElementAttributes(inputElement);
542
+ *
543
+ * The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
544
+ * If a validation rule is violated, it sets the element's validity state and error message accordingly.
545
+ *
546
+ * Validation rules:
547
+ * - input:
548
+ * - length:
549
+ * - tooShort: Checks if the value length is less than the minimum length.
550
+ * - tooLong: Checks if the value length exceeds the maximum length.
551
+ * - pattern:
552
+ * - patternMismatch: Checks if the value does not match the specified pattern.
553
+ * - counter:
554
+ * - range:
555
+ * - rangeOverflow: Checks if the value exceeds the maximum value.
556
+ * - rangeUnderflow: Checks if the value is less than the minimum value.
557
+ */
558
+ validateElementAttributes(elem) {
559
+ const validationRules = {
560
+ input: {
561
+ length: [
562
+ {
563
+ check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
564
+ validity: 'tooShort',
565
+ message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
566
+ },
567
+ {
568
+ check: (e) => e.value?.length > e.maxLength,
569
+ validity: 'tooLong',
570
+ message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
571
+ }
572
+ ],
573
+ pattern: [
574
+ {
575
+ check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
576
+ validity: 'patternMismatch',
577
+ message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
578
+ }
579
+ ]
580
+ },
581
+ counter: {
582
+ range: [
583
+ {
584
+ check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
585
+ validity: 'rangeOverflow',
586
+ message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
587
+ },
588
+ {
589
+ check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
590
+ validity: 'rangeUnderflow',
591
+ message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
592
+ }
593
+ ]
594
+ },
595
+ combobox: {
596
+ filter: [
597
+ {
598
+ check: (e) => {
599
+
600
+ // Guard Clause: If the behavior is not 'filter', skip this validation
601
+ if (e.behavior !== 'filter') return false;
602
+
603
+ // Get the current input value
604
+ const currentInputValue = e.input.value;
605
+
606
+ // Skip validation if the input has no value
607
+ if (!currentInputValue) return false;
608
+
609
+ /**
610
+ * Let's check if the option selected and combobox value match.
611
+ */
612
+
613
+ // Guard Clause: If there is no option selected fail the validation
614
+ if (!e.optionSelected) return true;
615
+
616
+ // Guard Clause: If there is no value fail the validation
617
+ if (!e.value) return true;
618
+
619
+ // Guard Clause: If the selected option's value doesn't match the input value fail the validation
620
+ if (e.optionSelected.value !== e.value) return true;
621
+
622
+ /**
623
+ * Now let's make sure the user hasn't change the value in the input after selecting an option.
624
+ * This is to make sure there's no user confusion if they select an option but then change the value to something else.
625
+ */
626
+
627
+ // Guard Clause: If the current input value doesn't match the option selected value fail the validation
628
+ if (currentInputValue && currentInputValue !== e.optionSelected.value) return true;
629
+
630
+ // Guard Clause: If the current input value doesn't match the combobox value fail the validation
631
+ if (currentInputValue && currentInputValue !== e.value) return true;
632
+
633
+ // If all the checks passed the validation passes
634
+ return false;
635
+ },
636
+ validity: 'valueMissing',
637
+ message: e => e.getAttribute('setCustomValidityValueMissingFilter') || e.setCustomValidity || ''
638
+ }
639
+ ]
640
+ }
641
+ };
642
+
643
+ let elementType;
644
+ if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
645
+ elementType = 'input';
646
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
647
+ elementType = 'counter';
648
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
649
+ elementType = 'combobox';
650
+ }
651
+
652
+ if (elementType) {
653
+ const rules = validationRules[elementType];
654
+
655
+ if (rules) {
656
+ Object.values(rules).flat().forEach(rule => {
657
+ if (rule.check(elem)) {
658
+ elem.validity = rule.validity;
659
+ elem.errorMessage = rule.message(elem);
660
+ }
661
+ });
662
+ }
663
+ }
664
+ }
665
+
666
+ /**
667
+ * Determines the validity state of the element based on the type attribute.
668
+ * @private
669
+ * @param {object} elem - HTML element to validate.
670
+ * @returns {void}
671
+ */
672
+ validateType(elem) {
673
+ if (elem.hasAttribute('type')) {
674
+ if (elem.type === 'email') {
675
+ const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
676
+
677
+ if (!elem.value.match(emailRegex)) {
678
+ elem.validity = 'patternMismatch';
679
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
680
+ return;
681
+ }
682
+ } else if (elem.type === 'credit-card') {
683
+ if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
684
+ elem.validity = 'tooShort';
685
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
686
+ return;
687
+ }
688
+ } else if (elem.type === 'number') {
689
+ if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
690
+ elem.validity = 'rangeOverflow';
691
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
692
+ return;
693
+ }
694
+
695
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
696
+ elem.validity = 'rangeUnderflow';
697
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
698
+ return;
699
+ }
700
+ } else if (elem.type === 'date' && elem.value?.length > 0) {
701
+
702
+ // Guard Clause: if the value is too short
703
+ if (elem.value?.length < elem.lengthForType) {
704
+
705
+ elem.validity = 'tooShort';
706
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
707
+ return;
708
+ }
709
+
710
+ // Guard Clause: If the value is too long for the type
711
+ if (elem.value?.length > elem.lengthForType) {
712
+
713
+ elem.validity = 'tooLong';
714
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
715
+ return;
716
+ }
717
+
718
+ // Validate that the date passed was the correct format and is a valid date
719
+ if (elem.value && !elem.valueObject) {
720
+ elem.validity = 'patternMismatch';
721
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
722
+ return;
723
+ }
724
+
725
+ // Perform the rest of the validation
726
+
727
+ // // Validate max date
728
+ if (elem.max?.length === elem.lengthForType) {
729
+
730
+ if (elem.valueObject > elem.maxObject) {
731
+ elem.validity = 'rangeOverflow';
732
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
733
+ return;
734
+ }
735
+ }
736
+
737
+ // Validate min date
738
+ if (elem.min?.length === elem.lengthForType) {
739
+ if (elem.valueObject < elem.minObject) {
740
+ elem.validity = 'rangeUnderflow';
741
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
742
+ return;
743
+ }
744
+ }
745
+ }
746
+ }
747
+ }
748
+
749
+ /**
750
+ * Determines the validity state of the element.
751
+ * @param {object} elem - HTML element to validate.
752
+ * @param {boolean} force - Boolean that forces validation to run.
753
+ * @returns {void}
754
+ */
755
+ validate(elem, force) {
756
+ this.getInputElements(elem);
757
+ this.getAuroInputs(elem);
758
+
759
+ // Check if validation should run
760
+ let validationShouldRun =
761
+
762
+ // If the validation was forced
763
+ force ||
764
+
765
+ // If the validation should run on input
766
+ elem.validateOnInput ||
767
+
768
+ // State-based checks
769
+ (
770
+ // Element is not currently focused
771
+ !elem.contains(document.activeElement) && // native input is not focused directly
772
+ !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
773
+
774
+ // And element has been touched or is untouched but has a value
775
+ ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
776
+ );
777
+
778
+ if (elem.hasAttribute('error')) {
779
+ elem.validity = 'customError';
780
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
781
+ validationShouldRun = false;
782
+ } else if (validationShouldRun) {
783
+ elem.validity = 'valid';
784
+ elem.errorMessage = '';
785
+
786
+ /**
787
+ * Only validate once we interact with the datepicker
788
+ * elem.value === undefined is the initial state pre-interaction.
789
+ *
790
+ * The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
791
+ */
792
+
793
+ let hasValue = false;
794
+
795
+ // Check string for having a value
796
+ if (typeof elem.value === "string") {
797
+ hasValue = elem.value && elem.value.length > 0;
798
+ }
799
+
800
+ if (typeof elem.value === "boolean") {
801
+ hasValue = elem.value || elem.value === false;
802
+ }
803
+
804
+ if (typeof elem.value === "number") {
805
+ hasValue = !isNaN(elem.value) && elem.value !== null;
806
+ }
807
+
808
+ // Check array value types for having a value
809
+ if (Array.isArray(elem.value)) {
810
+ hasValue = Boolean(
811
+ elem.value.length > 0 &&
812
+ elem.value.some((value) => typeof value === "string" && value.length > 0)
813
+ );
814
+ }
815
+
816
+ // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
817
+ if (this.auroInputElements?.length === 2) {
818
+ if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
819
+ hasValue = false;
820
+ }
821
+ }
822
+
823
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
824
+
825
+ if (isCombobox) {
826
+
827
+ if (!elem.persistInput || elem.behavior === "filter") {
828
+ hasValue = elem.input.value?.length > 0;
829
+ }
830
+ }
831
+
832
+ if (!hasValue && elem.required && (force || elem.touched)) {
833
+ elem.validity = 'valueMissing';
834
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
835
+ } else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
836
+ this.validateType(elem);
837
+ this.validateElementAttributes(elem);
838
+ } else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
839
+ this.validateElementAttributes(elem);
840
+ } else if (isCombobox) {
841
+ this.validateElementAttributes(elem);
842
+
843
+ // Don't run extra validation for cases where the combobox is not being used as a filter
844
+ validationShouldRun = elem.behavior !== 'filter';
845
+ }
846
+ }
847
+
848
+ if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing" && elem.validity !== "customError") {
849
+
850
+ const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
851
+
852
+ // Don't reset combobox validity if persistInput is set since we can't use the input value to validate
853
+ if (!isCombobox || isCombobox && !elem.persistInput) {
854
+
855
+ // run validation on all inputs since we're going to use them to set the validity of this component
856
+ this.auroInputElements.forEach(input => input.validate(force));
857
+
858
+ // Reset element validity to the validity of the input
859
+ elem.validity = this.auroInputElements[0].validity;
860
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
861
+ }
862
+
863
+ // multiple input in one components (datepicker)
864
+ // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
865
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
866
+ elem.validity = this.auroInputElements[1].validity;
867
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
868
+ }
869
+ }
870
+
871
+ if (validationShouldRun || elem.hasAttribute('error')) {
872
+ // Use the validity message override if it is declared
873
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
874
+ elem.errorMessage = elem.ValidityMessageOverride;
875
+ }
876
+
877
+ this.getErrorMessage(elem);
878
+ }
879
+
880
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
881
+ bubbles: true,
882
+ composed: true,
883
+ detail: {
884
+ validity: elem.validity,
885
+ message: elem.errorMessage
886
+ }
887
+ }));
888
+ }
889
+
890
+ /**
891
+ * Gets all the HTML5 `inputs` in the element shadow DOM.
892
+ * @private
893
+ * @param {object} elem - HTML element to validate.
894
+ * @returns {void}
895
+ */
896
+ getInputElements(elem) {
897
+ this.inputElements = elem.renderRoot.querySelectorAll('input');
898
+ }
899
+
900
+ /**
901
+ * Gets all the `auro-inputs` in the element shadow DOM.
902
+ * @private
903
+ * @param {object} elem - HTML element to validate.
904
+ * @returns {void}
905
+ */
906
+ getAuroInputs(elem) {
907
+ this.auroInputElements = elem.shadowRoot.querySelectorAll('auro-input, [auro-input]');
908
+ }
909
+
910
+ /**
911
+ * Return appropriate error message.
912
+ * @private
913
+ * @param {object} elem - HTML element to validate.
914
+ * @returns {void}
915
+ */
916
+ getErrorMessage(elem) {
917
+ if (elem.validity !== 'valid') {
918
+ if (elem.setCustomValidity) {
919
+ elem.errorMessage = elem.setCustomValidity;
920
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
921
+ const input = elem.renderRoot.querySelector('input');
922
+
923
+ if (input.validationMessage.length > 0) {
924
+ elem.errorMessage = input.validationMessage;
925
+ }
926
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-combobox') && elem.errorMessage === '') {
927
+ elem.errorMessage = elem.input?.inputElement?.validationMessage;
928
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
929
+ const firstInput = this.inputElements[0];
930
+
931
+ if (firstInput.validationMessage.length > 0) {
932
+ elem.errorMessage = firstInput.validationMessage;
933
+ } else if (this.inputElements?.length === 2) {
934
+ const secondInput = this.inputElements[1];
935
+
936
+ if (secondInput.validationMessage.length > 0) {
937
+ elem.errorMessage = secondInput.validationMessage;
938
+ }
939
+ }
940
+ }
941
+ } else {
942
+ elem.errorMessage = '';
943
+ }
944
+ }
945
+ }
946
+
947
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
948
+ // See LICENSE in the project root for license information.
949
+
950
+
951
+ class AuroDependencyVersioning {
952
+
953
+ /**
954
+ * Generates a unique string to be used for child auro element naming.
955
+ * @private
956
+ * @param {string} baseName - Defines the first part of the unique element name.
957
+ * @param {string} version - Version of the component that will be appended to the baseName.
958
+ * @returns {string} - Unique string to be used for naming.
959
+ */
960
+ generateElementName(baseName, version) {
961
+ let result = baseName;
962
+
963
+ result += '-';
964
+ result += version.replace(/[.]/g, '_');
965
+
966
+ return result;
967
+ }
968
+
969
+ /**
970
+ * Generates a unique string to be used for child auro element naming.
971
+ * @param {string} baseName - Defines the first part of the unique element name.
972
+ * @param {string} version - Version of the component that will be appended to the baseName.
973
+ * @returns {string} - Unique string to be used for naming.
974
+ */
975
+ generateTag(baseName, version, tagClass) {
976
+ const elementName = this.generateElementName(baseName, version);
977
+ const tag = i`${s(elementName)}`;
978
+
979
+ if (!customElements.get(elementName)) {
980
+ customElements.define(elementName, class extends tagClass {});
981
+ }
982
+
983
+ return tag;
984
+ }
985
+ }
986
+
987
+ var colorCss = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]),:host([appearance=inverse]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]),:host([appearance=inverse][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
988
+
989
+ var styleCss = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
990
+
991
+ var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
992
+
993
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
994
+ // See LICENSE in the project root for license information.
995
+
996
+ // ---------------------------------------------------------------------
997
+
998
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
999
+
1000
+ class AuroLibraryRuntimeUtils {
1001
+
1002
+ /* eslint-disable jsdoc/require-param */
1003
+
1004
+ /**
1005
+ * This will register a new custom element with the browser.
1006
+ * @param {String} name - The name of the custom element.
1007
+ * @param {Object} componentClass - The class to register as a custom element.
1008
+ * @returns {void}
1009
+ */
1010
+ registerComponent(name, componentClass) {
1011
+ if (!customElements.get(name)) {
1012
+ customElements.define(name, class extends componentClass {});
1013
+ }
1014
+ }
1015
+
1016
+ /**
1017
+ * Finds and returns the closest HTML Element based on a selector.
1018
+ * @returns {void}
1019
+ */
1020
+ closestElement(
1021
+ selector, // selector like in .closest()
1022
+ base = this, // extra functionality to skip a parent
1023
+ __Closest = (el, found = el && el.closest(selector)) =>
1024
+ !el || el === document || el === window
1025
+ ? null // standard .closest() returns null for non-found selectors also
1026
+ : found
1027
+ ? found // found a selector INside this element
1028
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
1029
+ ) {
1030
+ return __Closest(base);
1031
+ }
1032
+ /* eslint-enable jsdoc/require-param */
1033
+
1034
+ /**
1035
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
1036
+ * @param {Object} elem - The element to check.
1037
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
1038
+ * @returns {void}
1039
+ */
1040
+ handleComponentTagRename(elem, tagName) {
1041
+ const tag = tagName.toLowerCase();
1042
+ const elemTag = elem.tagName.toLowerCase();
1043
+
1044
+ if (elemTag !== tag) {
1045
+ elem.setAttribute(tag, true);
1046
+ }
1047
+ }
1048
+
1049
+ /**
1050
+ * Validates if an element is a specific Auro component.
1051
+ * @param {Object} elem - The element to validate.
1052
+ * @param {String} tagName - The name of the Auro component to check against.
1053
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
1054
+ */
1055
+ elementMatch(elem, tagName) {
1056
+ const tag = tagName.toLowerCase();
1057
+ const elemTag = elem.tagName.toLowerCase();
1058
+
1059
+ return elemTag === tag || elem.hasAttribute(tag);
1060
+ }
1061
+
1062
+ /**
1063
+ * Gets the text content of a named slot.
1064
+ * @returns {String}
1065
+ * @private
1066
+ */
1067
+ getSlotText(elem, name) {
1068
+ const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
1069
+ const nodes = slot?.assignedNodes({ flatten: true }) || [];
1070
+ const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
1071
+
1072
+ return text || null;
1073
+ }
1074
+ }
1075
+
1076
+ // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1077
+ // See LICENSE in the project root for license information.
1078
+
1079
+
1080
+ /**
1081
+ * Displays help text or error messages within form elements - Internal Use Only.
1082
+ */
1083
+ class AuroHelpText extends i$2 {
1084
+
1085
+ constructor() {
1086
+ super();
1087
+
1088
+ this.error = false;
1089
+ this.appearance = "default";
1090
+ this.onDark = false;
1091
+ this.hasTextContent = false;
1092
+
1093
+ AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
1094
+ }
1095
+
1096
+ static get styles() {
1097
+ return [
1098
+ colorCss,
1099
+ styleCss,
1100
+ tokensCss
1101
+ ];
1102
+ }
1103
+
1104
+ // function to define props used within the scope of this component
1105
+ static get properties() {
1106
+ return {
1107
+
1108
+ /**
1109
+ * Defines whether the component will be on lighter or darker backgrounds.
1110
+ * @property {'default', 'inverse'} - The appearance of the help text, either default (for light backgrounds) or inverse (for dark backgrounds).
1111
+ * @default 'default'
1112
+ */
1113
+ appearance: {
1114
+ type: String,
1115
+ reflect: true
1116
+ },
1117
+
1118
+ /**
1119
+ * @private
1120
+ */
1121
+ slotNodes: {
1122
+ type: Boolean,
1123
+ },
1124
+
1125
+ /**
1126
+ * @private
1127
+ */
1128
+ hasTextContent: {
1129
+ type: Boolean,
1130
+ },
1131
+
1132
+ /**
1133
+ * If declared, make font color red.
1134
+ */
1135
+ error: {
1136
+ type: Boolean,
1137
+ reflect: true,
1138
+ },
1139
+
1140
+ /**
1141
+ * DEPRECATED - use `appearance` instead.
1142
+ */
1143
+ onDark: {
1144
+ type: Boolean,
1145
+ reflect: true
1146
+ }
1147
+ };
1148
+ }
1149
+
1150
+ /**
1151
+ * This will register this element with the browser.
1152
+ * @param {string} [name="auro-helptext"] - The name of element that you want to register to.
1153
+ *
1154
+ * @example
1155
+ * AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
1156
+ *
1157
+ */
1158
+ static register(name = "auro-helptext") {
1159
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
1160
+ }
1161
+
1162
+ updated() {
1163
+ this.handleSlotChange();
1164
+ }
1165
+
1166
+ handleSlotChange(event) {
1167
+ if (event) {
1168
+ this.slotNodes = event.target.assignedNodes();
1169
+ }
1170
+
1171
+ this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
1172
+ }
1173
+
1174
+ /**
1175
+ * Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
1176
+ *
1177
+ * @param {NodeList|Array} nodes - The list of nodes to check for content.
1178
+ * @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
1179
+ * @private
1180
+ */
1181
+ checkSlotsForContent(nodes) {
1182
+ if (!nodes) {
1183
+ return false;
1184
+ }
1185
+
1186
+ return nodes.some((node) => {
1187
+ if (node.textContent.trim()) {
1188
+ return true;
1189
+ }
1190
+
1191
+ if (!node.querySelector) {
1192
+ return false;
1193
+ }
1194
+
1195
+ const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
1196
+ if (!nestedSlot) {
1197
+ return false;
1198
+ }
1199
+
1200
+ const nestedSlotNodes = nestedSlot.assignedNodes();
1201
+ return this.checkSlotsForContent(nestedSlotNodes);
1202
+ });
1203
+ }
1204
+
1205
+ // function that renders the HTML and CSS into the scope of the component
1206
+ render() {
1207
+ return b`
1208
+ <div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
1209
+ <slot @slotchange=${this.handleSlotChange}></slot>
1210
+ </div>
1211
+ `;
1212
+ }
1213
+ }
1214
+
1215
+ var formkitVersion = '202606081904';
1216
+
1217
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1218
+ // See LICENSE in the project root for license information.
1219
+ // ---------------------------------------------------------------------
1220
+
1221
+
1222
+ /* eslint no-magic-numbers: ["error", { "ignore": [0, 1, -1] }] */
1223
+ /* eslint-disable max-lines, lit/binding-positions, lit/no-invalid-html, no-underscore-dangle */
1224
+
1225
+ /**
1226
+ * The `auro-radio-group` element is used to group a set `auro-radio` elements.
1227
+ * @customElement auro-radio-group
1228
+ *
1229
+ * @csspart radio-group - Apply css to the fieldset element in the shadow DOM
1230
+ * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1231
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1232
+ * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1233
+ * @event auroFormElement-validated - Notifies that the element has been validated.
1234
+ * @event input - Notifies every time the value prop of the element is changed.
1235
+ */
1236
+
1237
+ class AuroRadioGroup extends i$2 {
1238
+ constructor() {
1239
+ super();
1240
+
1241
+ this._initializeDefaults();
1242
+ }
1243
+
1244
+ _initializeDefaults() {
1245
+ this.appearance = "default";
1246
+ this.disabled = false;
1247
+ this.horizontal = false;
1248
+ this.required = false;
1249
+ this.validity = undefined;
1250
+ this.value = undefined;
1251
+ this.optionSelected = undefined;
1252
+ this.onDark = false;
1253
+ this.touched = false;
1254
+ this.hasLegend = false;
1255
+
1256
+ /**
1257
+ * @private
1258
+ */
1259
+ this.validation = new AuroFormValidation();
1260
+
1261
+ /**
1262
+ * @private
1263
+ */
1264
+ this.index = 0;
1265
+
1266
+ /**
1267
+ * @private
1268
+ */
1269
+ this.max = 3;
1270
+
1271
+ /**
1272
+ * @private
1273
+ */
1274
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
1275
+
1276
+ /**
1277
+ * Generate unique names for dependency components.
1278
+ */
1279
+ const versioning = new AuroDependencyVersioning();
1280
+
1281
+ /**
1282
+ * @private
1283
+ */
1284
+ this.helpTextTag = versioning.generateTag('auro-formkit-radio-helptext', formkitVersion, AuroHelpText);
1285
+ }
1286
+
1287
+ static get styles() {
1288
+ return [
1289
+ styleCss$1,
1290
+ colorCss$1,
1291
+ tokenCss
1292
+ ];
1293
+ }
1294
+
1295
+ static get properties() {
1296
+ return {
1297
+
1298
+ /**
1299
+ * Defines whether the component will be on lighter or darker backgrounds.
1300
+ * @type {'default' | 'inverse'}
1301
+ * @default 'default'
1302
+ */
1303
+ appearance: {
1304
+ type: String,
1305
+ reflect: true
1306
+ },
1307
+
1308
+ /**
1309
+ * If true, all radio buttons will be disabled.
1310
+ */
1311
+ disabled: {
1312
+ type: Boolean,
1313
+ reflect: true
1314
+ },
1315
+
1316
+ /**
1317
+ * If true, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
1318
+ */
1319
+ error: {
1320
+ type: String,
1321
+ reflect: true
1322
+ },
1323
+
1324
+ /**
1325
+ * Indicates whether the legend slot is set or not.
1326
+ * @private
1327
+ */
1328
+ hasLegend: {
1329
+ type: Boolean,
1330
+ reflect: false,
1331
+ attribute: false
1332
+ },
1333
+
1334
+ /**
1335
+ * If true, displays radio buttons horizontally.
1336
+ */
1337
+ horizontal: { type: Boolean },
1338
+
1339
+ /**
1340
+ * If true, disables auto-validation on blur.
1341
+ */
1342
+ noValidate: {
1343
+ type: Boolean,
1344
+ reflect: true
1345
+ },
1346
+
1347
+ /**
1348
+ * DEPRECATED - use `appearance="inverse"` instead.
1349
+ */
1350
+ onDark: {
1351
+ type: Boolean,
1352
+ reflect: true
1353
+ },
1354
+
1355
+ /**
1356
+ * Specifies the current selected radio button.
1357
+ */
1358
+ optionSelected: {
1359
+ type: Object
1360
+ },
1361
+
1362
+ /**
1363
+ * Populates the `required` attribute on the element. Used for client-side validation.
1364
+ */
1365
+ required: {
1366
+ type: Boolean,
1367
+ reflect: true
1368
+ },
1369
+
1370
+ /**
1371
+ * Sets a custom help text message to display for all validityStates.
1372
+ */
1373
+ setCustomValidity: {
1374
+ type: String
1375
+ },
1376
+
1377
+ /**
1378
+ * Custom help text message to display when validity = `customError`.
1379
+ */
1380
+ setCustomValidityCustomError: {
1381
+ type: String
1382
+ },
1383
+
1384
+ /**
1385
+ * Custom help text message to display when validity = `valueMissing`.
1386
+ */
1387
+ setCustomValidityValueMissing: {
1388
+ type: String
1389
+ },
1390
+
1391
+ /**
1392
+ * Indicates whether the radio group is in a dirty state (has been interacted with).
1393
+ * @private
1394
+ */
1395
+ touched: {
1396
+ type: Boolean,
1397
+ reflect: true,
1398
+ attribute: false
1399
+ },
1400
+
1401
+ /**
1402
+ * Specifies the `validityState` this element is in.
1403
+ */
1404
+ validity: {
1405
+ type: String,
1406
+ reflect: true
1407
+ },
1408
+
1409
+ /**
1410
+ * Specifies the current value of the selected radio button.
1411
+ */
1412
+ value: {
1413
+ type: String
1414
+ }
1415
+ };
1416
+ }
1417
+
1418
+ /**
1419
+ * This will register this element with the browser.
1420
+ * @param {string} [name="auro-radio-group"] - The name of the element that you want to register.
1421
+ *
1422
+ * @example
1423
+ * AuroRadioGroup.register("custom-radio-group") // This will register this element to <custom-radio-group/>
1424
+ *
1425
+ */
1426
+ static register(name = "auro-radio-group") {
1427
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroRadioGroup);
1428
+ }
1429
+
1430
+ connectedCallback() {
1431
+ super.connectedCallback();
1432
+ this.handleItems();
1433
+ this.addEventListener('toggleSelected', this.handleToggleSelected);
1434
+ this.addEventListener('keydown', this.handleKeyDown);
1435
+ this.addEventListener('resetRadio', this.resetRadio);
1436
+ this.addEventListener('auroRadio-blur', this.handleRadioBlur);
1437
+ this.addEventListener('auroRadio-selected', this.handleSelection);
1438
+ }
1439
+
1440
+ firstUpdated() {
1441
+ // Add the tag name as an attribute if it is different than the component name
1442
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-radio-group');
1443
+ }
1444
+
1445
+ /**
1446
+ * Method for handling of selection of a radio element.
1447
+ * @private
1448
+ * @param {Event} event - The trigger event tied to this function.
1449
+ * @returns {void}
1450
+ */
1451
+ handleSelection(event) {
1452
+ // specifically check null and undefined in case if the value is false or 0
1453
+ if (event.target.value !== null && event.target.value !== undefined) {
1454
+ this.value = event.target.value;
1455
+ } else {
1456
+ this.value = '';
1457
+ }
1458
+
1459
+ this.optionSelected = event.target;
1460
+
1461
+ this.validation.validate(this, this.optionSelected !== undefined);
1462
+ }
1463
+
1464
+ /**
1465
+ * Method handles radio element blur.
1466
+ * @private
1467
+ * @returns {void}
1468
+ */
1469
+ handleRadioBlur() {
1470
+ this.touched = true;
1471
+ this.validation.validate(this);
1472
+ }
1473
+
1474
+ /**
1475
+ * LitElement lifecycle method. Called after the DOM has been updated.
1476
+ * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
1477
+ * @returns {void}
1478
+ */
1479
+ updated(changedProperties) {
1480
+ if (changedProperties.has('disabled')) {
1481
+ // only change the children if we are making everything disabled, or if we are making everything enabled and there are no individually-disabled radio buttons
1482
+ if (this.disabled || this.items.every((el) => el.disabled)) {
1483
+ this.items.forEach((el) => {
1484
+ el.disabled = this.disabled;
1485
+ });
1486
+ }
1487
+ }
1488
+
1489
+ if (changedProperties.has('value')) {
1490
+ this.dispatchEvent(new CustomEvent('input', {
1491
+ bubbles: true,
1492
+ cancelable: true,
1493
+ composed: true,
1494
+ }));
1495
+ }
1496
+
1497
+ if (changedProperties.has('required')) {
1498
+ this.items.forEach((el) => {
1499
+ el.required = this.required;
1500
+ });
1501
+ }
1502
+
1503
+ if (changedProperties.has('onDark')) {
1504
+ this.items.forEach((el) => {
1505
+ el.onDark = this.onDark;
1506
+ });
1507
+ }
1508
+
1509
+ if (changedProperties.has('appearance')) {
1510
+ this.items.forEach((el) => {
1511
+ el.appearance = this.appearance;
1512
+ });
1513
+ }
1514
+
1515
+ if (changedProperties.has('error')) {
1516
+ this.validate(true);
1517
+ }
1518
+
1519
+ if (changedProperties.has('validity')) {
1520
+ if (this.validity && this.validity !== 'valid') {
1521
+ this.setAttribute('aria-invalid', 'true');
1522
+
1523
+ this.items.forEach((el) => {
1524
+ el.setAttribute('error', true);
1525
+ });
1526
+ } else {
1527
+ this.removeAttribute('aria-invalid');
1528
+
1529
+ this.items.forEach((el) => {
1530
+ el.removeAttribute('error');
1531
+ });
1532
+ }
1533
+ }
1534
+ }
1535
+
1536
+ /**
1537
+ * Resets component to initial state.
1538
+ * @returns {void}
1539
+ */
1540
+ reset() {
1541
+ // Sets first radio button to receive focus during keyboard navigation
1542
+ this.index = 0;
1543
+
1544
+ const buttons = this.querySelectorAll('auro-radio, [auro-radio]');
1545
+
1546
+ buttons.forEach((button) => {
1547
+ button.reset();
1548
+ });
1549
+
1550
+ this.validation.reset(this);
1551
+ }
1552
+
1553
+ /**
1554
+ * Validates value.
1555
+ * @param {boolean} [force=false] - Whether to force validation.
1556
+ */
1557
+ validate(force = false) {
1558
+ this.validation.validate(this, force);
1559
+ }
1560
+
1561
+ /**
1562
+ * Method handles the reset event from a radio element.
1563
+ * @private
1564
+ * @returns {void}
1565
+ */
1566
+ resetRadio() {
1567
+ if (this.items.length === 0) {
1568
+ this.handleItems();
1569
+ }
1570
+ }
1571
+
1572
+ /**
1573
+ * Method for handling the attributes of each radio input.
1574
+ * @private
1575
+ * @returns {void}
1576
+ */
1577
+ handleItems() {
1578
+ this.items = [...this.querySelectorAll(':scope auro-radio, :scope [auro-radio]')];
1579
+ this.initializeIndex();
1580
+
1581
+ if (this.disabled) {
1582
+ this.items.forEach((el) => {
1583
+ el.disabled = this.disabled;
1584
+ });
1585
+ }
1586
+
1587
+ this.items.forEach((el) => {
1588
+ el.required = this.required;
1589
+ el.error = Boolean(this.error);
1590
+ });
1591
+ }
1592
+
1593
+ /**
1594
+ * Method for handling slot content changes.
1595
+ * @private
1596
+ * @returns {void}
1597
+ */
1598
+ handleSlotChange() {
1599
+ this.handleItems();
1600
+ }
1601
+
1602
+ /**
1603
+ * Method for handling legend slot changes.
1604
+ * @private
1605
+ * @returns {void}
1606
+ */
1607
+ handleLegendSlotChange() {
1608
+ const slot = this.shadowRoot.querySelector('slot[name="legend"]');
1609
+ if (slot) {
1610
+ this.hasLegend = slot.assignedNodes().length > 0;
1611
+ }
1612
+ }
1613
+
1614
+ /**
1615
+ * Method for initializing the tab index of the checked radio input.
1616
+ * @private
1617
+ * @returns {void}
1618
+ */
1619
+ initializeIndex() {
1620
+ if (!this.disabled && this.items && this.items.length > 0) {
1621
+ const index = this.items.findIndex((item) => item.hasAttribute('checked') && !item.hasAttribute('disabled'));
1622
+ const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
1623
+
1624
+ this.index = index >= 0 ? index : nextEnabledIndex;
1625
+
1626
+ if (this.items[this.index]) {
1627
+ this.items[this.index].setAttribute('tabindex', 0);
1628
+ } }
1629
+ }
1630
+
1631
+ /**
1632
+ * Method for handling a newly selected radio input.
1633
+ * @private
1634
+ * @param {Event} event - The trigger event tied to this function.
1635
+ * @returns {void}
1636
+ */
1637
+ handleToggleSelected(event) {
1638
+ this.index = this.items.indexOf(event.target);
1639
+
1640
+ this.items.forEach((item) => {
1641
+ item.checked = item === event.target;
1642
+ });
1643
+
1644
+ this.value = event.target.value;
1645
+ this.optionSelected = event.target;
1646
+
1647
+ this.validation.validate(this);
1648
+ }
1649
+
1650
+ /**
1651
+ * Method for selecting a radio input.
1652
+ * @private
1653
+ * @param {Number} index - The value of the element's index attribute.
1654
+ * @returns {void}
1655
+ */
1656
+ selectItem(index) {
1657
+ const sdItem = this.items[index];
1658
+
1659
+ sdItem.click();
1660
+ sdItem.focus();
1661
+ this.index = index;
1662
+ }
1663
+
1664
+ /**
1665
+ * Method for selecting the next radio input.
1666
+ * @private
1667
+ * @param {Number} index - The value of the element's index attribute.
1668
+ * @param {String} moveDirection - Arrow key pressed by user.
1669
+ * @returns {void}
1670
+ */
1671
+ selectNextItem(index, moveDirection) {
1672
+ let currIndex = index;
1673
+
1674
+ for (currIndex; currIndex < this.items.length; moveDirection === "Down" ? currIndex += 1 : currIndex -= 1) {
1675
+ currIndex = currIndex === -1 ? this.items.length - 1 : currIndex;
1676
+ const sdItem = this.items[currIndex];
1677
+ if (sdItem) {
1678
+ if (this.disabled || this.items.every((item) => item.disabled === true)) {
1679
+ sdItem.focus();
1680
+ break;
1681
+ }
1682
+ if (!sdItem.disabled) {
1683
+ sdItem.click();
1684
+ sdItem.focus();
1685
+ this.index = currIndex;
1686
+ break;
1687
+ }
1688
+ }
1689
+ }
1690
+ }
1691
+
1692
+ /**
1693
+ * Method for handling a keydown event.
1694
+ * @private
1695
+ * @param {Event} event - The trigger event tied to this function.
1696
+ * @returns {void}
1697
+ */
1698
+ handleKeyDown(event) {
1699
+ switch (event.key) {
1700
+ case " ":
1701
+ event.preventDefault();
1702
+ this.selectItem(this.index);
1703
+ break;
1704
+
1705
+ case "Down":
1706
+ case "ArrowDown":
1707
+ case "Right":
1708
+ case "ArrowRight":
1709
+ event.preventDefault();
1710
+ this.selectNextItem(this.index === this.items.length - 1 ? 0 : this.index + 1, "Down");
1711
+ break;
1712
+
1713
+ case "Up":
1714
+ case "ArrowUp":
1715
+ case "Left":
1716
+ case "ArrowLeft":
1717
+ event.preventDefault();
1718
+ this.selectNextItem(this.index === 0 ? this.items.length - 1 : this.index - 1, "Up");
1719
+ break;
1720
+ }
1721
+ }
1722
+
1723
+ // function that renders the HTML and CSS into the scope of the component
1724
+ render() {
1725
+ const groupClasses = {
1726
+ 'displayFlex': this.horizontal && this.items.length <= this.max
1727
+ };
1728
+ const legendClasses = {
1729
+ 'hidden': !this.hasLegend && this.required
1730
+ };
1731
+
1732
+ return u`
1733
+ <fieldset class="${e(groupClasses)}" part="radio-group" role="radiogroup">
1734
+ <legend class="${e(legendClasses)}">
1735
+ <slot name="legend" @slotchange=${this.handleLegendSlotChange}></slot>
1736
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
1737
+ </legend>
1738
+ <slot @slotchange=${this.handleSlotChange}></slot>
1739
+ </fieldset>
1740
+
1741
+ ${!this.validity || this.validity === undefined || this.validity === 'valid'
1742
+ ? u`
1743
+ <${this.helpTextTag} appearance="${this.onDark ? 'inverse' : this.appearance}" part="helpText">
1744
+ <slot name="helpText"></slot>
1745
+ </${this.helpTextTag}>`
1746
+ : u`
1747
+ <${this.helpTextTag} appearance="${this.onDark ? 'inverse' : this.appearance}" role="alert" error aria-live="assertive" part="helpText">
1748
+ ${this.errorMessage}
1749
+ </${this.helpTextTag}>`
1750
+ }
1751
+ `;
1752
+ }
1753
+ }
1754
+
1755
+ AuroRadio.register();
1756
+ AuroRadioGroup.register();
1757
+
1758
+ AuroRadio.register('custom-radio');
1759
+ AuroRadioGroup.register('custom-radio-group');
1760
+
1761
+ function initExamples(initCount) {
1762
+ }
1763
+
1764
+ export { initExamples };