/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/@finsweet/attributes-favcustom@1.5.0/favcustom.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";(()=>{var a="fs-attributes";var f="cmsattribute";var l="favcustom";var x=async(...r)=>{var o;let s=[];for(let e of r){let t=await((o=window.fsAttributes[e])==null?void 0:o.loading);s.push(t)}return s};var d=()=>{};function y(r,s,o){var t;let e=window.fsAttributes[r];return e.destroy=o||d,(t=e.resolve)==null||t.call(e,s),s}var B=`${a}-support`,C="https://cdn.jsdelivr.net/npm/@finsweet/attributes-support@1/support.js",R=async()=>{let{fsAttributes:r,location:s}=window,{host:o,searchParams:e}=new URL(s.href);r.support||(r.support={});let{support:t}=r;if(!o.includes("webflow.io")||!e.has(B))return!1;if(t.import)return t.import;try{t.import=new Promise((n,i)=>{let c=document.createElement("script");c.src=C,c.onload=()=>n(!0),c.onerror=i,document.head.append(c)})}catch(n){return!1}return t.import};var p=r=>{let s=(e,t,n)=>{let i=r[e],{key:c,values:A}=i,u;if(!t)return`[${c}]`;let b=A==null?void 0:A[t];typeof b=="string"?u=b:u=b(n&&"instanceIndex"in n?n.instanceIndex:void 0);let m=n&&"caseInsensitive"in n&&n.caseInsensitive?"i":"";if(!(n!=null&&n.operator))return`[${c}="${u}"${m}]`;switch(n.operator){case"prefixed":return`[${c}^="${u}"${m}]`;case"suffixed":return`[${c}$="${u}"${m}]`;case"contains":return`[${c}*="${u}"${m}]`}};function o(e,t){let n=s("element",e,t),i=(t==null?void 0:t.scope)||document;return t!=null&&t.all?[...i.querySelectorAll(n)]:i.querySelector(n)}return[s,o]};var T={preventLoad:{key:`${a}-preventload`},debugMode:{key:`${a}-debug`},src:{key:"src",values:{finsweet:"@finsweet/attributes"}},dev:{key:`${a}-dev`}},[E,Q]=p(T);var _=r=>{let{currentScript:s}=document,o={};if(!s)return{attributes:o,preventsLoad:!1};let t={preventsLoad:typeof s.getAttribute(T.preventLoad.key)=="string",attributes:o};for(let n in r){let i=s.getAttribute(r[n]);t.attributes[n]=i}return t};var S=({scriptAttributes:r,attributeKey:s,version:o,init:e})=>{var c;h(),(c=window.fsAttributes)[s]||(c[s]={});let{preventsLoad:t,attributes:n}=_(r),i=window.fsAttributes[s];i.version=o,i.init=e,t||(window.Webflow||(window.Webflow=[]),window.Webflow.push(()=>e(n)))},h=()=>{let r=V();if(window.fsAttributes&&!Array.isArray(window.fsAttributes)){I(window.fsAttributes,r);return}let s={cms:{},push(...o){var e,t;for(let[n,i]of o)(t=(e=this[n])==null?void 0:e.loading)==null||t.then(i)},destroy(){var o,e;for(let t of r)(e=(o=window.fsAttributes[t])==null?void 0:o.destroy)==null||e.call(o)}};I(s,r),P(s),window.fsAttributes=s,window.FsAttributes=window.fsAttributes,R()},V=()=>{let r=E("src","finsweet",{operator:"contains"}),s=E("dev");return[...document.querySelectorAll(`script${r}, script${s}`)].reduce((t,n)=>{var c;let i=n.getAttribute(T.dev.key)||((c=n.src.match(/[\w-. ]+(?=(\.js)$)/))==null?void 0:c[0]);return i&&!t.includes(i)&&t.push(i),t},[])},I=(r,s)=>{for(let o of s){if(r[o])continue;r[o]={};let e=r[o];e.loading=new Promise(t=>{e.resolve=n=>{t(n),delete e.resolve}})}},P=r=>{let s=Array.isArray(window.fsAttributes)?window.fsAttributes:[];r.push(...s)};var w="1.5.0";var U=`fs-${l}`,L="src",M="src",O={element:{key:`${U}-element`,values:{src:L}},src:{key:`${U}-${M}`}},[ct,g]=p(O);var v=async()=>{await x(f);let r=g("src"),o=r instanceof HTMLImageElement?r.src:void 0;if(!o)return;let e=document.querySelector("link[rel*='icon']")||document.createElement("link");return e.type="image/x-icon",e.rel="shortcut icon",e.href=o,document.head.appendChild(e),y(l,o)};S({init:v,version:w,attributeKey:l});})();
