@aurodesignsystem-dev/auro-formkit 0.0.0-pr1001.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +2 -0
  4. package/README.md +314 -0
  5. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +50 -0
  6. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  7. package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
  8. package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
  9. package/components/bibtemplate/dist/index.d.ts +2 -0
  10. package/components/bibtemplate/dist/index.js +1940 -0
  11. package/components/bibtemplate/dist/registered.js +1940 -0
  12. package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
  13. package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
  14. package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
  15. package/components/checkbox/README.md +142 -0
  16. package/components/checkbox/demo/api.html +61 -0
  17. package/components/checkbox/demo/api.js +17 -0
  18. package/components/checkbox/demo/api.md +436 -0
  19. package/components/checkbox/demo/api.min.js +1870 -0
  20. package/components/checkbox/demo/index.html +57 -0
  21. package/components/checkbox/demo/index.js +8 -0
  22. package/components/checkbox/demo/index.md +327 -0
  23. package/components/checkbox/demo/index.min.js +1845 -0
  24. package/components/checkbox/demo/readme.html +57 -0
  25. package/components/checkbox/demo/readme.md +142 -0
  26. package/components/checkbox/dist/auro-checkbox-group.d.ts +166 -0
  27. package/components/checkbox/dist/auro-checkbox.d.ts +136 -0
  28. package/components/checkbox/dist/helptextVersion.d.ts +2 -0
  29. package/components/checkbox/dist/index.d.ts +3 -0
  30. package/components/checkbox/dist/index.js +1794 -0
  31. package/components/checkbox/dist/registered.js +1795 -0
  32. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
  33. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
  34. package/components/checkbox/dist/styles/color-css.d.ts +2 -0
  35. package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
  36. package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
  37. package/components/combobox/README.md +154 -0
  38. package/components/combobox/demo/api.html +63 -0
  39. package/components/combobox/demo/api.js +36 -0
  40. package/components/combobox/demo/api.md +1326 -0
  41. package/components/combobox/demo/api.min.js +18691 -0
  42. package/components/combobox/demo/index.html +63 -0
  43. package/components/combobox/demo/index.js +26 -0
  44. package/components/combobox/demo/index.md +725 -0
  45. package/components/combobox/demo/index.min.js +18545 -0
  46. package/components/combobox/demo/readme.html +57 -0
  47. package/components/combobox/demo/readme.md +154 -0
  48. package/components/combobox/dist/auro-combobox.d.ts +434 -0
  49. package/components/combobox/dist/bibtemplateVersion.d.ts +2 -0
  50. package/components/combobox/dist/dropdownVersion.d.ts +2 -0
  51. package/components/combobox/dist/index.d.ts +2 -0
  52. package/components/combobox/dist/index.js +16999 -0
  53. package/components/combobox/dist/inputVersion.d.ts +2 -0
  54. package/components/combobox/dist/registered.js +17001 -0
  55. package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
  56. package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
  57. package/components/combobox/dist/styles/style-css.d.ts +2 -0
  58. package/components/counter/README.md +146 -0
  59. package/components/counter/demo/api.html +61 -0
  60. package/components/counter/demo/api.js +20 -0
  61. package/components/counter/demo/api.md +730 -0
  62. package/components/counter/demo/api.min.js +10406 -0
  63. package/components/counter/demo/index.html +61 -0
  64. package/components/counter/demo/index.js +21 -0
  65. package/components/counter/demo/index.md +401 -0
  66. package/components/counter/demo/index.min.js +10370 -0
  67. package/components/counter/demo/readme.html +57 -0
  68. package/components/counter/demo/readme.md +146 -0
  69. package/components/counter/dist/auro-counter-button.d.ts +14 -0
  70. package/components/counter/dist/auro-counter-group.d.ts +386 -0
  71. package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
  72. package/components/counter/dist/auro-counter.d.ts +113 -0
  73. package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
  74. package/components/counter/dist/dropdownVersion.d.ts +2 -0
  75. package/components/counter/dist/helptextVersion.d.ts +2 -0
  76. package/components/counter/dist/iconVersion.d.ts +2 -0
  77. package/components/counter/dist/index.d.ts +3 -0
  78. package/components/counter/dist/index.js +10313 -0
  79. package/components/counter/dist/registered.js +10314 -0
  80. package/components/counter/dist/styles/color-css.d.ts +2 -0
  81. package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
  82. package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
  83. package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
  84. package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
  85. package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
  86. package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
  87. package/components/counter/dist/styles/style-css.d.ts +2 -0
  88. package/components/counter/dist/styles/tokens-css.d.ts +2 -0
  89. package/components/datepicker/README.md +141 -0
  90. package/components/datepicker/demo/api.html +63 -0
  91. package/components/datepicker/demo/api.js +35 -0
  92. package/components/datepicker/demo/api.md +1529 -0
  93. package/components/datepicker/demo/api.min.js +29755 -0
  94. package/components/datepicker/demo/index.html +62 -0
  95. package/components/datepicker/demo/index.js +19 -0
  96. package/components/datepicker/demo/index.md +204 -0
  97. package/components/datepicker/demo/index.min.js +29476 -0
  98. package/components/datepicker/demo/readme.html +57 -0
  99. package/components/datepicker/demo/readme.md +141 -0
  100. package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
  101. package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
  102. package/components/datepicker/dist/auro-calendar.d.ts +133 -0
  103. package/components/datepicker/dist/auro-datepicker.d.ts +625 -0
  104. package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
  105. package/components/datepicker/dist/buttonVersion.d.ts +2 -0
  106. package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
  107. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  108. package/components/datepicker/dist/index.d.ts +2 -0
  109. package/components/datepicker/dist/index.js +29406 -0
  110. package/components/datepicker/dist/inputVersion.d.ts +2 -0
  111. package/components/datepicker/dist/popoverVersion.d.ts +2 -0
  112. package/components/datepicker/dist/registered.js +29406 -0
  113. package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
  114. package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
  115. package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
  116. package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
  117. package/components/datepicker/dist/styles/color-css.d.ts +2 -0
  118. package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
  119. package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
  120. package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
  121. package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
  122. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
  123. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
  124. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
  125. package/components/datepicker/dist/styles/style-css.d.ts +2 -0
  126. package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
  127. package/components/datepicker/dist/utilities.d.ts +78 -0
  128. package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
  129. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
  130. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
  131. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
  132. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
  133. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
  134. package/components/dropdown/README.md +144 -0
  135. package/components/dropdown/demo/api.html +63 -0
  136. package/components/dropdown/demo/api.js +21 -0
  137. package/components/dropdown/demo/api.md +1266 -0
  138. package/components/dropdown/demo/api.min.js +4442 -0
  139. package/components/dropdown/demo/index.html +61 -0
  140. package/components/dropdown/demo/index.js +19 -0
  141. package/components/dropdown/demo/index.md +337 -0
  142. package/components/dropdown/demo/index.min.js +4405 -0
  143. package/components/dropdown/demo/readme.html +57 -0
  144. package/components/dropdown/demo/readme.md +144 -0
  145. package/components/dropdown/dist/auro-dropdown.d.ts +425 -0
  146. package/components/dropdown/dist/auro-dropdownBib.d.ts +68 -0
  147. package/components/dropdown/dist/dropdownVersion.d.ts +2 -0
  148. package/components/dropdown/dist/helptextVersion.d.ts +2 -0
  149. package/components/dropdown/dist/iconVersion.d.ts +2 -0
  150. package/components/dropdown/dist/index.d.ts +2 -0
  151. package/components/dropdown/dist/index.js +4350 -0
  152. package/components/dropdown/dist/registered.js +4350 -0
  153. package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
  154. package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
  155. package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
  156. package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
  157. package/components/dropdown/dist/styles/color-css.d.ts +2 -0
  158. package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
  159. package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
  160. package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
  161. package/components/dropdown/dist/styles/style-css.d.ts +2 -0
  162. package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
  163. package/components/form/README.md +142 -0
  164. package/components/form/demo/api.html +56 -0
  165. package/components/form/demo/api.js +3 -0
  166. package/components/form/demo/api.md +51 -0
  167. package/components/form/demo/api.min.js +638 -0
  168. package/components/form/demo/autocomplete.html +31 -0
  169. package/components/form/demo/index.html +57 -0
  170. package/components/form/demo/index.js +4 -0
  171. package/components/form/demo/index.md +403 -0
  172. package/components/form/demo/index.min.js +639 -0
  173. package/components/form/demo/readme.html +57 -0
  174. package/components/form/demo/readme.md +142 -0
  175. package/components/form/demo/registerDemoDeps.js +23 -0
  176. package/components/form/demo/working.html +124 -0
  177. package/components/form/dist/auro-form.d.ts +223 -0
  178. package/components/form/dist/index.d.ts +2 -0
  179. package/components/form/dist/index.js +614 -0
  180. package/components/form/dist/registered.d.ts +1 -0
  181. package/components/form/dist/registered.js +614 -0
  182. package/components/form/dist/styles/style-css.d.ts +2 -0
  183. package/components/helptext/dist/auro-helptext.d.ts +59 -0
  184. package/components/helptext/dist/index.d.ts +2 -0
  185. package/components/helptext/dist/index.js +207 -0
  186. package/components/helptext/dist/registered.js +207 -0
  187. package/components/helptext/dist/styles/color-css.d.ts +2 -0
  188. package/components/helptext/dist/styles/style-css.d.ts +2 -0
  189. package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
  190. package/components/input/README.md +139 -0
  191. package/components/input/demo/api.html +48 -0
  192. package/components/input/demo/api.js +29 -0
  193. package/components/input/demo/api.md +1366 -0
  194. package/components/input/demo/api.min.js +8542 -0
  195. package/components/input/demo/index.html +49 -0
  196. package/components/input/demo/index.js +20 -0
  197. package/components/input/demo/index.md +270 -0
  198. package/components/input/demo/index.min.js +8461 -0
  199. package/components/input/demo/readme.html +57 -0
  200. package/components/input/demo/readme.md +139 -0
  201. package/components/input/dist/auro-input.d.ts +167 -0
  202. package/components/input/dist/base-input.d.ts +566 -0
  203. package/components/input/dist/buttonVersion.d.ts +2 -0
  204. package/components/input/dist/helptextVersion.d.ts +2 -0
  205. package/components/input/dist/i18n.d.ts +18 -0
  206. package/components/input/dist/iconVersion.d.ts +2 -0
  207. package/components/input/dist/index.d.ts +2 -0
  208. package/components/input/dist/index.js +8367 -0
  209. package/components/input/dist/registered.js +8367 -0
  210. package/components/input/dist/styles/classic/color-css.d.ts +2 -0
  211. package/components/input/dist/styles/classic/style-css.d.ts +2 -0
  212. package/components/input/dist/styles/color-css.d.ts +2 -0
  213. package/components/input/dist/styles/default/borders-css.d.ts +2 -0
  214. package/components/input/dist/styles/default/color-css.d.ts +2 -0
  215. package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
  216. package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
  217. package/components/input/dist/styles/default/style-css.d.ts +2 -0
  218. package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
  219. package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
  220. package/components/input/dist/styles/mixins-css.d.ts +2 -0
  221. package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
  222. package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
  223. package/components/input/dist/styles/style-css.d.ts +2 -0
  224. package/components/input/dist/styles/tokens-css.d.ts +2 -0
  225. package/components/input/dist/utilities.d.ts +25 -0
  226. package/components/layoutElement/dist/auroElement.d.ts +34 -0
  227. package/components/layoutElement/dist/index.d.ts +2 -0
  228. package/components/layoutElement/dist/index.js +98 -0
  229. package/components/layoutElement/dist/registered.js +98 -0
  230. package/components/menu/README.md +145 -0
  231. package/components/menu/demo/api.html +62 -0
  232. package/components/menu/demo/api.js +27 -0
  233. package/components/menu/demo/api.md +1011 -0
  234. package/components/menu/demo/api.min.js +1762 -0
  235. package/components/menu/demo/index.html +58 -0
  236. package/components/menu/demo/index.js +28 -0
  237. package/components/menu/demo/index.md +61 -0
  238. package/components/menu/demo/index.min.js +1708 -0
  239. package/components/menu/demo/readme.html +57 -0
  240. package/components/menu/demo/readme.md +145 -0
  241. package/components/menu/dist/auro-menu-utils.d.ts +34 -0
  242. package/components/menu/dist/auro-menu.d.ts +246 -0
  243. package/components/menu/dist/auro-menuoption.d.ts +81 -0
  244. package/components/menu/dist/dropdownVersion.d.ts +2 -0
  245. package/components/menu/dist/iconVersion.d.ts +2 -0
  246. package/components/menu/dist/index.d.ts +4 -0
  247. package/components/menu/dist/index.js +1691 -0
  248. package/components/menu/dist/registered.js +1651 -0
  249. package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
  250. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  251. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  252. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  253. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  254. package/components/radio/README.md +137 -0
  255. package/components/radio/demo/api.html +59 -0
  256. package/components/radio/demo/api.js +19 -0
  257. package/components/radio/demo/api.md +602 -0
  258. package/components/radio/demo/api.min.js +1951 -0
  259. package/components/radio/demo/index.html +56 -0
  260. package/components/radio/demo/index.js +8 -0
  261. package/components/radio/demo/index.md +150 -0
  262. package/components/radio/demo/index.min.js +1908 -0
  263. package/components/radio/demo/readme.html +57 -0
  264. package/components/radio/demo/readme.md +137 -0
  265. package/components/radio/dist/auro-radio-group.d.ts +194 -0
  266. package/components/radio/dist/auro-radio.d.ts +147 -0
  267. package/components/radio/dist/helptextVersion.d.ts +2 -0
  268. package/components/radio/dist/index.d.ts +3 -0
  269. package/components/radio/dist/index.js +1857 -0
  270. package/components/radio/dist/registered.js +1858 -0
  271. package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
  272. package/components/radio/dist/styles/color-css.d.ts +2 -0
  273. package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
  274. package/components/radio/dist/styles/style-css.d.ts +2 -0
  275. package/components/radio/dist/styles/tokens-css.d.ts +2 -0
  276. package/components/select/README.md +145 -0
  277. package/components/select/demo/api.html +77 -0
  278. package/components/select/demo/api.js +35 -0
  279. package/components/select/demo/api.md +1413 -0
  280. package/components/select/demo/api.min.js +10502 -0
  281. package/components/select/demo/index.html +73 -0
  282. package/components/select/demo/index.js +9 -0
  283. package/components/select/demo/index.md +1151 -0
  284. package/components/select/demo/index.min.js +10390 -0
  285. package/components/select/demo/readme.html +57 -0
  286. package/components/select/demo/readme.md +145 -0
  287. package/components/select/dist/auro-select.d.ts +512 -0
  288. package/components/select/dist/bibtemplateVersion.d.ts +2 -0
  289. package/components/select/dist/dropdownVersion.d.ts +2 -0
  290. package/components/select/dist/helptextVersion.d.ts +2 -0
  291. package/components/select/dist/index.d.ts +2 -0
  292. package/components/select/dist/index.js +8898 -0
  293. package/components/select/dist/registered.js +8898 -0
  294. package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
  295. package/components/select/dist/styles/style-css.d.ts +2 -0
  296. package/components/select/dist/styles/tokens-css.d.ts +2 -0
  297. package/package.json +218 -0
@@ -0,0 +1,1845 @@
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={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){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}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){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$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.1");
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$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$2="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$1=`<${o$3}>`,r=document,l$1=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$1=Array.isArray,u$1=t=>a$1(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a$1(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$2?s$2.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$2+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$2)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$1()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$1());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(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=S(t,h._$AS(t,i.values),h,e)),i}class M{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??r).importNode(i,true);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r,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 R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,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=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$1(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!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.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=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a$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 R(this.O(l$1()),this.O(l$1()),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,i){for(this._$AP?.(false,true,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,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=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||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){S(this,t);}}const j=t$1.litHtmlPolyfillSupport;j?.(N,R),(t$1.litHtmlVersions??=[]).push("3.3.0");const B=(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 R(i.insertBefore(l$1(),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=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};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.0");
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 T}});
39
+
40
+ /**
41
+ * @license
42
+ * Copyright 2018 Google LLC
43
+ * SPDX-License-Identifier: BSD-3-Clause
44
+ */const o$1=o=>o??E;
45
+
46
+ var styleCss$2 = i$5`: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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", 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", 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", 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", 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", 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", 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", 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", 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", 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", 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", 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, 450);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", 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, 450);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", 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", 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", 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", 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", 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", 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", 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{display:block;--cbxLocation: var(--ds-size-50, 0.25rem)}fieldset{all:unset}@media screen and (min-width: 576px){.displayFlex slot{display:flex}}.cbxContainer{position:relative;display:flex;flex-direction:row;gap:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-100, 0.5rem)}.cbxContainer:hover{cursor:pointer}.label{display:block;padding-top:var(--ds-size-50, 0.25rem)}.label:hover{cursor:pointer}:host([disabled]) .cbxContainer{pointer-events:none;cursor:default}.inputContainer{position:relative}.inputContainer:after{-webkit-tap-highlight-color:transparent;display:block;content:"";align-items:center;justify-content:center;margin-top:var(--cbxLocation);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));border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);outline-style:solid;outline-width:1px;z-index:0}.svg--cbx{position:absolute;padding-top:3px;padding-bottom:3px;z-index:1;pointer-events:none}`;
47
+
48
+ var colorCss$2 = i$5`:host(:not([checked])) .cbxContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-hover, #f2f2f2)}:host .label{color:var(--ds-auro-checkbox-label-color)}:host .inputContainer:after{background-color:var(--ds-auro-checkbox-container-color);border-color:var(--ds-auro-checkbox-border-color);outline-color:var(--ds-auro-checkbox-outline-color)}:host .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-hover, #f2f2f2)}:host .svg--cbx{color:var(--ds-auro-checkbox-checkmark-color)}:host(:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-istrue, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue, #01426a)}:host([checked]) .cbxContainer:hover,:host([checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a)}:host([checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([checked]:focus-within) .cbxContainer:hover,:host([checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a)}:host([disabled]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([disabled]) .cbxContainer:hover,:host([disabled]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #ffffff)}:host([disabled][checked]){--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host([disabled][checked]) .cbxContainer:hover,:host([disabled][checked]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host([error]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([error]:not([checked]):focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([error][checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error, #e31f26);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([error][checked]) .cbxContainer:hover,:host([error][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-hover, #b1161c);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-hover, #b1161c)}:host([error][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([error][checked]:focus-within) .cbxContainer:hover,:host([error][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-hover, #b1161c)}:host([onDark]){--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-checkbox-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-checkbox-container-color: transparent}:host([onDark]) .cbxContainer:hover,:host([onDark]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-inverse-hover, rgba(255, 255, 255, 0.2))}:host([onDark]:not([checked])) .cbxContainer:hover,:host([onDark]:not([checked])) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-inverse-hover, rgba(255, 255, 255, 0.2))}:host([onDark]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][checked]){--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator-inverse, #00274a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff)}:host([onDark][checked]) .cbxContainer:hover,:host([onDark][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: transparent;--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse-hover, rgba(255, 255, 255, 0.7))}:host([onDark][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark][checked]:focus-within) .cbxContainer:hover,:host([onDark][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse-hover, rgba(255, 255, 255, 0.7))}:host([onDark][disabled]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][disabled]) .cbxContainer:hover,:host([onDark][disabled]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-checkbox-container-color: transparent}:host([onDark][disabled][checked]){--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark][disabled][checked]) .cbxContainer:hover,:host([onDark][disabled][checked]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark][error]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][error]:not([checked]):focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][error][checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][error][checked]) .cbxContainer:hover,:host([onDark][error][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65)}:host([onDark][error][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark][error][checked]:focus-within) .cbxContainer:hover,:host([onDark][error][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65)}`;
49
+
50
+ var tokensCss$1 = i$5`:host{--ds-auro-checkbox-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #ffffff);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-checkbox-outline-color: transparent;--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
51
+
52
+ var checkLg = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><path d=\"M5.321 12.514a.75.75 0 0 0-1.142.972l4.25 5a.75.75 0 0 0 1.141.001l10.25-12a.75.75 0 1 0-1.14-.975L9 16.844z\"/></svg>"};
53
+
54
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
55
+ // See LICENSE in the project root for license information.
56
+
57
+ // ---------------------------------------------------------------------
58
+
59
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
60
+
61
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
62
+
63
+ /* eslint-disable jsdoc/require-param */
64
+
65
+ /**
66
+ * This will register a new custom element with the browser.
67
+ * @param {String} name - The name of the custom element.
68
+ * @param {Object} componentClass - The class to register as a custom element.
69
+ * @returns {void}
70
+ */
71
+ registerComponent(name, componentClass) {
72
+ if (!customElements.get(name)) {
73
+ customElements.define(name, class extends componentClass {});
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Finds and returns the closest HTML Element based on a selector.
79
+ * @returns {void}
80
+ */
81
+ closestElement(
82
+ selector, // selector like in .closest()
83
+ base = this, // extra functionality to skip a parent
84
+ __Closest = (el, found = el && el.closest(selector)) =>
85
+ !el || el === document || el === window
86
+ ? null // standard .closest() returns null for non-found selectors also
87
+ : found
88
+ ? found // found a selector INside this element
89
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
90
+ ) {
91
+ return __Closest(base);
92
+ }
93
+ /* eslint-enable jsdoc/require-param */
94
+
95
+ /**
96
+ * 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.
97
+ * @param {Object} elem - The element to check.
98
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
99
+ * @returns {void}
100
+ */
101
+ handleComponentTagRename(elem, tagName) {
102
+ const tag = tagName.toLowerCase();
103
+ const elemTag = elem.tagName.toLowerCase();
104
+
105
+ if (elemTag !== tag) {
106
+ elem.setAttribute(tag, true);
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Validates if an element is a specific Auro component.
112
+ * @param {Object} elem - The element to validate.
113
+ * @param {String} tagName - The name of the Auro component to check against.
114
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
115
+ */
116
+ elementMatch(elem, tagName) {
117
+ const tag = tagName.toLowerCase();
118
+ const elemTag = elem.tagName.toLowerCase();
119
+
120
+ return elemTag === tag || elem.hasAttribute(tag);
121
+ }
122
+ };
123
+
124
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
125
+ // See LICENSE in the project root for license information.
126
+
127
+
128
+ /**
129
+ * Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
130
+ *
131
+ * @prop {string} id - The id global attribute defines an identifier (ID) which must be unique in the whole document.
132
+ * @attr id
133
+ *
134
+ * @csspart checkbox - apply css to a specific checkbox.
135
+ * @csspart checkbox-input - apply css to a specific checkbox's input.
136
+ * @csspart checkbox-label - apply css to a specific checkbox's label.
137
+ *
138
+ * @event {CustomEvent<any>} change - (Deprecated) Notifies when checked value is changed.
139
+ * @event {InputEvent} input - Notifies when when checked value is changed by user's interface.
140
+ */
141
+
142
+ // build the component class
143
+ class AuroCheckbox extends i$2 {
144
+ constructor() {
145
+ super();
146
+ this.checked = false;
147
+ this.disabled = false;
148
+ this.error = false;
149
+ this.onDark = false;
150
+ this.touched = false;
151
+
152
+ /**
153
+ * @private
154
+ */
155
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
156
+
157
+ /**
158
+ * @private
159
+ * @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
160
+ */
161
+ this.constructor.shadowRootOptions = {
162
+ ...i$2.shadowRootOptions,
163
+ delegatesFocus: true,
164
+ };
165
+ }
166
+
167
+ static get styles() {
168
+ return [
169
+ styleCss$2,
170
+ colorCss$2,
171
+ tokensCss$1
172
+ ];
173
+ }
174
+
175
+ // function to define props used within the scope of this component
176
+ static get properties() {
177
+ return {
178
+ ...super.properties,
179
+
180
+ /**
181
+ * If set to true, the checkbox will be filled with a checkmark.
182
+ */
183
+ checked: {
184
+ type: Boolean,
185
+ reflect: true
186
+ },
187
+
188
+ /**
189
+ * If set to true, the checkbox will not be clickable.
190
+ */
191
+ disabled: {
192
+ type: Boolean,
193
+ reflect: true
194
+ },
195
+
196
+ /**
197
+ * If set to true, the checkbox will be displayed with an error state.
198
+ */
199
+ error: {
200
+ type: Boolean,
201
+ reflect: true
202
+ },
203
+
204
+ /**
205
+ * Accepts any string and is used to identify related checkboxes when submitting form data.
206
+ */
207
+ name: { type: String },
208
+
209
+ /**
210
+ * Sets onDark styles for component.
211
+ */
212
+ onDark: {
213
+ type: Boolean,
214
+ reflect: true
215
+ },
216
+
217
+ /**
218
+ * Sets the element's input value. Must be unique within an auro-checkbox-group element.
219
+ */
220
+ value: {
221
+ type: String,
222
+ reflect: true
223
+ },
224
+
225
+ /**
226
+ * Indicates whether the checkbox has been interacted with.
227
+ * @type {boolean}
228
+ * @private
229
+ */
230
+ touched: {
231
+ type: Boolean,
232
+ reflect: true,
233
+ attribute: false
234
+ },
235
+
236
+ /**
237
+ * The id for input node.
238
+ * @private
239
+ */
240
+ inputId: {
241
+ type: String,
242
+ reflect: false,
243
+ attribute: false
244
+ }
245
+ };
246
+ }
247
+
248
+ /**
249
+ * This will register this element with the browser.
250
+ * @param {string} [name="auro-checkbox"] - The name of element that you want to register to.
251
+ *
252
+ * @example
253
+ * AuroCheckbox.register("custom-checkbox") // this will register this element to <custom-checkbox/>
254
+ *
255
+ */
256
+ static register(name = "auro-checkbox") {
257
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroCheckbox);
258
+ }
259
+
260
+ /**
261
+ * Handles the change event for the checkbox input.
262
+ * Updates the checked state and dispatches a corresponding custom event.
263
+ * This custom event is only for the purpose of supporting IE.
264
+ * @private
265
+ * @param {Event} event - The change event from the checkbox input.
266
+ * @returns {void}
267
+ */
268
+ handleChange(event) {
269
+ this.checked = event.target.checked;
270
+ const customEvent = new CustomEvent(event.type, event);
271
+
272
+ this.dispatchEvent(customEvent);
273
+ }
274
+
275
+ /**
276
+ * Handles the input event for the checkbox input.
277
+ * Updates the checked state and dispatches a custom 'auroCheckbox-input' event.
278
+ * @private
279
+ * @param {Event} event - The input event from the checkbox input.
280
+ * @returns {void}
281
+ */
282
+ handleInput(event) {
283
+ this.checked = event.target.checked;
284
+
285
+ // Old event we need to deprecate
286
+ this.dispatchEvent(new CustomEvent('auroCheckbox-input', {
287
+ bubbles: true,
288
+ cancelable: false,
289
+ composed: true,
290
+ }));
291
+ }
292
+
293
+ /**
294
+ * Function to support @focusin event.
295
+ * @private
296
+ * @returns {void}
297
+ */
298
+ handleFocusin() {
299
+ this.touched = true;
300
+ this.dispatchEvent(new CustomEvent('auroCheckbox-focusin', {
301
+ bubbles: true,
302
+ cancelable: false,
303
+ composed: true,
304
+ }));
305
+ }
306
+
307
+ /**
308
+ * Function to generate checkmark svg.
309
+ * @private
310
+ * @returns {void}
311
+ */
312
+ generateIconHtml() {
313
+ this.dom = new DOMParser().parseFromString(checkLg.svg, 'text/html');
314
+ this.svg = this.dom.body.firstChild;
315
+
316
+ this.svg.classList.add('svg--cbx');
317
+
318
+ return this.svg;
319
+ }
320
+
321
+ /**
322
+ * Resets component to initial state.
323
+ * @returns {void}
324
+ */
325
+ reset() {
326
+ this.checked = false;
327
+ this.error = false;
328
+ this.touched = false;
329
+ }
330
+
331
+ firstUpdated() {
332
+ // Add the tag name as an attribute if it is different than the component name
333
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-checkbox');
334
+
335
+ this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
336
+
337
+ this.addEventListener('click', (evt) => {
338
+ // Only prevent default for real user events, not tests or programmatic calls
339
+ if (evt.isTrusted) {
340
+ evt.preventDefault();
341
+ }
342
+
343
+ if (!this.disabled) {
344
+ this.shadowRoot.querySelector('input').click();
345
+ this.handleFocusin();
346
+ }
347
+ });
348
+
349
+ this.addEventListener('focusin', () => {
350
+ this.handleFocusin();
351
+ });
352
+
353
+ this.addEventListener('focusout', () => {
354
+ this.dispatchEvent(new CustomEvent('auroCheckbox-focusout', {
355
+ bubbles: true,
356
+ cancelable: false,
357
+ composed: true,
358
+ }));
359
+ });
360
+ }
361
+
362
+ /**
363
+ * @private
364
+ * @returns {HTMLElement}
365
+ */
366
+ render() {
367
+ const labelClasses = {
368
+ 'label': true,
369
+ 'label--cbx': true,
370
+ 'errorBorder': this.error
371
+ };
372
+
373
+ return x`
374
+ <div class="cbxContainer body-default" part="checkbox">
375
+ <div class="inputContainer">
376
+ <input
377
+ class="util_displayHiddenVisually cbx--input"
378
+ part="checkbox-input"
379
+ @change="${this.handleChange}"
380
+ @input="${this.handleInput}"
381
+ ?disabled="${this.disabled}"
382
+ ?checked="${this.checked}"
383
+ id="${this.inputId}"
384
+ name="${o$1(this.name)}"
385
+ type="checkbox"
386
+ .value="${this.value}"
387
+ />
388
+ ${this.checked ? this.generateIconHtml() : undefined}
389
+ </div>
390
+
391
+ <label for="${this.inputId}" class="${e(labelClasses)}" part="checkbox-label">
392
+ <slot></slot>
393
+ </label>
394
+ </div>
395
+ `;
396
+ }
397
+ }
398
+
399
+ /**
400
+ * @license
401
+ * Copyright 2020 Google LLC
402
+ * SPDX-License-Identifier: BSD-3-Clause
403
+ */
404
+ 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(x);
405
+
406
+ class DateFormatter {
407
+
408
+ constructor() {
409
+
410
+ /**
411
+ * @description Parses a date string into its components.
412
+ * @param {string} dateStr - Date string to parse.
413
+ * @param {string} format - Date format to parse.
414
+ * @returns {Object<key["month" | "day" | "year"]: number>|undefined}
415
+ */
416
+ this.parseDate = (dateStr, format = 'mm/dd/yyyy') => {
417
+
418
+ // Guard Clause: Date string is defined
419
+ if (!dateStr) {
420
+ return undefined;
421
+ }
422
+
423
+ // Assume the separator is a "/" a defined in our code base
424
+ const separator = '/';
425
+
426
+ // Get the parts of the date and format
427
+ const valueParts = dateStr.split(separator);
428
+ const formatParts = format.split(separator);
429
+
430
+ // Check if the value and format have the correct number of parts
431
+ if (valueParts.length !== formatParts.length) {
432
+ throw new Error('AuroDatepickerUtilities | parseDate: Date string and format length do not match');
433
+ }
434
+
435
+ // Holds the result to be returned
436
+ const result = formatParts.reduce((acc, part, index) => {
437
+ const value = valueParts[index];
438
+
439
+ if ((/m/iu).test(part)) {
440
+ acc.month = value;
441
+ } else if ((/d/iu).test(part)) {
442
+ acc.day = value;
443
+ } else if ((/y/iu).test(part)) {
444
+ acc.year = value;
445
+ }
446
+
447
+ return acc;
448
+ }, {});
449
+
450
+ // If we found all the parts, return the result
451
+ if (result.month && result.year) {
452
+ return result;
453
+ }
454
+
455
+ // Throw an error to let the dev know we were unable to parse the date string
456
+ throw new Error('AuroDatepickerUtilities | parseDate: Unable to parse date string');
457
+ };
458
+
459
+ /**
460
+ * Convert a date object to string format.
461
+ * @param {Object} date - Date to convert to string.
462
+ * @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
463
+ * @returns {String} Returns the date as a string.
464
+ */
465
+ this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
466
+ year: "numeric",
467
+ month: "2-digit",
468
+ day: "2-digit",
469
+ });
470
+
471
+ /**
472
+ * Converts a date string to a North American date format.
473
+ * @param {String} dateStr - Date to validate.
474
+ * @param {String} format - Date format to validate against.
475
+ * @returns {Boolean}
476
+ */
477
+ this.toNorthAmericanFormat = (dateStr, format) => {
478
+
479
+ if (format === 'mm/dd/yyyy') {
480
+ return dateStr;
481
+ }
482
+
483
+ const parsedDate = this.parseDate(dateStr, format);
484
+
485
+ if (!parsedDate) {
486
+ throw new Error('AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string');
487
+ }
488
+
489
+ const { month, day, year } = parsedDate;
490
+
491
+ const dateParts = [];
492
+ if (month) {
493
+ dateParts.push(month);
494
+ }
495
+
496
+ if (day) {
497
+ dateParts.push(day);
498
+ }
499
+
500
+ if (year) {
501
+ dateParts.push(year);
502
+ }
503
+
504
+ return dateParts.join('/');
505
+ };
506
+ }
507
+ }
508
+ const dateFormatter = new DateFormatter();
509
+
510
+ // filepath: dateConstraints.mjs
511
+ const DATE_UTIL_CONSTRAINTS = {
512
+ maxDay: 31,
513
+ maxMonth: 12,
514
+ maxYear: 2400,
515
+ minDay: 1,
516
+ minMonth: 1,
517
+ minYear: 1900,
518
+ };
519
+
520
+ class AuroDateUtilitiesBase {
521
+
522
+ /**
523
+ * @description The maximum day value allowed by the various utilities in this class.
524
+ * @readonly
525
+ * @type {Number}
526
+ */
527
+ get maxDay() {
528
+ return DATE_UTIL_CONSTRAINTS.maxDay;
529
+ }
530
+
531
+ /**
532
+ * @description The maximum month value allowed by the various utilities in this class.
533
+ * @readonly
534
+ * @type {Number}
535
+ */
536
+ get maxMonth() {
537
+ return DATE_UTIL_CONSTRAINTS.maxMonth;
538
+ }
539
+
540
+ /**
541
+ * @description The maximum year value allowed by the various utilities in this class.
542
+ * @readonly
543
+ * @type {Number}
544
+ */
545
+ get maxYear() {
546
+ return DATE_UTIL_CONSTRAINTS.maxYear;
547
+ }
548
+
549
+ /**
550
+ * @description The minimum day value allowed by the various utilities in this class.
551
+ * @readonly
552
+ * @type {Number}
553
+ */
554
+ get minDay() {
555
+ return DATE_UTIL_CONSTRAINTS.minDay;
556
+ }
557
+
558
+ /**
559
+ * @description The minimum month value allowed by the various utilities in this class.
560
+ * @readonly
561
+ * @type {Number}
562
+ */
563
+ get minMonth() {
564
+ return DATE_UTIL_CONSTRAINTS.minMonth;
565
+ }
566
+
567
+ /**
568
+ * @description The minimum year value allowed by the various utilities in this class.
569
+ * @readonly
570
+ * @type {Number}
571
+ */
572
+ get minYear() {
573
+ return DATE_UTIL_CONSTRAINTS.minYear;
574
+ }
575
+ }
576
+
577
+ /* eslint-disable no-magic-numbers */
578
+
579
+ class AuroDateUtilities extends AuroDateUtilitiesBase {
580
+
581
+ /**
582
+ * Returns the current century.
583
+ * @returns {String} The current century.
584
+ */
585
+ getCentury () {
586
+ return String(new Date().getFullYear()).slice(0, 2);
587
+ }
588
+
589
+ /**
590
+ * Returns a four digit year.
591
+ * @param {String} year - The year to convert to four digits.
592
+ * @returns {String} The four digit year.
593
+ */
594
+ getFourDigitYear (year) {
595
+
596
+ const strYear = String(year).trim();
597
+ return strYear.length <= 2 ? this.getCentury() + strYear : strYear;
598
+ }
599
+
600
+ constructor() {
601
+
602
+ super();
603
+
604
+ /**
605
+ * Compares two dates to see if they match.
606
+ * @param {Object} date1 - First date to compare.
607
+ * @param {Object} date2 - Second date to compare.
608
+ * @returns {Boolean} Returns true if the dates match.
609
+ */
610
+ this.datesMatch = (date1, date2) => new Date(date1).getTime() === new Date(date2).getTime();
611
+
612
+ /**
613
+ * Returns true if value passed in is a valid date.
614
+ * @param {String} date - Date to validate.
615
+ * @param {String} format - Date format to validate against.
616
+ * @returns {Boolean}
617
+ */
618
+ this.validDateStr = (date, format) => {
619
+
620
+ // The length we expect the date string to be
621
+ const dateStrLength = format.length;
622
+
623
+ // Guard Clause: Date and format are defined
624
+ if (typeof date === "undefined" || typeof format === "undefined") {
625
+ throw new Error('AuroDatepickerUtilities | validateDateStr: Date and format are required');
626
+ }
627
+
628
+ // Guard Clause: Date should be of type string
629
+ if (typeof date !== "string") {
630
+ throw new Error('AuroDatepickerUtilities | validateDateStr: Date must be a string');
631
+ }
632
+
633
+ // Guard Clause: Format should be of type string
634
+ if (typeof format !== "string") {
635
+ throw new Error('AuroDatepickerUtilities | validateDateStr: Format must be a string');
636
+ }
637
+
638
+ // Guard Clause: Length is what we expect it to be
639
+ if (date.length !== dateStrLength) {
640
+ return false;
641
+ }
642
+ // Get a formatted date string and parse it
643
+ const dateParts = dateFormatter.parseDate(date, format);
644
+
645
+ // Guard Clause: Date parse succeeded
646
+ if (!dateParts) {
647
+ return false;
648
+ }
649
+
650
+ // Create the expected date string based on the date parts
651
+ const expectedDateStr = `${dateParts.month}/${dateParts.day || "01"}/${this.getFourDigitYear(dateParts.year)}`;
652
+
653
+ // Generate a date object that we will extract a string date from to compare to the passed in date string
654
+ const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
655
+
656
+ // Get the date string of the date object we created from the string date
657
+ const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
658
+
659
+ // Guard Clause: Generated date matches date string input
660
+ if (expectedDateStr !== actualDateStr) {
661
+ return false;
662
+ }
663
+
664
+ // If we passed all other checks, we can assume the date is valid
665
+ return true;
666
+ };
667
+
668
+ /**
669
+ * Determines if a string date value matches the format provided.
670
+ * @param {string} value = The date string value.
671
+ * @param { string} format = The date format to match against.
672
+ * @returns {boolean}
673
+ */
674
+ this.dateAndFormatMatch = (value, format) => {
675
+
676
+ // Ensure we have both values we need to do the comparison
677
+ if (!value || !format) {
678
+ throw new Error('AuroFormValidation | dateFormatMatch: value and format are required');
679
+ }
680
+
681
+ // If the lengths are different, they cannot match
682
+ if (value.length !== format.length) {
683
+ return false;
684
+ }
685
+
686
+ // Get the parts of the date
687
+ const dateParts = dateFormatter.parseDate(value, format);
688
+
689
+ // Validator for day
690
+ const dayValueIsValid = (day) => {
691
+
692
+ // Guard clause: if there is no day in the dateParts, we can ignore this check.
693
+ if (!dateParts.day) {
694
+ return true;
695
+ }
696
+
697
+ // Guard clause: ensure day exists.
698
+ if (!day) {
699
+ return false;
700
+ }
701
+
702
+ // Convert day to number
703
+ const numDay = Number.parseInt(day, 10);
704
+
705
+ // Guard clause: ensure day is a valid integer
706
+ if (Number.isNaN(numDay)) {
707
+ throw new Error('AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer');
708
+ }
709
+
710
+ // Guard clause: ensure day is within the valid range
711
+ if (numDay < this.minDay || numDay > this.maxDay) {
712
+ return false;
713
+ }
714
+
715
+ // Default return
716
+ return true;
717
+ };
718
+
719
+ // Validator for month
720
+ const monthValueIsValid = (month) => {
721
+
722
+ // Guard clause: ensure month exists.
723
+ if (!month) {
724
+ return false;
725
+ }
726
+
727
+ // Convert month to number
728
+ const numMonth = Number.parseInt(month, 10);
729
+
730
+ // Guard clause: ensure month is a valid integer
731
+ if (Number.isNaN(numMonth)) {
732
+ throw new Error('AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer');
733
+ }
734
+
735
+ // Guard clause: ensure month is within the valid range
736
+ if (numMonth < this.minMonth || numMonth > this.maxMonth) {
737
+ return false;
738
+ }
739
+
740
+ // Default return
741
+ return true;
742
+ };
743
+
744
+ // Validator for year
745
+ const yearIsValid = (_year) => {
746
+
747
+ // Guard clause: ensure year exists.
748
+ if (!_year) {
749
+ return false;
750
+ }
751
+
752
+ // Get the full year
753
+ const year = this.getFourDigitYear(_year);
754
+
755
+ // Convert year to number
756
+ const numYear = Number.parseInt(year, 10);
757
+
758
+ // Guard clause: ensure year is a valid integer
759
+ if (Number.isNaN(numYear)) {
760
+ throw new Error('AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer');
761
+ }
762
+
763
+ // Guard clause: ensure year is within the valid range
764
+ if (numYear < this.minYear || numYear > this.maxYear) {
765
+ return false;
766
+ }
767
+
768
+ // Default return
769
+ return true;
770
+ };
771
+
772
+ // Self-contained checks for month, day, and year
773
+ const checks = [
774
+ monthValueIsValid(dateParts.month),
775
+ dayValueIsValid(dateParts.day),
776
+ yearIsValid(dateParts.year)
777
+ ];
778
+
779
+ // If any of the checks failed, the date format does not match and the result is invalid
780
+ const isValid = checks.every((check) => check === true);
781
+
782
+ // If the check is invalid, return false
783
+ if (!isValid) {
784
+ return false;
785
+ }
786
+
787
+ // Default case
788
+ return true;
789
+ };
790
+ }
791
+ }
792
+
793
+ // Export a class instance
794
+ const dateUtilities = new AuroDateUtilities();
795
+
796
+ // Export the class instance methods individually
797
+ const {
798
+ datesMatch,
799
+ validDateStr,
800
+ dateAndFormatMatch,
801
+ minDay,
802
+ minMonth,
803
+ minYear,
804
+ maxDay,
805
+ maxMonth,
806
+ maxYear
807
+ } = dateUtilities;
808
+
809
+ const {
810
+ toNorthAmericanFormat,
811
+ parseDate,
812
+ getDateAsString
813
+ } = dateFormatter;
814
+
815
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
816
+ // See LICENSE in the project root for license information.
817
+
818
+
819
+ class AuroFormValidation {
820
+
821
+ constructor() {
822
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
823
+ }
824
+
825
+ /**
826
+ * Resets the element to its initial state.
827
+ * @private
828
+ * @param {object} elem - HTML element to reset.
829
+ * @returns {void}
830
+ */
831
+ reset(elem) {
832
+ elem.validity = undefined;
833
+ elem.value = undefined;
834
+ elem.touched = false;
835
+
836
+ // Resets the second value of the datepicker in range state
837
+ if (elem.valueEnd) {
838
+ elem.valueEnd = undefined;
839
+ }
840
+
841
+ // Resets selected option of element
842
+ if (elem.optionSelected) {
843
+ elem.optionSelected = undefined;
844
+ }
845
+
846
+ // Runs validation to handle error attribute
847
+ this.validate(elem);
848
+ }
849
+
850
+ /**
851
+ * Validates the attributes of a given element based on predefined validation rules.
852
+ *
853
+ * @param {HTMLElement} elem - The element to be validated.
854
+ * @returns {void}
855
+ *
856
+ * @example
857
+ * // Assuming `inputElement` is a reference to an input element in the DOM
858
+ * validateElementAttributes(inputElement);
859
+ *
860
+ * The function checks the element's attributes against the validation rules defined for 'input' and 'counter' types.
861
+ * If a validation rule is violated, it sets the element's validity state and error message accordingly.
862
+ *
863
+ * Validation rules:
864
+ * - input:
865
+ * - length:
866
+ * - tooShort: Checks if the value length is less than the minimum length.
867
+ * - tooLong: Checks if the value length exceeds the maximum length.
868
+ * - pattern:
869
+ * - patternMismatch: Checks if the value does not match the specified pattern.
870
+ * - counter:
871
+ * - range:
872
+ * - rangeOverflow: Checks if the value exceeds the maximum value.
873
+ * - rangeUnderflow: Checks if the value is less than the minimum value.
874
+ */
875
+ validateElementAttributes(elem) {
876
+ const validationRules = {
877
+ input: {
878
+ length: [
879
+ {
880
+ check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
881
+ validity: 'tooShort',
882
+ message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
883
+ },
884
+ {
885
+ check: (e) => e.value?.length > e.maxLength,
886
+ validity: 'tooLong',
887
+ message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
888
+ }
889
+ ],
890
+ pattern: [
891
+ {
892
+ check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
893
+ validity: 'patternMismatch',
894
+ message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
895
+ }
896
+ ]
897
+ },
898
+ counter: {
899
+ range: [
900
+ {
901
+ check: (e) => e.max !== undefined && Number(e.max) < Number(e.value),
902
+ validity: 'rangeOverflow',
903
+ message: e => e.getAttribute('setCustomValidityRangeOverflow') || ''
904
+ },
905
+ {
906
+ check: (e) => e.min !== undefined && Number(e.min) > Number(e.value),
907
+ validity: 'rangeUnderflow',
908
+ message: e => e.getAttribute('setCustomValidityRangeUnderflow') || ''
909
+ }
910
+ ]
911
+ }
912
+ };
913
+
914
+ let elementType;
915
+ if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
916
+ elementType = 'input';
917
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
918
+ elementType = 'counter';
919
+ }
920
+
921
+ if (elementType) {
922
+ const rules = validationRules[elementType];
923
+
924
+ if (rules) {
925
+ Object.values(rules).flat().forEach(rule => {
926
+ if (rule.check(elem)) {
927
+ elem.validity = rule.validity;
928
+ elem.errorMessage = rule.message(elem);
929
+ }
930
+ });
931
+ }
932
+ }
933
+ }
934
+
935
+ /**
936
+ * Determines the validity state of the element based on the type attribute.
937
+ * @private
938
+ * @param {object} elem - HTML element to validate.
939
+ * @returns {void}
940
+ */
941
+ validateType(elem) {
942
+ if (elem.hasAttribute('type')) {
943
+ if (elem.type === 'email') {
944
+ const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
945
+
946
+ if (!elem.value.match(emailRegex)) {
947
+ elem.validity = 'patternMismatch';
948
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
949
+ return;
950
+ }
951
+ } else if (elem.type === 'credit-card') {
952
+ if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
953
+ elem.validity = 'tooShort';
954
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
955
+ return;
956
+ }
957
+ } else if (elem.type === 'number') {
958
+ if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
959
+ elem.validity = 'rangeOverflow';
960
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
961
+ return;
962
+ }
963
+
964
+ if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
965
+ elem.validity = 'rangeUnderflow';
966
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
967
+ return;
968
+ }
969
+ } else if (elem.type === 'date' && elem.value?.length > 0) {
970
+
971
+ // Guard Clause: if the value is too short
972
+ if (elem.value?.length < elem.lengthForType) {
973
+
974
+ elem.validity = 'tooShort';
975
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
976
+ return;
977
+ }
978
+
979
+ // Guard Clause: If the value is too long for the type
980
+ if (elem.value?.length > elem.lengthForType) {
981
+
982
+ elem.validity = 'tooLong';
983
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
984
+ return;
985
+ }
986
+
987
+ // Validate that the date passed was the correct format
988
+ if (!dateAndFormatMatch(elem.value, elem.format)) {
989
+ elem.validity = 'patternMismatch';
990
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || 'Invalid Date Format Entered';
991
+ return;
992
+ }
993
+
994
+ // Validate that the date passed was a valid date
995
+ if (!validDateStr(elem.value, elem.format)) {
996
+ elem.validity = 'invalidDate';
997
+ elem.errorMessage = elem.setCustomValidityInvalidDate || elem.setCustomValidity || 'Invalid Date Entered';
998
+ return;
999
+ }
1000
+
1001
+ // Perform the rest of the validation
1002
+ const formattedValue = toNorthAmericanFormat(elem.value, elem.format);
1003
+ const valueDate = new Date(formattedValue);
1004
+
1005
+ // // Validate max date
1006
+ if (elem.max?.length === elem.lengthForType) {
1007
+
1008
+ const maxDate = new Date(toNorthAmericanFormat(elem.max, elem.format));
1009
+
1010
+ if (valueDate > maxDate) {
1011
+ elem.validity = 'rangeOverflow';
1012
+ elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
1013
+ return;
1014
+ }
1015
+ }
1016
+
1017
+ // Validate min date
1018
+ if (elem.min?.length === elem.lengthForType) {
1019
+ const minDate = new Date(toNorthAmericanFormat(elem.min, elem.format));
1020
+
1021
+ if (valueDate < minDate) {
1022
+ elem.validity = 'rangeUnderflow';
1023
+ elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
1024
+ return;
1025
+ }
1026
+ }
1027
+ }
1028
+ }
1029
+ }
1030
+
1031
+ /**
1032
+ * Determines the validity state of the element.
1033
+ * @param {object} elem - HTML element to validate.
1034
+ * @param {boolean} force - Boolean that forces validation to run.
1035
+ * @returns {void}
1036
+ */
1037
+ validate(elem, force) {
1038
+ this.getInputElements(elem);
1039
+ this.getAuroInputs(elem);
1040
+
1041
+ // Check if validation should run
1042
+ let validationShouldRun =
1043
+
1044
+ // If the validation was forced
1045
+ force ||
1046
+
1047
+ // If the validation should run on input
1048
+ elem.validateOnInput ||
1049
+
1050
+ // State-based checks
1051
+ (
1052
+ // Element is not currently focused
1053
+ !elem.contains(document.activeElement) && // native input is not focused directly
1054
+ !document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
1055
+
1056
+ // And element has been touched or is untouched but has a value
1057
+ ( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
1058
+ );
1059
+
1060
+ if (elem.hasAttribute('error')) {
1061
+ elem.validity = 'customError';
1062
+ elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
1063
+ validationShouldRun = false;
1064
+ } else if (validationShouldRun) {
1065
+ elem.validity = 'valid';
1066
+ elem.errorMessage = '';
1067
+
1068
+ /**
1069
+ * Only validate once we interact with the datepicker
1070
+ * elem.value === undefined is the initial state pre-interaction.
1071
+ *
1072
+ * The validityState definitions are located at https://developer.mozilla.org/en-US/docs/Web/API/ValidityState.
1073
+ */
1074
+
1075
+ let hasValue = false;
1076
+
1077
+ // Check string for having a value
1078
+ if (typeof elem.value === "string") {
1079
+ hasValue = elem.value && elem.value.length > 0;
1080
+ }
1081
+
1082
+ // Check array value types for having a value
1083
+ if (Array.isArray(elem.value)) {
1084
+ hasValue = Boolean(
1085
+ elem.value.length > 0 &&
1086
+ elem.value.some((value) => typeof value === "string" && value.length > 0)
1087
+ );
1088
+ }
1089
+
1090
+ // If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
1091
+ if (this.auroInputElements?.length === 2) {
1092
+ if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
1093
+ hasValue = false;
1094
+ }
1095
+ }
1096
+
1097
+ if (!hasValue && elem.required && elem.touched) {
1098
+ elem.validity = 'valueMissing';
1099
+ elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
1100
+ } else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
1101
+ this.validateType(elem);
1102
+ this.validateElementAttributes(elem);
1103
+ } else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
1104
+ this.validateElementAttributes(elem);
1105
+ }
1106
+ }
1107
+
1108
+ if (this.auroInputElements?.length > 0 && elem.validity !== "valueMissing") {
1109
+ elem.validity = this.auroInputElements[0].validity;
1110
+ elem.errorMessage = this.auroInputElements[0].errorMessage;
1111
+
1112
+ // multiple input in one components (datepicker)
1113
+ // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1114
+ if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
1115
+ elem.validity = this.auroInputElements[1].validity;
1116
+ elem.errorMessage = this.auroInputElements[1].errorMessage;
1117
+ }
1118
+ }
1119
+
1120
+ if (validationShouldRun || elem.hasAttribute('error')) {
1121
+ // Use the validity message override if it is declared
1122
+ if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
1123
+ elem.errorMessage = elem.ValidityMessageOverride;
1124
+ }
1125
+
1126
+ this.getErrorMessage(elem);
1127
+
1128
+ elem.dispatchEvent(new CustomEvent('auroFormElement-validated', {
1129
+ bubbles: true,
1130
+ composed: true,
1131
+ detail: {
1132
+ validity: elem.validity,
1133
+ message: elem.errorMessage
1134
+ }
1135
+ }));
1136
+ }
1137
+ }
1138
+
1139
+ /**
1140
+ * Gets all the HTML5 `inputs` in the element shadow DOM.
1141
+ * @private
1142
+ * @param {object} elem - HTML element to validate.
1143
+ * @returns {void}
1144
+ */
1145
+ getInputElements(elem) {
1146
+ this.inputElements = elem.renderRoot.querySelectorAll('input');
1147
+ }
1148
+
1149
+ /**
1150
+ * Gets all the `auro-inputs` in the element shadow DOM.
1151
+ * @private
1152
+ * @param {object} elem - HTML element to validate.
1153
+ * @returns {void}
1154
+ */
1155
+ getAuroInputs(elem) {
1156
+ this.auroInputElements = elem.shadowRoot.querySelectorAll('auro-input, [auro-input]');
1157
+ }
1158
+
1159
+ /**
1160
+ * Return appropriate error message.
1161
+ * @private
1162
+ * @param {object} elem - HTML element to validate.
1163
+ * @returns {void}
1164
+ */
1165
+ getErrorMessage(elem) {
1166
+ if (elem.validity !== 'valid') {
1167
+ if (elem.setCustomValidity) {
1168
+ elem.errorMessage = elem.setCustomValidity;
1169
+ } else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
1170
+ const input = elem.renderRoot.querySelector('input');
1171
+
1172
+ if (input.validationMessage.length > 0) {
1173
+ elem.errorMessage = input.validationMessage;
1174
+ }
1175
+ } else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
1176
+ const firstInput = this.inputElements[0];
1177
+
1178
+ if (firstInput.validationMessage.length > 0) {
1179
+ elem.errorMessage = firstInput.validationMessage;
1180
+ } else if (this.inputElements?.length === 2) {
1181
+ const secondInput = this.inputElements[1];
1182
+
1183
+ if (secondInput.validationMessage.length > 0) {
1184
+ elem.errorMessage = secondInput.validationMessage;
1185
+ }
1186
+ }
1187
+ }
1188
+ } else {
1189
+ elem.errorMessage = '';
1190
+ }
1191
+ }
1192
+ }
1193
+
1194
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1195
+ // See LICENSE in the project root for license information.
1196
+
1197
+
1198
+ class AuroDependencyVersioning {
1199
+
1200
+ /**
1201
+ * Generates a unique string to be used for child auro element naming.
1202
+ * @private
1203
+ * @param {string} baseName - Defines the first part of the unique element name.
1204
+ * @param {string} version - Version of the component that will be appended to the baseName.
1205
+ * @returns {string} - Unique string to be used for naming.
1206
+ */
1207
+ generateElementName(baseName, version) {
1208
+ let result = baseName;
1209
+
1210
+ result += '-';
1211
+ result += version.replace(/[.]/g, '_');
1212
+
1213
+ return result;
1214
+ }
1215
+
1216
+ /**
1217
+ * Generates a unique string to be used for child auro element naming.
1218
+ * @param {string} baseName - Defines the first part of the unique element name.
1219
+ * @param {string} version - Version of the component that will be appended to the baseName.
1220
+ * @returns {string} - Unique string to be used for naming.
1221
+ */
1222
+ generateTag(baseName, version, tagClass) {
1223
+ const elementName = this.generateElementName(baseName, version);
1224
+ const tag = i`${s(elementName)}`;
1225
+
1226
+ if (!customElements.get(elementName)) {
1227
+ customElements.define(elementName, class extends tagClass {});
1228
+ }
1229
+
1230
+ return tag;
1231
+ }
1232
+ }
1233
+
1234
+ var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
1235
+
1236
+ var colorCss$1 = i$5`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
1237
+
1238
+ var colorCss = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
1239
+
1240
+ var styleCss = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", 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", 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", 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", 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", 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", 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", 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", 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", 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", 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", 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, 450);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", 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, 450);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", 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", 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", 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", 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", 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", 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", 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}`;
1241
+
1242
+ var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
1243
+
1244
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1245
+ // See LICENSE in the project root for license information.
1246
+
1247
+ // ---------------------------------------------------------------------
1248
+
1249
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
1250
+
1251
+ class AuroLibraryRuntimeUtils {
1252
+
1253
+ /* eslint-disable jsdoc/require-param */
1254
+
1255
+ /**
1256
+ * This will register a new custom element with the browser.
1257
+ * @param {String} name - The name of the custom element.
1258
+ * @param {Object} componentClass - The class to register as a custom element.
1259
+ * @returns {void}
1260
+ */
1261
+ registerComponent(name, componentClass) {
1262
+ if (!customElements.get(name)) {
1263
+ customElements.define(name, class extends componentClass {});
1264
+ }
1265
+ }
1266
+
1267
+ /**
1268
+ * Finds and returns the closest HTML Element based on a selector.
1269
+ * @returns {void}
1270
+ */
1271
+ closestElement(
1272
+ selector, // selector like in .closest()
1273
+ base = this, // extra functionality to skip a parent
1274
+ __Closest = (el, found = el && el.closest(selector)) =>
1275
+ !el || el === document || el === window
1276
+ ? null // standard .closest() returns null for non-found selectors also
1277
+ : found
1278
+ ? found // found a selector INside this element
1279
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
1280
+ ) {
1281
+ return __Closest(base);
1282
+ }
1283
+ /* eslint-enable jsdoc/require-param */
1284
+
1285
+ /**
1286
+ * 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.
1287
+ * @param {Object} elem - The element to check.
1288
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
1289
+ * @returns {void}
1290
+ */
1291
+ handleComponentTagRename(elem, tagName) {
1292
+ const tag = tagName.toLowerCase();
1293
+ const elemTag = elem.tagName.toLowerCase();
1294
+
1295
+ if (elemTag !== tag) {
1296
+ elem.setAttribute(tag, true);
1297
+ }
1298
+ }
1299
+
1300
+ /**
1301
+ * Validates if an element is a specific Auro component.
1302
+ * @param {Object} elem - The element to validate.
1303
+ * @param {String} tagName - The name of the Auro component to check against.
1304
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
1305
+ */
1306
+ elementMatch(elem, tagName) {
1307
+ const tag = tagName.toLowerCase();
1308
+ const elemTag = elem.tagName.toLowerCase();
1309
+
1310
+ return elemTag === tag || elem.hasAttribute(tag);
1311
+ }
1312
+ }
1313
+
1314
+ // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1315
+ // See LICENSE in the project root for license information.
1316
+
1317
+
1318
+ /**
1319
+ * Displays help text or error messages within form elements - Internal Use Only.
1320
+ */
1321
+ class AuroHelpText extends i$2 {
1322
+
1323
+ constructor() {
1324
+ super();
1325
+
1326
+ this.error = false;
1327
+ this.onDark = false;
1328
+ this.hasTextContent = false;
1329
+
1330
+ AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
1331
+ }
1332
+
1333
+ static get styles() {
1334
+ return [
1335
+ colorCss,
1336
+ styleCss,
1337
+ tokensCss
1338
+ ];
1339
+ }
1340
+
1341
+ // function to define props used within the scope of this component
1342
+ static get properties() {
1343
+ return {
1344
+
1345
+ /**
1346
+ * @private
1347
+ */
1348
+ slotNodes: {
1349
+ type: Boolean,
1350
+ },
1351
+
1352
+ /**
1353
+ * @private
1354
+ */
1355
+ hasTextContent: {
1356
+ type: Boolean,
1357
+ },
1358
+
1359
+ /**
1360
+ * If declared, make font color red.
1361
+ */
1362
+ error: {
1363
+ type: Boolean,
1364
+ reflect: true,
1365
+ },
1366
+
1367
+ /**
1368
+ * If declared, will apply onDark styles.
1369
+ */
1370
+ onDark: {
1371
+ type: Boolean,
1372
+ reflect: true
1373
+ }
1374
+ };
1375
+ }
1376
+
1377
+ /**
1378
+ * This will register this element with the browser.
1379
+ * @param {string} [name="auro-helptext"] - The name of element that you want to register to.
1380
+ *
1381
+ * @example
1382
+ * AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
1383
+ *
1384
+ */
1385
+ static register(name = "auro-helptext") {
1386
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
1387
+ }
1388
+
1389
+ updated() {
1390
+ this.handleSlotChange();
1391
+ }
1392
+
1393
+ handleSlotChange(event) {
1394
+ if (event) {
1395
+ this.slotNodes = event.target.assignedNodes();
1396
+ }
1397
+
1398
+ this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
1399
+ }
1400
+
1401
+ /**
1402
+ * Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
1403
+ *
1404
+ * @param {NodeList|Array} nodes - The list of nodes to check for content.
1405
+ * @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
1406
+ * @private
1407
+ */
1408
+ checkSlotsForContent(nodes) {
1409
+ if (!nodes) {
1410
+ return false;
1411
+ }
1412
+
1413
+ return nodes.some((node) => {
1414
+ if (node.textContent.trim()) {
1415
+ return true;
1416
+ }
1417
+
1418
+ if (!node.querySelector) {
1419
+ return false;
1420
+ }
1421
+
1422
+ const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
1423
+ if (!nestedSlot) {
1424
+ return false;
1425
+ }
1426
+
1427
+ const nestedSlotNodes = nestedSlot.assignedNodes();
1428
+ return this.checkSlotsForContent(nestedSlotNodes);
1429
+ });
1430
+ }
1431
+
1432
+ // function that renders the HTML and CSS into the scope of the component
1433
+ render() {
1434
+ return x`
1435
+ <div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
1436
+ <slot @slotchange=${this.handleSlotChange}></slot>
1437
+ </div>
1438
+ `;
1439
+ }
1440
+ }
1441
+
1442
+ var helpTextVersion = '1.0.0';
1443
+
1444
+ // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1445
+ // See LICENSE in the project root for license information.
1446
+
1447
+
1448
+ /**
1449
+ * The auro-checkbox-group element is a wrapper for auro-checkbox element.
1450
+ *
1451
+ * @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
1452
+ * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
1453
+ * @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
1454
+ * @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
1455
+ */
1456
+
1457
+ class AuroCheckboxGroup extends i$2 {
1458
+ constructor() {
1459
+ super();
1460
+
1461
+ this.validity = undefined;
1462
+ this.disabled = undefined;
1463
+ this.required = false;
1464
+ this.horizontal = false;
1465
+ this.onDark = false;
1466
+
1467
+ /**
1468
+ * Indicates whether the checkbox group is in a dirty state (has been interacted with).
1469
+ * @type {boolean}
1470
+ * @default false
1471
+ * @private
1472
+ */
1473
+ this.touched = false;
1474
+
1475
+ /**
1476
+ * @private
1477
+ */
1478
+ this.value = undefined;
1479
+
1480
+ /**
1481
+ * @private
1482
+ */
1483
+ this.index = 0;
1484
+
1485
+ /**
1486
+ * @private
1487
+ */
1488
+ this.maxNumber = 3;
1489
+
1490
+ /**
1491
+ * @private
1492
+ */
1493
+ this.validation = new AuroFormValidation();
1494
+
1495
+ /**
1496
+ * @private
1497
+ */
1498
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
1499
+
1500
+ /**
1501
+ * Generate unique names for dependency components.
1502
+ */
1503
+ const versioning = new AuroDependencyVersioning();
1504
+
1505
+ /**
1506
+ * @private
1507
+ */
1508
+ this.helpTextTag = versioning.generateTag('auro-formkit-checkbox-helptext', helpTextVersion, AuroHelpText);
1509
+ }
1510
+
1511
+ static get styles() {
1512
+ return [
1513
+ styleCss$1,
1514
+ colorCss$1,
1515
+ tokensCss$1
1516
+ ];
1517
+ }
1518
+
1519
+ static get properties() {
1520
+ return {
1521
+ ...super.properties,
1522
+
1523
+ /**
1524
+ * If set, disables the checkbox group.
1525
+ */
1526
+ disabled: {
1527
+ type: Boolean,
1528
+ reflect: true
1529
+ },
1530
+
1531
+ /**
1532
+ * When defined, sets persistent validity to `customError` and sets the validation message to the attribute value.
1533
+ */
1534
+ error: {
1535
+ type: String,
1536
+ reflect: true
1537
+ },
1538
+
1539
+ /**
1540
+ * If set, checkboxes will be aligned horizontally.
1541
+ */
1542
+ horizontal: {
1543
+ type: Boolean,
1544
+ reflect: true
1545
+ },
1546
+
1547
+ /**
1548
+ * If set, disables auto-validation on blur.
1549
+ */
1550
+ noValidate: {
1551
+ type: Boolean,
1552
+ reflect: true
1553
+ },
1554
+
1555
+ /**
1556
+ * Sets onDark styles for component.
1557
+ */
1558
+ onDark: {
1559
+ type: Boolean,
1560
+ reflect: true
1561
+ },
1562
+
1563
+ /**
1564
+ * Populates the `required` attribute on the element. Used for client-side validation.
1565
+ */
1566
+ required: {
1567
+ type: Boolean,
1568
+ reflect: true
1569
+ },
1570
+
1571
+ /**
1572
+ * Sets a custom help text message to display for all validityStates.
1573
+ */
1574
+ setCustomValidity: {
1575
+ type: String
1576
+ },
1577
+
1578
+ /**
1579
+ * Custom help text message to display when validity = `customError`.
1580
+ */
1581
+ setCustomValidityCustomError: {
1582
+ type: String
1583
+ },
1584
+
1585
+ /**
1586
+ * Custom help text message to display when validity = `valueMissing`.
1587
+ */
1588
+ setCustomValidityValueMissing: {
1589
+ type: String
1590
+ },
1591
+
1592
+ /**
1593
+ * Specifies the `validityState` this element is in.
1594
+ */
1595
+ validity: {
1596
+ type: String,
1597
+ reflect: true
1598
+ }
1599
+ };
1600
+ }
1601
+
1602
+ /**
1603
+ * This will register this element with the browser.
1604
+ * @param {string} [name="auro-checkbox-group"] - The name of element that you want to register to.
1605
+ *
1606
+ * @example
1607
+ * AuroCheckboxGroup.register("custom-checkbox-group") // this will register this element to <custom-checkbox-group/>
1608
+ *
1609
+ */
1610
+ static register(name = "auro-checkbox-group") {
1611
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroCheckboxGroup);
1612
+ }
1613
+
1614
+ connectedCallback() {
1615
+ super.connectedCallback();
1616
+ this.handleItems();
1617
+ }
1618
+
1619
+ /**
1620
+ * Helper method to handle checkbox value changing.
1621
+ * @private
1622
+ * @param {String} value - The value of the checkbox.
1623
+ * @param {Boolean} selected - The checked state of the checkbox.
1624
+ * @returns {void}
1625
+ */
1626
+ handleValueUpdate(value, selected) {
1627
+ if (selected) {
1628
+ // add if it isn't already in the value list
1629
+ if (!this.value.includes(value)) {
1630
+ this.value.push(value);
1631
+ }
1632
+ } else if (this.value.indexOf(value) > -1) { // eslint-disable-line no-magic-numbers
1633
+ // remove if it is in the value list
1634
+ const index = this.value.indexOf(value);
1635
+
1636
+ this.value.splice(index, 1);
1637
+ }
1638
+
1639
+ this.dispatchEvent(new CustomEvent('input', {
1640
+ bubbles: true,
1641
+ cancelable: false,
1642
+ composed: true,
1643
+ }));
1644
+
1645
+ this.validate(true);
1646
+ }
1647
+
1648
+ firstUpdated() {
1649
+ // Add the tag name as an attribute if it is different than the component name
1650
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-checkbox-group');
1651
+
1652
+ // must declare this function as a variable to correctly pass the reference to the removeEventListener
1653
+ const checkFocusWithin = function(evt) {
1654
+ if (document.auroCheckboxGroupActive && !document.auroCheckboxGroupActive.contains(evt.target)) {
1655
+ // if focus has left the group, cleanup and validate
1656
+ document.auroCheckboxGroupActive.focusWithin = false;
1657
+ window.removeEventListener('focusin', checkFocusWithin);
1658
+ document.removeEventListener('click', checkFocusWithin);
1659
+ // execute the validation
1660
+ document.auroCheckboxGroupActive.validation.validate(document.auroCheckboxGroupActive);
1661
+ }
1662
+ };
1663
+
1664
+ this.addEventListener('auroCheckbox-focusin', () => {
1665
+ this.touched = true;
1666
+
1667
+ if (!this.value) {
1668
+ this.value = [];
1669
+ }
1670
+
1671
+ // handle click outside the group
1672
+ if (!this.focusWithin) {
1673
+ document.addEventListener('click', checkFocusWithin);
1674
+ }
1675
+
1676
+ this.focusWithin = true;
1677
+ });
1678
+
1679
+ this.addEventListener('auroCheckbox-focusout', () => {
1680
+ document.auroCheckboxGroupActive = this;
1681
+
1682
+ // Only add the focusWithin check event listener once as you move focus through the options
1683
+ if (this.focusWithin) {
1684
+ window.addEventListener('focusin', checkFocusWithin);
1685
+ } else {
1686
+ this.focusWithin = true;
1687
+ }
1688
+ });
1689
+
1690
+ this.addEventListener('auroCheckbox-input', (evt) => {
1691
+ this.handleValueUpdate(evt.target.value, evt.target.checked);
1692
+ });
1693
+ }
1694
+
1695
+ /**
1696
+ * Helper method that handles the state of preselected checkboxes.
1697
+ * @private
1698
+ * @returns {void}
1699
+ */
1700
+ handlePreselectedItems() {
1701
+ let preSelectedValues = false;
1702
+
1703
+ this.checkboxes.forEach((item) => {
1704
+ if (item.hasAttribute('checked') && this.value === undefined) {
1705
+ preSelectedValues = true;
1706
+ }
1707
+ });
1708
+
1709
+ if (preSelectedValues) {
1710
+ if (!this.value) {
1711
+ this.value = [];
1712
+ }
1713
+
1714
+ this.checkboxes.forEach((item) => {
1715
+ this.handleValueUpdate(item.getAttribute('value'), Boolean(item.hasAttribute('checked')));
1716
+ });
1717
+ }
1718
+ }
1719
+
1720
+ /**
1721
+ * Helper method that handles the state of checkboxes.
1722
+ * @private
1723
+ * @returns {void}
1724
+ */
1725
+ handleItems() {
1726
+ const groupTagName = this.tagName.toLowerCase();
1727
+ const checkboxTagName = groupTagName.substring(0, groupTagName.indexOf('-group'));
1728
+
1729
+ this.checkboxes = Array.from(this.querySelectorAll(checkboxTagName));
1730
+
1731
+ this.handlePreselectedItems();
1732
+
1733
+ this.validate();
1734
+ }
1735
+
1736
+ /**
1737
+ * Resets component to initial state.
1738
+ * @returns {void}
1739
+ */
1740
+ reset() {
1741
+ this.checkboxes.forEach((checkbox) => {
1742
+ checkbox.reset();
1743
+ });
1744
+
1745
+ this.validation.reset(this);
1746
+ }
1747
+
1748
+ /**
1749
+ * LitElement lifecycle method. Called after the DOM has been updated.
1750
+ * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
1751
+ * @returns {void}
1752
+ */
1753
+ updated(changedProperties) {
1754
+ if (changedProperties.has('layout')) {
1755
+ this.checkboxes.forEach((el) => {
1756
+ el.layout = this.layout;
1757
+ });
1758
+ }
1759
+
1760
+ if (changedProperties.has('disabled')) {
1761
+ this.checkboxes.forEach((el) => {
1762
+ if (this.disabled) {
1763
+ el.setAttribute('disabled', true);
1764
+ } else {
1765
+ el.removeAttribute('disabled');
1766
+ }
1767
+ });
1768
+ }
1769
+
1770
+ if (changedProperties.has('validity')) {
1771
+ this.checkboxes.forEach((el) => {
1772
+ if (this.validity && this.validity !== 'valid') {
1773
+ el.setAttribute('error', true);
1774
+ } else {
1775
+ el.removeAttribute('error');
1776
+ }
1777
+ });
1778
+ }
1779
+
1780
+ if (changedProperties.has('required')) {
1781
+ if (this.required) {
1782
+ this.setAttribute('aria-required', true);
1783
+ } else {
1784
+ this.removeAttribute('aria-required');
1785
+ }
1786
+ }
1787
+
1788
+ if (changedProperties.has('onDark')) {
1789
+ this.checkboxes.forEach((el) => {
1790
+ el.onDark = this.onDark;
1791
+ });
1792
+ }
1793
+
1794
+ if (changedProperties.has('error')) {
1795
+ if (this.error) {
1796
+ this.setAttribute('aria-invalid', true);
1797
+ } else {
1798
+ this.removeAttribute('aria-invalid');
1799
+ }
1800
+
1801
+ this.validate(true);
1802
+ }
1803
+ }
1804
+
1805
+ /**
1806
+ * Validates value.
1807
+ * @param {boolean} [force=false] - Whether to force validation.
1808
+ */
1809
+ validate(force = false) {
1810
+ this.validation.validate(this, force);
1811
+ }
1812
+
1813
+ render() {
1814
+ const groupClasses = {
1815
+ 'displayFlex': this.horizontal && this.checkboxes.length <= this.maxNumber
1816
+ };
1817
+
1818
+ return u`
1819
+ <fieldset class="${e(groupClasses)}">
1820
+ <legend>
1821
+ <slot name="legend"></slot>
1822
+ ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
1823
+ </legend>
1824
+ <slot @slotchange=${this.handleItems}></slot>
1825
+ </fieldset>
1826
+
1827
+ ${!this.validity || this.validity === undefined || this.validity === 'valid'
1828
+ ? u`
1829
+ <${this.helpTextTag} part="helpText" ?onDark="${this.onDark}">
1830
+ <slot name="helpText"></slot>
1831
+ </${this.helpTextTag}>`
1832
+ : u`
1833
+ <${this.helpTextTag} error ?onDark="${this.onDark}" role="alert" aria-live="assertive" part="helpText">
1834
+ ${this.errorMessage}
1835
+ </${this.helpTextTag}>`
1836
+ }
1837
+ `;
1838
+ }
1839
+ }
1840
+
1841
+ AuroCheckbox.register(); // registering to `auro-checkbox`
1842
+ AuroCheckboxGroup.register(); // registering to `auro-checkbox-group`
1843
+
1844
+ AuroCheckbox.register('custom-checkbox');
1845
+ AuroCheckboxGroup.register('custom-checkbox-group');