@cfpb/cfpb-design-system 3.9.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -1
- package/dist/base/index.css +1 -1
- package/dist/base/index.css.map +2 -2
- package/dist/base/index.js +1 -1
- package/dist/base/index.js.map +1 -1
- package/dist/components/cfpb-buttons/index.css +1 -1
- package/dist/components/cfpb-buttons/index.css.map +2 -2
- package/dist/components/cfpb-buttons/index.js +1 -1
- package/dist/components/cfpb-buttons/index.js.map +1 -1
- package/dist/components/cfpb-expandables/index.css +1 -1
- package/dist/components/cfpb-expandables/index.css.map +2 -2
- package/dist/components/cfpb-expandables/index.js +1 -1
- package/dist/components/cfpb-expandables/index.js.map +1 -1
- package/dist/components/cfpb-forms/index.css +1 -1
- package/dist/components/cfpb-forms/index.css.map +2 -2
- package/dist/components/cfpb-forms/index.js +1 -1
- package/dist/components/cfpb-forms/index.js.map +1 -1
- package/dist/components/cfpb-icons/index.css +1 -1
- package/dist/components/cfpb-icons/index.css.map +2 -2
- package/dist/components/cfpb-icons/index.js +1 -1
- package/dist/components/cfpb-icons/index.js.map +1 -1
- package/dist/components/cfpb-layout/index.css +1 -1
- package/dist/components/cfpb-layout/index.css.map +2 -2
- package/dist/components/cfpb-layout/index.js +1 -1
- package/dist/components/cfpb-layout/index.js.map +1 -1
- package/dist/components/cfpb-notifications/index.css +1 -1
- package/dist/components/cfpb-notifications/index.css.map +2 -2
- package/dist/components/cfpb-notifications/index.js +1 -1
- package/dist/components/cfpb-notifications/index.js.map +1 -1
- package/dist/components/cfpb-pagination/index.css +1 -1
- package/dist/components/cfpb-pagination/index.css.map +2 -2
- package/dist/components/cfpb-pagination/index.js +1 -1
- package/dist/components/cfpb-pagination/index.js.map +1 -1
- package/dist/components/cfpb-tables/index.css +1 -1
- package/dist/components/cfpb-tables/index.css.map +2 -2
- package/dist/components/cfpb-tables/index.js +1 -1
- package/dist/components/cfpb-tables/index.js.map +1 -1
- package/dist/components/cfpb-tooltips/index.css +1 -1
- package/dist/components/cfpb-tooltips/index.css.map +2 -2
- package/dist/components/cfpb-tooltips/index.js +1 -1
- package/dist/components/cfpb-tooltips/index.js.map +1 -1
- package/dist/components/cfpb-typography/index.css +1 -1
- package/dist/components/cfpb-typography/index.css.map +2 -2
- package/dist/components/cfpb-typography/index.js +1 -1
- package/dist/components/cfpb-typography/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utilities/index.css +1 -1
- package/dist/utilities/index.css.map +2 -2
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/index.js.map +1 -1
- package/package.json +1 -1
- package/src/abstracts/vars.scss +12 -4
- package/src/components/cfpb-buttons/button.scss +0 -1
- package/src/components/cfpb-forms/form-field.scss +9 -5
- package/src/components/cfpb-forms/multiselect.scss +3 -4
- package/src/components/cfpb-forms/select.scss +25 -11
- package/src/components/cfpb-typography/list.scss +0 -11
- package/src/utilities/utilities.scss +3 -5
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var ut=Object.defineProperty;var ht=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var pt=(e,t,a)=>t in e?ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,we=(e,t)=>{for(var a in t||(t={}))jt.call(t,a)&&pt(e,a,t[a]);if(ht)for(var a of ht(t))Tt.call(t,a)&&pt(e,a,t[a]);return e};var b=(e,t)=>{for(var a in t)ut(e,a,{get:t[a],enumerable:!0})};var se={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};var ke={};b(ke,{default:()=>zt});var zt={};var Se={};b(Se,{default:()=>Bt});var Bt={};var Ee={};b(Ee,{default:()=>Nt});var Nt={};var Le={};b(Le,{default:()=>Ct});var Ct={};var De={};b(De,{default:()=>Ft});var Ft={};var Ae={};b(Ae,{default:()=>Vt});var Vt={};function le(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Gt(e,t){let a=e.min,r=e.max;le()>0&&le()!==16&&(a=a/16*le(),r=r/16*le());let o=a||0,s=r||Number.POSITIVE_INFINITY;return o<=t&&t<=s}function Rt(e){let t={};e=e||window.innerWidth;let a;for(a in se)t[a]=Gt(se[a],e);return t}var de="mobile",Ut="tablet",Pt="desktop";function je(e){let t=!1,a=Rt();return(e===de&&a.bpXS||e===Ut&&a.bpSM||e===Pt&&(a.bpMED||a.bpLG||a.bpXL))&&(t=!0),t}var I="data-js-hook",Z="behavior_",Te="state_";function D(){let e={};function t(i,o){return{}.hasOwnProperty.call(e,i)?e[i].push(o):e[i]=[o],this}function a(i,o){if(!{}.hasOwnProperty.call(e,i))return this;let s=e[i].indexOf(o);return s!==-1&&e[i].splice(s,1),this}function r(i,o){if(!{}.hasOwnProperty.call(e,i))return this;o=o||{};let s=e[i];for(let d=0,c=s.length;d<c;d++)s[d].call(this,o);return this}return this.addEventListener=t,this.removeEventListener=a,this.dispatchEvent=r,this.getRegisteredEvents=()=>e,this}function Y(e,t){if(!e)return!1;let a=e.getAttribute(I);return a?(a=a.split(" "),a.indexOf(t)>-1):!1}function A(e,t){if(Y(e,t))return t;if(t.indexOf(" ")!==-1){let r=I+" values cannot contain spaces!";throw new Error(r)}let a=e.getAttribute(I);return a!==null&&(t=a+" "+t),e.setAttribute(I,t),t}var Oe=Te+"atomic_init";function Xt(e,t){if(!e||!e.classList){let a=e+' is not valid. Check that element is a DOM node with class "'+t+'"';throw new Error(a)}return e}function Kt(e,t){let a=e.classList.contains(t)?e:e.querySelector("."+t);if(!a){let r=t+" not found on or in passed DOM node.";throw new Error(r)}return a}function q(e,t){return Xt(e,t),Kt(e,t)}function M(e){return Y(e,Oe)?!1:(A(e,Oe),!0)}function C(e,t,a,r={}){let o=(a||document).querySelectorAll(e),s=[],d,c;for(let p=0,m=o.length;p<m;p++)c=o[p],Y(c,Oe)===!1&&(d=new t(c),d.init(r),s.push(d));return s}function bt(e,t){t=t||document;let a=[];try{a=t.querySelectorAll(e)}catch(r){let i=`${e} not found in DOM! ${r}`;throw new Error(i)}return a.length===0&&e.indexOf(Z)===-1&&(a=gt(e,t)),a}function Jt(e,t,a,r){let i=[];e instanceof NodeList?i=e:e instanceof Node?i=[e]:typeof e=="string"&&(i=bt(e,r));for(let o=0,s=i.length;o<s;o++)i[o].addEventListener(t,a,!1);return i}function ce(e,t){let a;if(Y(e,t))return a=e,a;if(e){let r="["+I+"="+t+"]";a=e.querySelector(r)}if(!a){let r=t+" behavior not found on passed DOM node!";throw new Error(r)}return a}function gt(e,t){return e=I+"*="+Z+e,e="["+e+"]",bt(e,t)}var te=Object.prototype.toString;function ft(e){return typeof e=="undefined"}function Yt(e){return typeof e!="undefined"}function Wt(e){return e!==null&&typeof e=="object"}function yt(e){return te.call(e)==="[object String]"}function Zt(e){return te.call(e)==="[object Number]"}function Qt(e){return te.call(e)==="[object Date]"}var ea=Array.isArray||function(t){return te.call(t)==="[object Array]"};function ta(e){return te.call(e)==="[object Function]"}function aa(e){return ft(e)||e===null||yt(e)&&e.length<=0||/^\s*$/.test(e)}function ze(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var ae=Z+"flyout-menu",oa="["+I+"="+ae;function P(e,t=!0){let a=ce(e,ae),r=H(e),i=ce(e,ae+"_content"),o=0,s=0,d=1,c=2,p=3,m,f,y,_=W.bind(this),j=R.bind(this),S,E=!0,T=!1;function H(n){let l=[],h=n.querySelectorAll(`${oa}_trigger]`),u,k,U;for(let V=h.length>>>0;V--;){for(U=!1,u=h[V],k=u.parentElement;k!==n;)k.getAttribute(I)&&k.getAttribute(I).split(" ").indexOf(ae)!==-1?(U=!0,k=n):k=k.parentElement;U||l.unshift(h[V])}return l}function G(n=!1){return o=n?p:s,r.forEach(l=>{z("expanded",l,n),l.addEventListener("click",x.bind(this)),l.addEventListener("touchstart",g,{passive:!0}),l.addEventListener("mouseover",w.bind(this)),l.addEventListener("mouseout",L.bind(this))}),i.setAttribute("data-open",n?"true":"false"),t&&!n&&i.setAttribute("hidden",""),ne(),this}function z(n,l,h){let u=String(h);return l.setAttribute("aria-"+n,u),u}function g(){T=!0}function w(n){E||(T||this.dispatchEvent("triggerover",{target:this,trigger:n.target,type:"triggerover"}),T=!1)}function L(n){E||this.dispatchEvent("triggerout",{target:this,trigger:n.target,type:"triggerout"})}function x(n){if(!E)switch(this.dispatchEvent("triggerclick",{target:this,trigger:n.target,type:"triggerclick"}),n.preventDefault(),o){case s:case d:this.expand();break;case c:case p:this.collapse();break}}function O(){if(m==null||m.halt(),o===c||o===p)return this;if(o=c,t&&i.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!y)return j(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,j),f(),n||j(),this}function N(){if(m==null||m.halt(),o===d||o===s)return this;for(let l=0,h=r.length;l<h;l++)z("expanded",r[l],!1);if(i.setAttribute("data-open","false"),o=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!y||!f)return _(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,_),y(),n||_(),this}function R(){o=p,i.setAttribute("data-open","true"),m&&m.removeEventListener(v.END_EVENT,j),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let n=0,l=r.length;n<l;n++)z("expanded",r[n],!0)}function W(){o=s,t&&i.setAttribute("hidden",""),m&&m.removeEventListener(v.END_EVENT,_),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function re(n,l,h){m=n,l&&l!==y&&(y=l),h&&h!==f&&(f=h)}function ye(){m&&m.remove();let n;m=n,f=n,y=n}function xe(){return{container:a,content:i,trigger:r}}function ne(){return E&&(E=!1),!E}function _e(){return E||(E=!0),E}function ve(n){return S=n,this}let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.init=G,this.expand=O,this.collapse=N,this.setTransition=re,this.clearTransition=ye,this.getData=()=>S,this.getTransition=()=>m,this.getDom=xe,this.isAnimating=()=>o===c||o===d,this.isExpanded=()=>o===p,this.resume=ne,this.setData=ve,this.suspend=_e,P.BASE_CLASS=ae,this}var me={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function xt(e){let t=new D,a=new v(e,me,this);function r(s){return a.init(s),this}function i(){return a.applyClass(me.ALPHA_100),this}function o(){return a.applyClass(me.ALPHA_0),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.remove=a.remove,this.setElement=a.setElement,this.fadeIn=i,this.fadeOut=o,this.init=r,this}xt.CLASSES=me;function v(e,t,a){let r=t,i=e;if(!a)throw new Error("Child transition argument must be defined!");let o=a,s,d,c,p=!1,m=!1,f=!1;if(typeof r.CSS_PROPERTY=="undefined"||typeof r.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function y(){d&&p?(i.addEventListener(d,c),o.dispatchEvent(v.BEGIN_EVENT,{target:o,type:v.BEGIN_EVENT}),i.classList.add(v.ANIMATING_CLASS),m=!0):(o.dispatchEvent(v.BEGIN_EVENT,{target:o,type:v.BEGIN_EVENT}),c())}function _(){i.removeEventListener(d,c)}function j(x){return x&&x.propertyName!==r.CSS_PROPERTY?!1:(_(),i.classList.remove(v.ANIMATING_CLASS),o.dispatchEvent(v.END_EVENT,{target:o,type:v.END_EVENT}),m=!1,!0)}function S(){let x;for(x in r)({}).hasOwnProperty.call(r,x)&&r[x]!==r.BASE_CLASS&&i.classList.contains(r[x])&&i.classList.remove(r[x])}function E(){m&&(i.style.webkitTransitionDuration="0",i.style.mozTransitionDuration="0",i.style.oTransitionDuration="0",i.style.transitionDuration="0",i.removeEventListener(d,c),c(),i.style.webkitTransitionDuration="",i.style.mozTransitionDuration="",i.style.oTransitionDuration="",i.style.transitionDuration="")}function T(){E(),S(),i.classList.remove(r.BASE_CLASS)}function H(){i.classList.remove(v.NO_ANIMATION_CLASS),p=!0}function G(){i.classList.add(v.NO_ANIMATION_CLASS),p=!1}function z(x){if(!x){let W="Element does not have TransitionEnd event. It may be null!";throw new Error(W)}let O,N={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},R;for(R in N)if({}.hasOwnProperty.call(N,R)&&typeof x.style[R]!="undefined"){O=N[R];break}return O}function g(x){T(),H(),i=x,i.classList.add(r.BASE_CLASS),d=z(i)}function w(x){if(p=!i.classList.contains(v.NO_ANIMATION_CLASS),c=j.bind(this),g(i),!x)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return i.classList.add(x),this}function L(x){return f||(S(),f=!0),i.classList.contains(x)?!1:(_(),i.classList.remove(s),s=x,y(),i.classList.add(s),!0)}return this.animateOff=G,this.animateOn=H,this.applyClass=L,this.halt=E,this.init=w,this.isAnimated=()=>p,this.remove=T,this.setElement=g,this}v.BEGIN_EVENT="transitionbegin";v.END_EVENT="transitionend";v.NO_ANIMATION_CLASS="u-no-animation";v.ANIMATING_CLASS="u-is-animating";var oe={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function B(e){let t=new D,a=new v(e,oe,this),r=0;function i(){let y=e.scrollHeight+"px";e.style.maxHeight=y}function o(){window.removeEventListener("load",o),i()}function s(f){return a.init(f),window.addEventListener("load",o),window.addEventListener("resize",()=>{i()}),this}function d(){return i(),a.applyClass(oe.MH_DEFAULT),(!r||e.scrollHeight>r)&&(r=e.scrollHeight),this}function c(){return a.applyClass(oe.MH_SUMMARY),r=e.scrollHeight,this}function p(){return a.applyClass(oe.MH_ZERO),r=e.scrollHeight,this}function m(){return e.style.maxHeight="",a.remove()}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.refresh=i,this.remove=m,this.init=s,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}B.CLASSES=oe;var X={CSS_PROPERTY:"transform",BASE_CLASS:"u-move-transition",MOVE_TO_ORIGIN:"u-move-to-origin",MOVE_LEFT:"u-move-left",MOVE_LEFT_2X:"u-move-left-2x",MOVE_LEFT_3X:"u-move-left-3x",MOVE_RIGHT:"u-move-right",MOVE_UP:"u-move-up"};function _t(e){let t=new D,a=new v(e,X,this);function r(c){return a.init(c),this}function i(){return a.applyClass(X.MOVE_TO_ORIGIN),this}function o(c){c=c||1;let p=[X.MOVE_LEFT,X.MOVE_LEFT_2X,X.MOVE_LEFT_3X];return a.applyClass(p[c-1]),this}function s(){return a.applyClass(X.MOVE_RIGHT),this}function d(){return a.applyClass(X.MOVE_UP),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.remove=a.remove,this.init=r,this.moveLeft=()=>o(1),this.moveLeft2=()=>o(2),this.moveLeft3=()=>o(3),this.moveRight=s,this.moveToOrigin=i,this.moveUp=d,this}_t.CLASSES=X;var Ie={};b(Ie,{default:()=>na});var na={};var Q="o-expandable";function K(e){let t=q(e,Q),a,r,i,o,s;function d(){if(!M(t))return this;a=t.querySelector(`.${Q}__header`),r=t.querySelector(`.${Q}__content`),i=t.querySelector(`.${Q}__label`);let m=t.classList.contains(`${Q}--onload-open`);A(t,"behavior_flyout-menu"),A(a,"behavior_flyout-menu_trigger"),A(r,"behavior_flyout-menu_content");let f=m?B.CLASSES.MH_DEFAULT:B.CLASSES.MH_ZERO;return o=new B(r).init(f),s=new P(t),s.setTransition(o,o.maxHeightZero,o.maxHeightDefault),s.init(m),s.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),s.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function c(){return i.textContent.trim()}this.init=d,this.expand=()=>s.expand(),this.collapse=()=>s.collapse(),this.isExpanded=()=>s.isExpanded(),this.refresh=()=>s.getTransition().refresh(),this.getLabelText=c;let p=new D;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}K.BASE_CLASS=Q;K.init=e=>C(`.${K.BASE_CLASS}`,K,e);var Be={};b(Be,{default:()=>la});var la={};var he="o-expandable-group";function pe(e){let t=q(e,he),a=t.classList.contains(`${he}--accordion`),r,i;function o(d){let c=d.target;i&&i!==c&&i.collapse(),i=c}function s(d){return M(t)?(a&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",o)})),this):this}return this.init=s,this}pe.BASE_CLASS=he;pe.init=e=>{(e||document).querySelectorAll(`.${he}`).forEach(r=>{let i=C(`.${K.BASE_CLASS}`,K,r);new pe(r).init(i)})};var Me={};b(Me,{default:()=>ca});var ca={};var ee="o-summary";function ue(e){let t=q(e,ee),a=t.classList.contains(`${ee}--mobile`),r=t.querySelector(`.${ee}__content`),i=t.querySelector(`.${ee}__btn`),o,s,d;function c(){return M(t)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!_(),A(t,"behavior_flyout-menu"),A(r,"behavior_flyout-menu_content"),A(i,"behavior_flyout-menu_trigger"),s=new P(t,!1),o=new B(r),o.init(d?B.CLASSES.MH_SUMMARY:B.CLASSES.MH_DEFAULT),s.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),s.addEventListener("triggerclick",j),s.init(),y(),window.addEventListener("resize",y),"onorientationchange"in window&&window.addEventListener("orientationchange",y),t.addEventListener("focusin",m),r.addEventListener("click",f)}function m(g){!d&&g.target!==i&&(i.click(),t.removeEventListener("focusin",m))}function f(g){g.target.tagName!=="A"&&s.isExpanded()&&o.refresh()}function y(){_()?G():H()}function _(){return a&&!je(de)||r.scrollHeight<=88}function j(){s.addEventListener("expandend",S)}function S(){T(),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),s.removeEventListener("expandend",S),s.suspend(),o.remove()}function E(){i.classList.remove("u-hidden")}function T(){i.classList.add("u-hidden")}function H(){return d&&(s.collapse(),o.animateOn(),E(),d=!1),!d}function G(){return d||(o.animateOff(),s.expand(),T(),d=!0),d}let z=new D;return this.addEventListener=z.addEventListener,this.removeEventListener=z.removeEventListener,this.dispatchEvent=z.dispatchEvent,this.init=c,this}ue.BASE_CLASS=ee;ue.init=e=>C(`.${ee}`,ue,e);var ie="o-summary-minimal";function be(e){let t=q(e,ie),a=t.querySelector(`.${ie}__content`),r=t.querySelector(`.${ie}__btn`),i,o;function s(){return M(t)?(A(t,"behavior_flyout-menu"),A(a,"behavior_flyout-menu_content"),A(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),o=new P(t,!1),i=new B(a),i.init(B.CLASSES.MH_SUMMARY),o.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),o.init(),t.addEventListener("focusin",c),a.addEventListener("click",p),o.collapse(),i.animateOn()}function c(f){f.target!==r&&(r.click(),t.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&o.isExpanded()&&i.refresh()}let m=new D;return this.addEventListener=m.addEventListener,this.removeEventListener=m.removeEventListener,this.dispatchEvent=m.dispatchEvent,this.init=s,this}be.BASE_CLASS=ie;be.init=e=>C(`.${ie}`,be,e);var Ne={};b(Ne,{default:()=>pa});var pa={};var qe={};b(qe,{default:()=>ba});var ba={};var Ce={};b(Ce,{default:()=>fa});var fa={};var $e={};b($e,{default:()=>xa});var xa={};var Fe={};b(Fe,{default:()=>va});var va={};var He={};b(He,{default:()=>ka});var ka={};var Ve={};b(Ve,{default:()=>Ea});var Ea={};var Ge={};b(Ge,{default:()=>Da});var Da={};var Re={};b(Re,{default:()=>ja});var ja={};var Ta;function Oa(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function za(e,t){return RegExp(Oa(t.trim()),"i").test(e)}function Ia(e,t,a){let r=e,i=t,o=(a==null?void 0:a.maxSelections)||5,s=[],d=[],c=[],p=[],m=-1;function f(g){return i+"-"+g.value.trim().replace(/\s+/g,"-").toLowerCase()}function y(){return d.length>=o}function _(g){let w,L=[],x=!1;for(let O=0,N=g.length;O<N;O++)w=g[O],x=y()?!1:w.defaultSelected,L.push({id:f(w),value:w.value,text:w.text,checked:x}),x&&d.push(O);return L}function j(){return s=_(r),this}function S(g){return s[g].checked=!s[g].checked,d.length<o&&s[g].checked?(d.push(g),d.sort(),!0):(s[g].checked=!1,d=d.filter(function(w){return w!==g}),!1)}function E(g,w,L,x){return za(w.text,x)&&g.push(L),g}function T(g){return Object.prototype.toString.call(g)!=="[object String]"&&(g=""),p=c,s.length>0&&(c=s.reduce(function(w,L,x){return E(w,L,x,g)},[])),m=-1,c}function H(g){return s[g]}function G(g){let w=c.length,L=w===0?s.length:w;g<0?m=-1:g>=L?m=L-1:m=g}function z(){return m}return this.init=j,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=y,this.filterIndices=T,this.clearFilter=function(){return c=p=[],Ta},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=z,this.setIndex=G,this.resetIndex=function(){return m=-1,m},this.getOption=H,this}var vt=Ia;function $(e,t,a){let r=document.createElement(e);return Object.keys(a).forEach(i=>{let o=a[i];i in r?r[i]=o:r.setAttribute(i,o)}),t&&t.appendChild(r),r}var wt='<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--error" viewBox="0 0 12 19"><path d="M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"/></svg>';var Ca=wt,F="o-multiselect",$a="a-checkbox",Fa="a-text-input",kt="prev",ge="next",Ue="Enter",Ha=" ",St="Escape",Va="ArrowUp",Et="ArrowDown",Lt="Tab",Dt={renderTags:!0,maxSelections:5};function fe(e){e.classList.add(F);let t=q(e,F),a=!1,r,i,o,s,d,c,p,m,f,y,_,j=[],S;function E(){_.classList.remove("u-no-results"),_.classList.add("u-filtered");let n=o.getLastFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.remove("u-filter-match");n=o.getFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.add("u-filter-match")}function T(){_.classList.remove("u-filtered","u-no-results");for(let n=0,l=_.children.length;n<l;n++)_.children[n].classList.remove("u-filter-match");o.clearFilter()}function H(){_.classList.add("u-no-results"),_.classList.remove("u-filtered")}function G(n){return n.length>0?(E(),!0):(H(),!1)}function z(n){T(),o.resetIndex();let l=o.filterIndices(n);G(l)}function g(){return c.classList.add("u-active"),y.classList.remove("u-invisible"),y.setAttribute("aria-hidden",!1),S.dispatchEvent("expandbegin",{target:S}),S}function w(){return c.classList.remove("u-active"),y.classList.add("u-invisible"),y.setAttribute("aria-hidden",!0),o.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function L(n){n===ge?o.setIndex(o.getIndex()+1):n===kt&&o.setIndex(o.getIndex()-1);let l=o.getIndex();if(l>-1){let h=l,u=o.getFilterIndices();u.length>0&&(h=u[l]);let U=o.getOption(h).value,At=_.querySelector('[data-option="'+U+'"]').querySelector("input");a=!0,At.focus()}else a=!1,f.focus()}function x(){f.value="",T()}function O(n){let l=n.target;l.tagName==="BUTTON"&&(n.preventDefault(),l.removeEventListener("click",O),l.querySelector("label").click())}function N(n){if(n.key===Ha||n.key===Ue){let l=n.target.querySelector("label");_.querySelector("#"+l.getAttribute("for")).click()}}function R(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function W(n,l){let h=R(l),u=$("li",null,{"data-option":l.value}),k=$("button",u,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+h+">"+l.text+Ca+"</label>"});n.appendChild(u),k.addEventListener("click",O),k.addEventListener("keydown",N)}function re(n){let l=o.getOption(n)||o.getOption(o.getIndex());if(l){if(l.checked){_.classList.contains("u-max-selections")&&_.classList.remove("u-max-selections");let h='[data-option="'+l.value+'"]',u=p.querySelector(h);typeof u!="undefined"&&u&&(p==null||p.removeChild(u))}else d!=null&&d.renderTags&&p&&W(p,l);o.toggleOption(n),o.isAtMaxSelections()&&_.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}o.resetIndex(),a=!1,y.getAttribute("aria-hidden")==="false"&&f.focus()}function ye(n){re(Number(n.target.getAttribute("data-index"))),x()}function xe(){m.addEventListener("mousemove",function(h){let u=h.target;h.offsetX>u.offsetWidth-35?u.style.cursor="pointer":u.style.cursor="auto"}),m.addEventListener("mouseup",function(h){let u=h.target;h.offsetX>u.offsetWidth-35&&y.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){z(this.value)}),f.addEventListener("focus",function(){y.getAttribute("aria-hidden")==="true"&&g()}),f.addEventListener("blur",function(){!a&&y.getAttribute("aria-hidden")==="false"&&w()}),f.addEventListener("keydown",function(h){let u=h.key;y.getAttribute("aria-hidden")==="true"&&u!==Lt&&g(),u===Ue?(h.preventDefault(),L(ge)):u===St?(x(),w()):u===Et?L(ge):u===Lt&&!h.shiftKey&&y.getAttribute("aria-hidden")==="false"&&w()}),_.addEventListener("mousedown",function(){a=!0}),_.addEventListener("keydown",function(h){let u=h.key,k=h.target,U=k.checked;if(u===Ue){h.preventDefault(),k.checked=!U;let V=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(V)}else u===St?(f.focus(),w()):u===Va?L(kt):u===Et&&L(ge)}),y.addEventListener("mousedown",function(h){h.target.tagName==="LABEL"&&(a=!0)});let n=_.querySelectorAll("input");for(let h=0,u=n.length;h<u;h++)n[h].addEventListener("change",ye);let l=p.querySelectorAll("button");for(let h=0,u=l.length;h<u;h++)l[h].addEventListener("click",O),l[h].addEventListener("keydown",N)}function ne(){c=document.createElement("div"),c.className=F,p=$("ul",null,{className:"m-tag-group"}),m=$("header",c,{className:F+"__header"}),f=$("input",m,{className:F+"__search "+Fa,type:"text",placeholder:i||"Select up to five",id:t.id,autocomplete:"off"}),y=$("fieldset",c,{className:F+"__fieldset u-invisible","aria-hidden":"true"});let n=F+"__options";o.isAtMaxSelections()&&(n+=" u-max-selections"),_=$("ul",y,{className:n});let l,h,u;for(let k=0,U=s.length;k<U;k++){l=s[k],h=R(l),u=o.getOption(k).checked;let V=$("li",_,{"data-option":l.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});$("input",V,{id:h,type:"checkbox",value:l.value,name:r,class:$a+" "+F+"__checkbox",checked:u,"data-index":k}),$("label",V,{for:h,textContent:l.text,className:F+"__label a-label"}),j.push(V),u&&(d!=null&&d.renderTags)&&W(p,l)}return c.insertBefore(p,m),t.parentNode.insertBefore(c,t),c.appendChild(t),c}function _e(n=Dt){if(!M(t))return this;if(ze())return this;if(S=this,r=t.name||t.id,i=t.getAttribute("placeholder"),s=t.options||[],d=we(we({},Dt),n),s.length>0){o=new vt(s,r,d).init();let l=ne();t.parentNode.removeChild(t),t=l,M(t),xe()}return this}function ve(){return o}this.init=_e,this.expand=g,this.collapse=w;let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.getModel=ve,this.updateSelections=re,this.selectionClickHandler=O,this.selectionKeyDownHandler=N,this}fe.BASE_CLASS=F;fe.init=e=>C(`.${F}`,fe,void 0,e);var Pe={};b(Pe,{default:()=>Ra});var Ra={};var Xe={};b(Xe,{default:()=>Pa});var Pa={};var Ke={};b(Ke,{default:()=>Ka});var Ka={};var Je={};b(Je,{default:()=>Ya});var Ya={};var Ye={};b(Ye,{default:()=>Za});var Za={};var We={};b(We,{default:()=>eo});var eo={};var Ze={};b(Ze,{default:()=>ao});var ao={};var Qe={};b(Qe,{default:()=>io});var io={};var et={};b(et,{default:()=>no});var no={};var tt={};b(tt,{default:()=>lo});var lo={};var at={};b(at,{default:()=>mo});var mo={};var ot={};b(ot,{default:()=>po});var po={};var it={};b(it,{default:()=>bo});var bo={};var rt={};b(rt,{default:()=>fo});var fo={};var nt={};b(nt,{default:()=>xo});var xo={};var st={};b(st,{default:()=>vo});var vo={};var lt={};b(lt,{default:()=>ko});var ko={};var dt={};b(dt,{default:()=>Eo});var Eo={};var ct={};b(ct,{default:()=>Do});var Do={};var mt={};b(mt,{default:()=>jo});var jo={};})();
|
|
1
|
+
(()=>{var ut=Object.defineProperty;var ht=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var pt=(e,t,a)=>t in e?ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,we=(e,t)=>{for(var a in t||(t={}))jt.call(t,a)&&pt(e,a,t[a]);if(ht)for(var a of ht(t))Tt.call(t,a)&&pt(e,a,t[a]);return e};var b=(e,t)=>{for(var a in t)ut(e,a,{get:t[a],enumerable:!0})};var se={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};var ke={};b(ke,{default:()=>zt});var zt={};var Se={};b(Se,{default:()=>Bt});var Bt={};var Ee={};b(Ee,{default:()=>Nt});var Nt={};var Le={};b(Le,{default:()=>Ct});var Ct={};var De={};b(De,{default:()=>Ft});var Ft={};var Ae={};b(Ae,{default:()=>Vt});var Vt={};function le(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Gt(e,t){let a=e.min,i=e.max;le()>0&&le()!==16&&(a=a/16*le(),i=i/16*le());let r=a||0,s=i||Number.POSITIVE_INFINITY;return r<=t&&t<=s}function Rt(e){let t={};e=e||window.innerWidth;let a;for(a in se)t[a]=Gt(se[a],e);return t}var de="mobile",Ut="tablet",Pt="desktop";function je(e){let t=!1,a=Rt();return(e===de&&a.bpXS||e===Ut&&a.bpSM||e===Pt&&(a.bpMED||a.bpLG||a.bpXL))&&(t=!0),t}var I="data-js-hook",Z="behavior_",Te="state_";function D(){let e={};function t(o,r){return{}.hasOwnProperty.call(e,o)?e[o].push(r):e[o]=[r],this}function a(o,r){if(!{}.hasOwnProperty.call(e,o))return this;let s=e[o].indexOf(r);return s!==-1&&e[o].splice(s,1),this}function i(o,r){if(!{}.hasOwnProperty.call(e,o))return this;r=r||{};let s=e[o];for(let d=0,c=s.length;d<c;d++)s[d].call(this,r);return this}return this.addEventListener=t,this.removeEventListener=a,this.dispatchEvent=i,this.getRegisteredEvents=()=>e,this}function Y(e,t){if(!e)return!1;let a=e.getAttribute(I);return a?(a=a.split(" "),a.indexOf(t)>-1):!1}function A(e,t){if(Y(e,t))return t;if(t.indexOf(" ")!==-1){let i=I+" values cannot contain spaces!";throw new Error(i)}let a=e.getAttribute(I);return a!==null&&(t=a+" "+t),e.setAttribute(I,t),t}var Oe=Te+"atomic_init";function Xt(e,t){if(!e||!e.classList){let a=e+' is not valid. Check that element is a DOM node with class "'+t+'"';throw new Error(a)}return e}function Kt(e,t){let a=e.classList.contains(t)?e:e.querySelector("."+t);if(!a){let i=t+" not found on or in passed DOM node.";throw new Error(i)}return a}function q(e,t){return Xt(e,t),Kt(e,t)}function M(e){return Y(e,Oe)?!1:(A(e,Oe),!0)}function C(e,t,a,i={}){let r=(a||document).querySelectorAll(e),s=[],d,c;for(let p=0,m=r.length;p<m;p++)c=r[p],Y(c,Oe)===!1&&(d=new t(c),d.init(i),s.push(d));return s}function bt(e,t){t=t||document;let a=[];try{a=t.querySelectorAll(e)}catch(i){let o=`${e} not found in DOM! ${i}`;throw new Error(o)}return a.length===0&&e.indexOf(Z)===-1&&(a=gt(e,t)),a}function Jt(e,t,a,i){let o=[];e instanceof NodeList?o=e:e instanceof Node?o=[e]:typeof e=="string"&&(o=bt(e,i));for(let r=0,s=o.length;r<s;r++)o[r].addEventListener(t,a,!1);return o}function ce(e,t){let a;if(Y(e,t))return a=e,a;if(e){let i="["+I+"="+t+"]";a=e.querySelector(i)}if(!a){let i=t+" behavior not found on passed DOM node!";throw new Error(i)}return a}function gt(e,t){return e=I+"*="+Z+e,e="["+e+"]",bt(e,t)}var te=Object.prototype.toString;function ft(e){return typeof e=="undefined"}function Yt(e){return typeof e!="undefined"}function Wt(e){return e!==null&&typeof e=="object"}function vt(e){return te.call(e)==="[object String]"}function Zt(e){return te.call(e)==="[object Number]"}function Qt(e){return te.call(e)==="[object Date]"}var ea=Array.isArray||function(t){return te.call(t)==="[object Array]"};function ta(e){return te.call(e)==="[object Function]"}function aa(e){return ft(e)||e===null||vt(e)&&e.length<=0||/^\s*$/.test(e)}function ze(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var ae=Z+"flyout-menu",ra="["+I+"="+ae;function P(e,t=!0){let a=ce(e,ae),i=H(e),o=ce(e,ae+"_content"),r=0,s=0,d=1,c=2,p=3,m,f,v,x=W.bind(this),j=R.bind(this),S,E=!0,T=!1;function H(n){let l=[],h=n.querySelectorAll(`${ra}_trigger]`),u,k,U;for(let V=h.length>>>0;V--;){for(U=!1,u=h[V],k=u.parentElement;k!==n;)k.getAttribute(I)&&k.getAttribute(I).split(" ").indexOf(ae)!==-1?(U=!0,k=n):k=k.parentElement;U||l.unshift(h[V])}return l}function G(n=!1){return r=n?p:s,i.forEach(l=>{z("expanded",l,n),l.addEventListener("click",y.bind(this)),l.addEventListener("touchstart",g,{passive:!0}),l.addEventListener("mouseover",w.bind(this)),l.addEventListener("mouseout",L.bind(this))}),o.setAttribute("data-open",n?"true":"false"),t&&!n&&o.setAttribute("hidden",""),ne(),this}function z(n,l,h){let u=String(h);return l.setAttribute("aria-"+n,u),u}function g(){T=!0}function w(n){E||(T||this.dispatchEvent("triggerover",{target:this,trigger:n.target,type:"triggerover"}),T=!1)}function L(n){E||this.dispatchEvent("triggerout",{target:this,trigger:n.target,type:"triggerout"})}function y(n){if(!E)switch(this.dispatchEvent("triggerclick",{target:this,trigger:n.target,type:"triggerclick"}),n.preventDefault(),r){case s:case d:this.expand();break;case c:case p:this.collapse();break}}function O(){if(m==null||m.halt(),r===c||r===p)return this;if(r=c,t&&o.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!v)return j(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(_.END_EVENT,j),f(),n||j(),this}function N(){if(m==null||m.halt(),r===d||r===s)return this;for(let l=0,h=i.length;l<h;l++)z("expanded",i[l],!1);if(o.setAttribute("data-open","false"),r=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!v||!f)return x(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(_.END_EVENT,x),v(),n||x(),this}function R(){r=p,o.setAttribute("data-open","true"),m&&m.removeEventListener(_.END_EVENT,j),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let n=0,l=i.length;n<l;n++)z("expanded",i[n],!0)}function W(){r=s,t&&o.setAttribute("hidden",""),m&&m.removeEventListener(_.END_EVENT,x),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function ie(n,l,h){m=n,l&&l!==v&&(v=l),h&&h!==f&&(f=h)}function ve(){m&&m.remove();let n;m=n,f=n,v=n}function ye(){return{container:a,content:o,trigger:i}}function ne(){return E&&(E=!1),!E}function xe(){return E||(E=!0),E}function _e(n){return S=n,this}let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.init=G,this.expand=O,this.collapse=N,this.setTransition=ie,this.clearTransition=ve,this.getData=()=>S,this.getTransition=()=>m,this.getDom=ye,this.isAnimating=()=>r===c||r===d,this.isExpanded=()=>r===p,this.resume=ne,this.setData=_e,this.suspend=xe,P.BASE_CLASS=ae,this}var me={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function yt(e){let t=new D,a=new _(e,me,this);function i(s){return a.init(s),this}function o(){return a.applyClass(me.ALPHA_100),this}function r(){return a.applyClass(me.ALPHA_0),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.remove=a.remove,this.setElement=a.setElement,this.fadeIn=o,this.fadeOut=r,this.init=i,this}yt.CLASSES=me;function _(e,t,a){let i=t,o=e;if(!a)throw new Error("Child transition argument must be defined!");let r=a,s,d,c,p=!1,m=!1,f=!1;if(typeof i.CSS_PROPERTY=="undefined"||typeof i.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function v(){d&&p?(o.addEventListener(d,c),r.dispatchEvent(_.BEGIN_EVENT,{target:r,type:_.BEGIN_EVENT}),o.classList.add(_.ANIMATING_CLASS),m=!0):(r.dispatchEvent(_.BEGIN_EVENT,{target:r,type:_.BEGIN_EVENT}),c())}function x(){o.removeEventListener(d,c)}function j(y){return y&&y.propertyName!==i.CSS_PROPERTY?!1:(x(),o.classList.remove(_.ANIMATING_CLASS),r.dispatchEvent(_.END_EVENT,{target:r,type:_.END_EVENT}),m=!1,!0)}function S(){let y;for(y in i)({}).hasOwnProperty.call(i,y)&&i[y]!==i.BASE_CLASS&&o.classList.contains(i[y])&&o.classList.remove(i[y])}function E(){m&&(o.style.webkitTransitionDuration="0",o.style.mozTransitionDuration="0",o.style.oTransitionDuration="0",o.style.transitionDuration="0",o.removeEventListener(d,c),c(),o.style.webkitTransitionDuration="",o.style.mozTransitionDuration="",o.style.oTransitionDuration="",o.style.transitionDuration="")}function T(){E(),S(),o.classList.remove(i.BASE_CLASS)}function H(){o.classList.remove(_.NO_ANIMATION_CLASS),p=!0}function G(){o.classList.add(_.NO_ANIMATION_CLASS),p=!1}function z(y){if(!y){let W="Element does not have TransitionEnd event. It may be null!";throw new Error(W)}let O,N={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},R;for(R in N)if({}.hasOwnProperty.call(N,R)&&typeof y.style[R]!="undefined"){O=N[R];break}return O}function g(y){T(),H(),o=y,o.classList.add(i.BASE_CLASS),d=z(o)}function w(y){if(p=!o.classList.contains(_.NO_ANIMATION_CLASS),c=j.bind(this),g(o),!y)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return o.classList.add(y),this}function L(y){return f||(S(),f=!0),o.classList.contains(y)?!1:(x(),o.classList.remove(s),s=y,v(),o.classList.add(s),!0)}return this.animateOff=G,this.animateOn=H,this.applyClass=L,this.halt=E,this.init=w,this.isAnimated=()=>p,this.remove=T,this.setElement=g,this}_.BEGIN_EVENT="transitionbegin";_.END_EVENT="transitionend";_.NO_ANIMATION_CLASS="u-no-animation";_.ANIMATING_CLASS="u-is-animating";var re={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function B(e){let t=new D,a=new _(e,re,this),i=0;function o(){let v=e.scrollHeight+"px";e.style.maxHeight=v}function r(){window.removeEventListener("load",r),o()}function s(f){return a.init(f),window.addEventListener("load",r),window.addEventListener("resize",()=>{o()}),this}function d(){return o(),a.applyClass(re.MH_DEFAULT),(!i||e.scrollHeight>i)&&(i=e.scrollHeight),this}function c(){return a.applyClass(re.MH_SUMMARY),i=e.scrollHeight,this}function p(){return a.applyClass(re.MH_ZERO),i=e.scrollHeight,this}function m(){return e.style.maxHeight="",a.remove()}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.refresh=o,this.remove=m,this.init=s,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}B.CLASSES=re;var X={CSS_PROPERTY:"transform",BASE_CLASS:"u-move-transition",MOVE_TO_ORIGIN:"u-move-to-origin",MOVE_LEFT:"u-move-left",MOVE_LEFT_2X:"u-move-left-2x",MOVE_LEFT_3X:"u-move-left-3x",MOVE_RIGHT:"u-move-right",MOVE_UP:"u-move-up"};function xt(e){let t=new D,a=new _(e,X,this);function i(c){return a.init(c),this}function o(){return a.applyClass(X.MOVE_TO_ORIGIN),this}function r(c){c=c||1;let p=[X.MOVE_LEFT,X.MOVE_LEFT_2X,X.MOVE_LEFT_3X];return a.applyClass(p[c-1]),this}function s(){return a.applyClass(X.MOVE_RIGHT),this}function d(){return a.applyClass(X.MOVE_UP),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.remove=a.remove,this.init=i,this.moveLeft=()=>r(1),this.moveLeft2=()=>r(2),this.moveLeft3=()=>r(3),this.moveRight=s,this.moveToOrigin=o,this.moveUp=d,this}xt.CLASSES=X;var Ie={};b(Ie,{default:()=>na});var na={};var Q="o-expandable";function K(e){let t=q(e,Q),a,i,o,r,s;function d(){if(!M(t))return this;a=t.querySelector(`.${Q}__header`),i=t.querySelector(`.${Q}__content`),o=t.querySelector(`.${Q}__label`);let m=t.classList.contains(`${Q}--onload-open`);A(t,"behavior_flyout-menu"),A(a,"behavior_flyout-menu_trigger"),A(i,"behavior_flyout-menu_content");let f=m?B.CLASSES.MH_DEFAULT:B.CLASSES.MH_ZERO;return r=new B(i).init(f),s=new P(t),s.setTransition(r,r.maxHeightZero,r.maxHeightDefault),s.init(m),s.addEventListener("expandbegin",()=>{i.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),s.addEventListener("collapseend",()=>{i.classList.add("u-hidden")}),this}function c(){return o.textContent.trim()}this.init=d,this.expand=()=>s.expand(),this.collapse=()=>s.collapse(),this.isExpanded=()=>s.isExpanded(),this.refresh=()=>s.getTransition().refresh(),this.getLabelText=c;let p=new D;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}K.BASE_CLASS=Q;K.init=e=>C(`.${K.BASE_CLASS}`,K,e);var Be={};b(Be,{default:()=>la});var la={};var he="o-expandable-group";function pe(e){let t=q(e,he),a=t.classList.contains(`${he}--accordion`),i,o;function r(d){let c=d.target;o&&o!==c&&o.collapse(),o=c}function s(d){return M(t)?(a&&(i=d,i.forEach(c=>{c.addEventListener("expandbegin",r)})),this):this}return this.init=s,this}pe.BASE_CLASS=he;pe.init=e=>{(e||document).querySelectorAll(`.${he}`).forEach(i=>{let o=C(`.${K.BASE_CLASS}`,K,i);new pe(i).init(o)})};var Me={};b(Me,{default:()=>ca});var ca={};var ee="o-summary";function ue(e){let t=q(e,ee),a=t.classList.contains(`${ee}--mobile`),i=t.querySelector(`.${ee}__content`),o=t.querySelector(`.${ee}__btn`),r,s,d;function c(){return M(t)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!x(),A(t,"behavior_flyout-menu"),A(i,"behavior_flyout-menu_content"),A(o,"behavior_flyout-menu_trigger"),s=new P(t,!1),r=new B(i),r.init(d?B.CLASSES.MH_SUMMARY:B.CLASSES.MH_DEFAULT),s.setTransition(r,r.maxHeightSummary,r.maxHeightDefault),s.addEventListener("triggerclick",j),s.init(),v(),window.addEventListener("resize",v),"onorientationchange"in window&&window.addEventListener("orientationchange",v),t.addEventListener("focusin",m),i.addEventListener("click",f)}function m(g){!d&&g.target!==o&&(o.click(),t.removeEventListener("focusin",m))}function f(g){g.target.tagName!=="A"&&s.isExpanded()&&r.refresh()}function v(){x()?G():H()}function x(){return a&&!je(de)||i.scrollHeight<=88}function j(){s.addEventListener("expandend",S)}function S(){T(),window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v),s.removeEventListener("expandend",S),s.suspend(),r.remove()}function E(){o.classList.remove("u-hidden")}function T(){o.classList.add("u-hidden")}function H(){return d&&(s.collapse(),r.animateOn(),E(),d=!1),!d}function G(){return d||(r.animateOff(),s.expand(),T(),d=!0),d}let z=new D;return this.addEventListener=z.addEventListener,this.removeEventListener=z.removeEventListener,this.dispatchEvent=z.dispatchEvent,this.init=c,this}ue.BASE_CLASS=ee;ue.init=e=>C(`.${ee}`,ue,e);var oe="o-summary-minimal";function be(e){let t=q(e,oe),a=t.querySelector(`.${oe}__content`),i=t.querySelector(`.${oe}__btn`),o,r;function s(){return M(t)?(A(t,"behavior_flyout-menu"),A(a,"behavior_flyout-menu_content"),A(i,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),r=new P(t,!1),o=new B(a),o.init(B.CLASSES.MH_SUMMARY),r.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),r.init(),t.addEventListener("focusin",c),a.addEventListener("click",p),r.collapse(),o.animateOn()}function c(f){f.target!==i&&(i.click(),t.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&r.isExpanded()&&o.refresh()}let m=new D;return this.addEventListener=m.addEventListener,this.removeEventListener=m.removeEventListener,this.dispatchEvent=m.dispatchEvent,this.init=s,this}be.BASE_CLASS=oe;be.init=e=>C(`.${oe}`,be,e);var Ne={};b(Ne,{default:()=>pa});var pa={};var qe={};b(qe,{default:()=>ba});var ba={};var Ce={};b(Ce,{default:()=>fa});var fa={};var $e={};b($e,{default:()=>ya});var ya={};var Fe={};b(Fe,{default:()=>_a});var _a={};var He={};b(He,{default:()=>ka});var ka={};var Ve={};b(Ve,{default:()=>Ea});var Ea={};var Ge={};b(Ge,{default:()=>Da});var Da={};var Re={};b(Re,{default:()=>ja});var ja={};var Ta;function Oa(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function za(e,t){return RegExp(Oa(t.trim()),"i").test(e)}function Ia(e,t,a){let i=e,o=t,r=(a==null?void 0:a.maxSelections)||5,s=[],d=[],c=[],p=[],m=-1;function f(g){return o+"-"+g.value.trim().replace(/\s+/g,"-").toLowerCase()}function v(){return d.length>=r}function x(g){let w,L=[],y=!1;for(let O=0,N=g.length;O<N;O++)w=g[O],y=v()?!1:w.defaultSelected,L.push({id:f(w),value:w.value,text:w.text,checked:y}),y&&d.push(O);return L}function j(){return s=x(i),this}function S(g){return s[g].checked=!s[g].checked,d.length<r&&s[g].checked?(d.push(g),d.sort(),!0):(s[g].checked=!1,d=d.filter(function(w){return w!==g}),!1)}function E(g,w,L,y){return za(w.text,y)&&g.push(L),g}function T(g){return Object.prototype.toString.call(g)!=="[object String]"&&(g=""),p=c,s.length>0&&(c=s.reduce(function(w,L,y){return E(w,L,y,g)},[])),m=-1,c}function H(g){return s[g]}function G(g){let w=c.length,L=w===0?s.length:w;g<0?m=-1:g>=L?m=L-1:m=g}function z(){return m}return this.init=j,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=v,this.filterIndices=T,this.clearFilter=function(){return c=p=[],Ta},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=z,this.setIndex=G,this.resetIndex=function(){return m=-1,m},this.getOption=H,this}var _t=Ia;function $(e,t,a){let i=document.createElement(e);return Object.keys(a).forEach(o=>{let r=a[o];o in i?i[o]=r:i.setAttribute(o,r)}),t&&t.appendChild(i),i}var wt='<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--error" viewBox="0 0 12 19"><path d="M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"/></svg>';var Ca=wt,F="o-multiselect",$a="a-checkbox",Fa="a-text-input",kt="prev",ge="next",Ue="Enter",Ha=" ",St="Escape",Va="ArrowUp",Et="ArrowDown",Lt="Tab",Dt={renderTags:!0,maxSelections:5};function fe(e){e.classList.add(F);let t=q(e,F),a=!1,i,o,r,s,d,c,p,m,f,v,x,j=[],S;function E(){x.classList.remove("u-no-results"),x.classList.add("u-filtered");let n=r.getLastFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.remove("u-filter-match");n=r.getFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.add("u-filter-match")}function T(){x.classList.remove("u-filtered","u-no-results");for(let n=0,l=x.children.length;n<l;n++)x.children[n].classList.remove("u-filter-match");r.clearFilter()}function H(){x.classList.add("u-no-results"),x.classList.remove("u-filtered")}function G(n){return n.length>0?(E(),!0):(H(),!1)}function z(n){T(),r.resetIndex();let l=r.filterIndices(n);G(l)}function g(){return c.classList.add("u-active"),v.classList.remove("u-invisible"),v.setAttribute("aria-hidden",!1),S.dispatchEvent("expandbegin",{target:S}),S}function w(){return c.classList.remove("u-active"),v.classList.add("u-invisible"),v.setAttribute("aria-hidden",!0),r.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function L(n){n===ge?r.setIndex(r.getIndex()+1):n===kt&&r.setIndex(r.getIndex()-1);let l=r.getIndex();if(l>-1){let h=l,u=r.getFilterIndices();u.length>0&&(h=u[l]);let U=r.getOption(h).value,At=x.querySelector('[data-option="'+U+'"]').querySelector("input");a=!0,At.focus()}else a=!1,f.focus()}function y(){f.value="",T()}function O(n){let l=n.target;l.tagName==="BUTTON"&&(n.preventDefault(),l.removeEventListener("click",O),l.querySelector("label").click())}function N(n){if(n.key===Ha||n.key===Ue){let l=n.target.querySelector("label");x.querySelector("#"+l.getAttribute("for")).click()}}function R(n){return i+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function W(n,l){let h=R(l),u=$("li",null,{"data-option":l.value}),k=$("button",u,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+h+">"+l.text+Ca+"</label>"});n.appendChild(u),k.addEventListener("click",O),k.addEventListener("keydown",N)}function ie(n){let l=r.getOption(n)||r.getOption(r.getIndex());if(l){if(l.checked){x.classList.contains("u-max-selections")&&x.classList.remove("u-max-selections");let h='[data-option="'+l.value+'"]',u=p.querySelector(h);typeof u!="undefined"&&u&&(p==null||p.removeChild(u))}else d!=null&&d.renderTags&&p&&W(p,l);r.toggleOption(n),r.isAtMaxSelections()&&x.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}r.resetIndex(),a=!1,v.getAttribute("aria-hidden")==="false"&&f.focus()}function ve(n){ie(Number(n.target.getAttribute("data-index"))),y()}function ye(){m.addEventListener("mousemove",function(h){let u=h.target;h.offsetX>u.offsetWidth-35?u.style.cursor="pointer":u.style.cursor="auto"}),m.addEventListener("mouseup",function(h){let u=h.target;h.offsetX>u.offsetWidth-35&&v.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){z(this.value)}),f.addEventListener("focus",function(){v.getAttribute("aria-hidden")==="true"&&g()}),f.addEventListener("blur",function(){!a&&v.getAttribute("aria-hidden")==="false"&&w()}),f.addEventListener("keydown",function(h){let u=h.key;v.getAttribute("aria-hidden")==="true"&&u!==Lt&&g(),u===Ue?(h.preventDefault(),L(ge)):u===St?(y(),w()):u===Et?L(ge):u===Lt&&!h.shiftKey&&v.getAttribute("aria-hidden")==="false"&&w()}),x.addEventListener("mousedown",function(){a=!0}),x.addEventListener("keydown",function(h){let u=h.key,k=h.target,U=k.checked;if(u===Ue){h.preventDefault(),k.checked=!U;let V=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(V)}else u===St?(f.focus(),w()):u===Va?L(kt):u===Et&&L(ge)}),v.addEventListener("mousedown",function(h){h.target.tagName==="LABEL"&&(a=!0)});let n=x.querySelectorAll("input");for(let h=0,u=n.length;h<u;h++)n[h].addEventListener("change",ve);let l=p.querySelectorAll("button");for(let h=0,u=l.length;h<u;h++)l[h].addEventListener("click",O),l[h].addEventListener("keydown",N)}function ne(){c=document.createElement("div"),c.className=F,p=$("ul",null,{className:"m-tag-group"}),m=$("header",c,{className:F+"__header"}),f=$("input",m,{className:F+"__search "+Fa,type:"text",placeholder:o||"Select up to five",id:t.id,autocomplete:"off"}),v=$("fieldset",c,{className:F+"__fieldset u-invisible","aria-hidden":"true"});let n=F+"__options";r.isAtMaxSelections()&&(n+=" u-max-selections"),x=$("ul",v,{className:n});let l,h,u;for(let k=0,U=s.length;k<U;k++){l=s[k],h=R(l),u=r.getOption(k).checked;let V=$("li",x,{"data-option":l.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});$("input",V,{id:h,type:"checkbox",value:l.value,name:i,class:$a+" "+F+"__checkbox",checked:u,"data-index":k}),$("label",V,{for:h,textContent:l.text,className:F+"__label a-label"}),j.push(V),u&&(d!=null&&d.renderTags)&&W(p,l)}return c.insertBefore(p,m),t.parentNode.insertBefore(c,t),c.appendChild(t),c}function xe(n=Dt){if(!M(t))return this;if(ze())return this;if(S=this,i=t.name||t.id,o=t.getAttribute("placeholder"),s=t.options||[],d=we(we({},Dt),n),s.length>0){r=new _t(s,i,d).init();let l=ne();t.parentNode.removeChild(t),t=l,M(t),ye()}return this}function _e(){return r}this.init=xe,this.expand=g,this.collapse=w;let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.getModel=_e,this.updateSelections=ie,this.selectionClickHandler=O,this.selectionKeyDownHandler=N,this}fe.BASE_CLASS=F;fe.init=e=>C(`.${F}`,fe,void 0,e);var Pe={};b(Pe,{default:()=>Ra});var Ra={};var Xe={};b(Xe,{default:()=>Pa});var Pa={};var Ke={};b(Ke,{default:()=>Ka});var Ka={};var Je={};b(Je,{default:()=>Ya});var Ya={};var Ye={};b(Ye,{default:()=>Za});var Za={};var We={};b(We,{default:()=>er});var er={};var Ze={};b(Ze,{default:()=>ar});var ar={};var Qe={};b(Qe,{default:()=>or});var or={};var et={};b(et,{default:()=>nr});var nr={};var tt={};b(tt,{default:()=>lr});var lr={};var at={};b(at,{default:()=>cr});var cr={};var rt={};b(rt,{default:()=>hr});var hr={};var ot={};b(ot,{default:()=>ur});var ur={};var it={};b(it,{default:()=>gr});var gr={};var nt={};b(nt,{default:()=>vr});var vr={};var st={};b(st,{default:()=>xr});var xr={};var lt={};b(lt,{default:()=>wr});var wr={};var dt={};b(dt,{default:()=>Sr});var Sr={};var ct={};b(ct,{default:()=>Lr});var Lr={};var mt={};b(mt,{default:()=>Ar});var Ar={};})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|