"use strict";(()=>{var m="fs-attributes";var I="cmsattribute";var w="cmsfilter";var p="queryparam";var x="support";var g=async(...t)=>{var r;let o=[];for(let n of t){let e=await((r=window.fsAttributes[n])==null?void 0:r.loading);o.push(e)}return o};var S=()=>{};var _={formBlock:"w-form",checkboxField:"w-checkbox",checkboxInput:"w-checkbox-input",radioField:"w-radio",radioInput:"w-radio-input",checkboxOrRadioLabel:"w-form-label",checkboxOrRadioFocus:"w--redirected-focus",checkboxOrRadioChecked:"w--redirected-checked",successMessage:"w-form-done",errorMessage:"w-form-fail"};var U=t=>t instanceof HTMLInputElement,C=t=>t instanceof HTMLSelectElement,L=t=>t instanceof HTMLTextAreaElement;var E=t=>typeof t=="string";function B(t,o,r){var e;let n=window.fsAttributes[t];return n.destroy=r||S,(e=n.resolve)==null||e.call(n,o),o}var v=(t,o="1",r="iife")=>{let e=`${t}${r==="esm"?".esm":""}.js`;return`https://cdn.jsdelivr.net/npm/@finsweet/attributes-${t}@${o}/${e}`};var $=`${m}-${x}`,M=async()=>{var e;let{fsAttributes:t,location:o}=window,{host:r,searchParams:n}=new URL(o.href);return!r.includes("webflow.io")||!n.has($)?!1:(e=t.import)==null?void 0:e.call(t,x,"1")};var d=t=>{let o=(e,i,s)=>{let c=t[e],{key:l,values:u}=c,a;if(!i)return`[${l}]`;let f=u==null?void 0:u[i];E(f)?a=f:a=f(s&&"instanceIndex"in s?s.instanceIndex:void 0);let A=s&&"caseInsensitive"in s&&s.caseInsensitive?"i":"";if(!(s!=null&&s.operator))return`[${l}="${a}"${A}]`;switch(s.operator){case"prefixed":return`[${l}^="${a}"${A}]`;case"suffixed":return`[${l}$="${a}"${A}]`;case"contains":return`[${l}*="${a}"${A}]`}};function r(e,i){let s=o("element",e,i),c=(i==null?void 0:i.scope)||document;return i!=null&&i.all?[...c.querySelectorAll(s)]:c.querySelector(s)}return[o,r,(e,i)=>{let s=t[i];return s?e.getAttribute(s.key):null}]};var T={preventLoad:{key:`${m}-preventload`},debugMode:{key:`${m}-debug`},src:{key:"src",values:{finsweet:"@finsweet/attributes"}},dev:{key:`${m}-dev`}},[R,mt]=d(T);var h=t=>{let{currentScript:o}=document,r={};if(!o)return{attributes:r,preventsLoad:!1};let e={preventsLoad:E(o.getAttribute(T.preventLoad.key)),attributes:r};for(let i in t){let s=o.getAttribute(t[i]);e.attributes[i]=s}return e};var P=({scriptAttributes:t,attributeKey:o,version:r,init:n})=>{var c;K(),(c=window.fsAttributes)[o]||(c[o]={});let{preventsLoad:e,attributes:i}=h(t),s=window.fsAttributes[o];s.version=r,s.init=n,e||(window.Webflow||(window.Webflow=[]),window.Webflow.push(()=>n(i)))},K=()=>{let t=H();if(window.fsAttributes&&!Array.isArray(window.fsAttributes)){y(window.fsAttributes,t);return}let o=F(t);y(o,t),D(o),window.fsAttributes=o,window.FsAttributes=window.fsAttributes,M()},F=t=>{let o={cms:{},push(...r){var n,e;for(let[i,s]of r)(e=(n=this[i])==null?void 0:n.loading)==null||e.then(s)},async import(r,n){let e=o[r];return e||new Promise(i=>{let s=document.createElement("script");s.src=v(r,n),s.async=!0,s.onload=()=>{let[c]=y(o,[r]);i(c)},document.head.append(s)})},destroy(){var r,n;for(let e of t)(n=(r=window.fsAttributes[e])==null?void 0:r.destroy)==null||n.call(r)}};return o},H=()=>{let t=R("src","finsweet",{operator:"contains"}),o=R("dev");return[...document.querySelectorAll(`script${t}, script${o}`)].reduce((e,i)=>{var c;let s=i.getAttribute(T.dev.key)||((c=i.src.match(/[\w-. ]+(?=(\.js)$)/))==null?void 0:c[0]);return s&&!e.includes(s)&&e.push(s),e},[])},y=(t,o)=>o.map(n=>{let e=t[n];return e||(t[n]={},e=t[n],e.loading=new Promise(i=>{e.resolve=s=>{i(s),delete e.resolve}}),e)}),D=t=>{let o=Array.isArray(window.fsAttributes)?window.fsAttributes:[];t.push(...o)};var O="1.2.1";function N(t,o){for(let r of t){let n=r.closest(`.${_.checkboxField}`),e=n?n.querySelector("input"):null;if(e){e.checked=!0;continue}let i=r.closest(`.${_.radioField}`),s=i?i.querySelector("input"):null;if(s){let c=s.closest("form");if(c){let u=[...c.querySelectorAll(`input[name="${s.name}"]`)].find(a=>a.value===o);u&&(u.checked=!0);continue}}if(C(r)||L(r)||U(r)&&r.type!=="button"){r.value=o;continue}r.textContent=o}}var k=`fs-${p}`,j="name",G="removequery",Y={true:"true"},b={name:{key:`${k}-${j}`},removeQuery:{key:`${k}-${G}`,values:Y}},[wt,gt]=d(b);var V=async()=>{await g(I);let t=new URL(window.location.href);for(let[o,r]of[...t.searchParams]){let n=[...document.querySelectorAll(`[${b.name.key}="${o}"]`)];if(n.length<1||(N(n,r),window.fsAttributes[w]))continue;n.some(i=>i.hasAttribute(b.removeQuery.key))&&t.searchParams.delete(o)}return history.replaceState(null,"",t.toString()),B(p)};P({init:V,version:O,attributeKey:p});})();