@cfpb/cfpb-design-system 4.0.3 → 4.1.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 (92) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/dist/base/index.css +1 -1
  3. package/dist/base/index.css.map +2 -2
  4. package/dist/base/index.js +1 -1
  5. package/dist/base/index.js.map +1 -1
  6. package/dist/components/cfpb-buttons/index.css +1 -1
  7. package/dist/components/cfpb-buttons/index.css.map +2 -2
  8. package/dist/components/cfpb-buttons/index.js +1 -1
  9. package/dist/components/cfpb-buttons/index.js.map +1 -1
  10. package/dist/components/cfpb-expandables/index.css +1 -1
  11. package/dist/components/cfpb-expandables/index.css.map +2 -2
  12. package/dist/components/cfpb-expandables/index.js +1 -1
  13. package/dist/components/cfpb-expandables/index.js.map +1 -1
  14. package/dist/components/cfpb-forms/index.css +1 -1
  15. package/dist/components/cfpb-forms/index.css.map +2 -2
  16. package/dist/components/cfpb-forms/index.js +1 -1
  17. package/dist/components/cfpb-forms/index.js.map +1 -1
  18. package/dist/components/cfpb-icons/index.css +1 -1
  19. package/dist/components/cfpb-icons/index.css.map +2 -2
  20. package/dist/components/cfpb-icons/index.js +1 -1
  21. package/dist/components/cfpb-icons/index.js.map +1 -1
  22. package/dist/components/cfpb-layout/index.css +1 -1
  23. package/dist/components/cfpb-layout/index.css.map +2 -2
  24. package/dist/components/cfpb-layout/index.js +1 -1
  25. package/dist/components/cfpb-layout/index.js.map +1 -1
  26. package/dist/components/cfpb-notifications/index.css +1 -1
  27. package/dist/components/cfpb-notifications/index.css.map +2 -2
  28. package/dist/components/cfpb-notifications/index.js +1 -1
  29. package/dist/components/cfpb-notifications/index.js.map +1 -1
  30. package/dist/components/cfpb-pagination/index.css +1 -1
  31. package/dist/components/cfpb-pagination/index.css.map +2 -2
  32. package/dist/components/cfpb-pagination/index.js +1 -1
  33. package/dist/components/cfpb-pagination/index.js.map +1 -1
  34. package/dist/components/cfpb-tables/index.css +1 -1
  35. package/dist/components/cfpb-tables/index.css.map +2 -2
  36. package/dist/components/cfpb-tables/index.js +1 -1
  37. package/dist/components/cfpb-tables/index.js.map +1 -1
  38. package/dist/components/cfpb-tooltips/index.css +1 -1
  39. package/dist/components/cfpb-tooltips/index.css.map +2 -2
  40. package/dist/components/cfpb-tooltips/index.js +1 -1
  41. package/dist/components/cfpb-tooltips/index.js.map +1 -1
  42. package/dist/components/cfpb-typography/index.css +1 -1
  43. package/dist/components/cfpb-typography/index.css.map +2 -2
  44. package/dist/components/cfpb-typography/index.js +1 -1
  45. package/dist/components/cfpb-typography/index.js.map +1 -1
  46. package/dist/elements/cfpb-button/index.js +12 -4
  47. package/dist/elements/cfpb-button/index.js.map +4 -4
  48. package/dist/elements/cfpb-file-upload/index.js +11 -4
  49. package/dist/elements/cfpb-file-upload/index.js.map +4 -4
  50. package/dist/elements/cfpb-form-choice/index.js +11 -3
  51. package/dist/elements/cfpb-form-choice/index.js.map +4 -4
  52. package/dist/elements/cfpb-label/index.js +36 -0
  53. package/dist/elements/cfpb-label/index.js.map +7 -0
  54. package/dist/elements/cfpb-multiselect/index.js +13 -4
  55. package/dist/elements/cfpb-multiselect/index.js.map +4 -4
  56. package/dist/elements/cfpb-tag-filter/index.js +2 -2
  57. package/dist/elements/cfpb-tag-filter/index.js.map +2 -2
  58. package/dist/elements/cfpb-tag-group/index.js +2 -2
  59. package/dist/elements/cfpb-tag-group/index.js.map +2 -2
  60. package/dist/elements/cfpb-tag-topic/index.js +3 -3
  61. package/dist/elements/cfpb-tag-topic/index.js.map +2 -2
  62. package/dist/elements/index.js +14 -5
  63. package/dist/elements/index.js.map +4 -4
  64. package/dist/index.css +1 -1
  65. package/dist/index.css.map +2 -2
  66. package/dist/index.js +14 -5
  67. package/dist/index.js.map +4 -4
  68. package/dist/utilities/index.css +1 -1
  69. package/dist/utilities/index.css.map +2 -2
  70. package/dist/utilities/index.js +1 -1
  71. package/dist/utilities/index.js.map +1 -1
  72. package/package.json +1 -1
  73. package/src/abstracts/heading-mixins.scss +6 -0
  74. package/src/abstracts/vars.scss +23 -0
  75. package/src/base/base.scss +1 -1
  76. package/src/elements/cfpb-button/cfpb-button.component.scss +8 -0
  77. package/src/elements/cfpb-button/index.js +102 -19
  78. package/src/elements/cfpb-file-upload/index.js +6 -2
  79. package/src/elements/cfpb-form-choice/cfpb-form-choice.component.scss +6 -1
  80. package/src/elements/cfpb-form-choice/index.js +62 -29
  81. package/src/elements/cfpb-form-choice/index.spec.js +47 -0
  82. package/src/elements/cfpb-label/cfpb-label.component.scss +36 -0
  83. package/src/elements/cfpb-label/index.js +61 -0
  84. package/src/elements/cfpb-multiselect/cfpb-multiselect.component.scss +225 -0
  85. package/src/elements/cfpb-multiselect/index.js +444 -0
  86. package/src/elements/cfpb-multiselect/multiselect-model.js +288 -0
  87. package/src/elements/cfpb-multiselect/multiselect-model.spec.js +236 -0
  88. package/src/elements/cfpb-tag-filter/index.js +1 -1
  89. package/src/elements/cfpb-tag-filter/index.spec.js +1 -1
  90. package/src/elements/cfpb-tag-group/index.js +2 -1
  91. package/src/elements/cfpb-tag-topic/index.js +6 -0
  92. package/src/elements/index.js +2 -0
@@ -1,6 +1,6 @@
1
- (()=>{var Gt=Object.defineProperty;var ft=r=>{throw TypeError(r)};var Qt=(r,t,e)=>t in r?Gt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var $t=(r,t,e)=>Qt(r,typeof t!="symbol"?t+"":t,e),Z=(r,t,e)=>t.has(r)||ft("Cannot "+e);var _=(r,t,e)=>(Z(r,t,"read from private field"),e?e.call(r):t.get(r)),O=(r,t,e)=>t.has(r)?ft("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),j=(r,t,e,s)=>(Z(r,t,"write to private field"),s?s.call(r,e):t.set(r,e),e),f=(r,t,e)=>(Z(r,t,"access private method"),e);var mt=(r,t,e)=>new Promise((s,i)=>{var n=a=>{try{h(e.next(a))}catch(l){i(l)}},o=a=>{try{h(e.throw(a))}catch(l){i(l)}},h=a=>a.done?s(a.value):Promise.resolve(a.value).then(n,o);h((e=e.apply(r,t)).next())});var q=globalThis,V=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),gt=new WeakMap,N=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(V&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=gt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&gt.set(e,t))}return t}toString(){return this.cssText}},W=r=>new N(typeof r=="string"?r:r+"",void 0,G),Q=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1]),r[0]);return new N(e,r,G)},_t=(r,t)=>{if(V)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=q.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},X=V?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return W(e)})(r):r;var{is:Xt,defineProperty:Yt,getOwnPropertyDescriptor:te,getOwnPropertyNames:ee,getOwnPropertySymbols:se,getPrototypeOf:ie}=Object,v=globalThis,vt=v.trustedTypes,re=vt?vt.emptyScript:"",Y=v.reactiveElementPolyfillSupport,R=(r,t)=>r,tt={toAttribute(r,t){switch(t){case Boolean:r=r?re:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch(s){e=null}}return e}},St=(r,t)=>!Xt(r,t),yt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:St},At,bt;(At=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(bt=v.litPropertyMetadata)!=null||(v.litPropertyMetadata=new WeakMap);var m=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=yt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Yt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var o;let{get:i,set:n}=(o=te(this.prototype,t))!=null?o:{get(){return this[e]},set(h){this[e]=h}};return{get:i,set(h){let a=i==null?void 0:i.call(this);n==null||n.call(this,h),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:yt}static _$Ei(){if(this.hasOwnProperty(R("elementProperties")))return;let t=ie(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(R("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(R("properties"))){let e=this.properties,s=[...ee(e),...se(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(X(i))}else t!==void 0&&e.push(X(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return _t(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:tt).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o,h,a;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let l=s.getPropertyOptions(i),p=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:tt;this._$Em=i,this[i]=(a=(h=p.fromAttribute(e,l.type))!=null?h:(o=this._$Ej)==null?void 0:o.get(i))!=null?a:null,this._$Em=null}}requestUpdate(t,e,s){var i,n;if(t!==void 0){let o=this.constructor,h=this[t];if(s!=null||(s=o.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:St)(h,e)||s.useDefault&&s.reflect&&h===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){var h,a,l;s&&!((h=this._$Ej)!=null?h:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(a=o!=null?o:e)!=null?a:this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}_$EP(){return mt(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,h]of this._$Ep)this[o]=h;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,h]of n){let{wrapped:a}=h,l=this[o];a!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,h,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach((n=>{var o;return(o=n.hostUpdate)==null?void 0:o.call(n)})),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}},Et;m.elementStyles=[],m.shadowRootOptions={mode:"open"},m[R("elementProperties")]=new Map,m[R("finalized")]=new Map,Y==null||Y({ReactiveElement:m}),((Et=v.reactiveElementVersions)!=null?Et:v.reactiveElementVersions=[]).push("2.1.0");var M=globalThis,F=M.trustedTypes,wt=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,Nt="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,Rt="?"+y,oe=`<${Rt}>`,S=document,k=()=>S.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",ht=Array.isArray,ne=r=>ht(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",et=`[
1
+ (()=>{var Gt=Object.defineProperty;var ft=r=>{throw TypeError(r)};var Qt=(r,t,e)=>t in r?Gt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var $t=(r,t,e)=>Qt(r,typeof t!="symbol"?t+"":t,e),Z=(r,t,e)=>t.has(r)||ft("Cannot "+e);var _=(r,t,e)=>(Z(r,t,"read from private field"),e?e.call(r):t.get(r)),O=(r,t,e)=>t.has(r)?ft("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),B=(r,t,e,s)=>(Z(r,t,"write to private field"),s?s.call(r,e):t.set(r,e),e),f=(r,t,e)=>(Z(r,t,"access private method"),e);var mt=(r,t,e)=>new Promise((s,i)=>{var n=a=>{try{h(e.next(a))}catch(l){i(l)}},o=a=>{try{h(e.throw(a))}catch(l){i(l)}},h=a=>a.done?s(a.value):Promise.resolve(a.value).then(n,o);h((e=e.apply(r,t)).next())});var q=globalThis,V=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),gt=new WeakMap,N=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(V&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=gt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&gt.set(e,t))}return t}toString(){return this.cssText}},W=r=>new N(typeof r=="string"?r:r+"",void 0,G),Q=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1]),r[0]);return new N(e,r,G)},_t=(r,t)=>{if(V)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=q.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},X=V?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return W(e)})(r):r;var{is:Xt,defineProperty:Yt,getOwnPropertyDescriptor:te,getOwnPropertyNames:ee,getOwnPropertySymbols:se,getPrototypeOf:ie}=Object,v=globalThis,vt=v.trustedTypes,re=vt?vt.emptyScript:"",Y=v.reactiveElementPolyfillSupport,R=(r,t)=>r,tt={toAttribute(r,t){switch(t){case Boolean:r=r?re:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch(s){e=null}}return e}},St=(r,t)=>!Xt(r,t),yt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:St},At,bt;(At=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(bt=v.litPropertyMetadata)!=null||(v.litPropertyMetadata=new WeakMap);var m=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=yt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Yt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var o;let{get:i,set:n}=(o=te(this.prototype,t))!=null?o:{get(){return this[e]},set(h){this[e]=h}};return{get:i,set(h){let a=i==null?void 0:i.call(this);n==null||n.call(this,h),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:yt}static _$Ei(){if(this.hasOwnProperty(R("elementProperties")))return;let t=ie(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(R("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(R("properties"))){let e=this.properties,s=[...ee(e),...se(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(X(i))}else t!==void 0&&e.push(X(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return _t(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:tt).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o,h,a;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let l=s.getPropertyOptions(i),p=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:tt;this._$Em=i,this[i]=(a=(h=p.fromAttribute(e,l.type))!=null?h:(o=this._$Ej)==null?void 0:o.get(i))!=null?a:null,this._$Em=null}}requestUpdate(t,e,s){var i,n;if(t!==void 0){let o=this.constructor,h=this[t];if(s!=null||(s=o.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:St)(h,e)||s.useDefault&&s.reflect&&h===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){var h,a,l;s&&!((h=this._$Ej)!=null?h:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(a=o!=null?o:e)!=null?a:this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}_$EP(){return mt(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,h]of this._$Ep)this[o]=h;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,h]of n){let{wrapped:a}=h,l=this[o];a!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,h,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach((n=>{var o;return(o=n.hostUpdate)==null?void 0:o.call(n)})),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}},Et;m.elementStyles=[],m.shadowRootOptions={mode:"open"},m[R("elementProperties")]=new Map,m[R("finalized")]=new Map,Y==null||Y({ReactiveElement:m}),((Et=v.reactiveElementVersions)!=null?Et:v.reactiveElementVersions=[]).push("2.1.0");var M=globalThis,F=M.trustedTypes,wt=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,Nt="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,Rt="?"+y,oe=`<${Rt}>`,S=document,k=()=>S.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",ht=Array.isArray,ne=r=>ht(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",et=`[
2
2
  \f\r]`,L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,xt=/>/g,b=RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Pt=/'/g,Tt=/"/g,Lt=/^(?:script|style|textarea|title)$/i,lt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Mt=lt(1),$e=lt(2),me=lt(3),w=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),Ut=new WeakMap,E=S.createTreeWalker(S,129);function kt(r,t){if(!ht(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return wt!==void 0?wt.createHTML(t):t}var ae=(r,t)=>{let e=r.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",o=L;for(let h=0;h<e;h++){let a=r[h],l,p,d=-1,$=0;for(;$<a.length&&(o.lastIndex=$,p=o.exec(a),p!==null);)$=o.lastIndex,o===L?p[1]==="!--"?o=Ct:p[1]!==void 0?o=xt:p[2]!==void 0?(Lt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=b):p[3]!==void 0&&(o=b):o===b?p[0]===">"?(o=i!=null?i:L,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,l=p[1],o=p[3]===void 0?b:p[3]==='"'?Tt:Pt):o===Tt||o===Pt?o=b:o===Ct||o===xt?o=L:(o=b,i=void 0);let g=o===b&&r[h+1].startsWith("/>")?" ":"";n+=o===L?a+oe:d>=0?(s.push(l),a.slice(0,d)+Nt+a.slice(d)+y+g):a+y+(d===-2?h:g)}return[kt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},D=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0,h=t.length-1,a=this.parts,[l,p]=ae(t,e);if(this.el=r.createElement(l,s),E.currentNode=this.el.content,e===2||e===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=E.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(Nt)){let $=p[o++],g=i.getAttribute(d).split(y),z=/([.?@])?(.*)/.exec($);a.push({type:1,index:n,name:z[2],strings:g,ctor:z[1]==="."?rt:z[1]==="?"?ot:z[1]==="@"?nt:T}),i.removeAttribute(d)}else d.startsWith(y)&&(a.push({type:6,index:n}),i.removeAttribute(d));if(Lt.test(i.tagName)){let d=i.textContent.split(y),$=d.length-1;if($>0){i.textContent=F?F.emptyScript:"";for(let g=0;g<$;g++)i.append(d[g],k()),E.nextNode(),a.push({type:2,index:++n});i.append(d[$],k())}}}else if(i.nodeType===8)if(i.data===Rt)a.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(y,d+1))!==-1;)a.push({type:7,index:n}),d+=y.length-1}n++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function P(r,t,e=r,s){var o,h,a;if(t===w)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl,n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?((a=e._$Co)!=null?a:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=P(r,i._$AS(r,t.values),i,s)),t}var it=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:S).importNode(e,!0);E.currentNode=i;let n=E.nextNode(),o=0,h=0,a=s[0];for(;a!==void 0;){if(o===a.index){let p;a.type===2?p=new I(n,n.nextSibling,this,t):a.type===1?p=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(p=new at(n,this,t)),this._$AV.push(p),a=s[++h]}o!==(a==null?void 0:a.index)&&(n=E.nextNode(),o++)}return E.currentNode=S,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},I=class r{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),H(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ne(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!==u&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=D.createElement(kt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let o=new it(i,this),h=o.u(this.options);o.p(e),this.T(h),this._$AH=o}}_$AC(t){let e=Ut.get(t.strings);return e===void 0&&Ut.set(t.strings,e=new D(t)),e}k(t){ht(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new r(this.O(k()),this.O(k()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},T=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){let n=this.strings,o=!1;if(n===void 0)t=P(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{let h=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=P(this,h[s+a],e,a),l===w&&(l=this._$AH[a]),o||(o=!H(l)||l!==this._$AH[a]),l===u?t=u:t!==u&&(t+=(l!=null?l:"")+n[a+1]),this._$AH[a]=l}o&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},rt=class extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},ot=class extends T{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},nt=class extends T{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var o;if((t=(o=P(this,t,e,0))!=null?o:u)===w)return;let s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}};var st=M.litHtmlPolyfillSupport,Ot;st==null||st(D,I),((Ot=M.litHtmlVersions)!=null?Ot:M.litHtmlVersions=[]).push("3.3.0");var Ht=(r,t,e)=>{var n,o;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let h=(o=e==null?void 0:e.renderBefore)!=null?o:null;s._$litPart$=i=new I(t.insertBefore(k(),h),h,void 0,e!=null?e:{})}return i._$AI(r),i};var C=globalThis,A=class extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return w}},Dt;A._$litElement$=!0,A.finalized=!0,(Dt=C.litElementHydrateSupport)==null||Dt.call(C,{LitElement:A});var ct=C.litElementPolyfillSupport;ct==null||ct({LitElement:A});var It;((It=C.litElementVersions)!=null?It:C.litElementVersions=[]).push("4.2.0");var Bt=":root{--input-text-default:var(--black);--input-text-disabled-default:var(--gray-dark);--input-text-placeholder-default:var(--gray-dark);--input-border-default:var(--gray-60);--input-border-disabled:var(--gray-60);--input-border-success:var(--green);--input-border-warning:var(--gold);--input-border-error:var(--red);--input-border-hover-default:var(--pacific);--input-border-focus-default:var(--pacific);--input-bg-default:var(--white);--input-bg-disabled-default:var(--gray-10);--form-alert-icon-color-default:var(--gray);--form-alert-icon-color-success:var(--green);--form-alert-icon-color-warning:var(--gold);--form-alert-icon-color-error:var(--red);--select-border-default:var(--gray-60);--select-border-width-default:1px;--select-border-error:var(--red);--select-border-width-error:2px;--select-border-hover-default:var(--pacific);--select-border-focus-default:var(--pacific);--select-bg-disabled-default:var(--gray-10);--select-icon-bg-default:var(--gray-10);--select-text-disabled-default:var(--gray-dark);--choice-border-default:var(--gray-60);--choice-border-disabled:var(--gray-60);--choice-border-success:var(--green);--choice-border-warning:var(--gold);--choice-border-error:var(--red);--choice-border-hover-default:var(--pacific);--choice-border-focus-default:var(--pacific);--choice-outline-focus-default:var(--pacific);--choice-bg-default:var(--white);--choice-bg-disabled:var(--gray-10);--choice-bg-selected-default:var(--pacific);--choice-bg-selected-disabled:var(--gray-40);--choice-bg-selected-focus-default:var(--pacific);--choice-label-disabled-default:var(--gray-dark)}:host ul{list-style-type:none;padding-left:0}:host ul li{display:contents;margin-bottom:0}@media only screen and (min-width:37.5625em){:host ul{display:flex;flex-wrap:wrap;gap:.9375rem}:host ul[stacked]{flex-direction:column;width:fit-content}}:host ul:has(cfpb-tag-filter){display:flex;flex-wrap:wrap;gap:.9375rem}:host html[lang=ar]{direction:rtl;padding-right:0}";var zt=["CFPB-TAG-FILTER","CFPB-TAG-TOPIC"],U,B,x,c,qt,dt,Vt,Wt,Ft,pt,Kt,Jt,ut,K,Zt,J=class J extends A{constructor(){super();O(this,c);O(this,U);O(this,B,!1);O(this,x);this.stacked=!1,this.tagList=[],j(this,U,new MutationObserver(f(this,c,Vt).bind(this)))}static get properties(){return{stacked:{type:Boolean,reflect:!0},tagList:{type:Array}}}connectedCallback(){super.connectedCallback(),f(this,c,qt).call(this)}disconnectedCallback(){_(this,U).disconnect(),super.disconnectedCallback()}firstUpdated(){requestAnimationFrame(()=>{zt.forEach(e=>{this.querySelectorAll(`${e.toLowerCase()}`).forEach(i=>this.addTag(i))}),j(this,B,!0)})}addTag(e,s=-1){if(!Array.from(this.children).includes(e))return f(this,c,Kt).call(this,e,s),!1;f(this,c,Jt).call(this,e,s),f(this,c,pt).call(this)}removeTag(e){let s=f(this,c,Zt).call(this,e);f(this,c,K).call(this,s)}render(){return Mt`<ul ?stacked="${this.stacked}"></ul>`}static init(){window.customElements.get("cfpb-tag-group")||window.customElements.define("cfpb-tag-group",J)}};U=new WeakMap,B=new WeakMap,x=new WeakMap,c=new WeakSet,qt=function(){_(this,U).observe(this,{childList:!0,subtree:!1})},dt=function(e){return zt.includes(e)},Vt=function(e){if(_(this,B))for(let s of e)s.type==="childList"&&(s.addedNodes.forEach(i=>f(this,c,Wt).call(this,i)),s.removedNodes.forEach(i=>f(this,c,Ft).call(this,i)))},Wt=function(e){if(f(this,c,dt).call(this,e.tagName)){let s=Array.from(this.children).indexOf(e);this.addTag(e,s)}},Ft=function(e){f(this,c,dt).call(this,e.tagName)&&f(this,c,K).call(this,e)},pt=function(){if(this.tagList=[...this.renderRoot.querySelectorAll("ul li > *")],this.tagList.length>0){let e=!1;this.tagList.forEach(s=>{e&&(s.siblingOfJumpLink=!0,e=!1),s.href!==""&&(e=!0)})}},Kt=function(e,s){s===-1||s>=this.children.length?this.appendChild(e):this.insertBefore(e,this.children[s])},Jt=function(e,s){var l;let i=e.cloneNode(!0),n=document.createElement("li");n.appendChild(i);let o=this.shadowRoot.querySelector("ul"),h=s;s===-1||s>=o.children.length?(o.appendChild(n),h=o.children.length-1):o.insertBefore(n,o.children[s]),i.addEventListener("tag-click",()=>{this.dispatchEvent(new CustomEvent("tag-click",{detail:{target:i,index:h},bubbles:!0,composed:!0})),f(this,c,K).call(this,i)}),(l=_(this,x))!=null||j(this,x,new Map);let a=f(this,c,ut).call(this,e);_(this,x).set(a,n),this.dispatchEvent(new CustomEvent("tag-added",{detail:{target:e,index:h},bubbles:!0,composed:!0}))},ut=function(e){return`${e.tagName}::${e.textContent.trim()}`},K=function(e){let s=f(this,c,ut).call(this,e),i=_(this,x).get(s);if(!i)return!1;let n=Array.from(this.children).indexOf(e);n===-1&&i.parentElement&&(n=Array.from(i.parentElement.children).indexOf(i)),e.parentElement===this&&e.remove(),i.parentElement&&i.remove(),_(this,x).delete(s),this.dispatchEvent(new CustomEvent("tag-removed",{detail:{target:e,index:n},bubbles:!0,composed:!0})),f(this,c,pt).call(this)},Zt=function(e){return e.tagName==="LI"&&e.shadowRoot?e.querySelector("cfpb-tag-filter"):this.contains(e)?e:null},$t(J,"styles",Q`${W(Bt)}`);var jt=J;})();
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Pt=/'/g,Tt=/"/g,Lt=/^(?:script|style|textarea|title)$/i,lt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Mt=lt(1),$e=lt(2),me=lt(3),w=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),Ut=new WeakMap,E=S.createTreeWalker(S,129);function kt(r,t){if(!ht(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return wt!==void 0?wt.createHTML(t):t}var ae=(r,t)=>{let e=r.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",o=L;for(let h=0;h<e;h++){let a=r[h],l,p,d=-1,$=0;for(;$<a.length&&(o.lastIndex=$,p=o.exec(a),p!==null);)$=o.lastIndex,o===L?p[1]==="!--"?o=Ct:p[1]!==void 0?o=xt:p[2]!==void 0?(Lt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=b):p[3]!==void 0&&(o=b):o===b?p[0]===">"?(o=i!=null?i:L,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,l=p[1],o=p[3]===void 0?b:p[3]==='"'?Tt:Pt):o===Tt||o===Pt?o=b:o===Ct||o===xt?o=L:(o=b,i=void 0);let g=o===b&&r[h+1].startsWith("/>")?" ":"";n+=o===L?a+oe:d>=0?(s.push(l),a.slice(0,d)+Nt+a.slice(d)+y+g):a+y+(d===-2?h:g)}return[kt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},j=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0,h=t.length-1,a=this.parts,[l,p]=ae(t,e);if(this.el=r.createElement(l,s),E.currentNode=this.el.content,e===2||e===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=E.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(Nt)){let $=p[o++],g=i.getAttribute(d).split(y),z=/([.?@])?(.*)/.exec($);a.push({type:1,index:n,name:z[2],strings:g,ctor:z[1]==="."?rt:z[1]==="?"?ot:z[1]==="@"?nt:T}),i.removeAttribute(d)}else d.startsWith(y)&&(a.push({type:6,index:n}),i.removeAttribute(d));if(Lt.test(i.tagName)){let d=i.textContent.split(y),$=d.length-1;if($>0){i.textContent=F?F.emptyScript:"";for(let g=0;g<$;g++)i.append(d[g],k()),E.nextNode(),a.push({type:2,index:++n});i.append(d[$],k())}}}else if(i.nodeType===8)if(i.data===Rt)a.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(y,d+1))!==-1;)a.push({type:7,index:n}),d+=y.length-1}n++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function P(r,t,e=r,s){var o,h,a;if(t===w)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl,n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?((a=e._$Co)!=null?a:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=P(r,i._$AS(r,t.values),i,s)),t}var it=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:S).importNode(e,!0);E.currentNode=i;let n=E.nextNode(),o=0,h=0,a=s[0];for(;a!==void 0;){if(o===a.index){let p;a.type===2?p=new D(n,n.nextSibling,this,t):a.type===1?p=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(p=new at(n,this,t)),this._$AV.push(p),a=s[++h]}o!==(a==null?void 0:a.index)&&(n=E.nextNode(),o++)}return E.currentNode=S,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},D=class r{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),H(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ne(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!==u&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=j.createElement(kt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let o=new it(i,this),h=o.u(this.options);o.p(e),this.T(h),this._$AH=o}}_$AC(t){let e=Ut.get(t.strings);return e===void 0&&Ut.set(t.strings,e=new j(t)),e}k(t){ht(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new r(this.O(k()),this.O(k()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},T=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){let n=this.strings,o=!1;if(n===void 0)t=P(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{let h=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=P(this,h[s+a],e,a),l===w&&(l=this._$AH[a]),o||(o=!H(l)||l!==this._$AH[a]),l===u?t=u:t!==u&&(t+=(l!=null?l:"")+n[a+1]),this._$AH[a]=l}o&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},rt=class extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},ot=class extends T{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},nt=class extends T{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var o;if((t=(o=P(this,t,e,0))!=null?o:u)===w)return;let s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}};var st=M.litHtmlPolyfillSupport,Ot;st==null||st(j,D),((Ot=M.litHtmlVersions)!=null?Ot:M.litHtmlVersions=[]).push("3.3.0");var Ht=(r,t,e)=>{var n,o;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let h=(o=e==null?void 0:e.renderBefore)!=null?o:null;s._$litPart$=i=new D(t.insertBefore(k(),h),h,void 0,e!=null?e:{})}return i._$AI(r),i};var C=globalThis,A=class extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return w}},jt;A._$litElement$=!0,A.finalized=!0,(jt=C.litElementHydrateSupport)==null||jt.call(C,{LitElement:A});var ct=C.litElementPolyfillSupport;ct==null||ct({LitElement:A});var Dt;((Dt=C.litElementVersions)!=null?Dt:C.litElementVersions=[]).push("4.2.0");var It=":root{--font-adjust-base:0.517;--font-adjust-step:0.0054;--font-adjust-h1:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*5);--font-adjust-h2:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*4);--font-adjust-h3:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*3);--font-adjust-h4:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*2);--font-adjust-h5:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*1);--font-adjust-h6:var(--font-adjust-base);--font-adjust-body:var(--font-adjust-base);--input-text-default:var(--black);--input-text-disabled-default:var(--gray-dark);--input-text-placeholder-default:var(--gray-dark);--input-border-default:var(--gray-60);--input-border-disabled:var(--gray-60);--input-border-success:var(--green);--input-border-warning:var(--gold);--input-border-error:var(--red);--input-border-hover-default:var(--pacific);--input-border-focus-default:var(--pacific);--input-bg-default:var(--white);--input-bg-disabled-default:var(--gray-10);--form-alert-icon-color-default:var(--gray);--form-alert-icon-color-success:var(--green);--form-alert-icon-color-warning:var(--gold);--form-alert-icon-color-error:var(--red);--select-border-default:var(--gray-60);--select-border-width-default:1px;--select-border-error:var(--red);--select-border-width-error:2px;--select-border-hover-default:var(--pacific);--select-border-focus-default:var(--pacific);--select-bg-disabled-default:var(--gray-10);--select-icon-bg-default:var(--gray-10);--select-text-disabled-default:var(--gray-dark);--choice-border-default:var(--gray-60);--choice-border-disabled:var(--gray-60);--choice-border-success:var(--green);--choice-border-warning:var(--gold);--choice-border-error:var(--red);--choice-border-hover-default:var(--pacific);--choice-border-focus-default:var(--pacific);--choice-outline-focus-default:var(--pacific);--choice-bg-default:var(--white);--choice-bg-disabled:var(--gray-10);--choice-bg-selected-default:var(--pacific);--choice-bg-selected-disabled:var(--gray-40);--choice-bg-selected-focus-default:var(--pacific);--choice-label-disabled-default:var(--gray-dark)}:host ul{list-style-type:none;padding-left:0}:host ul li{display:contents;margin-bottom:0}@media only screen and (min-width:37.5625em){:host ul{display:flex;flex-wrap:wrap;gap:.9375rem}:host ul[stacked]{flex-direction:column;width:fit-content}}:host ul:has(cfpb-tag-filter){display:flex;flex-wrap:wrap;gap:.9375rem}:host html[lang=ar]{direction:rtl;padding-right:0}";var zt=["CFPB-TAG-FILTER","CFPB-TAG-TOPIC"],U,I,x,c,qt,dt,Vt,Wt,Ft,pt,Kt,Jt,ut,K,Zt,J=class J extends A{constructor(){super();O(this,c);O(this,U);O(this,I,!1);O(this,x);this.stacked=!1,this.tagList=[],B(this,U,new MutationObserver(f(this,c,Vt).bind(this)))}static get properties(){return{stacked:{type:Boolean,reflect:!0},tagList:{type:Array}}}connectedCallback(){super.connectedCallback(),f(this,c,qt).call(this)}disconnectedCallback(){_(this,U).disconnect(),super.disconnectedCallback()}firstUpdated(){requestAnimationFrame(()=>{zt.forEach(e=>{this.querySelectorAll(`${e.toLowerCase()}`).forEach(i=>this.addTag(i))}),B(this,I,!0)})}addTag(e,s=-1){if(!Array.from(this.children).includes(e))return f(this,c,Kt).call(this,e,s),!1;f(this,c,Jt).call(this,e,s),f(this,c,pt).call(this)}removeTag(e){let s=f(this,c,Zt).call(this,e);f(this,c,K).call(this,s)}render(){return Mt`<ul ?stacked="${this.stacked}"></ul>`}static init(){window.customElements.get("cfpb-tag-group")||window.customElements.define("cfpb-tag-group",J)}};U=new WeakMap,I=new WeakMap,x=new WeakMap,c=new WeakSet,qt=function(){_(this,U).observe(this,{childList:!0,subtree:!1})},dt=function(e){return zt.includes(e)},Vt=function(e){if(_(this,I))for(let s of e)s.type==="childList"&&(s.addedNodes.forEach(i=>f(this,c,Wt).call(this,i)),s.removedNodes.forEach(i=>f(this,c,Ft).call(this,i)))},Wt=function(e){if(f(this,c,dt).call(this,e.tagName)){let s=Array.from(this.children).indexOf(e);this.addTag(e,s)}},Ft=function(e){f(this,c,dt).call(this,e.tagName)&&f(this,c,K).call(this,e)},pt=function(){if(this.tagList=[...this.renderRoot.querySelectorAll("ul li > *")],this.tagList.length>0){let e=!1;this.tagList.forEach(s=>{e&&(s.siblingOfJumpLink=!0,e=!1),s.href!==""&&(e=!0)})}},Kt=function(e,s){s===-1||s>=this.children.length?this.appendChild(e):this.insertBefore(e,this.children[s])},Jt=function(e,s){var l;let i=e.cloneNode(!0),n=document.createElement("li");n.appendChild(i);let o=this.shadowRoot.querySelector("ul"),h=s;s===-1||s>=o.children.length?(o.appendChild(n),h=o.children.length-1):o.insertBefore(n,o.children[s]),i.addEventListener("tag-click",()=>{this.dispatchEvent(new CustomEvent("tag-click",{detail:{target:i,index:h},bubbles:!0,composed:!0})),f(this,c,K).call(this,i)}),(l=_(this,x))!=null||B(this,x,new Map);let a=f(this,c,ut).call(this,e);_(this,x).set(a,n),this.dispatchEvent(new CustomEvent("tag-added",{detail:{target:e,index:h},bubbles:!0,composed:!0}))},ut=function(e){return`${e.tagName}::${e.textContent.trim()}`},K=function(e){let s=f(this,c,ut).call(this,e),i=_(this,x).get(s);if(!i)return!1;let n=Array.from(this.children).indexOf(e);n===-1&&i.parentElement&&(n=Array.from(i.parentElement.children).indexOf(i)),e.parentElement===this&&e.remove(),i.parentElement&&i.remove(),_(this,x).delete(s),this.dispatchEvent(new CustomEvent("tag-removed",{detail:{target:e,index:n},bubbles:!0,composed:!0})),f(this,c,pt).call(this)},Zt=function(e){return e.tagName==="LI"&&e.shadowRoot?e.querySelector("cfpb-tag-filter"):this.contains(e)?e:null},$t(J,"styles",Q`${W(It)}`);var Bt=J;})();
4
4
  /*! Bundled license information:
5
5
 
6
6
  @lit/reactive-element/css-tag.js: