@cfpb/cfpb-design-system 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.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.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.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.map +2 -2
- package/dist/components/cfpb-notifications/index.js.map +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.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-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 +2 -2
- package/src/abstracts/heading-mixins.scss +32 -74
- package/src/components/cfpb-expandables/expandable-group.js +1 -1
- package/src/components/cfpb-expandables/expandable.spec.js +1 -1
- package/src/components/cfpb-forms/tag.scss +10 -3
- package/src/components/cfpb-typography/link.scss +1 -0
- package/src/components/cfpb-typography/mixins.scss +21 -1
- package/src/components/cfpb-typography/slug-header.scss +1 -3
- package/src/index.scss +10 -0
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var ut=Object.defineProperty;var pt=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable;var bt=(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)&&bt(e,a,t[a]);if(pt)for(var a of pt(t))zt.call(t,a)&&bt(e,a,t[a]);return e};var u=(e,t)=>{for(var a in t)ut(e,a,{get:t[a],enumerable:!0})};var le={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={};u(ke,{default:()=>It});var It={};var Se={};u(Se,{default:()=>Mt});var Mt={};var Ee={};u(Ee,{default:()=>Ct});var Ct={};var De={};u(De,{default:()=>Ft});var Ft={};var Ae={};u(Ae,{default:()=>Vt});var Vt={};var Le={};u(Le,{default:()=>Rt});var Rt={};var Te={};u(Te,{default:()=>Pt});var Pt={};function se(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Xt(e,t){let a=e.min,r=e.max;se()>0&&se()!==16&&(a=a/16*se(),r=r/16*se());let i=a||0,l=r||Number.POSITIVE_INFINITY;return i<=t&&t<=l}function Kt(e){let t={};e=e||window.innerWidth;let a;for(a in le)t[a]=Xt(le[a],e);return t}var de="mobile",Jt="tablet",Yt="desktop";function je(e){let t=!1,a=Kt();return(e===de&&a.bpXS||e===Jt&&a.bpSM||e===Yt&&(a.bpMED||a.bpLG||a.bpXL))&&(t=!0),t}var I="data-js-hook",Z="behavior_",ze="state_";function A(){let e={};function t(o,i){return{}.hasOwnProperty.call(e,o)?e[o].push(i):e[o]=[i],this}function a(o,i){if(!{}.hasOwnProperty.call(e,o))return this;let l=e[o].indexOf(i);return l!==-1&&e[o].splice(l,1),this}function r(o,i){if(!{}.hasOwnProperty.call(e,o))return this;i=i||{};let l=e[o];for(let d=0,c=l.length;d<c;d++)l[d].call(this,i);return this}return this.addEventListener=t,this.removeEventListener=a,this.dispatchEvent=r,this.getRegisteredEvents=()=>e,this}function W(e,t){if(!e)return!1;let a=e.getAttribute(I);return a?(a=a.split(" "),a.indexOf(t)>-1):!1}function L(e,t){if(W(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=ze+"atomic_init";function Wt(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 $t(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 Wt(e,t),$t(e,t)}function M(e){return W(e,Oe)?!1:(L(e,Oe),!0)}function F(e,t,a,r={}){let i=(a||document).querySelectorAll(e),l=[],d,c;for(let p=0,h=i.length;p<h;p++)c=i[p],W(c,Oe)===!1&&(d=new t(c),d.init(r),l.push(d));return l}function gt(e,t){t=t||document;let a=[];try{a=t.querySelectorAll(e)}catch(r){let o=`${e} not found in DOM! ${r}`;throw new Error(o)}return a.length===0&&e.indexOf(Z)===-1&&(a=ft(e,t)),a}function Zt(e,t,a,r){let o=[];e instanceof NodeList?o=e:e instanceof Node?o=[e]:typeof e=="string"&&(o=gt(e,r));for(let i=0,l=o.length;i<l;i++)o[i].addEventListener(t,a,!1);return o}function ce(e,t){let a;if(W(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 ft(e,t){return e=I+"*="+Z+e,e="["+e+"]",gt(e,t)}function Qt(e,t,a){e.removeEventListener(t,a)}var te=Object.prototype.toString;function yt(e){return typeof e=="undefined"}function ea(e){return typeof e!="undefined"}function ta(e){return e!==null&&typeof e=="object"}function xt(e){return te.call(e)==="[object String]"}function aa(e){return te.call(e)==="[object Number]"}function ia(e){return te.call(e)==="[object Date]"}var oa=Array.isArray||function(t){return te.call(t)==="[object Array]"};function ra(e){return te.call(e)==="[object Function]"}function na(e){return yt(e)||e===null||xt(e)&&e.length<=0||/^\s*$/.test(e)}function Ie(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var ae=Z+"flyout-menu",la="["+I+"="+ae;function X(e,t=!0){let a=ce(e,ae),r=V(e),o=ce(e,ae+"_content"),i=0,l=0,d=1,c=2,p=3,h,f,y,v=$.bind(this),T=U.bind(this),S,E=!0,j=!1;function V(n){let s=[],m=n.querySelectorAll(`${la}_trigger]`),b,k,P;for(let G=m.length>>>0;G--;){for(P=!1,b=m[G],k=b.parentElement;k!==n;)k.getAttribute(I)&&k.getAttribute(I).split(" ").indexOf(ae)!==-1?(P=!0,k=n):k=k.parentElement;P||s.unshift(m[G])}return s}function R(n=!1){return i=n?p:l,r.forEach(s=>{O("expanded",s,n),s.addEventListener("click",x.bind(this)),s.addEventListener("touchstart",g,{passive:!0}),s.addEventListener("mouseover",w.bind(this)),s.addEventListener("mouseout",D.bind(this))}),o.setAttribute("data-open",n?"true":"false"),t&&!n&&o.setAttribute("hidden",""),ne(),this}function O(n,s,m){let b=String(m);return s.setAttribute("aria-"+n,b),b}function g(){j=!0}function w(n){E||(j||this.dispatchEvent("triggerover",{target:this,trigger:n.target,type:"triggerover"}),j=!1)}function D(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(),i){case l:case d:this.expand();break;case c:case p:this.collapse();break}}function z(){if(h==null||h.halt(),i===c||i===p)return this;if(i=c,t&&o.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!y)return T(),this;let n=h==null?void 0:h.isAnimated();return n&&h.addEventListener(_.END_EVENT,T),f(),n||T(),this}function C(){if(h==null||h.halt(),i===d||i===l)return this;for(let s=0,m=r.length;s<m;s++)O("expanded",r[s],!1);if(o.setAttribute("data-open","false"),i=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!y||!f)return v(),this;let n=h==null?void 0:h.isAnimated();return n&&h.addEventListener(_.END_EVENT,v),y(),n||v(),this}function U(){i=p,o.setAttribute("data-open","true"),h&&h.removeEventListener(_.END_EVENT,T),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let n=0,s=r.length;n<s;n++)O("expanded",r[n],!0)}function $(){i=l,t&&o.setAttribute("hidden",""),h&&h.removeEventListener(_.END_EVENT,v),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function re(n,s,m){h=n,s&&s!==y&&(y=s),m&&m!==f&&(f=m)}function ye(){h&&h.remove();let n;h=n,f=n,y=n}function xe(){return{container:a,content:o,trigger:r}}function ne(){return E&&(E=!1),!E}function ve(){return E||(E=!0),E}function _e(n){return S=n,this}let Y=new A;return this.addEventListener=Y.addEventListener,this.removeEventListener=Y.removeEventListener,this.dispatchEvent=Y.dispatchEvent,this.init=R,this.expand=z,this.collapse=C,this.setTransition=re,this.clearTransition=ye,this.getData=()=>S,this.getTransition=()=>h,this.getDom=xe,this.isAnimating=()=>i===c||i===d,this.isExpanded=()=>i===p,this.resume=ne,this.setData=_e,this.suspend=ve,X.BASE_CLASS=ae,this}var he={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function vt(e){let t=new A,a=new _(e,he,this);function r(l){return a.init(l),this}function o(){return a.applyClass(he.ALPHA_100),this}function i(){return a.applyClass(he.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=i,this.init=r,this}vt.CLASSES=he;function _(e,t,a){let r=t,o=e;if(!a)throw new Error("Child transition argument must be defined!");let i=a,l,d,c,p=!1,h=!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?(o.addEventListener(d,c),i.dispatchEvent(_.BEGIN_EVENT,{target:i,type:_.BEGIN_EVENT}),o.classList.add(_.ANIMATING_CLASS),h=!0):(i.dispatchEvent(_.BEGIN_EVENT,{target:i,type:_.BEGIN_EVENT}),c())}function v(){o.removeEventListener(d,c)}function T(x){return x&&x.propertyName!==r.CSS_PROPERTY?!1:(v(),o.classList.remove(_.ANIMATING_CLASS),i.dispatchEvent(_.END_EVENT,{target:i,type:_.END_EVENT}),h=!1,!0)}function S(){let x;for(x in r)({}).hasOwnProperty.call(r,x)&&r[x]!==r.BASE_CLASS&&o.classList.contains(r[x])&&o.classList.remove(r[x])}function E(){h&&(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 j(){E(),S(),o.classList.remove(r.BASE_CLASS)}function V(){o.classList.remove(_.NO_ANIMATION_CLASS),p=!0}function R(){o.classList.add(_.NO_ANIMATION_CLASS),p=!1}function O(x){if(!x){let $="Element does not have TransitionEnd event. It may be null!";throw new Error($)}let z,C={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},U;for(U in C)if({}.hasOwnProperty.call(C,U)&&typeof x.style[U]!="undefined"){z=C[U];break}return z}function g(x){j(),V(),o=x,o.classList.add(r.BASE_CLASS),d=O(o)}function w(x){if(p=!o.classList.contains(_.NO_ANIMATION_CLASS),c=T.bind(this),g(o),!x)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return o.classList.add(x),this}function D(x){return f||(S(),f=!0),o.classList.contains(x)?!1:(v(),o.classList.remove(l),l=x,y(),o.classList.add(l),!0)}return this.animateOff=R,this.animateOn=V,this.applyClass=D,this.halt=E,this.init=w,this.isAnimated=()=>p,this.remove=j,this.setElement=g,this}_.BEGIN_EVENT="transitionbegin";_.END_EVENT="transitionend";_.NO_ANIMATION_CLASS="u-no-animation";_.ANIMATING_CLASS="u-is-animating";var ie={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 A,a=new _(e,ie,this),r=0;function o(){let y=e.scrollHeight+"px";e.style.maxHeight=y}function i(){window.removeEventListener("load",i),o()}function l(f){return a.init(f),window.addEventListener("load",i),window.addEventListener("resize",()=>{o()}),this}function d(){return o(),a.applyClass(ie.MH_DEFAULT),(!r||e.scrollHeight>r)&&(r=e.scrollHeight),this}function c(){return a.applyClass(ie.MH_SUMMARY),r=e.scrollHeight,this}function p(){return a.applyClass(ie.MH_ZERO),r=e.scrollHeight,this}function h(){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=h,this.init=l,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}B.CLASSES=ie;var K={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 A,a=new _(e,K,this);function r(c){return a.init(c),this}function o(){return a.applyClass(K.MOVE_TO_ORIGIN),this}function i(c){c=c||1;let p=[K.MOVE_LEFT,K.MOVE_LEFT_2X,K.MOVE_LEFT_3X];return a.applyClass(p[c-1]),this}function l(){return a.applyClass(K.MOVE_RIGHT),this}function d(){return a.applyClass(K.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=()=>i(1),this.moveLeft2=()=>i(2),this.moveLeft3=()=>i(3),this.moveRight=l,this.moveToOrigin=o,this.moveUp=d,this}_t.CLASSES=K;var Be={};u(Be,{default:()=>ca});var ca={};var Q="o-expandable";function J(e){let t=q(e,Q),a,r,o,i,l;function d(){if(!M(t))return this;a=t.querySelector(`.${Q}__header`),r=t.querySelector(`.${Q}__content`),o=t.querySelector(`.${Q}__label`);let h=t.classList.contains(`${Q}--onload-open`);L(t,"behavior_flyout-menu"),L(a,"behavior_flyout-menu_trigger"),L(r,"behavior_flyout-menu_content");let f=h?B.CLASSES.MH_DEFAULT:B.CLASSES.MH_ZERO;return i=new B(r).init(f),l=new X(t),l.setTransition(i,i.maxHeightZero,i.maxHeightDefault),l.init(h),l.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),l.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function c(){return o.textContent.trim()}this.init=d,this.expand=()=>l.expand(),this.collapse=()=>l.collapse(),this.isExpanded=()=>l.isExpanded(),this.refresh=()=>l.getTransition().refresh(),this.getLabelText=c;let p=new A;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}J.BASE_CLASS=Q;J.init=e=>F(`.${J.BASE_CLASS}`,J,e);var Me={};u(Me,{default:()=>ma});var ma={};var me="o-expandable-group";function pe(e){let t=q(e,me),a=t.classList.contains(`${me}__accordion`),r,o;function i(d){let c=d.target;o&&o!==c&&o.collapse(),o=c}function l(d){return M(t)?(a&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",i)})),this):this}return this.init=l,this}pe.BASE_CLASS=me;pe.init=e=>{(e||document).querySelectorAll(`.${me}`).forEach(r=>{let o=F(`.${J.BASE_CLASS}`,J,r);new pe(r).init(o)})};var Ne={};u(Ne,{default:()=>ba});var ba={};var ee="o-summary";function be(e){let t=q(e,ee),a=t.classList.contains(`${ee}--mobile`),r=t.querySelector(`.${ee}__content`),o=t.querySelector(`.${ee}__btn`),i,l,d;function c(){return M(t)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!v(),L(t,"behavior_flyout-menu"),L(r,"behavior_flyout-menu_content"),L(o,"behavior_flyout-menu_trigger"),l=new X(t,!1),i=new B(r),i.init(d?B.CLASSES.MH_SUMMARY:B.CLASSES.MH_DEFAULT),l.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),l.addEventListener("triggerclick",T),l.init(),y(),window.addEventListener("resize",y),"onorientationchange"in window&&window.addEventListener("orientationchange",y),t.addEventListener("focusin",h),r.addEventListener("click",f)}function h(g){!d&&g.target!==o&&(o.click(),t.removeEventListener("focusin",h))}function f(g){g.target.tagName!=="A"&&l.isExpanded()&&i.refresh()}function y(){v()?R():V()}function v(){return a&&!je(de)||r.scrollHeight<=88}function T(){l.addEventListener("expandend",S)}function S(){j(),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),l.removeEventListener("expandend",S),l.suspend(),i.remove()}function E(){o.classList.remove("u-hidden")}function j(){o.classList.add("u-hidden")}function V(){return d&&(l.collapse(),i.animateOn(),E(),d=!1),!d}function R(){return d||(i.animateOff(),l.expand(),j(),d=!0),d}let O=new A;return this.addEventListener=O.addEventListener,this.removeEventListener=O.removeEventListener,this.dispatchEvent=O.dispatchEvent,this.init=c,this}be.BASE_CLASS=ee;be.init=e=>F(`.${ee}`,be,e);var oe="o-summary-minimal";function ue(e){let t=q(e,oe),a=t.querySelector(`.${oe}__content`),r=t.querySelector(`.${oe}__btn`),o,i;function l(){return M(t)?(L(t,"behavior_flyout-menu"),L(a,"behavior_flyout-menu_content"),L(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),i=new X(t,!1),o=new B(a),o.init(B.CLASSES.MH_SUMMARY),i.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),i.init(),t.addEventListener("focusin",c),a.addEventListener("click",p),i.collapse(),o.animateOn()}function c(f){f.target!==r&&(r.click(),t.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&i.isExpanded()&&o.refresh()}let h=new A;return this.addEventListener=h.addEventListener,this.removeEventListener=h.removeEventListener,this.dispatchEvent=h.dispatchEvent,this.init=l,this}ue.BASE_CLASS=oe;ue.init=e=>F(`.${oe}`,ue,e);var Ce={};u(Ce,{default:()=>fa});var fa={};var qe={};u(qe,{default:()=>xa});var xa={};var Fe={};u(Fe,{default:()=>_a});var _a={};var He={};u(He,{default:()=>ka});var ka={};var Ve={};u(Ve,{default:()=>Ea});var Ea={};var Ge={};u(Ge,{default:()=>Aa});var Aa={};var Re={};u(Re,{default:()=>Ta});var Ta={};var Ue={};u(Ue,{default:()=>za});var za={};var Pe={};u(Pe,{default:()=>Ia});var Ia={};var Ba;function Ma(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function Na(e,t){return RegExp(Ma(t.trim()),"i").test(e)}function Ca(e,t,a){let r=e,o=t,i=(a==null?void 0:a.maxSelections)||5,l=[],d=[],c=[],p=[],h=-1;function f(g){return o+"-"+g.value.trim().replace(/\s+/g,"-").toLowerCase()}function y(){return d.length>=i}function v(g){let w,D=[],x=!1;for(let z=0,C=g.length;z<C;z++)w=g[z],x=y()?!1:w.defaultSelected,D.push({id:f(w),value:w.value,text:w.text,checked:x}),x&&d.push(z);return D}function T(){return l=v(r),this}function S(g){return l[g].checked=!l[g].checked,d.length<i&&l[g].checked?(d.push(g),d.sort(),!0):(l[g].checked=!1,d=d.filter(function(w){return w!==g}),!1)}function E(g,w,D,x){return Na(w.text,x)&&g.push(D),g}function j(g){return Object.prototype.toString.call(g)!=="[object String]"&&(g=""),p=c,l.length>0&&(c=l.reduce(function(w,D,x){return E(w,D,x,g)},[])),h=-1,c}function V(g){return l[g]}function R(g){let w=c.length,D=w===0?l.length:w;g<0?h=-1:g>=D?h=D-1:h=g}function O(){return h}return this.init=T,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=y,this.filterIndices=j,this.clearFilter=function(){return c=p=[],Ba},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=O,this.setIndex=R,this.resetIndex=function(){return h=-1,h},this.getOption=V,this}var wt=Ca;function H(e,t,a){let r=document.createElement(e);return Object.keys(a).forEach(o=>{let i=a[o];o in r?r[o]=i:r.setAttribute(o,i)}),t&&t.appendChild(r),r}var kt='<svg xmlns="http://www.w3.org/2000/svg" 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 Ga=kt,N="o-multiselect",Ra="a-checkbox",Ua="a-text-input",St="prev",ge="next",Xe="Enter",Pa=" ",Et="Escape",Xa="ArrowUp",Dt="ArrowDown",At="Tab",Lt={renderTags:!0,maxSelections:5};function fe(e){e.classList.add(N);let t=q(e,N),a=!1,r,o,i,l,d,c,p,h,f,y,v,T=[],S;function E(){v.classList.remove("u-no-results"),v.classList.add("u-filtered");let n=i.getLastFilterIndices();for(let s=0,m=n.length;s<m;s++)T[n[s]].classList.remove("u-filter-match");n=i.getFilterIndices();for(let s=0,m=n.length;s<m;s++)T[n[s]].classList.add("u-filter-match")}function j(){v.classList.remove("u-filtered","u-no-results");for(let n=0,s=v.children.length;n<s;n++)v.children[n].classList.remove("u-filter-match");i.clearFilter()}function V(){v.classList.add("u-no-results"),v.classList.remove("u-filtered")}function R(n){return n.length>0?(E(),!0):(V(),!1)}function O(n){j(),i.resetIndex();let s=i.filterIndices(n);R(s)}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),i.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function D(n){n===ge?i.setIndex(i.getIndex()+1):n===St&&i.setIndex(i.getIndex()-1);let s=i.getIndex();if(s>-1){let m=s,b=i.getFilterIndices();b.length>0&&(m=b[s]);let P=i.getOption(m).value,Tt=v.querySelector('[data-option="'+P+'"]').querySelector("input");a=!0,Tt.focus()}else a=!1,f.focus()}function x(){f.value="",j()}function z(n){let s=n.target;s.tagName==="BUTTON"&&(n.preventDefault(),s.removeEventListener("click",z),s.querySelector("label").click())}function C(n){if(n.key===Pa||n.key===Xe){let s=n.target.querySelector("label");v.querySelector("#"+s.getAttribute("for")).click()}}function U(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function $(n,s){let m=U(s),b=H("li",null,{"data-option":s.value}),k=H("button",b,{type:"button",innerHTML:"<label for="+m+">"+s.text+Ga+"</label>"});n.appendChild(b),k.addEventListener("click",z),k.addEventListener("keydown",C)}function re(n){let s=i.getOption(n)||i.getOption(i.getIndex());if(s){if(s.checked){v.classList.contains("u-max-selections")&&v.classList.remove("u-max-selections");let m='[data-option="'+s.value+'"]',b=p.querySelector(m);typeof b!="undefined"&&b&&(p==null||p.removeChild(b))}else d!=null&&d.renderTags&&p&&$(p,s);i.toggleOption(n),i.isAtMaxSelections()&&v.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}i.resetIndex(),a=!1,y.getAttribute("aria-hidden")==="false"&&f.focus()}function ye(n){re(Number(n.target.getAttribute("data-index"))),x()}function xe(){h.addEventListener("mousemove",function(m){let b=m.target;m.offsetX>b.offsetWidth-35?b.style.cursor="pointer":b.style.cursor="auto"}),h.addEventListener("mouseup",function(m){let b=m.target;m.offsetX>b.offsetWidth-35&&y.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){O(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(m){let b=m.key;y.getAttribute("aria-hidden")==="true"&&b!==At&&g(),b===Xe?(m.preventDefault(),D(ge)):b===Et?(x(),w()):b===Dt?D(ge):b===At&&!m.shiftKey&&y.getAttribute("aria-hidden")==="false"&&w()}),v.addEventListener("mousedown",function(){a=!0}),v.addEventListener("keydown",function(m){let b=m.key,k=m.target,P=k.checked;if(b===Xe){m.preventDefault(),k.checked=!P;let G=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(G)}else b===Et?(f.focus(),w()):b===Xa?D(St):b===Dt&&D(ge)}),y.addEventListener("mousedown",function(m){m.target.tagName==="LABEL"&&(a=!0)});let n=v.querySelectorAll("input");for(let m=0,b=n.length;m<b;m++)n[m].addEventListener("change",ye);let s=p.querySelectorAll("button");for(let m=0,b=s.length;m<b;m++)s[m].addEventListener("click",z),s[m].addEventListener("keydown",C)}function ne(){c=document.createElement("div"),c.className=N,p=H("ul",null,{className:N+"__choices"}),h=H("header",c,{className:N+"__header"}),f=H("input",h,{className:N+"__search "+Ua,type:"text",placeholder:o||"Select up to five",id:t.id,autocomplete:"off"}),y=H("fieldset",c,{className:N+"__fieldset u-invisible","aria-hidden":"true"});let n=N+"__options";i.isAtMaxSelections()&&(n+=" u-max-selections"),v=H("ul",y,{className:n});let s,m,b;for(let k=0,P=l.length;k<P;k++){s=l[k],m=U(s),b=i.getOption(k).checked;let G=H("li",v,{"data-option":s.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});H("input",G,{id:m,type:"checkbox",value:s.value,name:r,class:Ra+" "+N+"__checkbox",checked:b,"data-index":k}),H("label",G,{for:m,textContent:s.text,className:N+"__label a-label"}),T.push(G),b&&(d!=null&&d.renderTags)&&$(p,s)}return c.insertBefore(p,h),t.parentNode.insertBefore(c,t),c.appendChild(t),c}function ve(n=Lt){if(!M(t))return this;if(Ie())return this;if(S=this,r=t.name||t.id,o=t.getAttribute("placeholder"),l=t.options||[],d=we(we({},Lt),n),l.length>0){i=new wt(l,r,d).init();let s=ne();t.parentNode.removeChild(t),t=s,M(t),xe()}return this}function _e(){return i}this.init=ve,this.expand=g,this.collapse=w;let Y=new A;return this.addEventListener=Y.addEventListener,this.removeEventListener=Y.removeEventListener,this.dispatchEvent=Y.dispatchEvent,this.getModel=_e,this.updateSelections=re,this.selectionClickHandler=z,this.selectionKeyDownHandler=C,this}fe.BASE_CLASS=N;fe.init=e=>F(`.${N}`,fe,void 0,e);var Ke={};u(Ke,{default:()=>Ja});var Ja={};var Je={};u(Je,{default:()=>Wa});var Wa={};var Ye={};u(Ye,{default:()=>Za});var Za={};var We={};u(We,{default:()=>ei});var ei={};var $e={};u($e,{default:()=>ai});var ai={};var Ze={};u(Ze,{default:()=>oi});var oi={};var Qe={};u(Qe,{default:()=>ni});var ni={};var et={};u(et,{default:()=>si});var si={};var tt={};u(tt,{default:()=>ci});var ci={};var at={};u(at,{default:()=>mi});var mi={};var it={};u(it,{default:()=>bi});var bi={};var ot={};u(ot,{default:()=>gi});var gi={};var rt={};u(rt,{default:()=>yi});var yi={};var nt={};u(nt,{default:()=>vi});var vi={};var lt={};u(lt,{default:()=>wi});var wi={};var st={};u(st,{default:()=>Si});var Si={};var dt={};u(dt,{default:()=>Di});var Di={};var ct={};u(ct,{default:()=>Li});var Li={};var ht={};u(ht,{default:()=>ji});var ji={};var mt={};u(mt,{default:()=>Oi});var Oi={};})();
|
|
1
|
+
(()=>{var ut=Object.defineProperty;var pt=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable;var bt=(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)&&bt(e,a,t[a]);if(pt)for(var a of pt(t))zt.call(t,a)&&bt(e,a,t[a]);return e};var u=(e,t)=>{for(var a in t)ut(e,a,{get:t[a],enumerable:!0})};var le={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={};u(ke,{default:()=>It});var It={};var Se={};u(Se,{default:()=>Mt});var Mt={};var Ee={};u(Ee,{default:()=>Ct});var Ct={};var De={};u(De,{default:()=>Ft});var Ft={};var Ae={};u(Ae,{default:()=>Vt});var Vt={};var Le={};u(Le,{default:()=>Rt});var Rt={};var Te={};u(Te,{default:()=>Pt});var Pt={};function se(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function Xt(e,t){let a=e.min,r=e.max;se()>0&&se()!==16&&(a=a/16*se(),r=r/16*se());let i=a||0,l=r||Number.POSITIVE_INFINITY;return i<=t&&t<=l}function Kt(e){let t={};e=e||window.innerWidth;let a;for(a in le)t[a]=Xt(le[a],e);return t}var de="mobile",Jt="tablet",Yt="desktop";function je(e){let t=!1,a=Kt();return(e===de&&a.bpXS||e===Jt&&a.bpSM||e===Yt&&(a.bpMED||a.bpLG||a.bpXL))&&(t=!0),t}var I="data-js-hook",Z="behavior_",ze="state_";function A(){let e={};function t(o,i){return{}.hasOwnProperty.call(e,o)?e[o].push(i):e[o]=[i],this}function a(o,i){if(!{}.hasOwnProperty.call(e,o))return this;let l=e[o].indexOf(i);return l!==-1&&e[o].splice(l,1),this}function r(o,i){if(!{}.hasOwnProperty.call(e,o))return this;i=i||{};let l=e[o];for(let d=0,c=l.length;d<c;d++)l[d].call(this,i);return this}return this.addEventListener=t,this.removeEventListener=a,this.dispatchEvent=r,this.getRegisteredEvents=()=>e,this}function W(e,t){if(!e)return!1;let a=e.getAttribute(I);return a?(a=a.split(" "),a.indexOf(t)>-1):!1}function L(e,t){if(W(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=ze+"atomic_init";function Wt(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 $t(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 Wt(e,t),$t(e,t)}function M(e){return W(e,Oe)?!1:(L(e,Oe),!0)}function F(e,t,a,r={}){let i=(a||document).querySelectorAll(e),l=[],d,c;for(let p=0,h=i.length;p<h;p++)c=i[p],W(c,Oe)===!1&&(d=new t(c),d.init(r),l.push(d));return l}function gt(e,t){t=t||document;let a=[];try{a=t.querySelectorAll(e)}catch(r){let o=`${e} not found in DOM! ${r}`;throw new Error(o)}return a.length===0&&e.indexOf(Z)===-1&&(a=ft(e,t)),a}function Zt(e,t,a,r){let o=[];e instanceof NodeList?o=e:e instanceof Node?o=[e]:typeof e=="string"&&(o=gt(e,r));for(let i=0,l=o.length;i<l;i++)o[i].addEventListener(t,a,!1);return o}function ce(e,t){let a;if(W(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 ft(e,t){return e=I+"*="+Z+e,e="["+e+"]",gt(e,t)}function Qt(e,t,a){e.removeEventListener(t,a)}var te=Object.prototype.toString;function yt(e){return typeof e=="undefined"}function ea(e){return typeof e!="undefined"}function ta(e){return e!==null&&typeof e=="object"}function xt(e){return te.call(e)==="[object String]"}function aa(e){return te.call(e)==="[object Number]"}function ia(e){return te.call(e)==="[object Date]"}var oa=Array.isArray||function(t){return te.call(t)==="[object Array]"};function ra(e){return te.call(e)==="[object Function]"}function na(e){return yt(e)||e===null||xt(e)&&e.length<=0||/^\s*$/.test(e)}function Ie(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var ae=Z+"flyout-menu",la="["+I+"="+ae;function X(e,t=!0){let a=ce(e,ae),r=V(e),o=ce(e,ae+"_content"),i=0,l=0,d=1,c=2,p=3,h,f,y,v=$.bind(this),T=U.bind(this),S,E=!0,j=!1;function V(n){let s=[],m=n.querySelectorAll(`${la}_trigger]`),b,k,P;for(let G=m.length>>>0;G--;){for(P=!1,b=m[G],k=b.parentElement;k!==n;)k.getAttribute(I)&&k.getAttribute(I).split(" ").indexOf(ae)!==-1?(P=!0,k=n):k=k.parentElement;P||s.unshift(m[G])}return s}function R(n=!1){return i=n?p:l,r.forEach(s=>{O("expanded",s,n),s.addEventListener("click",x.bind(this)),s.addEventListener("touchstart",g,{passive:!0}),s.addEventListener("mouseover",w.bind(this)),s.addEventListener("mouseout",D.bind(this))}),o.setAttribute("data-open",n?"true":"false"),t&&!n&&o.setAttribute("hidden",""),ne(),this}function O(n,s,m){let b=String(m);return s.setAttribute("aria-"+n,b),b}function g(){j=!0}function w(n){E||(j||this.dispatchEvent("triggerover",{target:this,trigger:n.target,type:"triggerover"}),j=!1)}function D(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(),i){case l:case d:this.expand();break;case c:case p:this.collapse();break}}function z(){if(h==null||h.halt(),i===c||i===p)return this;if(i=c,t&&o.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!y)return T(),this;let n=h==null?void 0:h.isAnimated();return n&&h.addEventListener(_.END_EVENT,T),f(),n||T(),this}function C(){if(h==null||h.halt(),i===d||i===l)return this;for(let s=0,m=r.length;s<m;s++)O("expanded",r[s],!1);if(o.setAttribute("data-open","false"),i=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!y||!f)return v(),this;let n=h==null?void 0:h.isAnimated();return n&&h.addEventListener(_.END_EVENT,v),y(),n||v(),this}function U(){i=p,o.setAttribute("data-open","true"),h&&h.removeEventListener(_.END_EVENT,T),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let n=0,s=r.length;n<s;n++)O("expanded",r[n],!0)}function $(){i=l,t&&o.setAttribute("hidden",""),h&&h.removeEventListener(_.END_EVENT,v),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function re(n,s,m){h=n,s&&s!==y&&(y=s),m&&m!==f&&(f=m)}function ye(){h&&h.remove();let n;h=n,f=n,y=n}function xe(){return{container:a,content:o,trigger:r}}function ne(){return E&&(E=!1),!E}function ve(){return E||(E=!0),E}function _e(n){return S=n,this}let Y=new A;return this.addEventListener=Y.addEventListener,this.removeEventListener=Y.removeEventListener,this.dispatchEvent=Y.dispatchEvent,this.init=R,this.expand=z,this.collapse=C,this.setTransition=re,this.clearTransition=ye,this.getData=()=>S,this.getTransition=()=>h,this.getDom=xe,this.isAnimating=()=>i===c||i===d,this.isExpanded=()=>i===p,this.resume=ne,this.setData=_e,this.suspend=ve,X.BASE_CLASS=ae,this}var he={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function vt(e){let t=new A,a=new _(e,he,this);function r(l){return a.init(l),this}function o(){return a.applyClass(he.ALPHA_100),this}function i(){return a.applyClass(he.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=i,this.init=r,this}vt.CLASSES=he;function _(e,t,a){let r=t,o=e;if(!a)throw new Error("Child transition argument must be defined!");let i=a,l,d,c,p=!1,h=!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?(o.addEventListener(d,c),i.dispatchEvent(_.BEGIN_EVENT,{target:i,type:_.BEGIN_EVENT}),o.classList.add(_.ANIMATING_CLASS),h=!0):(i.dispatchEvent(_.BEGIN_EVENT,{target:i,type:_.BEGIN_EVENT}),c())}function v(){o.removeEventListener(d,c)}function T(x){return x&&x.propertyName!==r.CSS_PROPERTY?!1:(v(),o.classList.remove(_.ANIMATING_CLASS),i.dispatchEvent(_.END_EVENT,{target:i,type:_.END_EVENT}),h=!1,!0)}function S(){let x;for(x in r)({}).hasOwnProperty.call(r,x)&&r[x]!==r.BASE_CLASS&&o.classList.contains(r[x])&&o.classList.remove(r[x])}function E(){h&&(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 j(){E(),S(),o.classList.remove(r.BASE_CLASS)}function V(){o.classList.remove(_.NO_ANIMATION_CLASS),p=!0}function R(){o.classList.add(_.NO_ANIMATION_CLASS),p=!1}function O(x){if(!x){let $="Element does not have TransitionEnd event. It may be null!";throw new Error($)}let z,C={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},U;for(U in C)if({}.hasOwnProperty.call(C,U)&&typeof x.style[U]!="undefined"){z=C[U];break}return z}function g(x){j(),V(),o=x,o.classList.add(r.BASE_CLASS),d=O(o)}function w(x){if(p=!o.classList.contains(_.NO_ANIMATION_CLASS),c=T.bind(this),g(o),!x)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return o.classList.add(x),this}function D(x){return f||(S(),f=!0),o.classList.contains(x)?!1:(v(),o.classList.remove(l),l=x,y(),o.classList.add(l),!0)}return this.animateOff=R,this.animateOn=V,this.applyClass=D,this.halt=E,this.init=w,this.isAnimated=()=>p,this.remove=j,this.setElement=g,this}_.BEGIN_EVENT="transitionbegin";_.END_EVENT="transitionend";_.NO_ANIMATION_CLASS="u-no-animation";_.ANIMATING_CLASS="u-is-animating";var ie={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 A,a=new _(e,ie,this),r=0;function o(){let y=e.scrollHeight+"px";e.style.maxHeight=y}function i(){window.removeEventListener("load",i),o()}function l(f){return a.init(f),window.addEventListener("load",i),window.addEventListener("resize",()=>{o()}),this}function d(){return o(),a.applyClass(ie.MH_DEFAULT),(!r||e.scrollHeight>r)&&(r=e.scrollHeight),this}function c(){return a.applyClass(ie.MH_SUMMARY),r=e.scrollHeight,this}function p(){return a.applyClass(ie.MH_ZERO),r=e.scrollHeight,this}function h(){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=h,this.init=l,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}B.CLASSES=ie;var K={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 A,a=new _(e,K,this);function r(c){return a.init(c),this}function o(){return a.applyClass(K.MOVE_TO_ORIGIN),this}function i(c){c=c||1;let p=[K.MOVE_LEFT,K.MOVE_LEFT_2X,K.MOVE_LEFT_3X];return a.applyClass(p[c-1]),this}function l(){return a.applyClass(K.MOVE_RIGHT),this}function d(){return a.applyClass(K.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=()=>i(1),this.moveLeft2=()=>i(2),this.moveLeft3=()=>i(3),this.moveRight=l,this.moveToOrigin=o,this.moveUp=d,this}_t.CLASSES=K;var Be={};u(Be,{default:()=>ca});var ca={};var Q="o-expandable";function J(e){let t=q(e,Q),a,r,o,i,l;function d(){if(!M(t))return this;a=t.querySelector(`.${Q}__header`),r=t.querySelector(`.${Q}__content`),o=t.querySelector(`.${Q}__label`);let h=t.classList.contains(`${Q}--onload-open`);L(t,"behavior_flyout-menu"),L(a,"behavior_flyout-menu_trigger"),L(r,"behavior_flyout-menu_content");let f=h?B.CLASSES.MH_DEFAULT:B.CLASSES.MH_ZERO;return i=new B(r).init(f),l=new X(t),l.setTransition(i,i.maxHeightZero,i.maxHeightDefault),l.init(h),l.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),l.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function c(){return o.textContent.trim()}this.init=d,this.expand=()=>l.expand(),this.collapse=()=>l.collapse(),this.isExpanded=()=>l.isExpanded(),this.refresh=()=>l.getTransition().refresh(),this.getLabelText=c;let p=new A;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}J.BASE_CLASS=Q;J.init=e=>F(`.${J.BASE_CLASS}`,J,e);var Me={};u(Me,{default:()=>ma});var ma={};var me="o-expandable-group";function pe(e){let t=q(e,me),a=t.classList.contains(`${me}--accordion`),r,o;function i(d){let c=d.target;o&&o!==c&&o.collapse(),o=c}function l(d){return M(t)?(a&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",i)})),this):this}return this.init=l,this}pe.BASE_CLASS=me;pe.init=e=>{(e||document).querySelectorAll(`.${me}`).forEach(r=>{let o=F(`.${J.BASE_CLASS}`,J,r);new pe(r).init(o)})};var Ne={};u(Ne,{default:()=>ba});var ba={};var ee="o-summary";function be(e){let t=q(e,ee),a=t.classList.contains(`${ee}--mobile`),r=t.querySelector(`.${ee}__content`),o=t.querySelector(`.${ee}__btn`),i,l,d;function c(){return M(t)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!v(),L(t,"behavior_flyout-menu"),L(r,"behavior_flyout-menu_content"),L(o,"behavior_flyout-menu_trigger"),l=new X(t,!1),i=new B(r),i.init(d?B.CLASSES.MH_SUMMARY:B.CLASSES.MH_DEFAULT),l.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),l.addEventListener("triggerclick",T),l.init(),y(),window.addEventListener("resize",y),"onorientationchange"in window&&window.addEventListener("orientationchange",y),t.addEventListener("focusin",h),r.addEventListener("click",f)}function h(g){!d&&g.target!==o&&(o.click(),t.removeEventListener("focusin",h))}function f(g){g.target.tagName!=="A"&&l.isExpanded()&&i.refresh()}function y(){v()?R():V()}function v(){return a&&!je(de)||r.scrollHeight<=88}function T(){l.addEventListener("expandend",S)}function S(){j(),window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),l.removeEventListener("expandend",S),l.suspend(),i.remove()}function E(){o.classList.remove("u-hidden")}function j(){o.classList.add("u-hidden")}function V(){return d&&(l.collapse(),i.animateOn(),E(),d=!1),!d}function R(){return d||(i.animateOff(),l.expand(),j(),d=!0),d}let O=new A;return this.addEventListener=O.addEventListener,this.removeEventListener=O.removeEventListener,this.dispatchEvent=O.dispatchEvent,this.init=c,this}be.BASE_CLASS=ee;be.init=e=>F(`.${ee}`,be,e);var oe="o-summary-minimal";function ue(e){let t=q(e,oe),a=t.querySelector(`.${oe}__content`),r=t.querySelector(`.${oe}__btn`),o,i;function l(){return M(t)?(L(t,"behavior_flyout-menu"),L(a,"behavior_flyout-menu_content"),L(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),i=new X(t,!1),o=new B(a),o.init(B.CLASSES.MH_SUMMARY),i.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),i.init(),t.addEventListener("focusin",c),a.addEventListener("click",p),i.collapse(),o.animateOn()}function c(f){f.target!==r&&(r.click(),t.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&i.isExpanded()&&o.refresh()}let h=new A;return this.addEventListener=h.addEventListener,this.removeEventListener=h.removeEventListener,this.dispatchEvent=h.dispatchEvent,this.init=l,this}ue.BASE_CLASS=oe;ue.init=e=>F(`.${oe}`,ue,e);var Ce={};u(Ce,{default:()=>fa});var fa={};var qe={};u(qe,{default:()=>xa});var xa={};var Fe={};u(Fe,{default:()=>_a});var _a={};var He={};u(He,{default:()=>ka});var ka={};var Ve={};u(Ve,{default:()=>Ea});var Ea={};var Ge={};u(Ge,{default:()=>Aa});var Aa={};var Re={};u(Re,{default:()=>Ta});var Ta={};var Ue={};u(Ue,{default:()=>za});var za={};var Pe={};u(Pe,{default:()=>Ia});var Ia={};var Ba;function Ma(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function Na(e,t){return RegExp(Ma(t.trim()),"i").test(e)}function Ca(e,t,a){let r=e,o=t,i=(a==null?void 0:a.maxSelections)||5,l=[],d=[],c=[],p=[],h=-1;function f(g){return o+"-"+g.value.trim().replace(/\s+/g,"-").toLowerCase()}function y(){return d.length>=i}function v(g){let w,D=[],x=!1;for(let z=0,C=g.length;z<C;z++)w=g[z],x=y()?!1:w.defaultSelected,D.push({id:f(w),value:w.value,text:w.text,checked:x}),x&&d.push(z);return D}function T(){return l=v(r),this}function S(g){return l[g].checked=!l[g].checked,d.length<i&&l[g].checked?(d.push(g),d.sort(),!0):(l[g].checked=!1,d=d.filter(function(w){return w!==g}),!1)}function E(g,w,D,x){return Na(w.text,x)&&g.push(D),g}function j(g){return Object.prototype.toString.call(g)!=="[object String]"&&(g=""),p=c,l.length>0&&(c=l.reduce(function(w,D,x){return E(w,D,x,g)},[])),h=-1,c}function V(g){return l[g]}function R(g){let w=c.length,D=w===0?l.length:w;g<0?h=-1:g>=D?h=D-1:h=g}function O(){return h}return this.init=T,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=y,this.filterIndices=j,this.clearFilter=function(){return c=p=[],Ba},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=O,this.setIndex=R,this.resetIndex=function(){return h=-1,h},this.getOption=V,this}var wt=Ca;function H(e,t,a){let r=document.createElement(e);return Object.keys(a).forEach(o=>{let i=a[o];o in r?r[o]=i:r.setAttribute(o,i)}),t&&t.appendChild(r),r}var kt='<svg xmlns="http://www.w3.org/2000/svg" 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 Ga=kt,N="o-multiselect",Ra="a-checkbox",Ua="a-text-input",St="prev",ge="next",Xe="Enter",Pa=" ",Et="Escape",Xa="ArrowUp",Dt="ArrowDown",At="Tab",Lt={renderTags:!0,maxSelections:5};function fe(e){e.classList.add(N);let t=q(e,N),a=!1,r,o,i,l,d,c,p,h,f,y,v,T=[],S;function E(){v.classList.remove("u-no-results"),v.classList.add("u-filtered");let n=i.getLastFilterIndices();for(let s=0,m=n.length;s<m;s++)T[n[s]].classList.remove("u-filter-match");n=i.getFilterIndices();for(let s=0,m=n.length;s<m;s++)T[n[s]].classList.add("u-filter-match")}function j(){v.classList.remove("u-filtered","u-no-results");for(let n=0,s=v.children.length;n<s;n++)v.children[n].classList.remove("u-filter-match");i.clearFilter()}function V(){v.classList.add("u-no-results"),v.classList.remove("u-filtered")}function R(n){return n.length>0?(E(),!0):(V(),!1)}function O(n){j(),i.resetIndex();let s=i.filterIndices(n);R(s)}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),i.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function D(n){n===ge?i.setIndex(i.getIndex()+1):n===St&&i.setIndex(i.getIndex()-1);let s=i.getIndex();if(s>-1){let m=s,b=i.getFilterIndices();b.length>0&&(m=b[s]);let P=i.getOption(m).value,Tt=v.querySelector('[data-option="'+P+'"]').querySelector("input");a=!0,Tt.focus()}else a=!1,f.focus()}function x(){f.value="",j()}function z(n){let s=n.target;s.tagName==="BUTTON"&&(n.preventDefault(),s.removeEventListener("click",z),s.querySelector("label").click())}function C(n){if(n.key===Pa||n.key===Xe){let s=n.target.querySelector("label");v.querySelector("#"+s.getAttribute("for")).click()}}function U(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function $(n,s){let m=U(s),b=H("li",null,{"data-option":s.value}),k=H("button",b,{type:"button",innerHTML:"<label for="+m+">"+s.text+Ga+"</label>"});n.appendChild(b),k.addEventListener("click",z),k.addEventListener("keydown",C)}function re(n){let s=i.getOption(n)||i.getOption(i.getIndex());if(s){if(s.checked){v.classList.contains("u-max-selections")&&v.classList.remove("u-max-selections");let m='[data-option="'+s.value+'"]',b=p.querySelector(m);typeof b!="undefined"&&b&&(p==null||p.removeChild(b))}else d!=null&&d.renderTags&&p&&$(p,s);i.toggleOption(n),i.isAtMaxSelections()&&v.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}i.resetIndex(),a=!1,y.getAttribute("aria-hidden")==="false"&&f.focus()}function ye(n){re(Number(n.target.getAttribute("data-index"))),x()}function xe(){h.addEventListener("mousemove",function(m){let b=m.target;m.offsetX>b.offsetWidth-35?b.style.cursor="pointer":b.style.cursor="auto"}),h.addEventListener("mouseup",function(m){let b=m.target;m.offsetX>b.offsetWidth-35&&y.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){O(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(m){let b=m.key;y.getAttribute("aria-hidden")==="true"&&b!==At&&g(),b===Xe?(m.preventDefault(),D(ge)):b===Et?(x(),w()):b===Dt?D(ge):b===At&&!m.shiftKey&&y.getAttribute("aria-hidden")==="false"&&w()}),v.addEventListener("mousedown",function(){a=!0}),v.addEventListener("keydown",function(m){let b=m.key,k=m.target,P=k.checked;if(b===Xe){m.preventDefault(),k.checked=!P;let G=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(G)}else b===Et?(f.focus(),w()):b===Xa?D(St):b===Dt&&D(ge)}),y.addEventListener("mousedown",function(m){m.target.tagName==="LABEL"&&(a=!0)});let n=v.querySelectorAll("input");for(let m=0,b=n.length;m<b;m++)n[m].addEventListener("change",ye);let s=p.querySelectorAll("button");for(let m=0,b=s.length;m<b;m++)s[m].addEventListener("click",z),s[m].addEventListener("keydown",C)}function ne(){c=document.createElement("div"),c.className=N,p=H("ul",null,{className:N+"__choices"}),h=H("header",c,{className:N+"__header"}),f=H("input",h,{className:N+"__search "+Ua,type:"text",placeholder:o||"Select up to five",id:t.id,autocomplete:"off"}),y=H("fieldset",c,{className:N+"__fieldset u-invisible","aria-hidden":"true"});let n=N+"__options";i.isAtMaxSelections()&&(n+=" u-max-selections"),v=H("ul",y,{className:n});let s,m,b;for(let k=0,P=l.length;k<P;k++){s=l[k],m=U(s),b=i.getOption(k).checked;let G=H("li",v,{"data-option":s.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});H("input",G,{id:m,type:"checkbox",value:s.value,name:r,class:Ra+" "+N+"__checkbox",checked:b,"data-index":k}),H("label",G,{for:m,textContent:s.text,className:N+"__label a-label"}),T.push(G),b&&(d!=null&&d.renderTags)&&$(p,s)}return c.insertBefore(p,h),t.parentNode.insertBefore(c,t),c.appendChild(t),c}function ve(n=Lt){if(!M(t))return this;if(Ie())return this;if(S=this,r=t.name||t.id,o=t.getAttribute("placeholder"),l=t.options||[],d=we(we({},Lt),n),l.length>0){i=new wt(l,r,d).init();let s=ne();t.parentNode.removeChild(t),t=s,M(t),xe()}return this}function _e(){return i}this.init=ve,this.expand=g,this.collapse=w;let Y=new A;return this.addEventListener=Y.addEventListener,this.removeEventListener=Y.removeEventListener,this.dispatchEvent=Y.dispatchEvent,this.getModel=_e,this.updateSelections=re,this.selectionClickHandler=z,this.selectionKeyDownHandler=C,this}fe.BASE_CLASS=N;fe.init=e=>F(`.${N}`,fe,void 0,e);var Ke={};u(Ke,{default:()=>Ja});var Ja={};var Je={};u(Je,{default:()=>Wa});var Wa={};var Ye={};u(Ye,{default:()=>Za});var Za={};var We={};u(We,{default:()=>ei});var ei={};var $e={};u($e,{default:()=>ai});var ai={};var Ze={};u(Ze,{default:()=>oi});var oi={};var Qe={};u(Qe,{default:()=>ni});var ni={};var et={};u(et,{default:()=>si});var si={};var tt={};u(tt,{default:()=>ci});var ci={};var at={};u(at,{default:()=>mi});var mi={};var it={};u(it,{default:()=>bi});var bi={};var ot={};u(ot,{default:()=>gi});var gi={};var rt={};u(rt,{default:()=>yi});var yi={};var nt={};u(nt,{default:()=>vi});var vi={};var lt={};u(lt,{default:()=>wi});var wi={};var st={};u(st,{default:()=>Si});var Si={};var dt={};u(dt,{default:()=>Di});var Di={};var ct={};u(ct,{default:()=>Li});var Li={};var ht={};u(ht,{default:()=>ji});var ji={};var mt={};u(mt,{default:()=>Oi});var Oi={};})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|