@searchcraft/vue-sdk 0.13.1 → 0.13.3

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/index.umd.js CHANGED
@@ -1,57 +1,58 @@
1
- (function(L,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],B):(L=typeof globalThis<"u"?globalThis:L||self,B(L.SearchcraftVueSdk={},L.Vue))})(this,function(L,B){"use strict";var Fl=Object.defineProperty;var Ll=(L,B,Oe)=>B in L?Fl(L,B,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):L[B]=Oe;var u=(L,B,Oe)=>Ll(L,typeof B!="symbol"?B+"":B,Oe);var Ur;const Oe="searchcraft-javascript-sdk",Ee={hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,state:!0,updatable:!0};var an=Object.defineProperty,nn=(s,e)=>{for(var t in e)an(s,t,{get:e[t],enumerable:!0})},on="http://www.w3.org/2000/svg",cn="http://www.w3.org/1999/xhtml",ss=(s=>(s.Undefined="undefined",s.Null="null",s.String="string",s.Number="number",s.SpecialNumber="number",s.Boolean="boolean",s.BigInt="bigint",s))(ss||{}),as=(s=>(s.Array="array",s.Date="date",s.Map="map",s.Object="object",s.RegularExpression="regexp",s.Set="set",s.Channel="channel",s.Symbol="symbol",s))(as||{}),Gt="type",Zt="value",Qt="serialized:",ln=(s,e)=>{var t;const r=e.$cmpMeta$;Object.entries((t=r.$members$)!=null?t:{}).map(([n,[o]])=>{if(o&31||o&32){const c=s[n],h=hn(Object.getPrototypeOf(s),n)||Object.getOwnPropertyDescriptor(s,n);h&&Object.defineProperty(s,n,{get(){return h.get.call(this)},set(i){h.set.call(this,i)},configurable:!0,enumerable:!0}),s[n]=e.$instanceValues$.has(n)?e.$instanceValues$.get(n):c}})};function hn(s,e){for(;s;){const t=Object.getOwnPropertyDescriptor(s,e);if(t!=null&&t.get)return t;s=Object.getPrototypeOf(s)}}var Se=s=>{if(s.__stencil__getHostRef)return s.__stencil__getHostRef()},un=(s,e)=>{const t={$flags$:0,$hostElement$:s,$cmpMeta$:e,$instanceValues$:new Map,$serializerValues$:new Map};t.$onReadyPromise$=new Promise(a=>t.$onReadyResolve$=a),s["s-p"]=[],s["s-rc"]=[];const r=t;return s.__stencil__getHostRef=()=>r,e.$flags$&512&&Ee.state&&ln(s,t),r},ns=(s,e)=>e in s,gt=(s,e)=>(0,console.error)(s,e),dn="r",fn="o",Yt="s",pn="t",mn="c",Xe="s-id",os="c-id",se=typeof window<"u"?window:{},O=se.HTMLElement||class{},N={$flags$:0,$resourcesUrl$:"",jmp:s=>s(),raf:s=>requestAnimationFrame(s),ael:(s,e,t,r)=>s.addEventListener(e,t,r),rel:(s,e,t,r)=>s.removeEventListener(e,t,r),ce:(s,e)=>new CustomEvent(s,e)},gn=Ee.shadowDom,bn=s=>Promise.resolve(s),Xt=!1,is=[],cs=[],vn=(s,e)=>t=>{s.push(t),Xt||(Xt=!0,N.$flags$&4?Jt(Kt):N.raf(Kt))},ls=s=>{for(let e=0;e<s.length;e++)try{s[e](performance.now())}catch(t){gt(t)}s.length=0},Kt=()=>{ls(is),ls(cs),(Xt=is.length>0)&&N.raf(Kt)},Jt=s=>bn().then(s),yn=vn(cs),er=s=>(s=typeof s,s==="object"||s==="function"),kn=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Cn=class Le{static fromLocalValue(e){const t=e[Gt],r=Zt in e?e[Zt]:void 0;switch(t){case"string":return r;case"boolean":return r;case"bigint":return BigInt(r);case"undefined":return;case"null":return null;case"number":return r==="NaN"?NaN:r==="-0"?-0:r==="Infinity"?1/0:r==="-Infinity"?-1/0:r;case"array":return r.map(i=>Le.fromLocalValue(i));case"date":return new Date(r);case"map":const a=new Map;for(const[i,l]of r){const m=typeof i=="object"&&i!==null?Le.fromLocalValue(i):i,p=Le.fromLocalValue(l);a.set(m,p)}return a;case"object":const n={};for(const[i,l]of r)n[i]=Le.fromLocalValue(l);return n;case"regexp":const{pattern:o,flags:c}=r;return new RegExp(o,c);case"set":const h=new Set;for(const i of r)h.add(Le.fromLocalValue(i));return h;case"symbol":return Symbol(r);default:throw new Error(`Unsupported type: ${t}`)}}static fromLocalValueArray(e){return e.map(t=>Le.fromLocalValue(t))}static isLocalValueObject(e){if(typeof e!="object"||e===null||!e.hasOwnProperty(Gt))return!1;const t=e[Gt];return Object.values({...ss,...as}).includes(t)?t!=="null"&&t!=="undefined"?e.hasOwnProperty(Zt):!0:!1}},xn={};nn(xn,{err:()=>hs,map:()=>Sn,ok:()=>tr,unwrap:()=>wn,unwrapErr:()=>Rn});var tr=s=>({isOk:!0,isErr:!1,value:s}),hs=s=>({isOk:!1,isErr:!0,value:s});function Sn(s,e){if(s.isOk){const t=e(s.value);return t instanceof Promise?t.then(r=>tr(r)):tr(t)}if(s.isErr){const t=s.value;return hs(t)}throw"should never get here"}var wn=s=>{if(s.isOk)return s.value;throw s.value},Rn=s=>{if(s.isErr)return s.value;throw s.value};function $n(s){return typeof s!="string"||!s.startsWith(Qt)?s:Cn.fromLocalValue(JSON.parse(atob(s.slice(Qt.length))))}var us=s=>{const e=bt(s,"childNodes");s.tagName&&s.tagName.includes("-")&&s["s-cr"]&&s.tagName!=="SLOT-FB"&&ds(e,s.tagName).forEach(r=>{r.nodeType===1&&r.tagName==="SLOT-FB"&&(En(r,rr(r),!1).length?r.hidden=!0:r.hidden=!1)});let t=0;for(t=0;t<e.length;t++){const r=e[t];r.nodeType===1&&bt(r,"childNodes").length&&us(r)}},Tn=s=>{const e=[];for(let t=0;t<s.length;t++){const r=s[t]["s-nr"]||void 0;r&&r.isConnected&&e.push(r)}return e};function ds(s,e,t){let r=0,a=[],n;for(;r<s.length;r++)n=s[r],n["s-sr"]&&(!e||n["s-hn"]===e)&&t===void 0&&a.push(n),a=[...a,...ds(n.childNodes,e,t)];return a}var En=(s,e,t=!0)=>{const r=[];(t&&s["s-sr"]||!s["s-sr"])&&r.push(s);let a=s;for(;a=a.nextSibling;)rr(a)===e&&(t||!a["s-sr"])&&r.push(a);return r},fs=(s,e)=>s.nodeType===1?s.getAttribute("slot")===null&&e===""||s.getAttribute("slot")===e:s["s-sn"]===e?!0:e==="",Pn=(s,e,t,r)=>{if(s["s-ol"]&&s["s-ol"].isConnected)return;const a=document.createTextNode("");if(a["s-nr"]=s,!e["s-cr"]||!e["s-cr"].parentNode)return;const n=e["s-cr"].parentNode,o=bt(n,"appendChild");if(typeof r<"u"){a["s-oo"]=r;const c=bt(n,"childNodes"),h=[a];c.forEach(i=>{i["s-nr"]&&h.push(i)}),h.sort((i,l)=>!i["s-oo"]||i["s-oo"]<(l["s-oo"]||0)?-1:!l["s-oo"]||l["s-oo"]<i["s-oo"]?1:0),h.forEach(i=>o.call(n,i))}else o.call(n,a);s["s-ol"]=a,s["s-sh"]=e["s-hn"]},rr=s=>typeof s["s-sn"]=="string"?s["s-sn"]:s.nodeType===1&&s.getAttribute("slot")||void 0;function ps(s){if(s.assignedElements||s.assignedNodes||!s["s-sr"])return;const e=t=>(function(r){const a=[],n=this["s-sn"];r!=null&&r.flatten&&console.error(`
1
+ (function(G,te){typeof exports=="object"&&typeof module<"u"?te(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],te):(G=typeof globalThis<"u"?globalThis:G||self,te(G.SearchcraftVueSdk={},G.Vue))})(this,function(G,te){"use strict";var Nu=Object.defineProperty;var zu=(G,te,xt)=>te in G?Nu(G,te,{enumerable:!0,configurable:!0,writable:!0,value:xt}):G[te]=xt;var d=(G,te,xt)=>zu(G,typeof te!="symbol"?te+"":te,xt);var Zs;const xt="searchcraft-javascript-sdk",st={hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,state:!0,updatable:!0};var eo=Object.defineProperty,to=(s,e)=>{for(var t in e)eo(s,t,{get:e[t],enumerable:!0})},ro="http://www.w3.org/2000/svg",so="http://www.w3.org/1999/xhtml",ua=(s=>(s.Undefined="undefined",s.Null="null",s.String="string",s.Number="number",s.SpecialNumber="number",s.Boolean="boolean",s.BigInt="bigint",s))(ua||{}),ha=(s=>(s.Array="array",s.Date="date",s.Map="map",s.Object="object",s.RegularExpression="regexp",s.Set="set",s.Channel="channel",s.Symbol="symbol",s))(ha||{}),Gr="type",jr="value",Yr="serialized:",ao=(s,e)=>{var t;const r=e.$cmpMeta$;Object.entries((t=r.$members$)!=null?t:{}).map(([n,[o]])=>{if(o&31||o&32){const c=s[n],h=no(Object.getPrototypeOf(s),n)||Object.getOwnPropertyDescriptor(s,n);h&&Object.defineProperty(s,n,{get(){return h.get.call(this)},set(i){h.set.call(this,i)},configurable:!0,enumerable:!0}),s[n]=e.$instanceValues$.has(n)?e.$instanceValues$.get(n):c}})};function no(s,e){for(;s;){const t=Object.getOwnPropertyDescriptor(s,e);if(t!=null&&t.get)return t;s=Object.getPrototypeOf(s)}}var Qe=s=>{if(s.__stencil__getHostRef)return s.__stencil__getHostRef()},oo=(s,e)=>{const t={$flags$:0,$hostElement$:s,$cmpMeta$:e,$instanceValues$:new Map,$serializerValues$:new Map};t.$onReadyPromise$=new Promise(a=>t.$onReadyResolve$=a),s["s-p"]=[],s["s-rc"]=[];const r=t;return s.__stencil__getHostRef=()=>r,e.$flags$&512&&st.state&&ao(s,t),r},da=(s,e)=>e in s,yr=(s,e)=>(0,console.error)(s,e),io="r",co="o",Zr="s",lo="t",uo="c",$t="s-id",fa="c-id",me=typeof window<"u"?window:{},j=me.HTMLElement||class{},Z={$flags$:0,$resourcesUrl$:"",jmp:s=>s(),raf:s=>requestAnimationFrame(s),ael:(s,e,t,r)=>s.addEventListener(e,t,r),rel:(s,e,t,r)=>s.removeEventListener(e,t,r),ce:(s,e)=>new CustomEvent(s,e)},ho=st.shadowDom,fo=s=>Promise.resolve(s),Xr=!1,pa=[],ma=[],po=(s,e)=>t=>{s.push(t),Xr||(Xr=!0,Z.$flags$&4?Kr(Qr):Z.raf(Qr))},ga=s=>{for(let e=0;e<s.length;e++)try{s[e](performance.now())}catch(t){yr(t)}s.length=0},Qr=()=>{ga(pa),ga(ma),(Xr=pa.length>0)&&Z.raf(Qr)},Kr=s=>fo().then(s),mo=po(ma),Jr=s=>(s=typeof s,s==="object"||s==="function"),go=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bo=class St{static fromLocalValue(e){const t=e[Gr],r=jr in e?e[jr]:void 0;switch(t){case"string":return r;case"boolean":return r;case"bigint":return BigInt(r);case"undefined":return;case"null":return null;case"number":return r==="NaN"?NaN:r==="-0"?-0:r==="Infinity"?1/0:r==="-Infinity"?-1/0:r;case"array":return r.map(i=>St.fromLocalValue(i));case"date":return new Date(r);case"map":const a=new Map;for(const[i,u]of r){const g=typeof i=="object"&&i!==null?St.fromLocalValue(i):i,p=St.fromLocalValue(u);a.set(g,p)}return a;case"object":const n={};for(const[i,u]of r)n[i]=St.fromLocalValue(u);return n;case"regexp":const{pattern:o,flags:c}=r;return new RegExp(o,c);case"set":const h=new Set;for(const i of r)h.add(St.fromLocalValue(i));return h;case"symbol":return Symbol(r);default:throw new Error(`Unsupported type: ${t}`)}}static fromLocalValueArray(e){return e.map(t=>St.fromLocalValue(t))}static isLocalValueObject(e){if(typeof e!="object"||e===null||!e.hasOwnProperty(Gr))return!1;const t=e[Gr];return Object.values({...ua,...ha}).includes(t)?t!=="null"&&t!=="undefined"?e.hasOwnProperty(jr):!0:!1}},vo={};to(vo,{err:()=>ba,map:()=>yo,ok:()=>es,unwrap:()=>Co,unwrapErr:()=>ko});var es=s=>({isOk:!0,isErr:!1,value:s}),ba=s=>({isOk:!1,isErr:!0,value:s});function yo(s,e){if(s.isOk){const t=e(s.value);return t instanceof Promise?t.then(r=>es(r)):es(t)}if(s.isErr){const t=s.value;return ba(t)}throw"should never get here"}var Co=s=>{if(s.isOk)return s.value;throw s.value},ko=s=>{if(s.isErr)return s.value;throw s.value};function So(s){return typeof s!="string"||!s.startsWith(Yr)?s:bo.fromLocalValue(JSON.parse(atob(s.slice(Yr.length))))}var va=s=>{const e=Cr(s,"childNodes");s.tagName&&s.tagName.includes("-")&&s["s-cr"]&&s.tagName!=="SLOT-FB"&&ya(e,s.tagName).forEach(r=>{r.nodeType===1&&r.tagName==="SLOT-FB"&&(wo(r,ts(r),!1).length?r.hidden=!0:r.hidden=!1)});let t=0;for(t=0;t<e.length;t++){const r=e[t];r.nodeType===1&&Cr(r,"childNodes").length&&va(r)}},xo=s=>{const e=[];for(let t=0;t<s.length;t++){const r=s[t]["s-nr"]||void 0;r&&r.isConnected&&e.push(r)}return e};function ya(s,e,t){let r=0,a=[],n;for(;r<s.length;r++)n=s[r],n["s-sr"]&&(!e||n["s-hn"]===e)&&t===void 0&&a.push(n),a=[...a,...ya(n.childNodes,e,t)];return a}var wo=(s,e,t=!0)=>{const r=[];(t&&s["s-sr"]||!s["s-sr"])&&r.push(s);let a=s;for(;a=a.nextSibling;)ts(a)===e&&(t||!a["s-sr"])&&r.push(a);return r},Ca=(s,e)=>s.nodeType===1?s.getAttribute("slot")===null&&e===""||s.getAttribute("slot")===e:s["s-sn"]===e?!0:e==="",To=(s,e,t,r)=>{if(s["s-ol"]&&s["s-ol"].isConnected)return;const a=document.createTextNode("");if(a["s-nr"]=s,!e["s-cr"]||!e["s-cr"].parentNode)return;const n=e["s-cr"].parentNode,o=Cr(n,"appendChild");if(typeof r<"u"){a["s-oo"]=r;const c=Cr(n,"childNodes"),h=[a];c.forEach(i=>{i["s-nr"]&&h.push(i)}),h.sort((i,u)=>!i["s-oo"]||i["s-oo"]<(u["s-oo"]||0)?-1:!u["s-oo"]||u["s-oo"]<i["s-oo"]?1:0),h.forEach(i=>o.call(n,i))}else o.call(n,a);s["s-ol"]=a,s["s-sh"]=e["s-hn"]},ts=s=>typeof s["s-sn"]=="string"?s["s-sn"]:s.nodeType===1&&s.getAttribute("slot")||void 0;function ka(s){if(s.assignedElements||s.assignedNodes||!s["s-sr"])return;const e=t=>(function(r){const a=[],n=this["s-sn"];r!=null&&r.flatten&&console.error(`
2
2
  Flattening is not supported for Stencil non-shadow slots.
3
3
  You can use \`.childNodes\` to nested slot fallback content.
4
4
  If you have a particular use case, please open an issue on the Stencil repo.
5
- `);const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:Tn(o.childNodes)).forEach(h=>{n===rr(h)&&a.push(h)}),t?a.filter(h=>h.nodeType===1):a}).bind(s);s.assignedElements=e(!0),s.assignedNodes=e(!1)}function bt(s,e){if("__"+e in s){const t=s["__"+e];return typeof t!="function"?t:t.bind(s)}else return typeof s[e]!="function"?s[e]:s[e].bind(s)}var De=(s,e="")=>()=>{},vt=new WeakMap,In=(s,e)=>"sc-"+s.$tagName$,d=(s,e,...t)=>{let r=null,a=null,n=null,o=!1,c=!1;const h=[],i=m=>{for(let p=0;p<m.length;p++)r=m[p],Array.isArray(r)?i(r):r!=null&&typeof r!="boolean"&&((o=typeof s!="function"&&!er(r))&&(r=String(r)),o&&c?h[h.length-1].$text$+=r:h.push(o?ze(null,r):r),c=o)};if(i(t),e){e.key&&(a=e.key),e.name&&(n=e.name);{const m=e.className||e.class;m&&(e.class=typeof m!="object"?m:Object.keys(m).filter(p=>m[p]).join(" "))}}if(typeof s=="function")return s(e===null?{}:e,h,Mn);const l=ze(s,null);return l.$attrs$=e,h.length>0&&(l.$children$=h),l.$key$=a,l.$name$=n,l},ze=(s,e)=>{const t={$flags$:0,$tag$:s,$text$:e,$elm$:null,$children$:null};return t.$attrs$=null,t.$key$=null,t.$name$=null,t},An={},_n=s=>s&&s.$tag$===An,Mn={forEach:(s,e)=>s.map(ms).forEach(e),map:(s,e)=>s.map(ms).map(e).map(Fn)},ms=s=>({vattrs:s.$attrs$,vchildren:s.$children$,vkey:s.$key$,vname:s.$name$,vtag:s.$tag$,vtext:s.$text$}),Fn=s=>{if(typeof s.vtag=="function"){const t={...s.vattrs};return s.vkey&&(t.key=s.vkey),s.vname&&(t.name=s.vname),d(s.vtag,t,...s.vchildren||[])}const e=ze(s.vtag,s.vtext);return e.$attrs$=s.vattrs,e.$children$=s.vchildren,e.$key$=s.vkey,e.$name$=s.vname,e},Ln=(s,e,t,r)=>{var a,n;const o=De("hydrateClient",e),c=s.shadowRoot,h=[],i=[],l=[],m=null,p=ze(e,null);p.$elm$=s,se.document&&(!N.$orgLocNodes$||!N.$orgLocNodes$.size)&&ar(se.document.body,N.$orgLocNodes$=new Map),s[Xe]=t,s.removeAttribute(Xe),r.$vnode$=sr(p,h,i,m,s,s,t,l);let g=0;const v=h.length;let y;for(g;g<v;g++){y=h[g];const I=y.$hostId$+"."+y.$nodeId$,z=N.$orgLocNodes$.get(I),fe=y.$elm$;if(!c)fe["s-hn"]=e.toUpperCase(),y.$tag$==="slot"&&(fe["s-cr"]=s["s-cr"]);else if((a=y.$tag$)!=null&&a.toString().includes("-")&&y.$tag$!=="slot-fb"&&!y.$elm$.shadowRoot){const Ue=Se(y.$elm$);if(Ue){const G=In(Ue.$cmpMeta$),Be=se.document.querySelector(`style[sty-id="${G}"]`);Be&&s.shadowRoot.append(Be.cloneNode(!0))}}y.$tag$==="slot"&&(y.$name$=y.$elm$["s-sn"]||y.$elm$.name||null,y.$children$?(y.$flags$|=2,y.$elm$.childNodes.length||y.$children$.forEach(Ue=>{y.$elm$.appendChild(Ue.$elm$)})):y.$flags$|=1),z&&z.isConnected&&(z.parentElement.shadowRoot&&z["s-en"]===""&&z.parentNode.insertBefore(fe,z.nextSibling),z.parentNode.removeChild(z),c||(fe["s-oo"]=parseInt(y.$nodeId$))),z&&!z["s-id"]&&N.$orgLocNodes$.delete(I)}const x=[],P=l.length;let S=0,k,T,_,R;for(S;S<P;S++)if(k=l[S],!(!k||!k.length))for(_=k.length,T=0,T;T<_;T++){if(R=k[T],x[R.hostId]||(x[R.hostId]=N.$orgLocNodes$.get(R.hostId)),!x[R.hostId])continue;const I=x[R.hostId];I.shadowRoot&&R.node.parentElement!==I&&I.appendChild(R.node),(!I.shadowRoot||!c)&&(R.slot["s-cr"]||(R.slot["s-cr"]=I["s-cr"],!R.slot["s-cr"]&&I.shadowRoot?R.slot["s-cr"]=I:R.slot["s-cr"]=(I.__childNodes||I.childNodes)[0]),Pn(R.node,R.slot,!1,R.node["s-oo"]),(n=R.node.parentElement)!=null&&n.shadowRoot&&R.node.getAttribute&&R.node.getAttribute("slot")&&R.node.removeAttribute("slot"))}r.$hostElement$=s,o()},sr=(s,e,t,r,a,n,o,c=[])=>{let h,i,l,m;if(n.nodeType===1){if(h=n.getAttribute(os),h&&(i=h.split("."),i[0]===o||i[0]==="0")){l=gs({$flags$:0,$hostId$:i[0],$nodeId$:i[1],$depth$:i[2],$index$:i[3],$tag$:n.tagName.toLowerCase(),$elm$:n,$attrs$:{class:n.className||""}}),e.push(l),n.removeAttribute(os),s.$children$||(s.$children$=[]);const g=l.$elm$.getAttribute("s-sn");typeof g=="string"&&(l.$tag$==="slot-fb"&&bs(g,i[2],l,n,s,e,t,r,c),l.$elm$["s-sn"]=g,l.$elm$.removeAttribute("s-sn")),l.$index$!==void 0&&(s.$children$[l.$index$]=l),s=l}if(n.shadowRoot)for(m=n.shadowRoot.childNodes.length-1;m>=0;m--)sr(s,e,t,r,a,n.shadowRoot.childNodes[m],o,c);const p=n.__childNodes||n.childNodes;for(m=p.length-1;m>=0;m--)sr(s,e,t,r,a,p[m],o,c)}else if(n.nodeType===8){if(i=n.nodeValue.split("."),i[1]===o||i[1]==="0"){if(h=i[0],l=gs({$hostId$:i[1],$nodeId$:i[2],$depth$:i[3],$index$:i[4]||"0",$elm$:n,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null}),h===pn)l.$elm$=vs(n,3),l.$elm$&&l.$elm$.nodeType===3&&(l.$text$=l.$elm$.textContent,e.push(l),n.remove(),o===l.$hostId$&&(s.$children$||(s.$children$=[]),s.$children$[l.$index$]=l));else if(h===mn)l.$elm$=vs(n,8),l.$elm$&&l.$elm$.nodeType===8&&(e.push(l),n.remove());else if(l.$hostId$===o)if(h===Yt){const p=n["s-sn"]=i[5]||"";bs(p,i[2],l,n,s,e,t,r,c)}else h===dn&&(a["s-cr"]=n,n["s-cn"]=!0)}}else if(s&&s.$tag$==="style"){const p=ze(null,n.textContent);p.$elm$=n,p.$index$="0",s.$children$=[p]}else n.nodeType===3&&!n.wholeText.trim()&&!n["s-nr"]&&n.remove();return s},ar=(s,e)=>{if(s.nodeType===1){const t=s[Xe]||s.getAttribute(Xe);t&&e.set(t,s);let r=0;if(s.shadowRoot)for(;r<s.shadowRoot.childNodes.length;r++)ar(s.shadowRoot.childNodes[r],e);const a=s.__childNodes||s.childNodes;for(r=0;r<a.length;r++)ar(a[r],e)}else if(s.nodeType===8){const t=s.nodeValue.split(".");t[0]===fn&&(e.set(t[1]+"."+t[2],s),s.nodeValue="",s["s-en"]=t[3])}},gs=s=>({...{$flags$:0,$hostId$:null,$nodeId$:null,$depth$:null,$index$:"0",$elm$:null,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},...s});function bs(s,e,t,r,a,n,o,c,h){r["s-sr"]=!0,t.$name$=s||null,t.$tag$="slot";const i=a!=null&&a.$elm$?a.$elm$["s-id"]||a.$elm$.getAttribute("s-id"):"";{const l=t.$elm$,m=i&&i!==t.$hostId$&&a.$elm$.shadowRoot;On(h,e,s,r,m?i:t.$hostId$),ps(r),m&&a.$elm$.insertBefore(l,a.$elm$.children[0])}n.push(t),o.push(t),a.$children$||(a.$children$=[]),a.$children$[t.$index$]=t}var On=(s,e,t,r,a)=>{var n,o;let c=r.nextSibling;if(s[e]=s[e]||[],!(!c||(n=c.nodeValue)!=null&&n.startsWith(Yt+".")))do c&&((c.getAttribute&&c.getAttribute("slot")||c["s-sn"])===t||t===""&&!c["s-sn"]&&(!c.getAttribute||!c.getAttribute("slot"))&&(c.nodeType===8||c.nodeType===3))&&(c["s-sn"]=t,s[e].push({slot:r,node:c,hostId:a})),c=c==null?void 0:c.nextSibling;while(c&&!((o=c.nodeValue)!=null&&o.startsWith(Yt+".")))},vs=(s,e)=>{let t=s;do t=t.nextSibling;while(t&&(t.nodeType!==e||!t.nodeValue));return t},nr=s=>{const e=kn(s);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};nr("::slotted"),nr(":host"),nr(":host-context");var ys=(s,e,t)=>typeof s=="string"&&s.startsWith(Qt)?(s=$n(s),s):s!=null&&!er(s)?e&4?s==="false"?!1:s===""||!!s:e&2?typeof s=="string"?parseFloat(s):typeof s=="number"?s:NaN:e&1?String(s):s:s,Dn=s=>s,we=(s,e,t)=>{const r=Dn(s);return{emit:a=>ks(r,e,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},ks=(s,e,t)=>{const r=N.ce(e,t);return s.dispatchEvent(r),r},Cs=(s,e,t,r,a,n,o)=>{if(t===r)return;let c=ns(s,e),h=e.toLowerCase();if(e==="class"){const i=s.classList,l=xs(t);let m=xs(r);if((s["s-si"]||s["s-sc"])&&o){const p=s["s-sc"]||s["s-si"];m.push(p),l.forEach(g=>{g.startsWith(p)&&m.push(g)}),m=[...new Set(m)].filter(g=>g),i.add(...m)}else i.remove(...l.filter(p=>p&&!m.includes(p))),i.add(...m.filter(p=>p&&!l.includes(p)))}else if(e==="style"){for(const i in t)(!r||r[i]==null)&&(i.includes("-")?s.style.removeProperty(i):s.style[i]="");for(const i in r)(!t||r[i]!==t[i])&&(i.includes("-")?s.style.setProperty(i,r[i]):s.style[i]=r[i])}else if(e!=="key")if(!s.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):ns(se,h)?e=h.slice(2):e=h[2]+e.slice(3),t||r){const i=e.endsWith(Ss);e=e.replace(Nn,""),t&&N.rel(s,e,t,i),r&&N.ael(s,e,r,i)}}else{const i=er(r);if((c||i&&r!==null)&&!a)try{if(s.tagName.includes("-"))s[e]!==r&&(s[e]=r);else{const l=r??"";e==="list"?c=!1:(t==null||s[e]!=l)&&(typeof s.__lookupSetter__(e)=="function"?s[e]=l:s.setAttribute(e,l))}}catch{}r==null||r===!1?(r!==!1||s.getAttribute(e)==="")&&s.removeAttribute(e):(!c||n&4||a)&&!i&&s.nodeType===1&&(r=r===!0?"":r,s.setAttribute(e,r))}},zn=/\s/,xs=s=>(typeof s=="object"&&s&&"baseVal"in s&&(s=s.baseVal),!s||typeof s!="string"?[]:s.split(zn)),Ss="Capture",Nn=new RegExp(Ss+"$"),or=(s,e,t,r)=>{const a=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,n=s&&s.$attrs$||{},o=e.$attrs$||{};for(const c of ws(Object.keys(n)))c in o||Cs(a,c,n[c],void 0,t,e.$flags$,r);for(const c of ws(Object.keys(o)))Cs(a,c,n[c],o[c],t,e.$flags$,r)};function ws(s){return s.includes("ref")?[...s.filter(e=>e!=="ref"),"ref"]:s}var ir,cr,lr=!1,yt=!1,hr=!1,ae=!1,kt=(s,e,t)=>{var r;const a=e.$children$[t];let n=0,o,c,h;if(lr||(hr=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)o=a.$elm$=se.document.createTextNode(a.$text$);else if(a.$flags$&1)o=a.$elm$=se.document.createTextNode(""),or(null,a,ae);else{if(ae||(ae=a.$tag$==="svg"),!se.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=a.$elm$=se.document.createElementNS(ae?on:cn,!lr&&Ee.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),ae&&a.$tag$==="foreignObject"&&(ae=!1),or(null,a,ae),a.$children$)for(n=0;n<a.$children$.length;++n)c=kt(s,a,n),c&&o.appendChild(c);a.$tag$==="svg"?ae=!1:o.tagName==="foreignObject"&&(ae=!0)}return o["s-hn"]=cr,a.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=ir,o["s-sn"]=a.$name$||"",o["s-rf"]=(r=a.$attrs$)==null?void 0:r.ref,ps(o),h=s&&s.$children$&&s.$children$[t],h&&h.$tag$===a.$tag$&&s.$elm$&&Ke(s.$elm$,!1)),o},Ke=(s,e)=>{N.$flags$|=1;const t=Array.from(s.__childNodes||s.childNodes);for(let r=t.length-1;r>=0;r--){const a=t[r];a["s-hn"]!==cr&&a["s-ol"]&&(Re(Je(a).parentNode,a,Je(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,hr=!0),e&&Ke(a,e)}N.$flags$&=-2},Rs=(s,e,t,r,a,n)=>{let o=s["s-cr"]&&s["s-cr"].parentNode||s,c;for(;a<=n;++a)r[a]&&(c=kt(null,t,a),c&&(r[a].$elm$=c,Re(o,c,Je(e))))},$s=(s,e,t)=>{for(let r=e;r<=t;++r){const a=s[r];if(a){const n=a.$elm$;n&&(yt=!0,n["s-ol"]?n["s-ol"].remove():Ke(n,!0),n.remove())}}},Hn=(s,e,t,r,a=!1)=>{let n=0,o=0,c=0,h=0,i=e.length-1,l=e[0],m=e[i],p=r.length-1,g=r[0],v=r[p],y,x;for(;n<=i&&o<=p;)if(l==null)l=e[++n];else if(m==null)m=e[--i];else if(g==null)g=r[++o];else if(v==null)v=r[--p];else if(Ct(l,g,a))Ne(l,g,a),l=e[++n],g=r[++o];else if(Ct(m,v,a))Ne(m,v,a),m=e[--i],v=r[--p];else if(Ct(l,v,a))(l.$tag$==="slot"||v.$tag$==="slot")&&Ke(l.$elm$.parentNode,!1),Ne(l,v,a),Re(s,l.$elm$,m.$elm$.nextSibling),l=e[++n],v=r[--p];else if(Ct(m,g,a))(l.$tag$==="slot"||v.$tag$==="slot")&&Ke(m.$elm$.parentNode,!1),Ne(m,g,a),Re(s,m.$elm$,l.$elm$),m=e[--i],g=r[++o];else{for(c=-1,h=n;h<=i;++h)if(e[h]&&e[h].$key$!==null&&e[h].$key$===g.$key$){c=h;break}c>=0?(x=e[c],x.$tag$!==g.$tag$?y=kt(e&&e[o],t,c):(Ne(x,g,a),e[c]=void 0,y=x.$elm$),g=r[++o]):(y=kt(e&&e[o],t,o),g=r[++o]),y&&Re(Je(l.$elm$).parentNode,y,Je(l.$elm$))}n>i?Rs(s,r[p+1]==null?null:r[p+1].$elm$,t,r,o,p):o>p&&$s(e,n,i)},Ct=(s,e,t=!1)=>s.$tag$===e.$tag$?s.$tag$==="slot"?s.$name$===e.$name$:t?(t&&!s.$key$&&e.$key$&&(s.$key$=e.$key$),!0):s.$key$===e.$key$:!1,Je=s=>s&&s["s-ol"]||s,Ne=(s,e,t=!1)=>{const r=e.$elm$=s.$elm$,a=s.$children$,n=e.$children$,o=e.$tag$,c=e.$text$;let h;c===null?(ae=o==="svg"?!0:o==="foreignObject"?!1:ae,or(s,e,ae,t),a!==null&&n!==null?Hn(r,a,e,n,t):n!==null?(s.$text$!==null&&(r.textContent=""),Rs(r,null,e,n,0,n.length-1)):!t&&Ee.updatable&&a!==null?$s(a,0,a.length-1):t&&Ee.updatable&&a!==null&&n===null&&(e.$children$=a),ae&&o==="svg"&&(ae=!1)):(h=r["s-cr"])?h.parentNode.textContent=c:s.$text$!==c&&(r.data=c)},me=[],Ts=s=>{let e,t,r;const a=s.__childNodes||s.childNodes;for(const n of a){if(n["s-sr"]&&(e=n["s-cr"])&&e.parentNode){t=e.parentNode.__childNodes||e.parentNode.childNodes;const o=n["s-sn"];for(r=t.length-1;r>=0;r--)if(e=t[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==n["s-hn"])if(fs(e,o)){let c=me.find(h=>h.$nodeToRelocate$===e);yt=!0,e["s-sn"]=e["s-sn"]||o,c?(c.$nodeToRelocate$["s-sh"]=n["s-hn"],c.$slotRefNode$=n):(e["s-sh"]=n["s-hn"],me.push({$slotRefNode$:n,$nodeToRelocate$:e})),e["s-sr"]&&me.map(h=>{fs(h.$nodeToRelocate$,e["s-sn"])&&(c=me.find(i=>i.$nodeToRelocate$===e),c&&!h.$slotRefNode$&&(h.$slotRefNode$=c.$slotRefNode$))})}else me.some(c=>c.$nodeToRelocate$===e)||me.push({$nodeToRelocate$:e})}n.nodeType===1&&Ts(n)}},Re=(s,e,t)=>s==null?void 0:s.insertBefore(e,t),Un=(s,e,t=!1)=>{var r,a,n,o;const c=s.$hostElement$,h=s.$vnode$||ze(null,null),l=_n(e)?e:d(null,null,e);if(cr=c.tagName,t&&l.$attrs$)for(const m of Object.keys(l.$attrs$))c.hasAttribute(m)&&!["key","ref","style","class"].includes(m)&&(l.$attrs$[m]=c[m]);l.$tag$=null,l.$flags$|=4,s.$vnode$=l,l.$elm$=h.$elm$=c,lr=gn,ir=c["s-cr"],yt=!1,Ne(h,l,t);{if(N.$flags$|=1,hr){Ts(l.$elm$);for(const m of me){const p=m.$nodeToRelocate$;if(!p["s-ol"]&&se.document){const g=se.document.createTextNode("");g["s-nr"]=p,Re(p.parentNode,p["s-ol"]=g,p)}}for(const m of me){const p=m.$nodeToRelocate$,g=m.$slotRefNode$;if(g){const v=g.parentNode;let y=g.nextSibling;{let S=(r=p["s-ol"])==null?void 0:r.previousSibling;for(;S;){let k=(a=S["s-nr"])!=null?a:null;if(k&&k["s-sn"]===p["s-sn"]&&v===(k.__parentNode||k.parentNode)){for(k=k.nextSibling;k===p||k!=null&&k["s-sr"];)k=k==null?void 0:k.nextSibling;if(!k||!k["s-nr"]){y=k;break}}S=S.previousSibling}}const x=p.__parentNode||p.parentNode,P=p.__nextSibling||p.nextSibling;(!y&&v!==x||P!==y)&&p!==y&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),Re(v,p,y),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(n=p["s-ih"])!=null?n:!1)),p&&typeof g["s-rf"]=="function"&&g["s-rf"](g)}else p.nodeType===1&&(t&&(p["s-ih"]=(o=p.hidden)!=null?o:!1),p.hidden=!0)}}yt&&us(l.$elm$),N.$flags$&=-2,me.length=0}ir=void 0},Es=(s,e)=>{if(e&&!s.$onRenderResolve$&&e["s-p"]){const t=e["s-p"].push(new Promise(r=>s.$onRenderResolve$=()=>{e["s-p"].splice(t-1,1),r()}))}},ur=(s,e)=>{if(s.$flags$|=16,s.$flags$&4){s.$flags$|=512;return}Es(s,s.$ancestorComponent$);const t=()=>Bn(s,e);if(e){queueMicrotask(()=>{t()});return}return yn(t)},Bn=(s,e)=>{const t=s.$hostElement$,r=De("scheduleUpdate",s.$cmpMeta$.$tagName$),a=t;if(!a)throw new Error(`Can't render component <${t.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return e?n=He(a,"componentWillLoad",void 0,t):n=He(a,"componentWillUpdate",void 0,t),n=Ps(n,()=>He(a,"componentWillRender",void 0,t)),r(),Ps(n,()=>qn(s,a,e))},Ps=(s,e)=>Vn(s)?s.then(e).catch(t=>{console.error(t),e()}):e(),Vn=s=>s instanceof Promise||s&&s.then&&typeof s.then=="function",qn=async(s,e,t)=>{var r;const a=s.$hostElement$,n=De("update",s.$cmpMeta$.$tagName$),o=a["s-rc"],c=De("render",s.$cmpMeta$.$tagName$);jn(s,e,a,t),o&&(o.map(h=>h()),a["s-rc"]=void 0),c(),n();{const h=(r=a["s-p"])!=null?r:[],i=()=>Wn(s);h.length===0?i():(Promise.all(h).then(i),s.$flags$|=4,h.length=0)}},jn=(s,e,t,r)=>{try{e=e.render(),s.$flags$&=-17,s.$flags$|=2,Un(s,e,r)}catch(a){gt(a,s.$hostElement$)}return null},Wn=s=>{const e=s.$cmpMeta$.$tagName$,t=s.$hostElement$,r=De("postUpdate",e),a=t,n=s.$ancestorComponent$;He(a,"componentDidRender",void 0,t),s.$flags$&64?(He(a,"componentDidUpdate",void 0,t),r()):(s.$flags$|=64,Zn(t),He(a,"componentDidLoad",void 0,t),r(),s.$onReadyResolve$(t),n||Gn()),s.$onRenderResolve$&&(s.$onRenderResolve$(),s.$onRenderResolve$=void 0),s.$flags$&512&&Jt(()=>ur(s,!1)),s.$flags$&=-517},Gn=s=>{var e;Jt(()=>ks(se,"appload",{detail:{namespace:Oe}})),(e=N.$orgLocNodes$)!=null&&e.size&&N.$orgLocNodes$.clear()},He=(s,e,t,r)=>{if(s&&s[e])try{return s[e](t)}catch(a){gt(a,r)}},Zn=s=>{var e;return s.classList.add((e=Ee.hydratedSelectorName)!=null?e:"hydrated")},Qn=(s,e)=>Se(s).$instanceValues$.get(e),Is=(s,e,t,r)=>{const a=Se(s);if(!a)return;const n=s,o=a.$instanceValues$.get(e),c=a.$flags$,h=n;t=ys(t,r.$members$[e][0]);const i=Number.isNaN(o)&&Number.isNaN(t);if(t!==o&&!i){a.$instanceValues$.set(e,t);{if(r.$watchers$&&c&128){const m=r.$watchers$[e];m&&m.map(p=>{try{h[p](t,o,e)}catch(g){gt(g,n)}})}if((c&18)===2){if(h.componentShouldUpdate&&h.componentShouldUpdate(t,o,e)===!1)return;ur(a,!1)}}}},Yn=(s,e,t)=>{var r,a;const n=s.prototype;{s.watchers&&!e.$watchers$&&(e.$watchers$=s.watchers),s.deserializers&&!e.$deserializers$&&(e.$deserializers$=s.deserializers),s.serializers&&!e.$serializers$&&(e.$serializers$=s.serializers);const o=Object.entries((r=e.$members$)!=null?r:{});o.map(([c,[h]])=>{if(h&31||h&32){const{get:i,set:l}=Object.getOwnPropertyDescriptor(n,c)||{};i&&(e.$members$[c][0]|=2048),l&&(e.$members$[c][0]|=4096),Object.defineProperty(n,c,{get(){return i?i.apply(this):Qn(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(n,c,{set(m){const p=Se(this);if(p){if(l){typeof(h&32?this[c]:p.$hostElement$[c])>"u"&&p.$instanceValues$.get(c)&&(m=p.$instanceValues$.get(c)),l.apply(this,[ys(m,h)]),m=h&32?this[c]:p.$hostElement$[c],Is(this,c,m,e);return}{Is(this,c,m,e);return}}}})}});{const c=new Map;n.attributeChangedCallback=function(h,i,l){N.jmp(()=>{var m;const p=c.get(h),g=Se(this);if(this.hasOwnProperty(p)&&Ee.lazyLoad,n.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==l)return;if(p==null){const x=g==null?void 0:g.$flags$;if(g&&x&&!(x&8)&&x&128&&l!==i){const S=this,k=(m=e.$watchers$)==null?void 0:m[h];k==null||k.forEach(T=>{S[T]!=null&&S[T].call(S,l,i,h)})}return}const v=o.find(([x])=>x===p);v&&v[1][0]&4&&(l=!(l===null||l==="false"));const y=Object.getOwnPropertyDescriptor(n,p);l!=this[p]&&(!y.get||y.set)&&(this[p]=l)})},s.observedAttributes=Array.from(new Set([...Object.keys((a=e.$watchers$)!=null?a:{}),...o.filter(([h,i])=>i[0]&31).map(([h,i])=>{const l=i[1]||h;return c.set(l,h),l})]))}}return s},Xn=async(s,e,t,r)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const o=s.localName;customElements.whenDefined(o).then(()=>e.$flags$|=128)}}const a=e.$ancestorComponent$,n=()=>ur(e,!0);a&&a["s-rc"]?a["s-rc"].push(n):n()},Kn=(s,e)=>{},Jn=s=>{if(!(N.$flags$&1)){const e=Se(s);if(!e)return;const t=e.$cmpMeta$,r=De("connectedCallback",t.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>Kn());else{e.$flags$|=1;let a;a=s.getAttribute(Xe),a&&Ln(s,t.$tagName$,a,e),a||t.$flags$&12&&eo(s);{let n=s;for(;n=n.parentNode||n.host;)if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Es(e,e.$ancestorComponent$=n);break}}t.$members$&&Object.entries(t.$members$).map(([n,[o]])=>{if(o&31&&n in s&&s[n]!==Object.prototype[n]){const c=s[n];delete s[n],s[n]=c}}),Xn(s,e)}r()}},eo=s=>{if(!se.document)return;const e=s["s-cr"]=se.document.createComment("");e["s-cn"]=!0,Re(s,e,s.firstChild)},to=async s=>{N.$flags$&1||Se(s),vt.has(s)&&vt.delete(s),s.shadowRoot&&vt.has(s.shadowRoot)&&vt.delete(s.shadowRoot)},D=(s,e)=>{const t={$flags$:e[0],$tagName$:e[1]};t.$members$=e[2],t.$watchers$=s.$watchers$,t.$deserializers$=s.$deserializers$,t.$serializers$=s.$serializers$;const r=s.prototype.connectedCallback,a=s.prototype.disconnectedCallback;return Object.assign(s.prototype,{__hasHostListenerAttached:!1,__registerHost(){un(this,t)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!Se(this))return;this.__hasHostListenerAttached=!0}Jn(this),r&&r.call(this)},disconnectedCallback(){to(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),s.is=t.$tagName$,Yn(s,t)},ro=(s,e)=>e;function so(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var dr={exports:{}};/*!
5
+ `);const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:xo(o.childNodes)).forEach(h=>{n===ts(h)&&a.push(h)}),t?a.filter(h=>h.nodeType===1):a}).bind(s);s.assignedElements=e(!0),s.assignedNodes=e(!1)}function Cr(s,e){if("__"+e in s){const t=s["__"+e];return typeof t!="function"?t:t.bind(s)}else return typeof s[e]!="function"?s[e]:s[e].bind(s)}var wt=(s,e="")=>()=>{},kr=new WeakMap,Ro=(s,e)=>"sc-"+s.$tagName$,f=(s,e,...t)=>{typeof s=="string"&&(s=s);let r=null,a=null,n=null,o=!1,c=!1;const h=[],i=g=>{for(let p=0;p<g.length;p++)r=g[p],Array.isArray(r)?i(r):r!=null&&typeof r!="boolean"&&((o=typeof s!="function"&&!Jr(r))&&(r=String(r)),o&&c?h[h.length-1].$text$+=r:h.push(o?Tt(null,r):r),c=o)};if(i(t),e){e.key&&(a=e.key),e.name&&(n=e.name);{const g=e.className||e.class;g&&(e.class=typeof g!="object"?g:Object.keys(g).filter(p=>g[p]).join(" "))}}if(typeof s=="function")return s(e===null?{}:e,h,Ao);const u=Tt(s,null);return u.$attrs$=e,h.length>0&&(u.$children$=h),u.$key$=a,u.$name$=n,u},Tt=(s,e)=>{const t={$flags$:0,$tag$:s,$text$:e,$elm$:null,$children$:null};return t.$attrs$=null,t.$key$=null,t.$name$=null,t},Eo={},$o=s=>s&&s.$tag$===Eo,Ao={forEach:(s,e)=>s.map(Sa).forEach(e),map:(s,e)=>s.map(Sa).map(e).map(_o)},Sa=s=>({vattrs:s.$attrs$,vchildren:s.$children$,vkey:s.$key$,vname:s.$name$,vtag:s.$tag$,vtext:s.$text$}),_o=s=>{if(typeof s.vtag=="function"){const t={...s.vattrs};return s.vkey&&(t.key=s.vkey),s.vname&&(t.name=s.vname),f(s.vtag,t,...s.vchildren||[])}const e=Tt(s.vtag,s.vtext);return e.$attrs$=s.vattrs,e.$children$=s.vchildren,e.$key$=s.vkey,e.$name$=s.vname,e},Po=(s,e,t,r)=>{var a,n;const o=wt("hydrateClient",e),c=s.shadowRoot,h=[],i=[],u=[],g=null,p=Tt(e,null);p.$elm$=s,me.document&&(!Z.$orgLocNodes$||!Z.$orgLocNodes$.size)&&ss(me.document.body,Z.$orgLocNodes$=new Map),s[$t]=t,s.removeAttribute($t),r.$vnode$=rs(p,h,i,g,s,s,t,u);let y=0;const C=h.length;let k;for(y;y<C;y++){k=h[y];const z=k.$hostId$+"."+k.$nodeId$,q=Z.$orgLocNodes$.get(z),$e=k.$elm$;if(!c)$e["s-hn"]=e.toUpperCase(),k.$tag$==="slot"&&($e["s-cr"]=s["s-cr"]);else if((a=k.$tag$)!=null&&a.toString().includes("-")&&k.$tag$!=="slot-fb"&&!k.$elm$.shadowRoot){const rt=Qe(k.$elm$);if(rt){const U=Ro(rt.$cmpMeta$),ze=me.document.querySelector(`style[sty-id="${U}"]`);ze&&s.shadowRoot.append(ze.cloneNode(!0))}}k.$tag$==="slot"&&(k.$name$=k.$elm$["s-sn"]||k.$elm$.name||null,k.$children$?(k.$flags$|=2,k.$elm$.childNodes.length||k.$children$.forEach(rt=>{k.$elm$.appendChild(rt.$elm$)})):k.$flags$|=1),q&&q.isConnected&&(q.parentElement.shadowRoot&&q["s-en"]===""&&q.parentNode.insertBefore($e,q.nextSibling),q.parentNode.removeChild(q),c||($e["s-oo"]=parseInt(k.$nodeId$))),q&&!q["s-id"]&&Z.$orgLocNodes$.delete(z)}const w=[],L=u.length;let T=0,S,x,D,R;for(T;T<L;T++)if(S=u[T],!(!S||!S.length))for(D=S.length,x=0,x;x<D;x++){if(R=S[x],w[R.hostId]||(w[R.hostId]=Z.$orgLocNodes$.get(R.hostId)),!w[R.hostId])continue;const z=w[R.hostId];z.shadowRoot&&R.node.parentElement!==z&&z.appendChild(R.node),(!z.shadowRoot||!c)&&(R.slot["s-cr"]||(R.slot["s-cr"]=z["s-cr"],!R.slot["s-cr"]&&z.shadowRoot?R.slot["s-cr"]=z:R.slot["s-cr"]=(z.__childNodes||z.childNodes)[0]),To(R.node,R.slot,!1,R.node["s-oo"]),(n=R.node.parentElement)!=null&&n.shadowRoot&&R.node.getAttribute&&R.node.getAttribute("slot")&&R.node.removeAttribute("slot"))}r.$hostElement$=s,o()},rs=(s,e,t,r,a,n,o,c=[])=>{let h,i,u,g;if(n.nodeType===1){if(h=n.getAttribute(fa),h&&(i=h.split("."),i[0]===o||i[0]==="0")){u=xa({$flags$:0,$hostId$:i[0],$nodeId$:i[1],$depth$:i[2],$index$:i[3],$tag$:n.tagName.toLowerCase(),$elm$:n,$attrs$:{class:n.className||""}}),e.push(u),n.removeAttribute(fa),s.$children$||(s.$children$=[]);const y=u.$elm$.getAttribute("s-sn");typeof y=="string"&&(u.$tag$==="slot-fb"&&wa(y,i[2],u,n,s,e,t,r,c),u.$elm$["s-sn"]=y,u.$elm$.removeAttribute("s-sn")),u.$index$!==void 0&&(s.$children$[u.$index$]=u),s=u}if(n.shadowRoot)for(g=n.shadowRoot.childNodes.length-1;g>=0;g--)rs(s,e,t,r,a,n.shadowRoot.childNodes[g],o,c);const p=n.__childNodes||n.childNodes;for(g=p.length-1;g>=0;g--)rs(s,e,t,r,a,p[g],o,c)}else if(n.nodeType===8){if(i=n.nodeValue.split("."),i[1]===o||i[1]==="0"){if(h=i[0],u=xa({$hostId$:i[1],$nodeId$:i[2],$depth$:i[3],$index$:i[4]||"0",$elm$:n,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null}),h===lo)u.$elm$=Ta(n,3),u.$elm$&&u.$elm$.nodeType===3&&(u.$text$=u.$elm$.textContent,e.push(u),n.remove(),o===u.$hostId$&&(s.$children$||(s.$children$=[]),s.$children$[u.$index$]=u));else if(h===uo)u.$elm$=Ta(n,8),u.$elm$&&u.$elm$.nodeType===8&&(e.push(u),n.remove());else if(u.$hostId$===o)if(h===Zr){const p=n["s-sn"]=i[5]||"";wa(p,i[2],u,n,s,e,t,r,c)}else h===io&&(a["s-cr"]=n,n["s-cn"]=!0)}}else if(s&&s.$tag$==="style"){const p=Tt(null,n.textContent);p.$elm$=n,p.$index$="0",s.$children$=[p]}else n.nodeType===3&&!n.wholeText.trim()&&!n["s-nr"]&&n.remove();return s},ss=(s,e)=>{if(s.nodeType===1){const t=s[$t]||s.getAttribute($t);t&&e.set(t,s);let r=0;if(s.shadowRoot)for(;r<s.shadowRoot.childNodes.length;r++)ss(s.shadowRoot.childNodes[r],e);const a=s.__childNodes||s.childNodes;for(r=0;r<a.length;r++)ss(a[r],e)}else if(s.nodeType===8){const t=s.nodeValue.split(".");t[0]===co&&(e.set(t[1]+"."+t[2],s),s.nodeValue="",s["s-en"]=t[3])}},xa=s=>({...{$flags$:0,$hostId$:null,$nodeId$:null,$depth$:null,$index$:"0",$elm$:null,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},...s});function wa(s,e,t,r,a,n,o,c,h){r["s-sr"]=!0,t.$name$=s||null,t.$tag$="slot";const i=a!=null&&a.$elm$?a.$elm$["s-id"]||a.$elm$.getAttribute("s-id"):"";{const u=t.$elm$,g=i&&i!==t.$hostId$&&a.$elm$.shadowRoot;Io(h,e,s,r,g?i:t.$hostId$),ka(r),g&&a.$elm$.insertBefore(u,a.$elm$.children[0])}n.push(t),o.push(t),a.$children$||(a.$children$=[]),a.$children$[t.$index$]=t}var Io=(s,e,t,r,a)=>{var n,o;let c=r.nextSibling;if(s[e]=s[e]||[],!(!c||(n=c.nodeValue)!=null&&n.startsWith(Zr+".")))do c&&((c.getAttribute&&c.getAttribute("slot")||c["s-sn"])===t||t===""&&!c["s-sn"]&&(!c.getAttribute||!c.getAttribute("slot"))&&(c.nodeType===8||c.nodeType===3))&&(c["s-sn"]=t,s[e].push({slot:r,node:c,hostId:a})),c=c==null?void 0:c.nextSibling;while(c&&!((o=c.nodeValue)!=null&&o.startsWith(Zr+".")))},Ta=(s,e)=>{let t=s;do t=t.nextSibling;while(t&&(t.nodeType!==e||!t.nodeValue));return t},as=s=>{const e=go(s);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};as("::slotted"),as(":host"),as(":host-context");var Ra=(s,e,t)=>typeof s=="string"&&s.startsWith(Yr)?(s=So(s),s):s!=null&&!Jr(s)?e&4?s==="false"?!1:s===""||!!s:e&2?typeof s=="string"?parseFloat(s):typeof s=="number"?s:NaN:e&1?String(s):s:s,Mo=s=>s,Ke=(s,e,t)=>{const r=Mo(s);return{emit:a=>Ea(r,e,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Ea=(s,e,t)=>{const r=Z.ce(e,t);return s.dispatchEvent(r),r},$a=(s,e,t,r,a,n,o)=>{if(t===r)return;let c=da(s,e),h=e.toLowerCase();if(e==="class"){const i=s.classList,u=Aa(t);let g=Aa(r);if((s["s-si"]||s["s-sc"])&&o){const p=s["s-sc"]||s["s-si"];g.push(p),u.forEach(y=>{y.startsWith(p)&&g.push(y)}),g=[...new Set(g)].filter(y=>y),i.add(...g)}else i.remove(...u.filter(p=>p&&!g.includes(p))),i.add(...g.filter(p=>p&&!u.includes(p)))}else if(e==="style"){for(const i in t)(!r||r[i]==null)&&(i.includes("-")?s.style.removeProperty(i):s.style[i]="");for(const i in r)(!t||r[i]!==t[i])&&(i.includes("-")?s.style.setProperty(i,r[i]):s.style[i]=r[i])}else if(e!=="key")if(e==="ref")r&&r(s);else if(!s.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):da(me,h)?e=h.slice(2):e=h[2]+e.slice(3),t||r){const i=e.endsWith(_a);e=e.replace(Oo,""),t&&Z.rel(s,e,t,i),r&&Z.ael(s,e,r,i)}}else{const i=Jr(r);if((c||i&&r!==null)&&!a)try{if(s.tagName.includes("-"))s[e]!==r&&(s[e]=r);else{const u=r??"";e==="list"?c=!1:(t==null||s[e]!=u)&&(typeof s.__lookupSetter__(e)=="function"?s[e]=u:s.setAttribute(e,u))}}catch{}r==null||r===!1?(r!==!1||s.getAttribute(e)==="")&&s.removeAttribute(e):(!c||n&4||a)&&!i&&s.nodeType===1&&(r=r===!0?"":r,s.setAttribute(e,r))}},Lo=/\s/,Aa=s=>(typeof s=="object"&&s&&"baseVal"in s&&(s=s.baseVal),!s||typeof s!="string"?[]:s.split(Lo)),_a="Capture",Oo=new RegExp(_a+"$"),ns=(s,e,t,r)=>{const a=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,n=s&&s.$attrs$||{},o=e.$attrs$||{};for(const c of Pa(Object.keys(n)))c in o||$a(a,c,n[c],void 0,t,e.$flags$,r);for(const c of Pa(Object.keys(o)))$a(a,c,n[c],o[c],t,e.$flags$,r)};function Pa(s){return s.includes("ref")?[...s.filter(e=>e!=="ref"),"ref"]:s}var os,is,cs=!1,Sr=!1,ls=!1,ge=!1,xr=(s,e,t)=>{var r;const a=e.$children$[t];let n=0,o,c,h;if(cs||(ls=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)o=a.$elm$=me.document.createTextNode(a.$text$);else if(a.$flags$&1)o=a.$elm$=me.document.createTextNode(""),ns(null,a,ge);else{if(ge||(ge=a.$tag$==="svg"),!me.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=a.$elm$=me.document.createElementNS(ge?ro:so,!cs&&st.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),ge&&a.$tag$==="foreignObject"&&(ge=!1),ns(null,a,ge),a.$children$)for(n=0;n<a.$children$.length;++n)c=xr(s,a,n),c&&o.appendChild(c);a.$tag$==="svg"?ge=!1:o.tagName==="foreignObject"&&(ge=!0)}return o["s-hn"]=is,a.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=os,o["s-sn"]=a.$name$||"",o["s-rf"]=(r=a.$attrs$)==null?void 0:r.ref,ka(o),h=s&&s.$children$&&s.$children$[t],h&&h.$tag$===a.$tag$&&s.$elm$&&At(s.$elm$,!1)),o},At=(s,e)=>{Z.$flags$|=1;const t=Array.from(s.__childNodes||s.childNodes);for(let r=t.length-1;r>=0;r--){const a=t[r];a["s-hn"]!==is&&a["s-ol"]&&(Je(_t(a).parentNode,a,_t(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,ls=!0),e&&At(a,e)}Z.$flags$&=-2},Ia=(s,e,t,r,a,n)=>{let o=s["s-cr"]&&s["s-cr"].parentNode||s,c;for(;a<=n;++a)r[a]&&(c=xr(null,t,a),c&&(r[a].$elm$=c,Je(o,c,_t(e))))},Ma=(s,e,t)=>{for(let r=e;r<=t;++r){const a=s[r];if(a){const n=a.$elm$;Oa(a),n&&(Sr=!0,n["s-ol"]?n["s-ol"].remove():At(n,!0),n.remove())}}},Do=(s,e,t,r,a=!1)=>{let n=0,o=0,c=0,h=0,i=e.length-1,u=e[0],g=e[i],p=r.length-1,y=r[0],C=r[p],k,w;for(;n<=i&&o<=p;)if(u==null)u=e[++n];else if(g==null)g=e[--i];else if(y==null)y=r[++o];else if(C==null)C=r[--p];else if(wr(u,y,a))Rt(u,y,a),u=e[++n],y=r[++o];else if(wr(g,C,a))Rt(g,C,a),g=e[--i],C=r[--p];else if(wr(u,C,a))(u.$tag$==="slot"||C.$tag$==="slot")&&At(u.$elm$.parentNode,!1),Rt(u,C,a),Je(s,u.$elm$,g.$elm$.nextSibling),u=e[++n],C=r[--p];else if(wr(g,y,a))(u.$tag$==="slot"||C.$tag$==="slot")&&At(g.$elm$.parentNode,!1),Rt(g,y,a),Je(s,g.$elm$,u.$elm$),g=e[--i],y=r[++o];else{for(c=-1,h=n;h<=i;++h)if(e[h]&&e[h].$key$!==null&&e[h].$key$===y.$key$){c=h;break}c>=0?(w=e[c],w.$tag$!==y.$tag$?k=xr(e&&e[o],t,c):(Rt(w,y,a),e[c]=void 0,k=w.$elm$),y=r[++o]):(k=xr(e&&e[o],t,o),y=r[++o]),k&&Je(_t(u.$elm$).parentNode,k,_t(u.$elm$))}n>i?Ia(s,r[p+1]==null?null:r[p+1].$elm$,t,r,o,p):o>p&&Ma(e,n,i)},wr=(s,e,t=!1)=>s.$tag$===e.$tag$?s.$tag$==="slot"?s.$name$===e.$name$:t?(t&&!s.$key$&&e.$key$&&(s.$key$=e.$key$),!0):s.$key$===e.$key$:!1,_t=s=>s&&s["s-ol"]||s,Rt=(s,e,t=!1)=>{const r=e.$elm$=s.$elm$,a=s.$children$,n=e.$children$,o=e.$tag$,c=e.$text$;let h;c===null?(ge=o==="svg"?!0:o==="foreignObject"?!1:ge,ns(s,e,ge,t),a!==null&&n!==null?Do(r,a,e,n,t):n!==null?(s.$text$!==null&&(r.textContent=""),Ia(r,null,e,n,0,n.length-1)):!t&&st.updatable&&a!==null?Ma(a,0,a.length-1):t&&st.updatable&&a!==null&&n===null&&(e.$children$=a),ge&&o==="svg"&&(ge=!1)):(h=r["s-cr"])?h.parentNode.textContent=c:s.$text$!==c&&(r.data=c)},Ue=[],La=s=>{let e,t,r;const a=s.__childNodes||s.childNodes;for(const n of a){if(n["s-sr"]&&(e=n["s-cr"])&&e.parentNode){t=e.parentNode.__childNodes||e.parentNode.childNodes;const o=n["s-sn"];for(r=t.length-1;r>=0;r--)if(e=t[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==n["s-hn"])if(Ca(e,o)){let c=Ue.find(h=>h.$nodeToRelocate$===e);Sr=!0,e["s-sn"]=e["s-sn"]||o,c?(c.$nodeToRelocate$["s-sh"]=n["s-hn"],c.$slotRefNode$=n):(e["s-sh"]=n["s-hn"],Ue.push({$slotRefNode$:n,$nodeToRelocate$:e})),e["s-sr"]&&Ue.map(h=>{Ca(h.$nodeToRelocate$,e["s-sn"])&&(c=Ue.find(i=>i.$nodeToRelocate$===e),c&&!h.$slotRefNode$&&(h.$slotRefNode$=c.$slotRefNode$))})}else Ue.some(c=>c.$nodeToRelocate$===e)||Ue.push({$nodeToRelocate$:e})}n.nodeType===1&&La(n)}},Oa=s=>{s.$attrs$&&s.$attrs$.ref&&s.$attrs$.ref(null),s.$children$&&s.$children$.map(Oa)},Je=(s,e,t)=>s==null?void 0:s.insertBefore(e,t),Fo=(s,e,t=!1)=>{var r,a,n,o;const c=s.$hostElement$,h=s.$vnode$||Tt(null,null),u=$o(e)?e:f(null,null,e);if(is=c.tagName,t&&u.$attrs$)for(const g of Object.keys(u.$attrs$))c.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(u.$attrs$[g]=c[g]);u.$tag$=null,u.$flags$|=4,s.$vnode$=u,u.$elm$=h.$elm$=c,cs=ho,os=c["s-cr"],Sr=!1,Rt(h,u,t);{if(Z.$flags$|=1,ls){La(u.$elm$);for(const g of Ue){const p=g.$nodeToRelocate$;if(!p["s-ol"]&&me.document){const y=me.document.createTextNode("");y["s-nr"]=p,Je(p.parentNode,p["s-ol"]=y,p)}}for(const g of Ue){const p=g.$nodeToRelocate$,y=g.$slotRefNode$;if(y){const C=y.parentNode;let k=y.nextSibling;{let T=(r=p["s-ol"])==null?void 0:r.previousSibling;for(;T;){let S=(a=T["s-nr"])!=null?a:null;if(S&&S["s-sn"]===p["s-sn"]&&C===(S.__parentNode||S.parentNode)){for(S=S.nextSibling;S===p||S!=null&&S["s-sr"];)S=S==null?void 0:S.nextSibling;if(!S||!S["s-nr"]){k=S;break}}T=T.previousSibling}}const w=p.__parentNode||p.parentNode,L=p.__nextSibling||p.nextSibling;(!k&&C!==w||L!==k)&&p!==k&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),Je(C,p,k),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(n=p["s-ih"])!=null?n:!1)),p&&typeof y["s-rf"]=="function"&&y["s-rf"](y)}else p.nodeType===1&&(t&&(p["s-ih"]=(o=p.hidden)!=null?o:!1),p.hidden=!0)}}Sr&&va(u.$elm$),Z.$flags$&=-2,Ue.length=0}os=void 0},Da=(s,e)=>{if(e&&!s.$onRenderResolve$&&e["s-p"]){const t=e["s-p"].push(new Promise(r=>s.$onRenderResolve$=()=>{e["s-p"].splice(t-1,1),r()}))}},us=(s,e)=>{if(s.$flags$|=16,s.$flags$&4){s.$flags$|=512;return}Da(s,s.$ancestorComponent$);const t=()=>No(s,e);if(e){queueMicrotask(()=>{t()});return}return mo(t)},No=(s,e)=>{const t=s.$hostElement$,r=wt("scheduleUpdate",s.$cmpMeta$.$tagName$),a=t;if(!a)throw new Error(`Can't render component <${t.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return e?n=Et(a,"componentWillLoad",void 0,t):n=Et(a,"componentWillUpdate",void 0,t),n=Fa(n,()=>Et(a,"componentWillRender",void 0,t)),r(),Fa(n,()=>Uo(s,a,e))},Fa=(s,e)=>zo(s)?s.then(e).catch(t=>{console.error(t),e()}):e(),zo=s=>s instanceof Promise||s&&s.then&&typeof s.then=="function",Uo=async(s,e,t)=>{var r;const a=s.$hostElement$,n=wt("update",s.$cmpMeta$.$tagName$),o=a["s-rc"],c=wt("render",s.$cmpMeta$.$tagName$);Ho(s,e,a,t),o&&(o.map(h=>h()),a["s-rc"]=void 0),c(),n();{const h=(r=a["s-p"])!=null?r:[],i=()=>Bo(s);h.length===0?i():(Promise.all(h).then(i),s.$flags$|=4,h.length=0)}},Ho=(s,e,t,r)=>{try{e=e.render(),s.$flags$&=-17,s.$flags$|=2,Fo(s,e,r)}catch(a){yr(a,s.$hostElement$)}return null},Bo=s=>{const e=s.$cmpMeta$.$tagName$,t=s.$hostElement$,r=wt("postUpdate",e),a=t,n=s.$ancestorComponent$;Et(a,"componentDidRender",void 0,t),s.$flags$&64?(Et(a,"componentDidUpdate",void 0,t),r()):(s.$flags$|=64,qo(t),Et(a,"componentDidLoad",void 0,t),r(),s.$onReadyResolve$(t),n||Vo()),s.$onRenderResolve$&&(s.$onRenderResolve$(),s.$onRenderResolve$=void 0),s.$flags$&512&&Kr(()=>us(s,!1)),s.$flags$&=-517},Vo=s=>{var e;Kr(()=>Ea(me,"appload",{detail:{namespace:xt}})),(e=Z.$orgLocNodes$)!=null&&e.size&&Z.$orgLocNodes$.clear()},Et=(s,e,t,r)=>{if(s&&s[e])try{return s[e](t)}catch(a){yr(a,r)}},qo=s=>{var e;return s.classList.add((e=st.hydratedSelectorName)!=null?e:"hydrated")},Wo=(s,e)=>Qe(s).$instanceValues$.get(e),Na=(s,e,t,r)=>{const a=Qe(s);if(!a)return;const n=s,o=a.$instanceValues$.get(e),c=a.$flags$,h=n;t=Ra(t,r.$members$[e][0]);const i=Number.isNaN(o)&&Number.isNaN(t);if(t!==o&&!i){a.$instanceValues$.set(e,t);{if(r.$watchers$&&c&128){const g=r.$watchers$[e];g&&g.map(p=>{try{h[p](t,o,e)}catch(y){yr(y,n)}})}if((c&18)===2){if(h.componentShouldUpdate&&h.componentShouldUpdate(t,o,e)===!1)return;us(a,!1)}}}},Go=(s,e,t)=>{var r,a;const n=s.prototype;{s.watchers&&!e.$watchers$&&(e.$watchers$=s.watchers),s.deserializers&&!e.$deserializers$&&(e.$deserializers$=s.deserializers),s.serializers&&!e.$serializers$&&(e.$serializers$=s.serializers);const o=Object.entries((r=e.$members$)!=null?r:{});o.map(([c,[h]])=>{if(h&31||h&32){const{get:i,set:u}=Object.getOwnPropertyDescriptor(n,c)||{};i&&(e.$members$[c][0]|=2048),u&&(e.$members$[c][0]|=4096),Object.defineProperty(n,c,{get(){return i?i.apply(this):Wo(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(n,c,{set(g){const p=Qe(this);if(p){if(u){typeof(h&32?this[c]:p.$hostElement$[c])>"u"&&p.$instanceValues$.get(c)&&(g=p.$instanceValues$.get(c)),u.apply(this,[Ra(g,h)]),g=h&32?this[c]:p.$hostElement$[c],Na(this,c,g,e);return}{Na(this,c,g,e);return}}}})}});{const c=new Map;n.attributeChangedCallback=function(h,i,u){Z.jmp(()=>{var g;const p=c.get(h),y=Qe(this);if(this.hasOwnProperty(p)&&st.lazyLoad,n.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==u)return;if(p==null){const w=y==null?void 0:y.$flags$;if(y&&w&&!(w&8)&&w&128&&u!==i){const T=this,S=(g=e.$watchers$)==null?void 0:g[h];S==null||S.forEach(x=>{T[x]!=null&&T[x].call(T,u,i,h)})}return}const C=o.find(([w])=>w===p);C&&C[1][0]&4&&(u=!(u===null||u==="false"));const k=Object.getOwnPropertyDescriptor(n,p);u!=this[p]&&(!k.get||k.set)&&(this[p]=u)})},s.observedAttributes=Array.from(new Set([...Object.keys((a=e.$watchers$)!=null?a:{}),...o.filter(([h,i])=>i[0]&31).map(([h,i])=>{const u=i[1]||h;return c.set(u,h),u})]))}}return s},jo=async(s,e,t,r)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const o=s.localName;customElements.whenDefined(o).then(()=>e.$flags$|=128)}}const a=e.$ancestorComponent$,n=()=>us(e,!0);a&&a["s-rc"]?a["s-rc"].push(n):n()},Yo=(s,e)=>{},Zo=s=>{if(!(Z.$flags$&1)){const e=Qe(s);if(!e)return;const t=e.$cmpMeta$,r=wt("connectedCallback",t.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>Yo());else{e.$flags$|=1;let a;a=s.getAttribute($t),a&&Po(s,t.$tagName$,a,e),a||t.$flags$&12&&Xo(s);{let n=s;for(;n=n.parentNode||n.host;)if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Da(e,e.$ancestorComponent$=n);break}}t.$members$&&Object.entries(t.$members$).map(([n,[o]])=>{if(o&31&&n in s&&s[n]!==Object.prototype[n]){const c=s[n];delete s[n],s[n]=c}}),jo(s,e)}r()}},Xo=s=>{if(!me.document)return;const e=s["s-cr"]=me.document.createComment("");e["s-cn"]=!0,Je(s,e,s.firstChild)},Qo=async s=>{Z.$flags$&1||Qe(s),kr.has(s)&&kr.delete(s),s.shadowRoot&&kr.has(s.shadowRoot)&&kr.delete(s.shadowRoot)},Y=(s,e)=>{const t={$flags$:e[0],$tagName$:e[1]};t.$members$=e[2],t.$watchers$=s.$watchers$,t.$deserializers$=s.$deserializers$,t.$serializers$=s.$serializers$;const r=s.prototype.connectedCallback,a=s.prototype.disconnectedCallback;return Object.assign(s.prototype,{__hasHostListenerAttached:!1,__registerHost(){oo(this,t)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!Qe(this))return;this.__hasHostListenerAttached=!0}Zo(this),r&&r.call(this)},disconnectedCallback(){Qo(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),s.is=t.$tagName$,Go(s,t)},Ko=(s,e)=>e;function Uu(s){return s}function Jo(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var hs={exports:{}};/*!
6
6
  Copyright (c) 2018 Jed Watson.
7
7
  Licensed under the MIT License (MIT), see
8
8
  http://jedwatson.github.io/classnames
9
- */var As;function ao(){return As||(As=1,function(s){(function(){var e={}.hasOwnProperty;function t(){for(var n="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(n=a(n,r(c)))}return n}function r(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var c in n)e.call(n,c)&&n[c]&&(o=a(o,c));return o}function a(n,o){return o?n?n+" "+o:n+o:n}s.exports?(t.default=t,s.exports=t):window.classNames=t})()}(dr)),dr.exports}var no=ao(),ne=so(no);const fr="searchcraft";class oo{constructor(){u(this,"coreInstances",{});u(this,"subscriptions",{})}addCoreInstance(e,t){const r=t||fr;this.coreInstances[r]=e;for(const a of this.subscriptions[r]||[])a(e)}useCoreInstance(e,t){const r=e||fr;return this.coreInstances[r]?(t(this.coreInstances[r]),()=>{}):(this.subscriptions[r]||(this.subscriptions[r]=[]),this.subscriptions[r].push(t),()=>{this.subscriptions[r]&&(this.subscriptions[r]=this.subscriptions[r].filter(a=>a!==t))})}}const j=new oo;/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:_s,setPrototypeOf:Ms,isFrozen:io,getPrototypeOf:co,getOwnPropertyDescriptor:lo}=Object;let{freeze:K,seal:ie,create:pr}=Object,{apply:mr,construct:gr}=typeof Reflect<"u"&&Reflect;K||(K=function(e){return e}),ie||(ie=function(e){return e}),mr||(mr=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),gr||(gr=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const xt=ee(Array.prototype.forEach),ho=ee(Array.prototype.lastIndexOf),Fs=ee(Array.prototype.pop),et=ee(Array.prototype.push),uo=ee(Array.prototype.splice),St=ee(String.prototype.toLowerCase),br=ee(String.prototype.toString),vr=ee(String.prototype.match),tt=ee(String.prototype.replace),fo=ee(String.prototype.indexOf),po=ee(String.prototype.trim),le=ee(Object.prototype.hasOwnProperty),J=ee(RegExp.prototype.test),rt=mo(TypeError);function ee(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return mr(s,e,r)}}function mo(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return gr(s,t)}}function E(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:St;Ms&&Ms(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(io(e)||(e[r]=n),a=n)}s[a]=!0}return s}function go(s){for(let e=0;e<s.length;e++)le(s,e)||(s[e]=null);return s}function ge(s){const e=pr(null);for(const[t,r]of _s(s))le(s,t)&&(Array.isArray(r)?e[t]=go(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=ge(r):e[t]=r);return e}function st(s,e){for(;s!==null;){const r=lo(s,e);if(r){if(r.get)return ee(r.get);if(typeof r.value=="function")return ee(r.value)}s=co(s)}function t(){return null}return t}const Ls=K(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yr=K(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),kr=K(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bo=K(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cr=K(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vo=K(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Os=K(["#text"]),Ds=K(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xr=K(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),zs=K(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wt=K(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yo=ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ko=ie(/<%[\w\W]*|[\w\W]*%>/gm),Co=ie(/\$\{[\w\W]*/gm),xo=ie(/^data-[\-\w.\u00B7-\uFFFF]+$/),So=ie(/^aria-[\-\w]+$/),Ns=ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wo=ie(/^(?:\w+script|data):/i),Ro=ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hs=ie(/^html$/i),$o=ie(/^[a-z][.\w]*(-[.\w]+)+$/i);var Us=Object.freeze({__proto__:null,ARIA_ATTR:So,ATTR_WHITESPACE:Ro,CUSTOM_ELEMENT:$o,DATA_ATTR:xo,DOCTYPE_NAME:Hs,ERB_EXPR:ko,IS_ALLOWED_URI:Ns,IS_SCRIPT_OR_DATA:wo,MUSTACHE_EXPR:yo,TMPLIT_EXPR:Co});const at={element:1,text:3,progressingInstruction:7,comment:8,document:9},To=function(){return typeof window>"u"?null:window},Eo=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Bs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Vs(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:To();const e=w=>Vs(w);if(e.version="3.3.0",e.removed=[],!s||!s.document||s.document.nodeType!==at.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:h,NodeFilter:i,NamedNodeMap:l=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:m,DOMParser:p,trustedTypes:g}=s,v=h.prototype,y=st(v,"cloneNode"),x=st(v,"remove"),P=st(v,"nextSibling"),S=st(v,"childNodes"),k=st(v,"parentNode");if(typeof o=="function"){const w=t.createElement("template");w.content&&w.content.ownerDocument&&(t=w.content.ownerDocument)}let T,_="";const{implementation:R,createNodeIterator:I,createDocumentFragment:z,getElementsByTagName:fe}=t,{importNode:Ue}=r;let G=Bs();e.isSupported=typeof _s=="function"&&typeof k=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Be,ERB_EXPR:Br,TMPLIT_EXPR:Vr,DATA_ATTR:xl,ARIA_ATTR:Sl,IS_SCRIPT_OR_DATA:wl,ATTR_WHITESPACE:Ma,CUSTOM_ELEMENT:Rl}=Us;let{IS_ALLOWED_URI:Fa}=Us,V=null;const La=E({},[...Ls,...yr,...kr,...Cr,...Os]);let Z=null;const Oa=E({},[...Ds,...xr,...zs,...wt]);let H=Object.seal(pr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ft=null,qr=null;const Ve=Object.seal(pr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Da=!0,jr=!0,za=!1,Na=!0,qe=!1,Ht=!0,Me=!1,Wr=!1,Gr=!1,je=!1,Ut=!1,Bt=!1,Ha=!0,Ua=!1;const $l="user-content-";let Zr=!0,pt=!1,We={},Ge=null;const Ba=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Va=null;const qa=E({},["audio","video","img","source","image","track"]);let Qr=null;const ja=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let Ze=ke,Yr=!1,Xr=null;const Tl=E({},[Vt,qt,ke],br);let jt=E({},["mi","mo","mn","ms","mtext"]),Wt=E({},["annotation-xml"]);const El=E({},["title","style","font","a","script"]);let mt=null;const Pl=["application/xhtml+xml","text/html"],Il="text/html";let q=null,Qe=null;const Al=t.createElement("form"),Wa=function(f){return f instanceof RegExp||f instanceof Function},Kr=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Qe&&Qe===f)){if((!f||typeof f!="object")&&(f={}),f=ge(f),mt=Pl.indexOf(f.PARSER_MEDIA_TYPE)===-1?Il:f.PARSER_MEDIA_TYPE,q=mt==="application/xhtml+xml"?br:St,V=le(f,"ALLOWED_TAGS")?E({},f.ALLOWED_TAGS,q):La,Z=le(f,"ALLOWED_ATTR")?E({},f.ALLOWED_ATTR,q):Oa,Xr=le(f,"ALLOWED_NAMESPACES")?E({},f.ALLOWED_NAMESPACES,br):Tl,Qr=le(f,"ADD_URI_SAFE_ATTR")?E(ge(ja),f.ADD_URI_SAFE_ATTR,q):ja,Va=le(f,"ADD_DATA_URI_TAGS")?E(ge(qa),f.ADD_DATA_URI_TAGS,q):qa,Ge=le(f,"FORBID_CONTENTS")?E({},f.FORBID_CONTENTS,q):Ba,ft=le(f,"FORBID_TAGS")?E({},f.FORBID_TAGS,q):ge({}),qr=le(f,"FORBID_ATTR")?E({},f.FORBID_ATTR,q):ge({}),We=le(f,"USE_PROFILES")?f.USE_PROFILES:!1,Da=f.ALLOW_ARIA_ATTR!==!1,jr=f.ALLOW_DATA_ATTR!==!1,za=f.ALLOW_UNKNOWN_PROTOCOLS||!1,Na=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qe=f.SAFE_FOR_TEMPLATES||!1,Ht=f.SAFE_FOR_XML!==!1,Me=f.WHOLE_DOCUMENT||!1,je=f.RETURN_DOM||!1,Ut=f.RETURN_DOM_FRAGMENT||!1,Bt=f.RETURN_TRUSTED_TYPE||!1,Gr=f.FORCE_BODY||!1,Ha=f.SANITIZE_DOM!==!1,Ua=f.SANITIZE_NAMED_PROPS||!1,Zr=f.KEEP_CONTENT!==!1,pt=f.IN_PLACE||!1,Fa=f.ALLOWED_URI_REGEXP||Ns,Ze=f.NAMESPACE||ke,jt=f.MATHML_TEXT_INTEGRATION_POINTS||jt,Wt=f.HTML_INTEGRATION_POINTS||Wt,H=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&Wa(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&Wa(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qe&&(jr=!1),Ut&&(je=!0),We&&(V=E({},Os),Z=[],We.html===!0&&(E(V,Ls),E(Z,Ds)),We.svg===!0&&(E(V,yr),E(Z,xr),E(Z,wt)),We.svgFilters===!0&&(E(V,kr),E(Z,xr),E(Z,wt)),We.mathMl===!0&&(E(V,Cr),E(Z,zs),E(Z,wt))),f.ADD_TAGS&&(typeof f.ADD_TAGS=="function"?Ve.tagCheck=f.ADD_TAGS:(V===La&&(V=ge(V)),E(V,f.ADD_TAGS,q))),f.ADD_ATTR&&(typeof f.ADD_ATTR=="function"?Ve.attributeCheck=f.ADD_ATTR:(Z===Oa&&(Z=ge(Z)),E(Z,f.ADD_ATTR,q))),f.ADD_URI_SAFE_ATTR&&E(Qr,f.ADD_URI_SAFE_ATTR,q),f.FORBID_CONTENTS&&(Ge===Ba&&(Ge=ge(Ge)),E(Ge,f.FORBID_CONTENTS,q)),Zr&&(V["#text"]=!0),Me&&E(V,["html","head","body"]),V.table&&(E(V,["tbody"]),delete ft.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw rt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=f.TRUSTED_TYPES_POLICY,_=T.createHTML("")}else T===void 0&&(T=Eo(g,a)),T!==null&&typeof _=="string"&&(_=T.createHTML(""));K&&K(f),Qe=f}},Ga=E({},[...yr,...kr,...bo]),Za=E({},[...Cr,...vo]),_l=function(f){let b=k(f);(!b||!b.tagName)&&(b={namespaceURI:Ze,tagName:"template"});const C=St(f.tagName),F=St(b.tagName);return Xr[f.namespaceURI]?f.namespaceURI===qt?b.namespaceURI===ke?C==="svg":b.namespaceURI===Vt?C==="svg"&&(F==="annotation-xml"||jt[F]):!!Ga[C]:f.namespaceURI===Vt?b.namespaceURI===ke?C==="math":b.namespaceURI===qt?C==="math"&&Wt[F]:!!Za[C]:f.namespaceURI===ke?b.namespaceURI===qt&&!Wt[F]||b.namespaceURI===Vt&&!jt[F]?!1:!Za[C]&&(El[C]||!Ga[C]):!!(mt==="application/xhtml+xml"&&Xr[f.namespaceURI]):!1},pe=function(f){et(e.removed,{element:f});try{k(f).removeChild(f)}catch{x(f)}},Fe=function(f,b){try{et(e.removed,{attribute:b.getAttributeNode(f),from:b})}catch{et(e.removed,{attribute:null,from:b})}if(b.removeAttribute(f),f==="is")if(je||Ut)try{pe(b)}catch{}else try{b.setAttribute(f,"")}catch{}},Qa=function(f){let b=null,C=null;if(Gr)f="<remove></remove>"+f;else{const U=vr(f,/^[\r\n\t ]+/);C=U&&U[0]}mt==="application/xhtml+xml"&&Ze===ke&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const F=T?T.createHTML(f):f;if(Ze===ke)try{b=new p().parseFromString(F,mt)}catch{}if(!b||!b.documentElement){b=R.createDocument(Ze,"template",null);try{b.documentElement.innerHTML=Yr?_:F}catch{}}const X=b.body||b.documentElement;return f&&C&&X.insertBefore(t.createTextNode(C),X.childNodes[0]||null),Ze===ke?fe.call(b,Me?"html":"body")[0]:Me?b.documentElement:X},Ya=function(f){return I.call(f.ownerDocument||f,f,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},Jr=function(f){return f instanceof m&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof l)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},Xa=function(f){return typeof c=="function"&&f instanceof c};function Ce(w,f,b){xt(w,C=>{C.call(e,f,b,Qe)})}const Ka=function(f){let b=null;if(Ce(G.beforeSanitizeElements,f,null),Jr(f))return pe(f),!0;const C=q(f.nodeName);if(Ce(G.uponSanitizeElement,f,{tagName:C,allowedTags:V}),Ht&&f.hasChildNodes()&&!Xa(f.firstElementChild)&&J(/<[/\w!]/g,f.innerHTML)&&J(/<[/\w!]/g,f.textContent)||f.nodeType===at.progressingInstruction||Ht&&f.nodeType===at.comment&&J(/<[/\w]/g,f.data))return pe(f),!0;if(!(Ve.tagCheck instanceof Function&&Ve.tagCheck(C))&&(!V[C]||ft[C])){if(!ft[C]&&en(C)&&(H.tagNameCheck instanceof RegExp&&J(H.tagNameCheck,C)||H.tagNameCheck instanceof Function&&H.tagNameCheck(C)))return!1;if(Zr&&!Ge[C]){const F=k(f)||f.parentNode,X=S(f)||f.childNodes;if(X&&F){const U=X.length;for(let oe=U-1;oe>=0;--oe){const xe=y(X[oe],!0);xe.__removalCount=(f.__removalCount||0)+1,F.insertBefore(xe,P(f))}}}return pe(f),!0}return f instanceof h&&!_l(f)||(C==="noscript"||C==="noembed"||C==="noframes")&&J(/<\/no(script|embed|frames)/i,f.innerHTML)?(pe(f),!0):(qe&&f.nodeType===at.text&&(b=f.textContent,xt([Be,Br,Vr],F=>{b=tt(b,F," ")}),f.textContent!==b&&(et(e.removed,{element:f.cloneNode()}),f.textContent=b)),Ce(G.afterSanitizeElements,f,null),!1)},Ja=function(f,b,C){if(Ha&&(b==="id"||b==="name")&&(C in t||C in Al))return!1;if(!(jr&&!qr[b]&&J(xl,b))){if(!(Da&&J(Sl,b))){if(!(Ve.attributeCheck instanceof Function&&Ve.attributeCheck(b,f))){if(!Z[b]||qr[b]){if(!(en(f)&&(H.tagNameCheck instanceof RegExp&&J(H.tagNameCheck,f)||H.tagNameCheck instanceof Function&&H.tagNameCheck(f))&&(H.attributeNameCheck instanceof RegExp&&J(H.attributeNameCheck,b)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(b,f))||b==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&J(H.tagNameCheck,C)||H.tagNameCheck instanceof Function&&H.tagNameCheck(C))))return!1}else if(!Qr[b]){if(!J(Fa,tt(C,Ma,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&f!=="script"&&fo(C,"data:")===0&&Va[f])){if(!(za&&!J(wl,tt(C,Ma,"")))){if(C)return!1}}}}}}}return!0},en=function(f){return f!=="annotation-xml"&&vr(f,Rl)},tn=function(f){Ce(G.beforeSanitizeAttributes,f,null);const{attributes:b}=f;if(!b||Jr(f))return;const C={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let F=b.length;for(;F--;){const X=b[F],{name:U,namespaceURI:oe,value:xe}=X,Ye=q(U),es=xe;let Q=U==="value"?es:po(es);if(C.attrName=Ye,C.attrValue=Q,C.keepAttr=!0,C.forceKeepAttr=void 0,Ce(G.uponSanitizeAttribute,f,C),Q=C.attrValue,Ua&&(Ye==="id"||Ye==="name")&&(Fe(U,f),Q=$l+Q),Ht&&J(/((--!?|])>)|<\/(style|title|textarea)/i,Q)){Fe(U,f);continue}if(Ye==="attributename"&&vr(Q,"href")){Fe(U,f);continue}if(C.forceKeepAttr)continue;if(!C.keepAttr){Fe(U,f);continue}if(!Na&&J(/\/>/i,Q)){Fe(U,f);continue}qe&&xt([Be,Br,Vr],sn=>{Q=tt(Q,sn," ")});const rn=q(f.nodeName);if(!Ja(rn,Ye,Q)){Fe(U,f);continue}if(T&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!oe)switch(g.getAttributeType(rn,Ye)){case"TrustedHTML":{Q=T.createHTML(Q);break}case"TrustedScriptURL":{Q=T.createScriptURL(Q);break}}if(Q!==es)try{oe?f.setAttributeNS(oe,U,Q):f.setAttribute(U,Q),Jr(f)?pe(f):Fs(e.removed)}catch{Fe(U,f)}}Ce(G.afterSanitizeAttributes,f,null)},Ml=function w(f){let b=null;const C=Ya(f);for(Ce(G.beforeSanitizeShadowDOM,f,null);b=C.nextNode();)Ce(G.uponSanitizeShadowNode,b,null),Ka(b),tn(b),b.content instanceof n&&w(b.content);Ce(G.afterSanitizeShadowDOM,f,null)};return e.sanitize=function(w){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,C=null,F=null,X=null;if(Yr=!w,Yr&&(w="<!-->"),typeof w!="string"&&!Xa(w))if(typeof w.toString=="function"){if(w=w.toString(),typeof w!="string")throw rt("dirty is not a string, aborting")}else throw rt("toString is not a function");if(!e.isSupported)return w;if(Wr||Kr(f),e.removed=[],typeof w=="string"&&(pt=!1),pt){if(w.nodeName){const xe=q(w.nodeName);if(!V[xe]||ft[xe])throw rt("root node is forbidden and cannot be sanitized in-place")}}else if(w instanceof c)b=Qa("<!---->"),C=b.ownerDocument.importNode(w,!0),C.nodeType===at.element&&C.nodeName==="BODY"||C.nodeName==="HTML"?b=C:b.appendChild(C);else{if(!je&&!qe&&!Me&&w.indexOf("<")===-1)return T&&Bt?T.createHTML(w):w;if(b=Qa(w),!b)return je?null:Bt?_:""}b&&Gr&&pe(b.firstChild);const U=Ya(pt?w:b);for(;F=U.nextNode();)Ka(F),tn(F),F.content instanceof n&&Ml(F.content);if(pt)return w;if(je){if(Ut)for(X=z.call(b.ownerDocument);b.firstChild;)X.appendChild(b.firstChild);else X=b;return(Z.shadowroot||Z.shadowrootmode)&&(X=Ue.call(r,X,!0)),X}let oe=Me?b.outerHTML:b.innerHTML;return Me&&V["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&J(Hs,b.ownerDocument.doctype.name)&&(oe="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
10
- `+oe),qe&&xt([Be,Br,Vr],xe=>{oe=tt(oe,xe," ")}),T&&Bt?T.createHTML(oe):oe},e.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Kr(w),Wr=!0},e.clearConfig=function(){Qe=null,Wr=!1},e.isValidAttribute=function(w,f,b){Qe||Kr({});const C=q(w),F=q(f);return Ja(C,F,b)},e.addHook=function(w,f){typeof f=="function"&&et(G[w],f)},e.removeHook=function(w,f){if(f!==void 0){const b=ho(G[w],f);return b===-1?void 0:uo(G[w],b,1)[0]}return Fs(G[w])},e.removeHooks=function(w){G[w]=[]},e.removeAllHooks=function(){G=Bs()},e}var qs=Vs();const nt=(s,...e)=>{let t=s[0];for(let r=0;r<e.length;r++)t+=qs.sanitize(e[r]?String(e[r]):"")+s[r+1];return t||""},Po="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Pe=(s=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(s|=0));for(;s--;)e+=Po[t[s]&63];return e};const Io=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"adSource","Custom");u(this,"adClientResponseItem");u(this,"renderPosition","interstitial");u(this,"searchTerm");u(this,"isSearchInProgress",!1);u(this,"searchResultCount",0);u(this,"core");u(this,"intersectionObserver");u(this,"storeUnsubscribe");u(this,"cleanupCore");u(this,"adContainerRenderedTimeout");u(this,"isComponentConnected",!1);u(this,"timeTaken");u(this,"adContainerId","");t!==!1&&this.__registerHost()}get hostElement(){return this}handleAdRendered(){var t,r,a;this.adContainerId=Pe(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var n;(n=this.core)==null||n.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(r=(t=this.core)==null?void 0:t.config)==null?void 0:r.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var t;(t=this.core)==null||t.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(t){const r=t.searchClientRequestProperties;r&&typeof r=="object"&&(this.searchTerm=r.searchTerm),this.searchResultCount=t.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(t){const r=t.store.getState();this.isComponentConnected=!0,this.core=r.core,this.isSearchInProgress=r.isSearchInProgress,this.searchResultCount=r.searchClientResponseItems.length,this.timeTaken=r.searchResponseTimeTaken;const a=r.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(r),this.storeUnsubscribe=t.store.subscribe(n=>{this.timeTaken!==n.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(n),this.timeTaken=n.searchResponseTimeTaken,this.isSearchInProgress=n.isSearchInProgress})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{r!=null&&r.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var t,r,a;(t=this.storeUnsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,n,o,c,h;const t=this.adClientResponseItem;if(!t.admAd)return;let r="<p>Ad Marketplace Ad Placeholder</p>";return(o=(n=(a=this.core)==null?void 0:a.config)==null?void 0:n.admAdConfig)!=null&&o.template&&(r=(h=(c=this.core)==null?void 0:c.config)==null?void 0:h.admAdConfig.template(t.admAd,{html:nt})),d("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:r})}renderCustomAd(){var n,o,c;const t=(c=(o=(n=this.core)==null?void 0:n.config)==null?void 0:o.customAdConfig)==null?void 0:c.template,r=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return t&&(a=t({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:nt})),d("div",{class:"searchcraft-ad searchcraft-custom-ad",id:r,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var r,a;const t=((a=(r=this.core)==null?void 0:r.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return d("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:ne("searchcraft-ad",t),"data-searchcraft-ad-container-id":this.adContainerId})}render(){if(this.searchResultCount!==0)switch(this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[768,"searchcraft-ad",{searchcraftId:[1,"searchcraft-id"],adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function Rt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(e=>{switch(e){case"searchcraft-ad":customElements.get(e)||customElements.define(e,Io);break}})}const Ao=Rt,_o=D(class extends O{constructor(t){super();u(this,"hierarchy","primary");u(this,"disabled",!1);u(this,"icon");u(this,"iconOnly",!1);u(this,"iconPosition","left");u(this,"label","Search");u(this,"type","button");u(this,"buttonClick");u(this,"handleButtonClick",()=>{this.buttonClick.emit()});t!==!1&&this.__registerHost(),this.buttonClick=we(this,"buttonClick")}render(){return d("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:ne("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:d(ro,null,this.iconPosition==="left"&&this.icon,d("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[768,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function $t(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-button":customElements.get(e)||customElements.define(e,_o);break}})}const Mo=$t,Fo=D(class extends O{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return d("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},d("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[260,"searchcraft-error-message"]);function Tt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(e=>{switch(e){case"searchcraft-error-message":customElements.get(e)||customElements.define(e,Fo);break}})}const Lo=Tt,js=(s,e)=>{let t=s;for(const r of e)t=t==null?void 0:t.children[r];return t},Sr=(s,e)=>{const t={...s};for(const r in e)e.hasOwnProperty(r)&&(e[r]instanceof Object&&s[r]instanceof Object?t[r]=Sr(s[r],e[r]):t[r]=e[r]);return t};function Oo(s){return s.filter((e,t,r)=>!r.some((a,n)=>n!==t&&a.includes(e)))}const Ws=(s,e)=>{const t=structuredClone(s),r=(a,n)=>{var h;const o=structuredClone(a),c=js(e,n);if(!c)return o;for(const i of Object.keys(a.children))c.children[i]?o.children[i]={...Sr(a.children[i],c.children[i]),count:((h=o.children[i])==null?void 0:h.count)||0}:o.children[i]&&(o.children[i]=r(o.children[i],[...n,i]));return o};return r(t,[])},wr=(s,e)=>{const t={path:"/",count:0,children:{}},r=[],a=n=>{if(n.path!=="/"&&r.push({path:n.path,count:n.count}),n.children)for(const o of n.children)a(o)};a(s);for(const{path:n,count:o}of r){const c=n.split("/").filter(Boolean);if(e&&e.length>0){let i=!1;for(const l of e)if(l.startsWith("/")){if(n===l||n.startsWith(`${l}/`)){i=!0;break}}else if(c.includes(l)){i=!0;break}if(i)continue}let h=t;for(const i of c){const l=h.path==="/"?`/${i}`:`${h.path}/${i}`;h.children[i]||(h.children[i]={path:l,count:o,children:{}}),h=h.children[i]}h.count=o}return t},Do=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"fieldName","");u(this,"exclude");u(this,"facetSelectionUpdated");u(this,"selectedPaths",{});u(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});u(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});u(this,"renderedFacetTree",{path:"/",count:0,children:{}});u(this,"lastTimeTaken");u(this,"lastSearchTerm");u(this,"lastSearchMode");u(this,"lastSortType");u(this,"lastRangeValues");u(this,"lastFacetValues");u(this,"unsubscribe");u(this,"cleanupCore");u(this,"formatFacetName",t=>`${t.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);t!==!1&&this.__registerHost(),this.facetSelectionUpdated=we(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(t=>this.selectedPaths[t])}handleIncomingSearchResponse(t,r){var h,i,l;const a=(h=t.searchResponseFacetPrime)==null?void 0:h.find(m=>this.fieldName===Object.keys(m)[0]),n=a==null?void 0:a[this.fieldName],o=wr({path:"/",count:0,children:n||[]},this.exclude);switch(r){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=o;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(t.supplementalFacetPrime){const m=(i=t.supplementalFacetPrime)==null?void 0:i.find(v=>this.fieldName===Object.keys(v)[0]),p=m==null?void 0:m[this.fieldName],g=wr({path:"/",count:0,children:p||[]},this.exclude);this.facetTreeCollectedFromSearchResponse=Ws(g,o)}else this.facetTreeCollectedFromSearchResponse=o;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=Ws(this.facetTreeCollectedFromSearchResponse,o);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const c={path:"/",count:0,children:[]};for(const m of Object.keys(this.selectedPaths).filter(p=>this.selectedPaths[p])){const p=m.startsWith("/")?m.substring(1).split("/"):m.split("/"),g=!!js(this.facetTreeCollectedFromSearchResponse,p),v=p.at(-1);!g&&v&&((l=c.children)==null||l.push({children:[],count:0,path:m}))}this.facetTreeFromFacetPathsNotInSearchResponse=wr(c,this.exclude),this.renderedFacetTree=Sr(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(t){const r={...t},a=typeof r.searchClientRequestProperties=="string"&&r.searchTerm.trim()==="";if(r.searchTerm.trim()===""&&!a)this.handleIncomingSearchResponse(r,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==r.searchResponseTimeTaken&&r.searchClientRequestProperties){if(typeof r.searchClientRequestProperties=="object"){const n=r.searchClientRequestProperties;let o="UNKNOWN";this.lastSearchTerm!==n.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(n.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(n.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==n.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==n.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(n.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(n.facetPathsForIndexFields),this.lastSortType=n.order_by,this.lastSearchMode=n.mode,this.lastSearchTerm=n.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,o)}else if(typeof r.searchClientRequestProperties=="string"){let n="NEW_SEARCH_TERM";const o=JSON.parse(r.searchClientRequestProperties),h=(Array.isArray(o.query)?o.query:[o.query]).filter(l=>l.occur==="must"),i=JSON.stringify(h);this.lastFacetValues!==void 0&&this.lastFacetValues!==i?n="FACET_UPDATE":r.searchTerm.trim()===""&&this.lastSearchTerm===""?n="NEW_SEARCH_TERM":this.lastSearchTerm!==r.searchTerm&&(this.areAnyFacetPathsSelected?n="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":n="NEW_SEARCH_TERM"),this.lastFacetValues=i,this.lastSearchTerm=r.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,n)}}}onCoreAvailable(t){this.handleStateUpdate(t.store.getState()),this.unsubscribe=t.store.subscribe(r=>{this.handleStateUpdate(r)})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleCheckboxChange(t){var o;if(!this.selectedPaths[t])this.selectedPaths={...this.selectedPaths,[t]:!0};else{const c=Object.keys(this.selectedPaths).filter(h=>!h.includes(t));this.selectedPaths=c.reduce((h,i)=>(h[i]=!0,h),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),n=Oo(a);(o=this.facetSelectionUpdated)==null||o.emit({paths:n})}renderFacet(t,r){let a=!1;for(const c of Object.keys(this.selectedPaths))this.selectedPaths[c]&&c.startsWith(r.path)&&c.length>r.path.length&&(a=!0);const n=Object.keys(this.selectedPaths).includes(r.path),o=Object.keys(r.children).length>0&&(n||a)||t==="@@root";return d("div",{class:"searchcraft-facet-list-item"},t!=="@@root"&&d("label",{class:"searchcraft-facet-list-checkbox-label"},d("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},d("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[r.path],onChange:c=>{this.handleCheckboxChange(r.path)},type:"checkbox"}),a?d("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},d("svg",{viewBox:"0 0 14 3",fill:"none"},d("title",null,"Checkbox dash"),d("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):d("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),d("span",null,this.formatFacetName(t)," (",r.count,")")),o&&d("div",{class:"searchcraft-facet-list",style:{paddingLeft:t!=="@@root"?"24px":"0px",paddingTop:t!=="@@root"?"6px":"0px"}},Object.keys(r.children).map(c=>{if(r.children[c])return this.renderFacet(c,r.children[c])})))}render(){if(this.fieldName&&!(Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length===0))return Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length>0?d("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):d("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[768,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],exclude:[16],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function Gs(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(e=>{switch(e){case"searchcraft-facet-list":customElements.get(e)||customElements.define(e,Do);break}})}const zo=Gs;function ot(s,e){if(s&&e)return e.fieldNames.map(t=>{let r=s[t.fieldName];if(r)switch(t.dataType){case"date":{r=No(r,t.dateFormatLocale,t.dateFormatOptions);break}case"number":{r=Intl.NumberFormat(t.numberFormatLocale,t.numberFormatOptions).format(r*(t.numberScale||1));break}}return r}).filter(t=>!!t).join(e.delimiter||" ")}function Zs(s){return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function No(s,e="en-US",t={day:"numeric",month:"long",year:"numeric"}){const r=new Date(s),n=new Date().getTime()-r.getTime(),o=30*24*60*60*1e3;if(n<o){const c=Math.trunc(n/1e3),h=Math.trunc(c/60),i=Math.trunc(h/60),l=Math.trunc(i/24),m=new Intl.RelativeTimeFormat(e,t);return l>=1?m.format(-l,"day"):i>=1?m.format(-i,"hour"):h>=1?m.format(-h,"minute"):m.format(0,"second")}return new Intl.DateTimeFormat(e,t).format(r)}function Rr(s,e,t=0){const r=new Date(s);switch(e){case"year":return new Date(r.getFullYear()+t,0,1,0,0,0,0).getTime();case"month":return new Date(r.getFullYear(),r.getMonth()+t,1,0,0,0,0).getTime();case"day":return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t,0,0,0,0).getTime();case"hour":return new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours()+t,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${e}`)}}function Ho(s,e,t){const r=new Date(e),a=new Date(t);switch(s){case"year":return Math.abs(a.getFullYear()-r.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(r.getFullYear()*12+r.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${s}`)}}const Qs=s=>{if(s>=11&&s<=13)return`${s}th`;switch(s%10){case 1:return`${s}st`;case 2:return`${s}nd`;case 3:return`${s}rd`;default:return`${s}th`}};function Uo(s,e){const t=new Intl.DateTimeFormat("en-US",{month:"short"});switch(s){case"year":return e.getFullYear().toString();case"month":return`${t.format(e)} ${e.getFullYear()}`;case"day":return`${t.format(e)} ${Qs(e.getDate())}, ${e.getFullYear()}`;case"hour":{const r=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${t.format(e)} ${Qs(e.getDate())}, ${r.format(e)}`}default:throw new Error(`Unsupported granularity: ${s}`)}}function Bo(s,e){let t=!1,r=null;const a=n=>{s(...n),t=!0,setTimeout(()=>{if(t=!1,r){const o=r;r=null,a(o)}},e)};return(...n)=>{t?r=n:a(n)}}const Vo=D(class extends O{constructor(t){super();u(this,"max",100);u(this,"min",0);u(this,"step",1);u(this,"dataType","number");u(this,"dateGranularity");u(this,"lowerBound",0);u(this,"upperBound",1);u(this,"endValue",0);u(this,"startValue",0);u(this,"lastFocusedHandle","max");u(this,"throttledEmitUpdate",()=>{});u(this,"rangeChanged");u(this,"emitUpdate",async()=>{var t,r;switch(this.dataType){case"number":(t=this.rangeChanged)==null||t.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",n=Rr(this.min,a,this.lowerBound+this.startValue),o=Rr(this.min,a,this.lowerBound+this.endValue+1);(r=this.rangeChanged)==null||r.emit({startValue:n,endValue:o});break}}});u(this,"handleStartValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,r.value=`${this.endValue}`)});u(this,"handleEndValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,r.value=`${this.startValue}`)});u(this,"getLabel",t=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const r=this.dateGranularity||"year",a=this.lowerBound+t,n=Rr(this.min,r,a);return Uo(this.dateGranularity||"year",new Date(n))}}});t!==!1&&this.__registerHost(),this.rangeChanged=we(this,"rangeChanged")}connectedCallback(){switch(this.dataType){case"number":this.startValue=this.min,this.endValue=this.max,this.lowerBound=this.min,this.upperBound=this.max;break;case"date":{this.startValue=0,this.endValue=Ho(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=Bo(this.emitUpdate,120)}render(){const t=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,r=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),n=this.getLabel(this.endValue);return d("div",{key:"d5035ed8bcbf95c0ef5b2a7a9ef471e318a9dc30",class:"searchcraft-slider"},d("div",{key:"f5f7bc48703250b4f6c75a1f07c921233bd957d5",class:"searchcraft-slider-range"},d("div",{key:"fc2ec9f9786986a7306ffe43b54c47c35a1f086a",class:"searchcraft-slider-active-range",style:{left:`${t}%`,width:`${r-t}%`}}),d("input",{key:"716316b5ce507c40db5b7bd408f47b3bece88494",class:ne("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleStartValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),d("input",{key:"e2ad0d586136185faccb50d6d7fb113a64ddac42",class:ne("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleEndValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),d("div",{key:"7e9ab9fa9563cac6a1dfdd11910e04084ae5348d",class:"searchcraft-slider-label"},d("span",{key:"0909279f460c4be84c1088c5981a5f5299e8e2a0",class:"searchcraft-slider-start-label"},a),d("span",{key:"4b610a68f97fcbc0aa1eda428dfa1e53b00efe43",class:"searchcraft-slider-end-label"},n)))}},[768,"searchcraft-slider",{max:[2],min:[2],step:[2],dataType:[1,"data-type"],dateGranularity:[1,"date-granularity"],lowerBound:[32],upperBound:[32],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function Ys(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(e=>{switch(e){case"searchcraft-slider":customElements.get(e)||customElements.define(e,Vo);break}})}const qo=D(class extends O{constructor(t){super();u(this,"label","Toggle");u(this,"subLabel");u(this,"searchcraftId");u(this,"toggleUpdated");u(this,"isActive",!1);u(this,"lastSearchTerm");u(this,"unsubscribe");u(this,"cleanupCore");u(this,"handleToggle",async()=>{var t;this.isActive=!this.isActive,(t=this.toggleUpdated)==null||t.emit(this.isActive)});t!==!1&&this.__registerHost(),this.toggleUpdated=we(this,"toggleUpdated")}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){return d("div",{key:"7dad6f4e4422a62f6403724ff16fe25e042ae2ac",class:ne("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},d("div",{key:"2faa2ee1eb5cb78dc39f523415f2be96bc23fed1"},d("p",{key:"29ea63c281b8f1ae041ba75a149ce1b60e936662",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&d("p",{key:"e51efaae5ca79eede71852e6dec8eff4575139fe",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),d("button",{key:"d590da981692db162df9b8086ba2444d6a56ef9d",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},d("div",{key:"5be6ee1dd7dc58bd67fff18923569caee37b4936",class:"searchcraft-toggle-button-handle"})))}},[768,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function Xs(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-toggle-button":customElements.get(e)||customElements.define(e,qo);break}})}const jo=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"items",[]);u(this,"responsiveBreakpoint",768);u(this,"responsiveBehavior","auto");u(this,"lastSearchTerm");u(this,"isFilterPanelVisible",!0);u(this,"core");u(this,"unsubscribe");u(this,"cleanupCore");u(this,"resizeObserver");u(this,"manuallyToggled",!1);u(this,"toggleClickHandler");u(this,"handleWindowResize",()=>{this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t,this.setInitialDateRanges(),this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize(),this.unsubscribe=t.store.subscribe((r,a)=>{if(this.lastSearchTerm=r.searchTerm||"",a.isFilterPanelVisible!==r.isFilterPanelVisible){const o=window.innerWidth>=(this.responsiveBreakpoint||768);r.isFilterPanelVisible!==o&&(this.manuallyToggled=!0),this.updateToggleElementAttributes(r.isFilterPanelVisible)}this.isFilterPanelVisible=r.isFilterPanelVisible})}componentDidLoad(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.responsiveBehavior==="auto"&&typeof window<"u"&&this.setupResizeObserver(),this.setupToggleClickHandlers(),setTimeout(()=>{if(this.core){const t=this.core.store.getState().isFilterPanelVisible;this.updateToggleElementAttributes(t)}},0)}disconnectedCallback(){var t,r,a;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.resizeObserver)==null||a.disconnect(),typeof window<"u"&&window.removeEventListener("resize",this.handleWindowResize),this.cleanupToggleClickHandlers()}setupResizeObserver(){if(typeof ResizeObserver>"u"){window.addEventListener("resize",this.handleWindowResize);return}this.resizeObserver=new ResizeObserver(()=>{this.handleWindowResize()}),this.resizeObserver.observe(document.body)}updateVisibilityBasedOnWindowSize(){if(typeof window>"u"||this.manuallyToggled)return;const r=window.innerWidth>=(this.responsiveBreakpoint||768);this.core&&this.isFilterPanelVisible!==r&&this.core.store.getState().setFilterPanelVisibility(r)}setupToggleClickHandlers(){if(typeof document>"u")return;this.toggleClickHandler=r=>{if(!(window.innerWidth>=(this.responsiveBreakpoint||768))&&(r.preventDefault(),this.core)){const n=this.core.store.getState().isFilterPanelVisible;this.core.store.getState().setFilterPanelVisibility(!n)}},document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.addEventListener("click",this.toggleClickHandler)})}updateToggleElementAttributes(t){if(typeof document>"u")return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(a=>{t?(a.removeAttribute("data-filter-panel-collapsed"),a.setAttribute("data-filter-panel-expanded","")):(a.removeAttribute("data-filter-panel-expanded"),a.setAttribute("data-filter-panel-collapsed",""))})}cleanupToggleClickHandlers(){if(typeof document>"u"||!this.toggleClickHandler)return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.removeEventListener("click",this.toggleClickHandler)})}setInitialDateRanges(){var t,r;for(const a of this.items)if(a.type==="dateRange"){const n=a,o=n.options.minDate,c=n.options.maxDate||new Date;(r=(t=this.core)==null?void 0:t.store.getState())==null||r.addRangeValueForIndexField({fieldName:n.fieldName,value:`${n.fieldName}:[${o.toISOString()} TO ${c.toISOString()}]`})}}handleDateRangeChanged(t,r,a){var c,h,i,l;const n=new Date(r),o=new Date(a);(h=(c=this.core)==null?void 0:c.store.getState())==null||h.addRangeValueForIndexField({fieldName:t.fieldName,value:`${t.fieldName}:[${n.toISOString()} TO ${o.toISOString()}]`}),(l=(i=this.core)==null?void 0:i.store.getState())==null||l.search()}handleNumericRangeChanged(t,r,a){var n,o,c,h;(o=(n=this.core)==null?void 0:n.store.getState())==null||o.addRangeValueForIndexField({fieldName:t,value:`${t}:[${r} TO ${a}]`}),(h=(c=this.core)==null?void 0:c.store.getState())==null||h.search()}handleFacetSelectionUpdated(t,r){var a,n,o,c,h,i;r.length>0?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.addFacetPathsForIndexField({fieldName:t,value:`${t}: IN [${r.join(" ")}]`}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.removeFacetPathsForIndexField(t),(i=(h=this.core)==null?void 0:h.store.getState())==null||i.search()}handleExactMatchToggleUpdated(t){var r,a,n,o;(a=(r=this.core)==null?void 0:r.store.getState())==null||a.setSearchMode(t?"exact":"fuzzy"),(o=(n=this.core)==null?void 0:n.store.getState())==null||o.search()}handleMostRecentToggleUpdated(t,r){var a,n,o,c,h,i;r?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.setSortOrder({orderByField:t,sortType:"desc"}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.setSortOrder({orderByField:null,sortType:null}),(i=(h=this.core)==null?void 0:h.store.getState())==null||i.search()}render(){return this.isFilterPanelVisible?d("div",{class:"searchcraft-filter-panel"},this.items.map(t=>{switch(t.type){case"dateRange":{const r=t,a=r.options.maxDate||new Date;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-slider",{min:r.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:r.options.granularity,onRangeChanged:n=>{this.handleDateRangeChanged(r,n.detail.startValue,n.detail.endValue)}}))}case"numericRange":{const r=t;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-slider",{min:r.options.min,max:r.options.max,step:r.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(r.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const r=t;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-facet-list",{fieldName:r.fieldName,exclude:r.options.exclude,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(r.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const r=t;return d("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const r=t;return d("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(r.fieldName,a.detail)}})}}})):null}},[768,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],responsiveBreakpoint:[2,"responsive-breakpoint"],responsiveBehavior:[1,"responsive-behavior"],lastSearchTerm:[32],isFilterPanelVisible:[32]}]);function Wo(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-filter-panel":customElements.get(e)||customElements.define(e,jo);break;case"searchcraft-facet-list":customElements.get(e)||Gs();break;case"searchcraft-slider":customElements.get(e)||Ys();break;case"searchcraft-toggle-button":customElements.get(e)||Xs();break}})}const Go=Wo,Zo=D(class extends O{constructor(t){super();u(this,"inputLabelClassName","");u(this,"label","");t!==!1&&this.__registerHost()}render(){return d("label",{key:"1008f9beb320aaa94026604b283eb65a96023265",class:ne("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[768,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function $r(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-label":customElements.get(e)||customElements.define(e,Zo);break}})}const Qo=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"autoSearch",!0);u(this,"buttonPlacement","none");u(this,"buttonLabel");u(this,"inputLabel");u(this,"placeholderValue","Enter Search");u(this,"placeholderBehavior");u(this,"value");u(this,"inputFocus");u(this,"inputBlur");u(this,"inputInit");u(this,"inputValue","");u(this,"searchTerm","");u(this,"error",!1);u(this,"core");u(this,"unsubscribe");u(this,"cleanupCore");u(this,"handleInput",t=>{var a;const r=t.target;this.inputValue=r.value,(a=this.core)==null||a.store.getState().setSearchTerm(r.value),this.autoSearch&&this.performSearch()});u(this,"performSearch",async()=>{var t;this.error=!1;try{await((t=this.core)==null?void 0:t.store.getState().search())}catch{this.error=!0}});u(this,"handleClearInput",()=>{var t;this.inputValue="",(t=this.core)==null||t.store.getState().resetSearchValues(),this.error=!1});u(this,"handleFormSubmit",async t=>{t.preventDefault(),await this.performSearch()});t!==!1&&this.__registerHost(),this.inputFocus=we(this,"inputFocus"),this.inputBlur=we(this,"inputBlur"),this.inputInit=we(this,"inputInit")}init(){var t;this.core&&(this.value!==void 0&&this.value.trim().length>0&&(this.inputValue=this.value,this.core.store.getState().setSearchTerm(this.value),this.autoSearch&&this.core.store.getState().search()),(t=this.inputInit)==null||t.emit())}onCoreChange(){this.init()}onValueChange(t){var r,a;t!==void 0&&t!==this.inputValue&&(this.inputValue=t,(r=this.core)==null||r.store.getState().setSearchTerm(t),this.autoSearch&&t.trim().length>0&&((a=this.core)==null||a.store.getState().search()))}onCoreAvailable(t){this.core=t,this.init(),this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,(this.value===void 0||r.searchTerm==="")&&(this.inputValue=r.searchTerm)})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=this.inputValue.length>0,r=ne("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),n={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return d("form",{key:"8ba91615394f95c0d5bd26a3006d3e8b454f047e",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},d("div",{key:"d9025a1c041e3132280b22e5a1b039df0196cea5",class:r,style:n},d("div",{key:"a8c3a80a0ccb718f974902fb1d163d5c3ee6194a",class:"searchcraft-input-form-button"},d("searchcraft-button",{key:"a12ff9a8cdb9a4ce3c3fd54b1c2ae084edd37069",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&d("div",{key:"866e7162c402524eaca864bb6e950a244245dc48",class:"searchcraft-input-form-label"},d("searchcraft-input-label",{key:"c57217cd5924c827df08e22a728067e3bfc63a26",label:this.inputLabel})),this.error&&d("div",{key:"4a54728bf366db50de39470cf31860a6307dafea",class:"searchcraft-input-form-error-message"},d("searchcraft-error-message",{key:"5fa5b5f5677350338d15c8e6614b0d9f584141b0"},"Something went wrong.")),d("div",{key:"67be766103a3bca11cff6f83a2a6dea7c6c6f106",class:"searchcraft-input-form-input-wrapper"},d("input",{key:"931609a4e8fc55d688077ec6cb04f2bb9b86b5fe",autoComplete:"off",class:ne("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var o;return(o=this.inputFocus)==null?void 0:o.emit()},onBlur:()=>{var o;return(o=this.inputBlur)==null?void 0:o.emit()},onInput:o=>{this.handleInput(o)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),d("div",{key:"7feb32348b7faec4104137a142ba8150149498a5",class:"searchcraft-input-form-input-icon"},d("svg",{key:"8b9abd236d4896b8dbd5c14e06019c116e3675be",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},d("title",{key:"4d3b6724f6532920f5531d2e15b28a06f0770688"},"Search icon"),d("path",{key:"65a46a1916c1f020c9bebffd42aa016b59177376",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),t&&d("button",{key:"65278eb0ab49415dce79c874adf90adcb5854db5",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},d("svg",{key:"0016263afe32250ace58cc4b98ff6106d7d9d4a0",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},d("title",{key:"9b40d806455ab9c19c0cddb4c76101debdb0266c"},"Clear icon"),d("path",{key:"2954ee1496d6736d6e780755034902c76adb81e9",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"],value:["onValueChange"]}}},[768,"searchcraft-input-form",{searchcraftId:[1,"searchcraft-id"],autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],value:[1],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"],value:["onValueChange"]}]);function Ks(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-form":customElements.get(e)||customElements.define(e,Qo);break;case"searchcraft-button":customElements.get(e)||$t();break;case"searchcraft-error-message":customElements.get(e)||Tt();break;case"searchcraft-input-label":customElements.get(e)||$r();break}})}const Yo=Ks,Xo=$r,Ko=D(class extends O{constructor(t){super();u(this,"label");t!==!1&&this.__registerHost()}render(){return d("div",{key:"5bda164202246eeb2e56bb6a25bede9931898e7a",class:"searchcraft-loading"},d("div",{key:"e33a5abc6686f9983c718a2532aa2d46902d98a2",class:"searchcraft-loading-bars"},d("div",{key:"85ff7af527b8f419c9bfd6e84331dd68772e6fdd",class:"searchcraft-loading-bar-1"}),d("div",{key:"1485d17e9262dbec6d2e5976a63149878137821c",class:"searchcraft-loading-bar-2"}),d("div",{key:"d2939b9f7bc0599df7d96db91802ebfcbf232f3e",class:"searchcraft-loading-bar-3"}),d("div",{key:"7a73bd5baf25ec789c3170e066d1333b905bfe7b",class:"searchcraft-loading-bar-4"}),d("div",{key:"b644b618766727773b21d288945c21b6ef0be958",class:"searchcraft-loading-bar-5"}),d("div",{key:"4f5123a786fc40891ca54edc538dd56f683b26ce",class:"searchcraft-loading-bar-6"})),d("p",{key:"967c1a6fb41231c8d713b78facca98e7f5a80709",class:"searchcraft-loading-label"},this.label))}},[768,"searchcraft-loading",{label:[1]}]);function Js(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-loading":customElements.get(e)||customElements.define(e,Ko);break}})}const Jo=Js,ei=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"searchTerm");u(this,"searchResultsPerPage");u(this,"searchResultsPage");u(this,"searchResultsCount");u(this,"searchClientRequestProperties");u(this,"searchResultsPagesCount",1);u(this,"searchResultsRangeMin",1);u(this,"searchResultsRangeMax",1);u(this,"setSearchResultsPage",()=>{});u(this,"unsubscribe",()=>{});u(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleGoToPage(t){this.setSearchResultsPage(t)}renderOddPaginationItem(t){return d("li",null,d("button",{class:ne("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t))}renderEvenPaginationItem(t){if(!(this.searchResultsPagesCount<=t))return(this.searchResultsPagesCount<=5||t<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=t+1:this.searchResultsPage>=t-1)?d("li",null,d("button",{class:ne("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t)):d("li",null,d("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?d("li",null,d("button",{class:ne("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):d("li",null,d("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-pagination"},d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Previous page icon"),d("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),d("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Next page icon"),d("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[768,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function ti(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-pagination":customElements.get(e)||customElements.define(e,ei);break;case"searchcraft-button":customElements.get(e)||$t();break}})}const ri=ti,si=D(class extends O{constructor(t){super();u(this,"template");u(this,"type");u(this,"searchcraftId");u(this,"hotkey");u(this,"hotkeyModifier");u(this,"hotkeyModifierSymbol");u(this,"isPopoverVisible");u(this,"userAgent");u(this,"unsubscribe",()=>{});u(this,"cleanupCore");u(this,"core");u(this,"renderOptionSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Option key"),d("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),d("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));u(this,"renderCtrlSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Ctrl key"),d("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));u(this,"renderWindowsMetaSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Windows meta key"),d("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));u(this,"renderMacMetaSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Mac meta key"),d("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));t!==!1&&this.__registerHost()}onCoreAvailable(t){this.core=t;const r=t.store.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=t.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}setUserAgent(){const t=navigator.userAgent.toLowerCase();switch(!0){case t.includes("windows"):return"window";case t.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return d("div",{class:"searchcraft-popover-button-wrapper"},d("div",{class:"searchcraft-popover-button-input"},d("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},d("title",null,"Search icon"),d("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),d("span",null,"Search")),d("div",{class:"searchcraft-popover-button-keycaps"},d("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},d("span",null,this.hotkeyModifierSymbol)),d("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},d("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return d("div",null,d("slot",null))}}render(){return d("button",{key:"4f11d81bb189a929372d9e398a0913b3b626e42c",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:nt}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[772,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function ai(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(e=>{switch(e){case"searchcraft-popover-button":customElements.get(e)||customElements.define(e,si);break}})}const ni=ai,oi=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"searchResultsCount");u(this,"unsubscribe",()=>{});u(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.searchResultsCount=t.store.getState().searchResultsCount,this.unsubscribe=t.store.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){return d("footer",{key:"5e3c0da21c63453ac705d0ea2dbb1ee5053bd527",class:"searchcraft-popover-footer"},d("p",{key:"34332a6a54af63717a6f6c36c65a321b2d18c82c",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${Zs(this.searchResultsCount)} Results Found`:" "),d("a",{key:"8cd1bd1ad4e3a91e7221c5d38650b10a66dc884e",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},d("svg",{key:"4ebaa80bc3ee8cc2643368d84158cc46ac141376",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",{key:"804857d081cf5cbd8e63af05c3479a96872d136d"},"Powered by Searchcraft"),d("path",{key:"43d4a2b110134036b8823e508f535c293fb2df0c",d:"M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z",fill:"currentColor"}))))}},[768,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],searchResultsCount:[32]}]);function ea(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(e=>{switch(e){case"searchcraft-popover-footer":customElements.get(e)||customElements.define(e,oi);break}})}const ii=ea,ci=D(class extends O{constructor(t){super();u(this,"item");u(this,"popoverResultMappings");u(this,"documentPosition",0);u(this,"searchcraftId");u(this,"title");u(this,"subtitle");u(this,"href");u(this,"imageSource");u(this,"imageAlt");u(this,"core");u(this,"cleanupCore");u(this,"handleLinkClick",()=>{var t;if(this.core){const r=this.documentPosition,a=this.core.store.getState().searchTerm,n=this.core.store.getState().searchClientResponseItems.length||0;(t=this.core.measureClient)==null||t.sendMeasureEvent("document_clicked",{document_position:r,number_of_documents:n,search_term:a})}});t!==!1&&this.__registerHost()}mapValuesFromDocument(t){var r,a,n,o,c;this.title=ot(t,(r=this.popoverResultMappings)==null?void 0:r.title),this.subtitle=ot(t,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=ot(t,(n=this.popoverResultMappings)==null?void 0:n.href),this.imageSource=ot(t,(o=this.popoverResultMappings)==null?void 0:o.imageSource),this.imageAlt=ot(t,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}onCoreAvailable(t){this.core=t}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){return d("div",{key:"d1c9c310b8abc9d2370efb802eac1edf4189519d",class:"searchcraft-popover-list-item"},d("a",{key:"30eb1a5076c5b4b95ae43147eaee0bb72ce46179",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&d("div",{key:"d18ff55823dc2c61f3786f423936af8b009aeeda",class:"searchcraft-popover-list-item-image-wrapper"},d("img",{key:"56f4cc1d472f7da05e64fcf52c560a7ad0cdf7a6",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),d("div",{key:"78a0f0235d5e71d10076b70ccbaf4b58e0d6fea0",class:"searchcraft-popover-list-item-content"},this.title&&d("p",{key:"4489047af56e5aa295cb5f036e970dcad053d3b7",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&d("p",{key:"4d177c227a1dbf1233022d738403c8eb93ba328d",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[768,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],searchcraftId:[1,"searchcraft-id"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function Tr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-item":customElements.get(e)||customElements.define(e,ci);break}})}const li=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"popoverResultMappings");u(this,"searchClientResponseItems");u(this,"adClientResponseItems");u(this,"searchResultsPage");u(this,"searchResultsPerPage");u(this,"config");u(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.config=t.config}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}renderWithADMAds(){var t,r;return d("div",{class:"searchcraft-popover-list-view"},(t=this.adClientResponseItems)==null?void 0:t.map(a=>d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+n})))}renderWithCustomAds(){var h,i,l,m,p,g,v,y;const t=[],r=((i=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((m=(l=this.config)==null?void 0:l.customAdConfig)==null?void 0:m.adInterstitialQuantity)||1,n=((g=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:g.adStartQuantity)||0,o=((y=(v=this.config)==null?void 0:v.customAdConfig)==null?void 0:y.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let x=0;x<n;x++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${x}-ad`,renderPosition:"top"}));c.forEach((x,P)=>{if(r&&P%r===0&&P+r<c.length&&P>=r)for(let S=0;S<a;S++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${x.id}-ad-${S}`,renderPosition:"interstitial"}));t.push(d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:x,key:x.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+P}))});for(let x=0;x<o;x++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${x}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-popover-list-view"},t)}renderWithNativoAds(){var i,l,m,p,g,v,y,x,P,S;const t=[],r=((l=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:l.adInterstialStartIndex)||0,a=((p=(m=this.config)==null?void 0:m.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((v=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:v.adInterstitialQuantity)||1,o=((x=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:x.adStartQuantity)||0,c=((S=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:S.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let k=0;k<o;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"top"}));h.forEach((k,T)=>{if(a&&(T+r)%a===0&&T+a<h.length&&T>=a)for(let _=0;_<n;_++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k.id}-ad-${_}`,renderPosition:"interstitial"}));t.push(d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:k,key:k.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+T}))});for(let k=0;k<c;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-popover-list-view"},t)}renderWithNoAds(){var t;return d("div",{class:"searchcraft-popover-list-view"},(t=this.searchClientResponseItems)==null?void 0:t.map((r,a)=>d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:r,key:r.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var t,r,a;return(t=this.config)!=null&&t.customAdConfig?this.renderWithCustomAds():(r=this.config)!=null&&r.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[768,"searchcraft-popover-list-view",{searchcraftId:[1,"searchcraft-id"],popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function ta(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-view":customElements.get(e)||customElements.define(e,li);break;case"searchcraft-ad":customElements.get(e)||Rt();break;case"searchcraft-popover-list-item":customElements.get(e)||Tr();break}})}const hi=D(class extends O{constructor(t){super();u(this,"type","inline");u(this,"popoverResultMappings");u(this,"hotkey","k");u(this,"hotkeyModifier","meta");u(this,"searchcraftId");u(this,"placeholderValue","Enter Search");u(this,"placeholderBehavior");u(this,"isPopoverVisibleInState",!1);u(this,"searchClientResponseItems",[]);u(this,"adClientResponseItems",[]);u(this,"searchTerm");u(this,"isFocused",!1);u(this,"breakpointSm",576);u(this,"breakpointMd",768);u(this,"breakpointLg",992);u(this,"searchResultsPage");u(this,"searchResultsPerPage");u(this,"modalElement");u(this,"unsubscribe");u(this,"cleanupCore");u(this,"core");u(this,"handleDocumentClick",t=>{this.hostElement.contains(t.target)||(this.isFocused=!1)});u(this,"handleDocumentKeyDown",t=>{var r;if(t.key===this.hotkey&&this.handleHotkeyPressed(t),!!this.hostElement.contains(document.activeElement))switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.focusOnNextListItem(t.key);break;case"Escape":(r=this.core)==null||r.store.getState().setPopoverVisibility(!1);break;default:return}});u(this,"handleInputInit",()=>{const t=this.hostElement.querySelector(".searchcraft-input-form-input");t==null||t.focus()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t;const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=t.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=t.store.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage}),t.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(t){this.isPopoverVisibleInState=t,document.body.style.overflow=t?"hidden":"auto"}handleInputFocus(){var t;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((t=this.core)==null||t.store.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),this.modalElement.setAttribute("searchcraft-id",this.searchcraftId),this.placeholderValue&&this.modalElement.setAttribute("placeholder-value",this.placeholderValue),this.placeholderBehavior&&this.modalElement.setAttribute("placeholder-behavior",this.placeholderBehavior),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(t){var r;(r=this.core)==null||r.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(t){var r;if(t.ctrlKey&&this.hotkeyModifier==="ctrl"||t.altKey&&this.hotkeyModifier==="alt"||t.metaKey&&this.hotkeyModifier==="meta")if(t.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(r=this.core)==null||r.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(t){var n,o;const r=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=r.indexOf(document.activeElement);if(t==="ArrowDown")(n=r[(a+1)%r.length])==null||n.focus();else if(t==="ArrowUp")if(a>=1)(o=r[a-1])==null||o.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var t,r;return this.searchTerm&&((r=(t=this.searchTerm)==null?void 0:t.trim())==null?void 0:r.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const t=this.hasResultsToShow&&this.isFocused;return d("div",{class:ne("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":t})},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),t&&d("div",{class:"searchcraft-popover-form-inline-wrapper"},d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderModalPopover(){if(this.isPopoverVisibleInState)return d("div",{class:ne("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},d("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),d("div",{class:"searchcraft-popover-form-modal-wrapper"},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),d("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return d("div",{class:ne("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),d("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId}))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[768,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function ra(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(e=>{switch(e){case"searchcraft-popover-form":customElements.get(e)||customElements.define(e,hi);break;case"searchcraft-ad":customElements.get(e)||Rt();break;case"searchcraft-button":customElements.get(e)||$t();break;case"searchcraft-error-message":customElements.get(e)||Tt();break;case"searchcraft-input-form":customElements.get(e)||Ks();break;case"searchcraft-input-label":customElements.get(e)||$r();break;case"searchcraft-popover-footer":customElements.get(e)||ea();break;case"searchcraft-popover-form":customElements.get(e)||ra();break;case"searchcraft-popover-list-item":customElements.get(e)||Tr();break;case"searchcraft-popover-list-view":customElements.get(e)||ta();break}})}const ui=ra,di=Tr,fi=ta,pi=D(class extends O{constructor(t){super();u(this,"template");u(this,"searchcraftId");u(this,"searchTerm");u(this,"searchResultsPage");u(this,"searchResultsPerPage");u(this,"searchResultsCount");u(this,"searchClientRequestProperties");u(this,"count",0);u(this,"range",[0,0]);u(this,"responseTime","0");u(this,"unsubscribe",()=>{});u(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";return!this.searchTerm&&!t||this.searchResultsCount===0?null:d("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:nt}):`${Zs(this.count)} results found in ${this.responseTime}ms`)}},[768,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],count:[32],range:[32],responseTime:[32]}]);function mi(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(e=>{switch(e){case"searchcraft-results-info":customElements.get(e)||customElements.define(e,pi);break}})}const gi=mi,bi=D(class extends O{constructor(t){super();u(this,"item");u(this,"index");u(this,"documentPosition",0);u(this,"template");u(this,"searchcraftId");u(this,"templateHtml");u(this,"core");u(this,"cleanupCore");u(this,"handleResultContainerClick",t=>{var h;if(!t.target)return;const a=t.target.closest("a");if(!a||!((h=this.hostElement)!=null&&h.contains(a))||!this.core||!this.core.measureClient)return;const n=this.documentPosition,o=this.core.store.getState().searchTerm,c=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:n,number_of_documents:c,search_term:o})});u(this,"handleKeyDown",()=>{});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t}connectedCallback(){var t;if(this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(t=this.template)==null?void 0:t.call(this,this.item.document,this.index,{html:nt,source_index:this.item.source_index})}catch(r){console.error("Invalid search result template:",r)}}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){if(this.item)return typeof this.template>"u"?d("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([t,r])=>d("p",{key:t},d("strong",null,t),": ",r))):d("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[768,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function sa(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-result":customElements.get(e)||customElements.define(e,bi);break}})}const vi=sa,yi=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"initialQuery");u(this,"template");u(this,"adClientResponseItems",[]);u(this,"config");u(this,"isSearchInProgress",!0);u(this,"searchClientResponseItems");u(this,"searchResultsPage");u(this,"searchResultsPerPage");u(this,"searchTerm","");u(this,"unsubscribe");u(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){var a;const r=t.store.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(a=r.core)==null?void 0:a.config,this.unsubscribe=t.store.subscribe(n=>this.handleStateChange(n))}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){var r;this.adClientResponseItems=[...t.adClientResponseItems],this.config=(r=t.core)==null?void 0:r.config,this.isSearchInProgress=t.isSearchInProgress,this.searchClientResponseItems=[...t.searchClientResponseItems],this.searchResultsPage=t.searchResultsPage,this.searchResultsPerPage=t.searchResultsPerPage,this.searchTerm=t.searchTerm}renderEmptyState(){return d("div",{class:"searchcraft-search-results-empty-state"},d("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return d("div",{class:"searchcraft-search-results"},d("div",{class:"searchcraft-search-results-error-message"},d("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var r;const t=this.searchClientResponseItems||[];return d("div",{class:"searchcraft-search-results"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),t.map((a,n)=>d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:a,template:this.template})))}renderWithCustomAds(){var h,i,l,m,p,g,v,y;const t=[],r=((i=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((m=(l=this.config)==null?void 0:l.customAdConfig)==null?void 0:m.adInterstitialQuantity)||1,n=((g=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:g.adStartQuantity)||0,o=((y=(v=this.config)==null?void 0:v.customAdConfig)==null?void 0:y.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let x=0;x<n;x++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${x}-ad`,renderPosition:"top"}));c.forEach((x,P)=>{if(r&&P%r===0&&P+r<c.length&&P>=r)for(let S=0;S<a;S++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${x.id}-ad-${S}`,renderPosition:"interstitial"}));t.push(d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:x.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+P,index:P,item:x,template:this.template}))});for(let x=0;x<o;x++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${x}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-search-results"},t)}renderWithNativoAds(){var i,l,m,p,g,v,y,x,P,S;const t=[],r=((l=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:l.adInterstialStartIndex)||0,a=((p=(m=this.config)==null?void 0:m.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((v=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:v.adInterstitialQuantity)||1,o=((x=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:x.adStartQuantity)||0,c=((S=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:S.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let k=0;k<o;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"top"}));h.forEach((k,T)=>{if(a&&(T+r)%a===0&&T+a<h.length&&T>=a)for(let _=0;_<n;_++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k.id}-ad-${_}`,renderPosition:"interstitial"}));t.push(d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:k.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+T,index:T,item:k,template:this.template}))});for(let k=0;k<c;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-search-results"},t)}renderWithNoAds(){const t=this.searchClientResponseItems||[];return d("div",{class:"searchcraft-search-results"},t.map((r,a)=>d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:r.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:r,template:this.template})))}render(){var r,a,n;const t=this.searchClientResponseItems||[];return t.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&t.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(r=this.config)!=null&&r.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(n=this.config)!=null&&n.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[772,"searchcraft-search-results",{searchcraftId:[1,"searchcraft-id"],initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function ki(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-results":customElements.get(e)||customElements.define(e,yi);break;case"searchcraft-ad":customElements.get(e)||Rt();break;case"searchcraft-error-message":customElements.get(e)||Tt();break;case"searchcraft-search-result":customElements.get(e)||sa();break}})}const Ci=ki,xi=D(class extends O{constructor(t){super();u(this,"caption");u(this,"disabled",!1);u(this,"inputId");u(this,"label");u(this,"labelId");u(this,"name");u(this,"options",[]);u(this,"selectChange");u(this,"searchResultsPerPage");u(this,"setSearchResultsPage",()=>{});u(this,"setSearchResultsPerPage",()=>{});u(this,"handleSelectChange",t=>{this.selectChange.emit(t.target.value)});t!==!1&&this.__registerHost(),this.selectChange=we(this,"selectChange")}handleGoToPage(t){this.setSearchResultsPage(t)}render(){return d("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&d("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),d("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},d("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:t,value:r,selected:a})=>d("option",{key:r,value:r,selected:a},t))),d("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),d("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&d("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[768,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function aa(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-select":customElements.get(e)||customElements.define(e,xi);break}})}const Si=D(class extends O{constructor(t){super();u(this,"increment",20);u(this,"searchcraftId");u(this,"searchTerm");u(this,"searchResultsPage");u(this,"searchResultsPerPage");u(this,"searchResultsCount");u(this,"searchResultsPagesCount");u(this,"searchClientRequestProperties");u(this,"initialSearchResultsPerPage");u(this,"setSearchResultsPerPage",()=>{});u(this,"setSearchResultsPage",()=>{});u(this,"unsubscribe",()=>{});u(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=t.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-search-results-per-page"},d("div",{class:"searchcraft-search-results-per-page-select"},d("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),d("div",{class:"searchcraft-search-results-per-page-select-input"},d("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,a)=>{const n=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${n}`,value:n}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[768,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchClientRequestProperties:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function wi(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-search-results-per-page":customElements.get(e)||customElements.define(e,Si);break;case"searchcraft-select":customElements.get(e)||aa();break}})}const Ri=wi,$i=aa,Ti=Ys;function Er(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ie=Er();function na(s){Ie=s}var it={exec:()=>null};function A(s,e=""){let t=typeof s=="string"?s:s.source;const r={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(te.caret,"$1"),t=t.replace(a,o),r},getRegex:()=>new RegExp(t,e)};return r}var te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Ei=/^(?:[ \t]*(?:\n|$))+/,Pi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ii=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ct=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ai=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Pr=/(?:[*+-]|\d{1,9}[.)])/,oa=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ia=A(oa).replace(/bull/g,Pr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_i=A(oa).replace(/bull/g,Pr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ir=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mi=/^[^\n]+/,Ar=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fi=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ar).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Li=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Pr).getRegex(),Et="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_r=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Oi=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",_r).replace("tag",Et).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ca=A(Ir).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Et).getRegex(),Di=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ca).getRegex(),Mr={blockquote:Di,code:Pi,def:Fi,fences:Ii,heading:Ai,hr:ct,html:Oi,lheading:ia,list:Li,newline:Ei,paragraph:ca,table:it,text:Mi},la=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Et).getRegex(),zi={...Mr,lheading:_i,table:la,paragraph:A(Ir).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",la).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Et).getRegex()},Ni={...Mr,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_r).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:it,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(Ir).replace("hr",ct).replace("heading",` *#{1,6} *[^
11
- ]`).replace("lheading",ia).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ui=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ha=/^( {2,}|\\)\n(?!\s*$)/,Bi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pt=/[\p{P}\p{S}]/u,Fr=/[\s\p{P}\p{S}]/u,ua=/[^\s\p{P}\p{S}]/u,Vi=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fr).getRegex(),da=/(?!~)[\p{P}\p{S}]/u,qi=/(?!~)[\s\p{P}\p{S}]/u,ji=/(?:[^\s\p{P}\p{S}]|~)/u,Wi=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,fa=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Gi=A(fa,"u").replace(/punct/g,Pt).getRegex(),Zi=A(fa,"u").replace(/punct/g,da).getRegex(),pa="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qi=A(pa,"gu").replace(/notPunctSpace/g,ua).replace(/punctSpace/g,Fr).replace(/punct/g,Pt).getRegex(),Yi=A(pa,"gu").replace(/notPunctSpace/g,ji).replace(/punctSpace/g,qi).replace(/punct/g,da).getRegex(),Xi=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ua).replace(/punctSpace/g,Fr).replace(/punct/g,Pt).getRegex(),Ki=A(/\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Ji=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ec=A(_r).replace("(?:-->|$)","-->").getRegex(),tc=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ec).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),It=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rc=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",It).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ma=A(/^!?\[(label)\]\[(ref)\]/).replace("label",It).replace("ref",Ar).getRegex(),ga=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ar).getRegex(),sc=A("reflink|nolink(?!\\()","g").replace("reflink",ma).replace("nolink",ga).getRegex(),Lr={_backpedal:it,anyPunctuation:Ki,autolink:Ji,blockSkip:Wi,br:ha,code:Ui,del:it,emStrongLDelim:Gi,emStrongRDelimAst:Qi,emStrongRDelimUnd:Xi,escape:Hi,link:rc,nolink:ga,punctuation:Vi,reflink:ma,reflinkSearch:sc,tag:tc,text:Bi,url:it},ac={...Lr,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",It).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It).getRegex()},Or={...Lr,emStrongRDelimAst:Yi,emStrongLDelim:Zi,url:A(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},nc={...Or,br:A(ha).replace("{2,}","*").getRegex(),text:A(Or.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},At={normal:Mr,gfm:zi,pedantic:Ni},lt={normal:Lr,gfm:Or,breaks:nc,pedantic:ac},oc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ba=s=>oc[s];function ue(s,e){if(e){if(te.escapeTest.test(s))return s.replace(te.escapeReplace,ba)}else if(te.escapeTestNoEncode.test(s))return s.replace(te.escapeReplaceNoEncode,ba);return s}function va(s){try{s=encodeURI(s).replace(te.percentDecode,"%")}catch{return null}return s}function ya(s,e){var n;const t=s.replace(te.findPipe,(o,c,h)=>{let i=!1,l=c;for(;--l>=0&&h[l]==="\\";)i=!i;return i?"|":" |"}),r=t.split(te.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(te.slashPipe,"|");return r}function ht(s,e,t){const r=s.length;if(r===0)return"";let a=0;for(;a<r&&s.charAt(r-a-1)===e;)a++;return s.slice(0,r-a)}function ic(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===e[0])t++;else if(s[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function ka(s,e,t,r,a){const n=e.href,o=e.title||null,c=s[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const h={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:o,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,h}function cc(s,e,t){const r=s.match(t.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.split(`
9
+ */var za;function ei(){return za||(za=1,function(s){(function(){var e={}.hasOwnProperty;function t(){for(var n="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(n=a(n,r(c)))}return n}function r(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var c in n)e.call(n,c)&&n[c]&&(o=a(o,c));return o}function a(n,o){return o?n?n+" "+o:n+o:n}s.exports?(t.default=t,s.exports=t):window.classNames=t})()}(hs)),hs.exports}var ti=ei(),be=Jo(ti);const ds="searchcraft";class ri{constructor(){d(this,"coreInstances",{});d(this,"subscriptions",{})}addCoreInstance(e,t){const r=t||ds;this.coreInstances[r]=e;for(const a of this.subscriptions[r]||[])a(e)}useCoreInstance(e,t){const r=e||ds;return this.coreInstances[r]?(t(this.coreInstances[r]),()=>{}):(this.subscriptions[r]||(this.subscriptions[r]=[]),this.subscriptions[r].push(t),()=>{this.subscriptions[r]&&(this.subscriptions[r]=this.subscriptions[r].filter(a=>a!==t))})}}const re=new ri;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Ua,setPrototypeOf:Ha,isFrozen:si,getPrototypeOf:ai,getOwnPropertyDescriptor:ni}=Object;let{freeze:ne,seal:Te,create:fs}=Object,{apply:ps,construct:ms}=typeof Reflect<"u"&&Reflect;ne||(ne=function(e){return e}),Te||(Te=function(e){return e}),ps||(ps=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),ms||(ms=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const Tr=ie(Array.prototype.forEach),oi=ie(Array.prototype.lastIndexOf),Ba=ie(Array.prototype.pop),Pt=ie(Array.prototype.push),ii=ie(Array.prototype.splice),Rr=ie(String.prototype.toLowerCase),gs=ie(String.prototype.toString),bs=ie(String.prototype.match),It=ie(String.prototype.replace),ci=ie(String.prototype.indexOf),li=ie(String.prototype.trim),Ae=ie(Object.prototype.hasOwnProperty),oe=ie(RegExp.prototype.test),Mt=ui(TypeError);function ie(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return ps(s,e,r)}}function ui(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ms(s,t)}}function I(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Rr;Ha&&Ha(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(si(e)||(e[r]=n),a=n)}s[a]=!0}return s}function hi(s){for(let e=0;e<s.length;e++)Ae(s,e)||(s[e]=null);return s}function Oe(s){const e=fs(null);for(const[t,r]of Ua(s))Ae(s,t)&&(Array.isArray(r)?e[t]=hi(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Oe(r):e[t]=r);return e}function Lt(s,e){for(;s!==null;){const r=ni(s,e);if(r){if(r.get)return ie(r.get);if(typeof r.value=="function")return ie(r.value)}s=ai(s)}function t(){return null}return t}const Va=ne(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),vs=ne(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ys=ne(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),di=ne(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cs=ne(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fi=ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qa=ne(["#text"]),Wa=ne(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ks=ne(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ga=ne(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Er=ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pi=Te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),mi=Te(/<%[\w\W]*|[\w\W]*%>/gm),gi=Te(/\$\{[\w\W]*/gm),bi=Te(/^data-[\-\w.\u00B7-\uFFFF]+$/),vi=Te(/^aria-[\-\w]+$/),ja=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yi=Te(/^(?:\w+script|data):/i),Ci=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ya=Te(/^html$/i),ki=Te(/^[a-z][.\w]*(-[.\w]+)+$/i);var Za=Object.freeze({__proto__:null,ARIA_ATTR:vi,ATTR_WHITESPACE:Ci,CUSTOM_ELEMENT:ki,DATA_ATTR:bi,DOCTYPE_NAME:Ya,ERB_EXPR:mi,IS_ALLOWED_URI:ja,IS_SCRIPT_OR_DATA:yi,MUSTACHE_EXPR:pi,TMPLIT_EXPR:gi});const Ot={element:1,text:3,progressingInstruction:7,comment:8,document:9},Si=function(){return typeof window>"u"?null:window},xi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Xa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Qa(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Si();const e=v=>Qa(v);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==Ot.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:h,NodeFilter:i,NamedNodeMap:u=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:y}=s,C=h.prototype,k=Lt(C,"cloneNode"),w=Lt(C,"remove"),L=Lt(C,"nextSibling"),T=Lt(C,"childNodes"),S=Lt(C,"parentNode");if(typeof o=="function"){const v=t.createElement("template");v.content&&v.content.ownerDocument&&(t=v.content.ownerDocument)}let x,D="";const{implementation:R,createNodeIterator:z,createDocumentFragment:q,getElementsByTagName:$e}=t,{importNode:rt}=r;let U=Xa();e.isSupported=typeof Ua=="function"&&typeof S=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:ct,TMPLIT_EXPR:lt,DATA_ATTR:Xs,ARIA_ATTR:Qs,IS_SCRIPT_OR_DATA:Ks,ATTR_WHITESPACE:Zt,CUSTOM_ELEMENT:Js}=Za;let{IS_ALLOWED_URI:Xt}=Za,O=null;const Qt=I({},[...Va,...vs,...ys,...Cs,...qa]);let F=null;const Kt=I({},[...Wa,...ks,...Ga,...Er]);let A=Object.seal(fs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,ut=null;const ve=Object.seal(fs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Jt=!0,ht=!0,er=!1,tr=!0,ye=!1,qe=!0,fe=!1,dt=!1,ft=!1,Ce=!1,We=!1,Ge=!1,rr=!0,sr=!1;const ea="user-content-";let pt=!0,Me=!1,ke={},X=null;const mt=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ar=null;const nr=I({},["audio","video","img","source","image","track"]);let gt=null;const or=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml";let Se=K,bt=!1,vt=null;const ta=I({},[je,Ye,K],gs);let Ze=I({},["mi","mo","mn","ms","mtext"]),Xe=I({},["annotation-xml"]);const ra=I({},["title","style","font","a","script"]);let Le=null;const sa=["application/xhtml+xml","text/html"],aa="text/html";let P=null,xe=null;const na=t.createElement("form"),ir=function(l){return l instanceof RegExp||l instanceof Function},yt=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(xe&&xe===l)){if((!l||typeof l!="object")&&(l={}),l=Oe(l),Le=sa.indexOf(l.PARSER_MEDIA_TYPE)===-1?aa:l.PARSER_MEDIA_TYPE,P=Le==="application/xhtml+xml"?gs:Rr,O=Ae(l,"ALLOWED_TAGS")?I({},l.ALLOWED_TAGS,P):Qt,F=Ae(l,"ALLOWED_ATTR")?I({},l.ALLOWED_ATTR,P):Kt,vt=Ae(l,"ALLOWED_NAMESPACES")?I({},l.ALLOWED_NAMESPACES,gs):ta,gt=Ae(l,"ADD_URI_SAFE_ATTR")?I(Oe(or),l.ADD_URI_SAFE_ATTR,P):or,ar=Ae(l,"ADD_DATA_URI_TAGS")?I(Oe(nr),l.ADD_DATA_URI_TAGS,P):nr,X=Ae(l,"FORBID_CONTENTS")?I({},l.FORBID_CONTENTS,P):mt,Ie=Ae(l,"FORBID_TAGS")?I({},l.FORBID_TAGS,P):Oe({}),ut=Ae(l,"FORBID_ATTR")?I({},l.FORBID_ATTR,P):Oe({}),ke=Ae(l,"USE_PROFILES")?l.USE_PROFILES:!1,Jt=l.ALLOW_ARIA_ATTR!==!1,ht=l.ALLOW_DATA_ATTR!==!1,er=l.ALLOW_UNKNOWN_PROTOCOLS||!1,tr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ye=l.SAFE_FOR_TEMPLATES||!1,qe=l.SAFE_FOR_XML!==!1,fe=l.WHOLE_DOCUMENT||!1,Ce=l.RETURN_DOM||!1,We=l.RETURN_DOM_FRAGMENT||!1,Ge=l.RETURN_TRUSTED_TYPE||!1,ft=l.FORCE_BODY||!1,rr=l.SANITIZE_DOM!==!1,sr=l.SANITIZE_NAMED_PROPS||!1,pt=l.KEEP_CONTENT!==!1,Me=l.IN_PLACE||!1,Xt=l.ALLOWED_URI_REGEXP||ja,Se=l.NAMESPACE||K,Ze=l.MATHML_TEXT_INTEGRATION_POINTS||Ze,Xe=l.HTML_INTEGRATION_POINTS||Xe,A=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&ir(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(A.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&ir(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(A.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ye&&(ht=!1),We&&(Ce=!0),ke&&(O=I({},qa),F=[],ke.html===!0&&(I(O,Va),I(F,Wa)),ke.svg===!0&&(I(O,vs),I(F,ks),I(F,Er)),ke.svgFilters===!0&&(I(O,ys),I(F,ks),I(F,Er)),ke.mathMl===!0&&(I(O,Cs),I(F,Ga),I(F,Er))),l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ve.tagCheck=l.ADD_TAGS:(O===Qt&&(O=Oe(O)),I(O,l.ADD_TAGS,P))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ve.attributeCheck=l.ADD_ATTR:(F===Kt&&(F=Oe(F)),I(F,l.ADD_ATTR,P))),l.ADD_URI_SAFE_ATTR&&I(gt,l.ADD_URI_SAFE_ATTR,P),l.FORBID_CONTENTS&&(X===mt&&(X=Oe(X)),I(X,l.FORBID_CONTENTS,P)),l.ADD_FORBID_CONTENTS&&(X===mt&&(X=Oe(X)),I(X,l.ADD_FORBID_CONTENTS,P)),pt&&(O["#text"]=!0),fe&&I(O,["html","head","body"]),O.table&&(I(O,["tbody"]),delete Ie.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=l.TRUSTED_TYPES_POLICY,D=x.createHTML("")}else x===void 0&&(x=xi(y,a)),x!==null&&typeof D=="string"&&(D=x.createHTML(""));ne&&ne(l),xe=l}},cr=I({},[...vs,...ys,...di]),lr=I({},[...Cs,...fi]),oa=function(l){let m=S(l);(!m||!m.tagName)&&(m={namespaceURI:Se,tagName:"template"});const b=Rr(l.tagName),$=Rr(m.tagName);return vt[l.namespaceURI]?l.namespaceURI===Ye?m.namespaceURI===K?b==="svg":m.namespaceURI===je?b==="svg"&&($==="annotation-xml"||Ze[$]):!!cr[b]:l.namespaceURI===je?m.namespaceURI===K?b==="math":m.namespaceURI===Ye?b==="math"&&Xe[$]:!!lr[b]:l.namespaceURI===K?m.namespaceURI===Ye&&!Xe[$]||m.namespaceURI===je&&!Ze[$]?!1:!lr[b]&&(ra[b]||!cr[b]):!!(Le==="application/xhtml+xml"&&vt[l.namespaceURI]):!1},Q=function(l){Pt(e.removed,{element:l});try{S(l).removeChild(l)}catch{w(l)}},pe=function(l,m){try{Pt(e.removed,{attribute:m.getAttributeNode(l),from:m})}catch{Pt(e.removed,{attribute:null,from:m})}if(m.removeAttribute(l),l==="is")if(Ce||We)try{Q(m)}catch{}else try{m.setAttribute(l,"")}catch{}},ur=function(l){let m=null,b=null;if(ft)l="<remove></remove>"+l;else{const _=bs(l,/^[\r\n\t ]+/);b=_&&_[0]}Le==="application/xhtml+xml"&&Se===K&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const $=x?x.createHTML(l):l;if(Se===K)try{m=new p().parseFromString($,Le)}catch{}if(!m||!m.documentElement){m=R.createDocument(Se,"template",null);try{m.documentElement.innerHTML=bt?D:$}catch{}}const H=m.body||m.documentElement;return l&&b&&H.insertBefore(t.createTextNode(b),H.childNodes[0]||null),Se===K?$e.call(m,fe?"html":"body")[0]:fe?m.documentElement:H},hr=function(l){return z.call(l.ownerDocument||l,l,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},Ct=function(l){return l instanceof g&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof u)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},dr=function(l){return typeof c=="function"&&l instanceof c};function J(v,l,m){Tr(v,b=>{b.call(e,l,m,xe)})}const fr=function(l){let m=null;if(J(U.beforeSanitizeElements,l,null),Ct(l))return Q(l),!0;const b=P(l.nodeName);if(J(U.uponSanitizeElement,l,{tagName:b,allowedTags:O}),qe&&l.hasChildNodes()&&!dr(l.firstElementChild)&&oe(/<[/\w!]/g,l.innerHTML)&&oe(/<[/\w!]/g,l.textContent)||l.nodeType===Ot.progressingInstruction||qe&&l.nodeType===Ot.comment&&oe(/<[/\w]/g,l.data))return Q(l),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(b))&&(!O[b]||Ie[b])){if(!Ie[b]&&mr(b)&&(A.tagNameCheck instanceof RegExp&&oe(A.tagNameCheck,b)||A.tagNameCheck instanceof Function&&A.tagNameCheck(b)))return!1;if(pt&&!X[b]){const $=S(l)||l.parentNode,H=T(l)||l.childNodes;if(H&&$){const _=H.length;for(let V=_-1;V>=0;--V){const ee=k(H[V],!0);ee.__removalCount=(l.__removalCount||0)+1,$.insertBefore(ee,L(l))}}}return Q(l),!0}return l instanceof h&&!oa(l)||(b==="noscript"||b==="noembed"||b==="noframes")&&oe(/<\/no(script|embed|frames)/i,l.innerHTML)?(Q(l),!0):(ye&&l.nodeType===Ot.text&&(m=l.textContent,Tr([ze,ct,lt],$=>{m=It(m,$," ")}),l.textContent!==m&&(Pt(e.removed,{element:l.cloneNode()}),l.textContent=m)),J(U.afterSanitizeElements,l,null),!1)},pr=function(l,m,b){if(rr&&(m==="id"||m==="name")&&(b in t||b in na))return!1;if(!(ht&&!ut[m]&&oe(Xs,m))){if(!(Jt&&oe(Qs,m))){if(!(ve.attributeCheck instanceof Function&&ve.attributeCheck(m,l))){if(!F[m]||ut[m]){if(!(mr(l)&&(A.tagNameCheck instanceof RegExp&&oe(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l))&&(A.attributeNameCheck instanceof RegExp&&oe(A.attributeNameCheck,m)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(m,l))||m==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&oe(A.tagNameCheck,b)||A.tagNameCheck instanceof Function&&A.tagNameCheck(b))))return!1}else if(!gt[m]){if(!oe(Xt,It(b,Zt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&l!=="script"&&ci(b,"data:")===0&&ar[l])){if(!(er&&!oe(Ks,It(b,Zt,"")))){if(b)return!1}}}}}}}return!0},mr=function(l){return l!=="annotation-xml"&&bs(l,Js)},gr=function(l){J(U.beforeSanitizeAttributes,l,null);const{attributes:m}=l;if(!m||Ct(l))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let $=m.length;for(;$--;){const H=m[$],{name:_,namespaceURI:V,value:ee}=H,we=P(_),kt=ee;let N=_==="value"?kt:li(kt);if(b.attrName=we,b.attrValue=N,b.keepAttr=!0,b.forceKeepAttr=void 0,J(U.uponSanitizeAttribute,l,b),N=b.attrValue,sr&&(we==="id"||we==="name")&&(pe(_,l),N=ea+N),qe&&oe(/((--!?|])>)|<\/(style|title|textarea)/i,N)){pe(_,l);continue}if(we==="attributename"&&bs(N,"href")){pe(_,l);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){pe(_,l);continue}if(!tr&&oe(/\/>/i,N)){pe(_,l);continue}ye&&Tr([ze,ct,lt],vr=>{N=It(N,vr," ")});const br=P(l.nodeName);if(!pr(br,we,N)){pe(_,l);continue}if(x&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!V)switch(y.getAttributeType(br,we)){case"TrustedHTML":{N=x.createHTML(N);break}case"TrustedScriptURL":{N=x.createScriptURL(N);break}}if(N!==kt)try{V?l.setAttributeNS(V,_,N):l.setAttribute(_,N),Ct(l)?Q(l):Ba(e.removed)}catch{pe(_,l)}}J(U.afterSanitizeAttributes,l,null)},ia=function v(l){let m=null;const b=hr(l);for(J(U.beforeSanitizeShadowDOM,l,null);m=b.nextNode();)J(U.uponSanitizeShadowNode,m,null),fr(m),gr(m),m.content instanceof n&&v(m.content);J(U.afterSanitizeShadowDOM,l,null)};return e.sanitize=function(v){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,$=null,H=null;if(bt=!v,bt&&(v="<!-->"),typeof v!="string"&&!dr(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw Mt("dirty is not a string, aborting")}else throw Mt("toString is not a function");if(!e.isSupported)return v;if(dt||yt(l),e.removed=[],typeof v=="string"&&(Me=!1),Me){if(v.nodeName){const ee=P(v.nodeName);if(!O[ee]||Ie[ee])throw Mt("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof c)m=ur("<!---->"),b=m.ownerDocument.importNode(v,!0),b.nodeType===Ot.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!Ce&&!ye&&!fe&&v.indexOf("<")===-1)return x&&Ge?x.createHTML(v):v;if(m=ur(v),!m)return Ce?null:Ge?D:""}m&&ft&&Q(m.firstChild);const _=hr(Me?v:m);for(;$=_.nextNode();)fr($),gr($),$.content instanceof n&&ia($.content);if(Me)return v;if(Ce){if(We)for(H=q.call(m.ownerDocument);m.firstChild;)H.appendChild(m.firstChild);else H=m;return(F.shadowroot||F.shadowrootmode)&&(H=rt.call(r,H,!0)),H}let V=fe?m.outerHTML:m.innerHTML;return fe&&O["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&oe(Ya,m.ownerDocument.doctype.name)&&(V="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
10
+ `+V),ye&&Tr([ze,ct,lt],ee=>{V=It(V,ee," ")}),x&&Ge?x.createHTML(V):V},e.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yt(v),dt=!0},e.clearConfig=function(){xe=null,dt=!1},e.isValidAttribute=function(v,l,m){xe||yt({});const b=P(v),$=P(l);return pr(b,$,m)},e.addHook=function(v,l){typeof l=="function"&&Pt(U[v],l)},e.removeHook=function(v,l){if(l!==void 0){const m=oi(U[v],l);return m===-1?void 0:ii(U[v],m,1)[0]}return Ba(U[v])},e.removeHooks=function(v){U[v]=[]},e.removeAllHooks=function(){U=Xa()},e}var Ka=Qa();const Dt=(s,...e)=>{let t=s[0];for(let r=0;r<e.length;r++)t+=Ka.sanitize(e[r]?String(e[r]):"")+s[r+1];return t||""},wi="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let at=(s=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(s|=0));for(;s--;)e+=wi[t[s]&63];return e};const Ti=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"adSource","Custom");d(this,"adClientResponseItem");d(this,"renderPosition","interstitial");d(this,"searchTerm");d(this,"isSearchInProgress",!1);d(this,"searchResultCount",0);d(this,"core");d(this,"intersectionObserver");d(this,"storeUnsubscribe");d(this,"cleanupCore");d(this,"adContainerRenderedTimeout");d(this,"isComponentConnected",!1);d(this,"timeTaken");d(this,"adContainerId","");t!==!1&&this.__registerHost()}get hostElement(){return this}handleAdRendered(){var t,r,a;this.adContainerId=at(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var n;(n=this.core)==null||n.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(r=(t=this.core)==null?void 0:t.config)==null?void 0:r.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var t;(t=this.core)==null||t.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(t){const r=t.searchClientRequestProperties;r&&typeof r=="object"&&(this.searchTerm=r.searchTerm),this.searchResultCount=t.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(t){const r=t.store.getState();this.isComponentConnected=!0,this.core=r.core,this.isSearchInProgress=r.isSearchInProgress,this.searchResultCount=r.searchClientResponseItems.length,this.timeTaken=r.searchResponseTimeTaken;const a=r.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(r),this.storeUnsubscribe=t.store.subscribe(n=>{this.timeTaken!==n.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(n),this.timeTaken=n.searchResponseTimeTaken,this.isSearchInProgress=n.isSearchInProgress})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{r!=null&&r.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var t,r,a;(t=this.storeUnsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,n,o,c,h;const t=this.adClientResponseItem;if(!t.admAd)return;let r="<p>Ad Marketplace Ad Placeholder</p>";return(o=(n=(a=this.core)==null?void 0:a.config)==null?void 0:n.admAdConfig)!=null&&o.template&&(r=(h=(c=this.core)==null?void 0:c.config)==null?void 0:h.admAdConfig.template(t.admAd,{html:Dt})),f("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:r})}renderCustomAd(){var n,o,c;const t=(c=(o=(n=this.core)==null?void 0:n.config)==null?void 0:o.customAdConfig)==null?void 0:c.template,r=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return t&&(a=t({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Dt})),f("div",{class:"searchcraft-ad searchcraft-custom-ad",id:r,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var r,a;const t=((a=(r=this.core)==null?void 0:r.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return f("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:be("searchcraft-ad",t),"data-searchcraft-ad-container-id":this.adContainerId})}render(){if(this.searchResultCount!==0)switch(this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[768,"searchcraft-ad",{searchcraftId:[1,"searchcraft-id"],adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function $r(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(e=>{switch(e){case"searchcraft-ad":customElements.get(e)||customElements.define(e,Ti);break}})}const Ri=$r,Ei=Y(class extends j{constructor(t){super();d(this,"hierarchy","primary");d(this,"disabled",!1);d(this,"icon");d(this,"iconOnly",!1);d(this,"iconPosition","left");d(this,"label","Search");d(this,"type","button");d(this,"buttonClick");d(this,"handleButtonClick",()=>{this.buttonClick.emit()});t!==!1&&this.__registerHost(),this.buttonClick=Ke(this,"buttonClick")}render(){return f("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:be("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:f(Ko,null,this.iconPosition==="left"&&this.icon,f("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[768,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function Ar(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-button":customElements.get(e)||customElements.define(e,Ei);break}})}const $i=Ar,Ai=Y(class extends j{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return f("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},f("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[260,"searchcraft-error-message"]);function _r(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(e=>{switch(e){case"searchcraft-error-message":customElements.get(e)||customElements.define(e,Ai);break}})}const _i=_r;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Ja,setPrototypeOf:en,isFrozen:Pi,getPrototypeOf:Ii,getOwnPropertyDescriptor:Mi}=Object;let{freeze:ce,seal:Re,create:Ss}=Object,{apply:xs,construct:ws}=typeof Reflect<"u"&&Reflect;ce||(ce=function(e){return e}),Re||(Re=function(e){return e}),xs||(xs=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),ws||(ws=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const Pr=ue(Array.prototype.forEach),Li=ue(Array.prototype.lastIndexOf),tn=ue(Array.prototype.pop),Ft=ue(Array.prototype.push),Oi=ue(Array.prototype.splice),Ir=ue(String.prototype.toLowerCase),Ts=ue(String.prototype.toString),Rs=ue(String.prototype.match),Nt=ue(String.prototype.replace),Di=ue(String.prototype.indexOf),Fi=ue(String.prototype.trim),_e=ue(Object.prototype.hasOwnProperty),le=ue(RegExp.prototype.test),zt=Ni(TypeError);function ue(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return xs(s,e,r)}}function Ni(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ws(s,t)}}function M(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ir;en&&en(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(Pi(e)||(e[r]=n),a=n)}s[a]=!0}return s}function zi(s){for(let e=0;e<s.length;e++)_e(s,e)||(s[e]=null);return s}function De(s){const e=Ss(null);for(const[t,r]of Ja(s))_e(s,t)&&(Array.isArray(r)?e[t]=zi(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=De(r):e[t]=r);return e}function Ut(s,e){for(;s!==null;){const r=Mi(s,e);if(r){if(r.get)return ue(r.get);if(typeof r.value=="function")return ue(r.value)}s=Ii(s)}function t(){return null}return t}const rn=ce(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Es=ce(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$s=ce(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ui=ce(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),As=ce(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Hi=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sn=ce(["#text"]),an=ce(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),_s=ce(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),nn=ce(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mr=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Bi=Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vi=Re(/<%[\w\W]*|[\w\W]*%>/gm),qi=Re(/\$\{[\w\W]*/gm),Wi=Re(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gi=Re(/^aria-[\-\w]+$/),on=Re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ji=Re(/^(?:\w+script|data):/i),Yi=Re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cn=Re(/^html$/i),Zi=Re(/^[a-z][.\w]*(-[.\w]+)+$/i);var ln=Object.freeze({__proto__:null,ARIA_ATTR:Gi,ATTR_WHITESPACE:Yi,CUSTOM_ELEMENT:Zi,DATA_ATTR:Wi,DOCTYPE_NAME:cn,ERB_EXPR:Vi,IS_ALLOWED_URI:on,IS_SCRIPT_OR_DATA:ji,MUSTACHE_EXPR:Bi,TMPLIT_EXPR:qi});const Ht={element:1,text:3,progressingInstruction:7,comment:8,document:9},Xi=function(){return typeof window>"u"?null:window},Qi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},un=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hn(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xi();const e=v=>hn(v);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==Ht.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:h,NodeFilter:i,NamedNodeMap:u=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:y}=s,C=h.prototype,k=Ut(C,"cloneNode"),w=Ut(C,"remove"),L=Ut(C,"nextSibling"),T=Ut(C,"childNodes"),S=Ut(C,"parentNode");if(typeof o=="function"){const v=t.createElement("template");v.content&&v.content.ownerDocument&&(t=v.content.ownerDocument)}let x,D="";const{implementation:R,createNodeIterator:z,createDocumentFragment:q,getElementsByTagName:$e}=t,{importNode:rt}=r;let U=un();e.isSupported=typeof Ja=="function"&&typeof S=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:ct,TMPLIT_EXPR:lt,DATA_ATTR:Xs,ARIA_ATTR:Qs,IS_SCRIPT_OR_DATA:Ks,ATTR_WHITESPACE:Zt,CUSTOM_ELEMENT:Js}=ln;let{IS_ALLOWED_URI:Xt}=ln,O=null;const Qt=M({},[...rn,...Es,...$s,...As,...sn]);let F=null;const Kt=M({},[...an,..._s,...nn,...Mr]);let A=Object.seal(Ss(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,ut=null;const ve=Object.seal(Ss(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Jt=!0,ht=!0,er=!1,tr=!0,ye=!1,qe=!0,fe=!1,dt=!1,ft=!1,Ce=!1,We=!1,Ge=!1,rr=!0,sr=!1;const ea="user-content-";let pt=!0,Me=!1,ke={},X=null;const mt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ar=null;const nr=M({},["audio","video","img","source","image","track"]);let gt=null;const or=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml";let Se=K,bt=!1,vt=null;const ta=M({},[je,Ye,K],Ts);let Ze=M({},["mi","mo","mn","ms","mtext"]),Xe=M({},["annotation-xml"]);const ra=M({},["title","style","font","a","script"]);let Le=null;const sa=["application/xhtml+xml","text/html"],aa="text/html";let P=null,xe=null;const na=t.createElement("form"),ir=function(l){return l instanceof RegExp||l instanceof Function},yt=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(xe&&xe===l)){if((!l||typeof l!="object")&&(l={}),l=De(l),Le=sa.indexOf(l.PARSER_MEDIA_TYPE)===-1?aa:l.PARSER_MEDIA_TYPE,P=Le==="application/xhtml+xml"?Ts:Ir,O=_e(l,"ALLOWED_TAGS")?M({},l.ALLOWED_TAGS,P):Qt,F=_e(l,"ALLOWED_ATTR")?M({},l.ALLOWED_ATTR,P):Kt,vt=_e(l,"ALLOWED_NAMESPACES")?M({},l.ALLOWED_NAMESPACES,Ts):ta,gt=_e(l,"ADD_URI_SAFE_ATTR")?M(De(or),l.ADD_URI_SAFE_ATTR,P):or,ar=_e(l,"ADD_DATA_URI_TAGS")?M(De(nr),l.ADD_DATA_URI_TAGS,P):nr,X=_e(l,"FORBID_CONTENTS")?M({},l.FORBID_CONTENTS,P):mt,Ie=_e(l,"FORBID_TAGS")?M({},l.FORBID_TAGS,P):De({}),ut=_e(l,"FORBID_ATTR")?M({},l.FORBID_ATTR,P):De({}),ke=_e(l,"USE_PROFILES")?l.USE_PROFILES:!1,Jt=l.ALLOW_ARIA_ATTR!==!1,ht=l.ALLOW_DATA_ATTR!==!1,er=l.ALLOW_UNKNOWN_PROTOCOLS||!1,tr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ye=l.SAFE_FOR_TEMPLATES||!1,qe=l.SAFE_FOR_XML!==!1,fe=l.WHOLE_DOCUMENT||!1,Ce=l.RETURN_DOM||!1,We=l.RETURN_DOM_FRAGMENT||!1,Ge=l.RETURN_TRUSTED_TYPE||!1,ft=l.FORCE_BODY||!1,rr=l.SANITIZE_DOM!==!1,sr=l.SANITIZE_NAMED_PROPS||!1,pt=l.KEEP_CONTENT!==!1,Me=l.IN_PLACE||!1,Xt=l.ALLOWED_URI_REGEXP||on,Se=l.NAMESPACE||K,Ze=l.MATHML_TEXT_INTEGRATION_POINTS||Ze,Xe=l.HTML_INTEGRATION_POINTS||Xe,A=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&ir(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(A.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&ir(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(A.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ye&&(ht=!1),We&&(Ce=!0),ke&&(O=M({},sn),F=[],ke.html===!0&&(M(O,rn),M(F,an)),ke.svg===!0&&(M(O,Es),M(F,_s),M(F,Mr)),ke.svgFilters===!0&&(M(O,$s),M(F,_s),M(F,Mr)),ke.mathMl===!0&&(M(O,As),M(F,nn),M(F,Mr))),l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ve.tagCheck=l.ADD_TAGS:(O===Qt&&(O=De(O)),M(O,l.ADD_TAGS,P))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ve.attributeCheck=l.ADD_ATTR:(F===Kt&&(F=De(F)),M(F,l.ADD_ATTR,P))),l.ADD_URI_SAFE_ATTR&&M(gt,l.ADD_URI_SAFE_ATTR,P),l.FORBID_CONTENTS&&(X===mt&&(X=De(X)),M(X,l.FORBID_CONTENTS,P)),l.ADD_FORBID_CONTENTS&&(X===mt&&(X=De(X)),M(X,l.ADD_FORBID_CONTENTS,P)),pt&&(O["#text"]=!0),fe&&M(O,["html","head","body"]),O.table&&(M(O,["tbody"]),delete Ie.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=l.TRUSTED_TYPES_POLICY,D=x.createHTML("")}else x===void 0&&(x=Qi(y,a)),x!==null&&typeof D=="string"&&(D=x.createHTML(""));ce&&ce(l),xe=l}},cr=M({},[...Es,...$s,...Ui]),lr=M({},[...As,...Hi]),oa=function(l){let m=S(l);(!m||!m.tagName)&&(m={namespaceURI:Se,tagName:"template"});const b=Ir(l.tagName),$=Ir(m.tagName);return vt[l.namespaceURI]?l.namespaceURI===Ye?m.namespaceURI===K?b==="svg":m.namespaceURI===je?b==="svg"&&($==="annotation-xml"||Ze[$]):!!cr[b]:l.namespaceURI===je?m.namespaceURI===K?b==="math":m.namespaceURI===Ye?b==="math"&&Xe[$]:!!lr[b]:l.namespaceURI===K?m.namespaceURI===Ye&&!Xe[$]||m.namespaceURI===je&&!Ze[$]?!1:!lr[b]&&(ra[b]||!cr[b]):!!(Le==="application/xhtml+xml"&&vt[l.namespaceURI]):!1},Q=function(l){Ft(e.removed,{element:l});try{S(l).removeChild(l)}catch{w(l)}},pe=function(l,m){try{Ft(e.removed,{attribute:m.getAttributeNode(l),from:m})}catch{Ft(e.removed,{attribute:null,from:m})}if(m.removeAttribute(l),l==="is")if(Ce||We)try{Q(m)}catch{}else try{m.setAttribute(l,"")}catch{}},ur=function(l){let m=null,b=null;if(ft)l="<remove></remove>"+l;else{const _=Rs(l,/^[\r\n\t ]+/);b=_&&_[0]}Le==="application/xhtml+xml"&&Se===K&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const $=x?x.createHTML(l):l;if(Se===K)try{m=new p().parseFromString($,Le)}catch{}if(!m||!m.documentElement){m=R.createDocument(Se,"template",null);try{m.documentElement.innerHTML=bt?D:$}catch{}}const H=m.body||m.documentElement;return l&&b&&H.insertBefore(t.createTextNode(b),H.childNodes[0]||null),Se===K?$e.call(m,fe?"html":"body")[0]:fe?m.documentElement:H},hr=function(l){return z.call(l.ownerDocument||l,l,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},Ct=function(l){return l instanceof g&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof u)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},dr=function(l){return typeof c=="function"&&l instanceof c};function J(v,l,m){Pr(v,b=>{b.call(e,l,m,xe)})}const fr=function(l){let m=null;if(J(U.beforeSanitizeElements,l,null),Ct(l))return Q(l),!0;const b=P(l.nodeName);if(J(U.uponSanitizeElement,l,{tagName:b,allowedTags:O}),qe&&l.hasChildNodes()&&!dr(l.firstElementChild)&&le(/<[/\w!]/g,l.innerHTML)&&le(/<[/\w!]/g,l.textContent)||l.nodeType===Ht.progressingInstruction||qe&&l.nodeType===Ht.comment&&le(/<[/\w]/g,l.data))return Q(l),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(b))&&(!O[b]||Ie[b])){if(!Ie[b]&&mr(b)&&(A.tagNameCheck instanceof RegExp&&le(A.tagNameCheck,b)||A.tagNameCheck instanceof Function&&A.tagNameCheck(b)))return!1;if(pt&&!X[b]){const $=S(l)||l.parentNode,H=T(l)||l.childNodes;if(H&&$){const _=H.length;for(let V=_-1;V>=0;--V){const ee=k(H[V],!0);ee.__removalCount=(l.__removalCount||0)+1,$.insertBefore(ee,L(l))}}}return Q(l),!0}return l instanceof h&&!oa(l)||(b==="noscript"||b==="noembed"||b==="noframes")&&le(/<\/no(script|embed|frames)/i,l.innerHTML)?(Q(l),!0):(ye&&l.nodeType===Ht.text&&(m=l.textContent,Pr([ze,ct,lt],$=>{m=Nt(m,$," ")}),l.textContent!==m&&(Ft(e.removed,{element:l.cloneNode()}),l.textContent=m)),J(U.afterSanitizeElements,l,null),!1)},pr=function(l,m,b){if(rr&&(m==="id"||m==="name")&&(b in t||b in na))return!1;if(!(ht&&!ut[m]&&le(Xs,m))){if(!(Jt&&le(Qs,m))){if(!(ve.attributeCheck instanceof Function&&ve.attributeCheck(m,l))){if(!F[m]||ut[m]){if(!(mr(l)&&(A.tagNameCheck instanceof RegExp&&le(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l))&&(A.attributeNameCheck instanceof RegExp&&le(A.attributeNameCheck,m)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(m,l))||m==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&le(A.tagNameCheck,b)||A.tagNameCheck instanceof Function&&A.tagNameCheck(b))))return!1}else if(!gt[m]){if(!le(Xt,Nt(b,Zt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&l!=="script"&&Di(b,"data:")===0&&ar[l])){if(!(er&&!le(Ks,Nt(b,Zt,"")))){if(b)return!1}}}}}}}return!0},mr=function(l){return l!=="annotation-xml"&&Rs(l,Js)},gr=function(l){J(U.beforeSanitizeAttributes,l,null);const{attributes:m}=l;if(!m||Ct(l))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let $=m.length;for(;$--;){const H=m[$],{name:_,namespaceURI:V,value:ee}=H,we=P(_),kt=ee;let N=_==="value"?kt:Fi(kt);if(b.attrName=we,b.attrValue=N,b.keepAttr=!0,b.forceKeepAttr=void 0,J(U.uponSanitizeAttribute,l,b),N=b.attrValue,sr&&(we==="id"||we==="name")&&(pe(_,l),N=ea+N),qe&&le(/((--!?|])>)|<\/(style|title|textarea)/i,N)){pe(_,l);continue}if(we==="attributename"&&Rs(N,"href")){pe(_,l);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){pe(_,l);continue}if(!tr&&le(/\/>/i,N)){pe(_,l);continue}ye&&Pr([ze,ct,lt],vr=>{N=Nt(N,vr," ")});const br=P(l.nodeName);if(!pr(br,we,N)){pe(_,l);continue}if(x&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!V)switch(y.getAttributeType(br,we)){case"TrustedHTML":{N=x.createHTML(N);break}case"TrustedScriptURL":{N=x.createScriptURL(N);break}}if(N!==kt)try{V?l.setAttributeNS(V,_,N):l.setAttribute(_,N),Ct(l)?Q(l):tn(e.removed)}catch{pe(_,l)}}J(U.afterSanitizeAttributes,l,null)},ia=function v(l){let m=null;const b=hr(l);for(J(U.beforeSanitizeShadowDOM,l,null);m=b.nextNode();)J(U.uponSanitizeShadowNode,m,null),fr(m),gr(m),m.content instanceof n&&v(m.content);J(U.afterSanitizeShadowDOM,l,null)};return e.sanitize=function(v){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,$=null,H=null;if(bt=!v,bt&&(v="<!-->"),typeof v!="string"&&!dr(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw zt("dirty is not a string, aborting")}else throw zt("toString is not a function");if(!e.isSupported)return v;if(dt||yt(l),e.removed=[],typeof v=="string"&&(Me=!1),Me){if(v.nodeName){const ee=P(v.nodeName);if(!O[ee]||Ie[ee])throw zt("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof c)m=ur("<!---->"),b=m.ownerDocument.importNode(v,!0),b.nodeType===Ht.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!Ce&&!ye&&!fe&&v.indexOf("<")===-1)return x&&Ge?x.createHTML(v):v;if(m=ur(v),!m)return Ce?null:Ge?D:""}m&&ft&&Q(m.firstChild);const _=hr(Me?v:m);for(;$=_.nextNode();)fr($),gr($),$.content instanceof n&&ia($.content);if(Me)return v;if(Ce){if(We)for(H=q.call(m.ownerDocument);m.firstChild;)H.appendChild(m.firstChild);else H=m;return(F.shadowroot||F.shadowrootmode)&&(H=rt.call(r,H,!0)),H}let V=fe?m.outerHTML:m.innerHTML;return fe&&O["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&le(cn,m.ownerDocument.doctype.name)&&(V="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
11
+ `+V),ye&&Pr([ze,ct,lt],ee=>{V=Nt(V,ee," ")}),x&&Ge?x.createHTML(V):V},e.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yt(v),dt=!0},e.clearConfig=function(){xe=null,dt=!1},e.isValidAttribute=function(v,l,m){xe||yt({});const b=P(v),$=P(l);return pr(b,$,m)},e.addHook=function(v,l){typeof l=="function"&&Ft(U[v],l)},e.removeHook=function(v,l){if(l!==void 0){const m=Li(U[v],l);return m===-1?void 0:Oi(U[v],m,1)[0]}return tn(U[v])},e.removeHooks=function(v){U[v]=[]},e.removeAllHooks=function(){U=un()},e}hn();const dn=(s,e)=>{let t=s;for(const r of e)t=t==null?void 0:t.children[r];return t},Ps=(s,e)=>{const t={...s};for(const r in e)e.hasOwnProperty(r)&&(e[r]instanceof Object&&s[r]instanceof Object?t[r]=Ps(s[r],e[r]):t[r]=e[r]);return t};function Ki(s){return s.filter((e,t,r)=>!r.some((a,n)=>n!==t&&a.includes(e)))}const fn=(s,e)=>{const t=structuredClone(s),r=(a,n)=>{var h;const o=structuredClone(a),c=dn(e,n);if(!c)return o;for(const i of Object.keys(a.children))c.children[i]?o.children[i]={...Ps(a.children[i],c.children[i]),count:((h=o.children[i])==null?void 0:h.count)||0}:o.children[i]&&(o.children[i]=r(o.children[i],[...n,i]));return o};return r(t,[])},Is=(s,e)=>{const t={path:"/",count:0,children:{}},r=[],a=n=>{if(n.path!=="/"&&r.push({path:n.path,count:n.count}),n.children)for(const o of n.children)a(o)};a(s);for(const{path:n,count:o}of r){const c=n.split("/").filter(Boolean);if(e&&e.length>0){let i=!1;for(const u of e)if(u.startsWith("/")){if(n===u||n.startsWith(`${u}/`)){i=!0;break}}else if(c.includes(u)){i=!0;break}if(i)continue}let h=t;for(const i of c){const u=h.path==="/"?`/${i}`:`${h.path}/${i}`;h.children[i]||(h.children[i]={path:u,count:o,children:{}}),h=h.children[i]}h.count=o}return t},Ji=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"fieldName","");d(this,"exclude");d(this,"initialCollapseState","open");d(this,"viewMoreThreshold",8);d(this,"facetSelectionUpdated");d(this,"selectedPaths",{});d(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});d(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});d(this,"renderedFacetTree",{path:"/",count:0,children:{}});d(this,"isCollapsed",!1);d(this,"showAllFacets",!1);d(this,"lastTimeTaken");d(this,"lastSearchTerm");d(this,"lastSearchMode");d(this,"lastSortType");d(this,"lastRangeValues");d(this,"lastFacetValues");d(this,"unsubscribe");d(this,"cleanupCore");d(this,"formatFacetName",t=>`${t.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);d(this,"handleViewMoreToggle",()=>{this.showAllFacets=!this.showAllFacets});t!==!1&&this.__registerHost(),this.facetSelectionUpdated=Ke(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(t=>this.selectedPaths[t])}handleIncomingSearchResponse(t,r){var h,i,u;const a=(h=t.searchResponseFacetPrime)==null?void 0:h.find(g=>this.fieldName===Object.keys(g)[0]),n=a==null?void 0:a[this.fieldName],o=Is({path:"/",count:0,children:n||[]},this.exclude);switch(r){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=o;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(t.supplementalFacetPrime){const g=(i=t.supplementalFacetPrime)==null?void 0:i.find(C=>this.fieldName===Object.keys(C)[0]),p=g==null?void 0:g[this.fieldName],y=Is({path:"/",count:0,children:p||[]},this.exclude);this.facetTreeCollectedFromSearchResponse=fn(y,o)}else this.facetTreeCollectedFromSearchResponse=o;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=fn(this.facetTreeCollectedFromSearchResponse,o);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const c={path:"/",count:0,children:[]};for(const g of Object.keys(this.selectedPaths).filter(p=>this.selectedPaths[p])){const p=g.startsWith("/")?g.substring(1).split("/"):g.split("/"),y=!!dn(this.facetTreeCollectedFromSearchResponse,p),C=p.at(-1);!y&&C&&((u=c.children)==null||u.push({children:[],count:0,path:g}))}this.facetTreeFromFacetPathsNotInSearchResponse=Is(c,this.exclude),this.renderedFacetTree=Ps(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(t){const r={...t},a=typeof r.searchClientRequestProperties=="string"&&r.searchTerm.trim()==="";if(r.searchTerm.trim()===""&&!a)this.handleIncomingSearchResponse(r,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==r.searchResponseTimeTaken&&r.searchClientRequestProperties){if(typeof r.searchClientRequestProperties=="object"){const n=r.searchClientRequestProperties;let o="UNKNOWN";this.lastSearchTerm!==n.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(n.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(n.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==n.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==n.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(n.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(n.facetPathsForIndexFields),this.lastSortType=n.order_by,this.lastSearchMode=n.mode,this.lastSearchTerm=n.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,o)}else if(typeof r.searchClientRequestProperties=="string"){let n="NEW_SEARCH_TERM";const o=JSON.parse(r.searchClientRequestProperties),h=(Array.isArray(o.query)?o.query:[o.query]).filter(u=>u.occur==="must"),i=JSON.stringify(h);this.lastFacetValues!==void 0&&this.lastFacetValues!==i?n="FACET_UPDATE":r.searchTerm.trim()===""&&this.lastSearchTerm===""?n="NEW_SEARCH_TERM":this.lastSearchTerm!==r.searchTerm&&(this.areAnyFacetPathsSelected?n="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":n="NEW_SEARCH_TERM"),this.lastFacetValues=i,this.lastSearchTerm=r.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,n)}}}onCoreAvailable(t){this.handleStateUpdate(t.store.getState()),this.unsubscribe=t.store.subscribe(r=>{this.handleStateUpdate(r)})}connectedCallback(){this.isCollapsed=this.initialCollapseState==="closed",this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleCheckboxChange(t){var o;if(!this.selectedPaths[t])this.selectedPaths={...this.selectedPaths,[t]:!0};else{const c=Object.keys(this.selectedPaths).filter(h=>!h.includes(t));this.selectedPaths=c.reduce((h,i)=>(h[i]=!0,h),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),n=Ki(a);(o=this.facetSelectionUpdated)==null||o.emit({paths:n})}async handleCollapseToggle(){this.isCollapsed=!this.isCollapsed}async getIsCollapsed(){return this.isCollapsed}renderFacet(t,r){let a=!1;for(const c of Object.keys(this.selectedPaths))this.selectedPaths[c]&&c.startsWith(r.path)&&c.length>r.path.length&&(a=!0);const n=Object.keys(this.selectedPaths).includes(r.path),o=Object.keys(r.children).length>0&&(n||a)||t==="@@root";return f("div",{class:"searchcraft-facet-list-item"},t!=="@@root"&&f("label",{class:"searchcraft-facet-list-checkbox-label"},f("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},f("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[r.path],onChange:c=>{this.handleCheckboxChange(r.path)},type:"checkbox"}),a?f("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},f("svg",{viewBox:"0 0 14 3",fill:"none"},f("title",null,"Checkbox dash"),f("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):f("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},f("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},f("title",null,"Checkbox check"),f("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),f("span",null,this.formatFacetName(t)," (",r.count,")")),o&&f("div",{class:"searchcraft-facet-list",style:{paddingLeft:t!=="@@root"?"24px":"0px",paddingTop:t!=="@@root"?"6px":"0px"}},Object.keys(r.children).map(c=>{if(r.children[c])return this.renderFacet(c,r.children[c])})))}render(){if(!this.fieldName||Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length===0)return;if(Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length>0)return f("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query.");const t=Object.keys(this.renderedFacetTree.children),r=this.viewMoreThreshold??8,a=r>0&&t.length>r,n=a&&!this.showAllFacets?t.slice(0,r):t;return f("div",{class:"searchcraft-facet-list-wrapper","data-facet-section-collapsed":this.isCollapsed?"":void 0,"data-facet-section-expanded":this.isCollapsed?void 0:""},!this.isCollapsed&&f("div",{class:"searchcraft-facet-list-content"},f("div",{class:"searchcraft-facet-list"},n.map(o=>{if(this.renderedFacetTree.children[o])return this.renderFacet(o,this.renderedFacetTree.children[o])})),a&&f("button",{class:"searchcraft-facet-list-view-more",onClick:this.handleViewMoreToggle,type:"button"},this.showAllFacets?"View less":"View more...")))}},[768,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],exclude:[16],initialCollapseState:[1,"initial-collapse-state"],viewMoreThreshold:[2,"view-more-threshold"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32],isCollapsed:[32],showAllFacets:[32],handleCollapseToggle:[64],getIsCollapsed:[64]}]);function pn(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(e=>{switch(e){case"searchcraft-facet-list":customElements.get(e)||customElements.define(e,Ji);break}})}const ec=pn;function Bt(s,e){if(s&&e)return e.fieldNames.map(t=>{let r=s[t.fieldName];if(r)switch(t.dataType){case"date":{r=tc(r,t.dateFormatLocale,t.dateFormatOptions);break}case"number":{r=Intl.NumberFormat(t.numberFormatLocale,t.numberFormatOptions).format(r*(t.numberScale||1));break}}return r}).filter(t=>!!t).join(e.delimiter||" ")}function mn(s){return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function tc(s,e="en-US",t={day:"numeric",month:"long",year:"numeric"}){const r=new Date(s),n=new Date().getTime()-r.getTime(),o=30*24*60*60*1e3;if(n<o){const c=Math.trunc(n/1e3),h=Math.trunc(c/60),i=Math.trunc(h/60),u=Math.trunc(i/24),g=new Intl.RelativeTimeFormat(e,t);return u>=1?g.format(-u,"day"):i>=1?g.format(-i,"hour"):h>=1?g.format(-h,"minute"):g.format(0,"second")}return new Intl.DateTimeFormat(e,t).format(r)}function Ms(s,e,t=0){const r=new Date(s);switch(e){case"year":return new Date(r.getFullYear()+t,0,1,0,0,0,0).getTime();case"month":return new Date(r.getFullYear(),r.getMonth()+t,1,0,0,0,0).getTime();case"day":return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t,0,0,0,0).getTime();case"hour":return new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours()+t,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${e}`)}}function rc(s,e,t){const r=new Date(e),a=new Date(t);switch(s){case"year":return Math.abs(a.getFullYear()-r.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(r.getFullYear()*12+r.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${s}`)}}const gn=s=>{if(s>=11&&s<=13)return`${s}th`;switch(s%10){case 1:return`${s}st`;case 2:return`${s}nd`;case 3:return`${s}rd`;default:return`${s}th`}};function sc(s,e){const t=new Intl.DateTimeFormat("en-US",{month:"short"});switch(s){case"year":return e.getFullYear().toString();case"month":return`${t.format(e)} ${e.getFullYear()}`;case"day":return`${t.format(e)} ${gn(e.getDate())}, ${e.getFullYear()}`;case"hour":{const r=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${t.format(e)} ${gn(e.getDate())}, ${r.format(e)}`}default:throw new Error(`Unsupported granularity: ${s}`)}}function ac(s,e){let t=!1,r=null;const a=n=>{s(...n),t=!0,setTimeout(()=>{if(t=!1,r){const o=r;r=null,a(o)}},e)};return(...n)=>{t?r=n:a(n)}}const nc=Y(class extends j{constructor(t){super();d(this,"max",100);d(this,"min",0);d(this,"step",1);d(this,"dataType","number");d(this,"dateGranularity");d(this,"lowerBound",0);d(this,"upperBound",1);d(this,"endValue",0);d(this,"startValue",0);d(this,"lastFocusedHandle","max");d(this,"throttledEmitUpdate",()=>{});d(this,"rangeChanged");d(this,"emitUpdate",async()=>{var t,r;switch(this.dataType){case"number":(t=this.rangeChanged)==null||t.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",n=Ms(this.min,a,this.lowerBound+this.startValue),o=Ms(this.min,a,this.lowerBound+this.endValue+1);(r=this.rangeChanged)==null||r.emit({startValue:n,endValue:o});break}}});d(this,"handleStartValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,r.value=`${this.endValue}`)});d(this,"handleEndValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,r.value=`${this.startValue}`)});d(this,"getLabel",t=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const r=this.dateGranularity||"year",a=this.lowerBound+t,n=Ms(this.min,r,a);return sc(this.dateGranularity||"year",new Date(n))}}});t!==!1&&this.__registerHost(),this.rangeChanged=Ke(this,"rangeChanged")}connectedCallback(){switch(this.dataType){case"number":this.startValue=this.min,this.endValue=this.max,this.lowerBound=this.min,this.upperBound=this.max;break;case"date":{this.startValue=0,this.endValue=rc(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=ac(this.emitUpdate,120)}render(){const t=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,r=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),n=this.getLabel(this.endValue);return f("div",{key:"d5035ed8bcbf95c0ef5b2a7a9ef471e318a9dc30",class:"searchcraft-slider"},f("div",{key:"f5f7bc48703250b4f6c75a1f07c921233bd957d5",class:"searchcraft-slider-range"},f("div",{key:"fc2ec9f9786986a7306ffe43b54c47c35a1f086a",class:"searchcraft-slider-active-range",style:{left:`${t}%`,width:`${r-t}%`}}),f("input",{key:"716316b5ce507c40db5b7bd408f47b3bece88494",class:be("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleStartValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),f("input",{key:"e2ad0d586136185faccb50d6d7fb113a64ddac42",class:be("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleEndValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),f("div",{key:"7e9ab9fa9563cac6a1dfdd11910e04084ae5348d",class:"searchcraft-slider-label"},f("span",{key:"0909279f460c4be84c1088c5981a5f5299e8e2a0",class:"searchcraft-slider-start-label"},a),f("span",{key:"4b610a68f97fcbc0aa1eda428dfa1e53b00efe43",class:"searchcraft-slider-end-label"},n)))}},[768,"searchcraft-slider",{max:[2],min:[2],step:[2],dataType:[1,"data-type"],dateGranularity:[1,"date-granularity"],lowerBound:[32],upperBound:[32],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function bn(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(e=>{switch(e){case"searchcraft-slider":customElements.get(e)||customElements.define(e,nc);break}})}const oc=Y(class extends j{constructor(t){super();d(this,"label","Toggle");d(this,"subLabel");d(this,"searchcraftId");d(this,"toggleUpdated");d(this,"isActive",!1);d(this,"lastSearchTerm");d(this,"unsubscribe");d(this,"cleanupCore");d(this,"handleToggle",async()=>{var t;this.isActive=!this.isActive,(t=this.toggleUpdated)==null||t.emit(this.isActive)});t!==!1&&this.__registerHost(),this.toggleUpdated=Ke(this,"toggleUpdated")}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){return f("div",{key:"7dad6f4e4422a62f6403724ff16fe25e042ae2ac",class:be("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},f("div",{key:"2faa2ee1eb5cb78dc39f523415f2be96bc23fed1"},f("p",{key:"29ea63c281b8f1ae041ba75a149ce1b60e936662",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&f("p",{key:"e51efaae5ca79eede71852e6dec8eff4575139fe",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),f("button",{key:"d590da981692db162df9b8086ba2444d6a56ef9d",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},f("div",{key:"5be6ee1dd7dc58bd67fff18923569caee37b4936",class:"searchcraft-toggle-button-handle"})))}},[768,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function vn(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-toggle-button":customElements.get(e)||customElements.define(e,oc);break}})}const ic=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"items",[]);d(this,"responsiveBreakpoint",768);d(this,"responsiveBehavior","auto");d(this,"lastSearchTerm");d(this,"isFilterPanelVisible",!0);d(this,"core");d(this,"unsubscribe");d(this,"cleanupCore");d(this,"resizeObserver");d(this,"manuallyToggled",!1);d(this,"toggleClickHandler");d(this,"handleWindowResize",()=>{this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t,this.setInitialDateRanges(),this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize(),this.unsubscribe=t.store.subscribe((r,a)=>{if(this.lastSearchTerm=r.searchTerm||"",a.isFilterPanelVisible!==r.isFilterPanelVisible){const o=window.innerWidth>=(this.responsiveBreakpoint||768);r.isFilterPanelVisible!==o&&(this.manuallyToggled=!0),this.updateToggleElementAttributes(r.isFilterPanelVisible)}this.isFilterPanelVisible=r.isFilterPanelVisible})}componentDidLoad(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.responsiveBehavior==="auto"&&typeof window<"u"&&this.setupResizeObserver(),this.setupToggleClickHandlers(),setTimeout(()=>{if(this.core){const t=this.core.store.getState().isFilterPanelVisible;this.updateToggleElementAttributes(t)}},0)}disconnectedCallback(){var t,r,a;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.resizeObserver)==null||a.disconnect(),typeof window<"u"&&window.removeEventListener("resize",this.handleWindowResize),this.cleanupToggleClickHandlers()}setupResizeObserver(){if(typeof ResizeObserver>"u"){window.addEventListener("resize",this.handleWindowResize);return}this.resizeObserver=new ResizeObserver(()=>{this.handleWindowResize()}),this.resizeObserver.observe(document.body)}updateVisibilityBasedOnWindowSize(){if(typeof window>"u"||this.manuallyToggled)return;const r=window.innerWidth>=(this.responsiveBreakpoint||768);this.core&&this.isFilterPanelVisible!==r&&this.core.store.getState().setFilterPanelVisibility(r)}setupToggleClickHandlers(){if(typeof document>"u")return;this.toggleClickHandler=r=>{if(!(window.innerWidth>=(this.responsiveBreakpoint||768))&&(r.preventDefault(),this.core)){const n=this.core.store.getState().isFilterPanelVisible;this.core.store.getState().setFilterPanelVisibility(!n)}},document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.addEventListener("click",this.toggleClickHandler)})}updateToggleElementAttributes(t){if(typeof document>"u")return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(a=>{t?(a.removeAttribute("data-filter-panel-collapsed"),a.setAttribute("data-filter-panel-expanded","")):(a.removeAttribute("data-filter-panel-expanded"),a.setAttribute("data-filter-panel-collapsed",""))})}cleanupToggleClickHandlers(){if(typeof document>"u"||!this.toggleClickHandler)return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.removeEventListener("click",this.toggleClickHandler)})}setInitialDateRanges(){var t,r;for(const a of this.items)if(a.type==="dateRange"){const n=a,o=n.options.minDate,c=n.options.maxDate||new Date;(r=(t=this.core)==null?void 0:t.store.getState())==null||r.addRangeValueForIndexField({fieldName:n.fieldName,value:`${n.fieldName}:[${o.toISOString()} TO ${c.toISOString()}]`})}}handleDateRangeChanged(t,r,a){var c,h,i,u;const n=new Date(r),o=new Date(a);(h=(c=this.core)==null?void 0:c.store.getState())==null||h.addRangeValueForIndexField({fieldName:t.fieldName,value:`${t.fieldName}:[${n.toISOString()} TO ${o.toISOString()}]`}),(u=(i=this.core)==null?void 0:i.store.getState())==null||u.search()}handleNumericRangeChanged(t,r,a){var n,o,c,h;(o=(n=this.core)==null?void 0:n.store.getState())==null||o.addRangeValueForIndexField({fieldName:t,value:`${t}:[${r} TO ${a}]`}),(h=(c=this.core)==null?void 0:c.store.getState())==null||h.search()}handleFacetSelectionUpdated(t,r){var a,n,o,c,h,i;r.length>0?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.addFacetPathsForIndexField({fieldName:t,value:`${t}: IN [${r.join(" ")}]`}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.removeFacetPathsForIndexField(t),(i=(h=this.core)==null?void 0:h.store.getState())==null||i.search()}handleExactMatchToggleUpdated(t){var r,a,n,o;(a=(r=this.core)==null?void 0:r.store.getState())==null||a.setSearchMode(t?"exact":"fuzzy"),(o=(n=this.core)==null?void 0:n.store.getState())==null||o.search()}handleMostRecentToggleUpdated(t,r){var a,n,o,c,h,i;r?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.setSortOrder({orderByField:t,sortType:"desc"}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.setSortOrder({orderByField:null,sortType:null}),(i=(h=this.core)==null?void 0:h.store.getState())==null||i.search()}render(){return this.isFilterPanelVisible?f("div",{class:"searchcraft-filter-panel"},this.items.map(t=>{switch(t.type){case"dateRange":{const r=t,a=r.options.maxDate||new Date;return f("div",{class:"searchcraft-filter-panel-section"},f("p",{class:"searchcraft-filter-panel-label"},t.label),f("searchcraft-slider",{min:r.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:r.options.granularity,onRangeChanged:n=>{this.handleDateRangeChanged(r,n.detail.startValue,n.detail.endValue)}}))}case"numericRange":{const r=t;return f("div",{class:"searchcraft-filter-panel-section"},f("p",{class:"searchcraft-filter-panel-label"},t.label),f("searchcraft-slider",{min:r.options.min,max:r.options.max,step:r.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(r.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const r=t;let a=null,n=null;const o=h=>{n&&(h?(n.removeAttribute("data-facet-section-expanded"),n.setAttribute("data-facet-section-collapsed",""),n.setAttribute("aria-expanded","false")):(n.removeAttribute("data-facet-section-collapsed"),n.setAttribute("data-facet-section-expanded",""),n.setAttribute("aria-expanded","true")))},c=async()=>{if(a&&"handleCollapseToggle"in a&&"getIsCollapsed"in a){await a.handleCollapseToggle();const h=await a.getIsCollapsed();o(h)}};return f("div",{class:"searchcraft-filter-panel-section"},f("p",{ref:h=>{n=h||null},class:"searchcraft-filter-panel-label","data-toggle-facet-section":!0,"data-facet-section-expanded":r.options.initialCollapseState!=="closed"?"":void 0,"data-facet-section-collapsed":r.options.initialCollapseState==="closed"?"":void 0,onClick:c,onKeyDown:async h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),await c())},tabIndex:0,role:"button","aria-expanded":r.options.initialCollapseState!=="closed"},t.label),f("searchcraft-facet-list",{ref:h=>{a=h||null},fieldName:r.fieldName,exclude:r.options.exclude,initialCollapseState:r.options.initialCollapseState,viewMoreThreshold:r.options.viewMoreThreshold,onFacetSelectionUpdated:h=>{this.handleFacetSelectionUpdated(r.fieldName,h.detail.paths)}}))}case"exactMatchToggle":{const r=t;return f("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const r=t;return f("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(r.fieldName,a.detail)}})}}})):null}},[768,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],responsiveBreakpoint:[2,"responsive-breakpoint"],responsiveBehavior:[1,"responsive-behavior"],lastSearchTerm:[32],isFilterPanelVisible:[32]}]);function cc(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-filter-panel":customElements.get(e)||customElements.define(e,ic);break;case"searchcraft-facet-list":customElements.get(e)||pn();break;case"searchcraft-slider":customElements.get(e)||bn();break;case"searchcraft-toggle-button":customElements.get(e)||vn();break}})}const lc=cc,uc=Y(class extends j{constructor(t){super();d(this,"inputLabelClassName","");d(this,"label","");t!==!1&&this.__registerHost()}render(){return f("label",{key:"1008f9beb320aaa94026604b283eb65a96023265",class:be("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[768,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Ls(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-label":customElements.get(e)||customElements.define(e,uc);break}})}const hc=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"autoSearch",!0);d(this,"buttonPlacement","none");d(this,"buttonLabel");d(this,"inputLabel");d(this,"placeholderValue","Enter Search");d(this,"placeholderBehavior");d(this,"value");d(this,"inputFocus");d(this,"inputBlur");d(this,"inputInit");d(this,"inputValue","");d(this,"searchTerm","");d(this,"error",!1);d(this,"core");d(this,"unsubscribe");d(this,"cleanupCore");d(this,"handleInput",t=>{var a;const r=t.target;this.inputValue=r.value,(a=this.core)==null||a.store.getState().setSearchTerm(r.value),this.autoSearch&&this.performSearch()});d(this,"performSearch",async()=>{var t;this.error=!1;try{await((t=this.core)==null?void 0:t.store.getState().search())}catch{this.error=!0}});d(this,"handleClearInput",()=>{var t;this.inputValue="",(t=this.core)==null||t.store.getState().resetSearchValues(),this.error=!1});d(this,"handleFormSubmit",async t=>{t.preventDefault(),await this.performSearch()});t!==!1&&this.__registerHost(),this.inputFocus=Ke(this,"inputFocus"),this.inputBlur=Ke(this,"inputBlur"),this.inputInit=Ke(this,"inputInit")}init(){var t;this.core&&(this.value!==void 0&&this.value.trim().length>0&&(this.inputValue=this.value,this.core.store.getState().setSearchTerm(this.value),this.autoSearch&&this.core.store.getState().search()),(t=this.inputInit)==null||t.emit())}onCoreChange(){this.init()}onValueChange(t){var r,a;t!==void 0&&t!==this.inputValue&&(this.inputValue=t,(r=this.core)==null||r.store.getState().setSearchTerm(t),this.autoSearch&&t.trim().length>0&&((a=this.core)==null||a.store.getState().search()))}onCoreAvailable(t){this.core=t,this.init(),this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,(this.value===void 0||r.searchTerm==="")&&(this.inputValue=r.searchTerm)})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=this.inputValue.length>0,r=be("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),n={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return f("form",{key:"8ba91615394f95c0d5bd26a3006d3e8b454f047e",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},f("div",{key:"d9025a1c041e3132280b22e5a1b039df0196cea5",class:r,style:n},f("div",{key:"a8c3a80a0ccb718f974902fb1d163d5c3ee6194a",class:"searchcraft-input-form-button"},f("searchcraft-button",{key:"a12ff9a8cdb9a4ce3c3fd54b1c2ae084edd37069",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&f("div",{key:"866e7162c402524eaca864bb6e950a244245dc48",class:"searchcraft-input-form-label"},f("searchcraft-input-label",{key:"c57217cd5924c827df08e22a728067e3bfc63a26",label:this.inputLabel})),this.error&&f("div",{key:"4a54728bf366db50de39470cf31860a6307dafea",class:"searchcraft-input-form-error-message"},f("searchcraft-error-message",{key:"5fa5b5f5677350338d15c8e6614b0d9f584141b0"},"Something went wrong.")),f("div",{key:"67be766103a3bca11cff6f83a2a6dea7c6c6f106",class:"searchcraft-input-form-input-wrapper"},f("input",{key:"931609a4e8fc55d688077ec6cb04f2bb9b86b5fe",autoComplete:"off",class:be("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var o;return(o=this.inputFocus)==null?void 0:o.emit()},onBlur:()=>{var o;return(o=this.inputBlur)==null?void 0:o.emit()},onInput:o=>{this.handleInput(o)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),f("div",{key:"7feb32348b7faec4104137a142ba8150149498a5",class:"searchcraft-input-form-input-icon"},f("svg",{key:"8b9abd236d4896b8dbd5c14e06019c116e3675be",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},f("title",{key:"4d3b6724f6532920f5531d2e15b28a06f0770688"},"Search icon"),f("path",{key:"65a46a1916c1f020c9bebffd42aa016b59177376",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),t&&f("button",{key:"65278eb0ab49415dce79c874adf90adcb5854db5",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},f("svg",{key:"0016263afe32250ace58cc4b98ff6106d7d9d4a0",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},f("title",{key:"9b40d806455ab9c19c0cddb4c76101debdb0266c"},"Clear icon"),f("path",{key:"2954ee1496d6736d6e780755034902c76adb81e9",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"],value:["onValueChange"]}}},[768,"searchcraft-input-form",{searchcraftId:[1,"searchcraft-id"],autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],value:[1],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"],value:["onValueChange"]}]);function yn(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-form":customElements.get(e)||customElements.define(e,hc);break;case"searchcraft-button":customElements.get(e)||Ar();break;case"searchcraft-error-message":customElements.get(e)||_r();break;case"searchcraft-input-label":customElements.get(e)||Ls();break}})}const dc=yn,fc=Ls,pc=Y(class extends j{constructor(t){super();d(this,"label");t!==!1&&this.__registerHost()}render(){return f("div",{key:"5bda164202246eeb2e56bb6a25bede9931898e7a",class:"searchcraft-loading"},f("div",{key:"e33a5abc6686f9983c718a2532aa2d46902d98a2",class:"searchcraft-loading-bars"},f("div",{key:"85ff7af527b8f419c9bfd6e84331dd68772e6fdd",class:"searchcraft-loading-bar-1"}),f("div",{key:"1485d17e9262dbec6d2e5976a63149878137821c",class:"searchcraft-loading-bar-2"}),f("div",{key:"d2939b9f7bc0599df7d96db91802ebfcbf232f3e",class:"searchcraft-loading-bar-3"}),f("div",{key:"7a73bd5baf25ec789c3170e066d1333b905bfe7b",class:"searchcraft-loading-bar-4"}),f("div",{key:"b644b618766727773b21d288945c21b6ef0be958",class:"searchcraft-loading-bar-5"}),f("div",{key:"4f5123a786fc40891ca54edc538dd56f683b26ce",class:"searchcraft-loading-bar-6"})),f("p",{key:"967c1a6fb41231c8d713b78facca98e7f5a80709",class:"searchcraft-loading-label"},this.label))}},[768,"searchcraft-loading",{label:[1]}]);function Cn(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-loading":customElements.get(e)||customElements.define(e,pc);break}})}const mc=Cn,gc=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"scrollToTop",!0);d(this,"searchTerm");d(this,"searchResultsPerPage");d(this,"searchResultsPage");d(this,"searchResultsCount");d(this,"searchClientRequestProperties");d(this,"searchResultsPagesCount",1);d(this,"searchResultsRangeMin",1);d(this,"searchResultsRangeMax",1);d(this,"setSearchResultsPage",()=>{});d(this,"unsubscribe",()=>{});d(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}smoothScrollToSearchResults(){if(!this.scrollToTop)return;const t=document.querySelector("searchcraft-search-results .searchcraft-search-results");if(!t)return;const n=t.getBoundingClientRect().top+window.scrollY-200,o=window.scrollY,c=n-o,h=1500;let i=null;const u=p=>p===1?1:1-2**(-10*p),g=p=>{i===null&&(i=p);const y=p-i,C=Math.min(y/h,1),k=u(C);window.scrollTo(0,o+c*k),C<1&&requestAnimationFrame(g)};requestAnimationFrame(g)}handleGoToPage(t){this.setSearchResultsPage(t),this.scrollToTop&&this.smoothScrollToSearchResults()}renderOddPaginationItem(t){return f("li",null,f("button",{class:be("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t))}renderEvenPaginationItem(t){if(!(this.searchResultsPagesCount<=t))return(this.searchResultsPagesCount<=5||t<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=t+1:this.searchResultsPage>=t-1)?f("li",null,f("button",{class:be("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t)):f("li",null,f("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?f("li",null,f("button",{class:be("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):f("li",null,f("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return f("div",{class:"searchcraft-pagination"},f("div",{class:"searchcraft-pagination-control"},f("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:f("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",null,"Previous page icon"),f("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),f("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),f("div",{class:"searchcraft-pagination-control"},f("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:f("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",null,"Next page icon"),f("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[768,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],scrollToTop:[4,"scroll-to-top"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function bc(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-pagination":customElements.get(e)||customElements.define(e,gc);break;case"searchcraft-button":customElements.get(e)||Ar();break}})}const vc=bc,yc=Y(class extends j{constructor(t){super();d(this,"template");d(this,"type");d(this,"searchcraftId");d(this,"hotkey");d(this,"hotkeyModifier");d(this,"hotkeyModifierSymbol");d(this,"isPopoverVisible");d(this,"userAgent");d(this,"unsubscribe",()=>{});d(this,"cleanupCore");d(this,"core");d(this,"renderOptionSymbol",()=>f("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},f("title",null,"Option key"),f("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),f("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));d(this,"renderCtrlSymbol",()=>f("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},f("title",null,"Ctrl key"),f("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));d(this,"renderWindowsMetaSymbol",()=>f("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},f("title",null,"Windows meta key"),f("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));d(this,"renderMacMetaSymbol",()=>f("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},f("title",null,"Mac meta key"),f("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));t!==!1&&this.__registerHost()}onCoreAvailable(t){this.core=t;const r=t.store.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=t.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}setUserAgent(){const t=navigator.userAgent.toLowerCase();switch(!0){case t.includes("windows"):return"window";case t.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return f("div",{class:"searchcraft-popover-button-wrapper"},f("div",{class:"searchcraft-popover-button-input"},f("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},f("title",null,"Search icon"),f("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),f("span",null,"Search")),f("div",{class:"searchcraft-popover-button-keycaps"},f("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},f("span",null,this.hotkeyModifierSymbol)),f("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},f("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return f("div",null,f("slot",null))}}render(){return f("button",{key:"4f11d81bb189a929372d9e398a0913b3b626e42c",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:Dt}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[772,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function Cc(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(e=>{switch(e){case"searchcraft-popover-button":customElements.get(e)||customElements.define(e,yc);break}})}const kc=Cc,Sc=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"searchResultsCount");d(this,"unsubscribe",()=>{});d(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.searchResultsCount=t.store.getState().searchResultsCount,this.unsubscribe=t.store.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){return f("footer",{key:"5e3c0da21c63453ac705d0ea2dbb1ee5053bd527",class:"searchcraft-popover-footer"},f("p",{key:"34332a6a54af63717a6f6c36c65a321b2d18c82c",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${mn(this.searchResultsCount)} Results Found`:" "),f("a",{key:"8cd1bd1ad4e3a91e7221c5d38650b10a66dc884e",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},f("svg",{key:"4ebaa80bc3ee8cc2643368d84158cc46ac141376",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",{key:"804857d081cf5cbd8e63af05c3479a96872d136d"},"Powered by Searchcraft"),f("path",{key:"43d4a2b110134036b8823e508f535c293fb2df0c",d:"M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z",fill:"currentColor"}))))}},[768,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],searchResultsCount:[32]}]);function kn(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(e=>{switch(e){case"searchcraft-popover-footer":customElements.get(e)||customElements.define(e,Sc);break}})}const xc=kn,wc=Y(class extends j{constructor(t){super();d(this,"item");d(this,"popoverResultMappings");d(this,"documentPosition",0);d(this,"searchcraftId");d(this,"title");d(this,"subtitle");d(this,"href");d(this,"imageSource");d(this,"imageAlt");d(this,"core");d(this,"cleanupCore");d(this,"handleLinkClick",()=>{var t;if(this.core){const r=this.documentPosition,a=this.core.store.getState().searchTerm,n=this.core.store.getState().searchClientResponseItems.length||0;(t=this.core.measureClient)==null||t.sendMeasureEvent("document_clicked",{document_position:r,number_of_documents:n,search_term:a})}});t!==!1&&this.__registerHost()}mapValuesFromDocument(t){var r,a,n,o,c;this.title=Bt(t,(r=this.popoverResultMappings)==null?void 0:r.title),this.subtitle=Bt(t,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Bt(t,(n=this.popoverResultMappings)==null?void 0:n.href),this.imageSource=Bt(t,(o=this.popoverResultMappings)==null?void 0:o.imageSource),this.imageAlt=Bt(t,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}onCoreAvailable(t){this.core=t}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){return f("div",{key:"d1c9c310b8abc9d2370efb802eac1edf4189519d",class:"searchcraft-popover-list-item"},f("a",{key:"30eb1a5076c5b4b95ae43147eaee0bb72ce46179",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&f("div",{key:"d18ff55823dc2c61f3786f423936af8b009aeeda",class:"searchcraft-popover-list-item-image-wrapper"},f("img",{key:"56f4cc1d472f7da05e64fcf52c560a7ad0cdf7a6",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),f("div",{key:"78a0f0235d5e71d10076b70ccbaf4b58e0d6fea0",class:"searchcraft-popover-list-item-content"},this.title&&f("p",{key:"4489047af56e5aa295cb5f036e970dcad053d3b7",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&f("p",{key:"4d177c227a1dbf1233022d738403c8eb93ba328d",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[768,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],searchcraftId:[1,"searchcraft-id"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function Os(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-item":customElements.get(e)||customElements.define(e,wc);break}})}const Tc=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"popoverResultMappings");d(this,"searchClientResponseItems");d(this,"adClientResponseItems");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"config");d(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.config=t.config}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}renderWithADMAds(){var t,r;return f("div",{class:"searchcraft-popover-list-view"},(t=this.adClientResponseItems)==null?void 0:t.map(a=>f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>f("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+n})))}renderWithCustomAds(){var h,i,u,g,p,y,C,k;const t=[],r=((i=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((g=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:g.adInterstitialQuantity)||1,n=((y=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:y.adStartQuantity)||0,o=((k=(C=this.config)==null?void 0:C.customAdConfig)==null?void 0:k.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let w=0;w<n;w++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${w}-ad`,renderPosition:"top"}));c.forEach((w,L)=>{if(r&&L%r===0&&L+r<c.length&&L>=r)for(let T=0;T<a;T++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${w.id}-ad-${T}`,renderPosition:"interstitial"}));t.push(f("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:w,key:w.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+L}))});for(let w=0;w<o;w++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${w}-ad`,renderPosition:"bottom"}));return f("div",{class:"searchcraft-popover-list-view"},t)}renderWithNativoAds(){var i,u,g,p,y,C,k,w,L,T;const t=[],r=((u=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:u.adInterstialStartIndex)||0,a=((p=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((C=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:C.adInterstitialQuantity)||1,o=((w=(k=this.config)==null?void 0:k.nativoConfig)==null?void 0:w.adStartQuantity)||0,c=((T=(L=this.config)==null?void 0:L.nativoConfig)==null?void 0:T.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let S=0;S<o;S++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"top"}));h.forEach((S,x)=>{if(a&&(x+r)%a===0&&x+a<h.length&&x>=a)for(let D=0;D<n;D++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S.id}-ad-${D}`,renderPosition:"interstitial"}));t.push(f("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:S,key:S.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+x}))});for(let S=0;S<c;S++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"bottom"}));return f("div",{class:"searchcraft-popover-list-view"},t)}renderWithNoAds(){var t;return f("div",{class:"searchcraft-popover-list-view"},(t=this.searchClientResponseItems)==null?void 0:t.map((r,a)=>f("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:r,key:r.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var t,r,a;return(t=this.config)!=null&&t.customAdConfig?this.renderWithCustomAds():(r=this.config)!=null&&r.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[768,"searchcraft-popover-list-view",{searchcraftId:[1,"searchcraft-id"],popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Sn(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-view":customElements.get(e)||customElements.define(e,Tc);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-popover-list-item":customElements.get(e)||Os();break}})}const Rc=Y(class extends j{constructor(t){super();d(this,"type","inline");d(this,"popoverResultMappings");d(this,"hotkey","k");d(this,"hotkeyModifier","meta");d(this,"searchcraftId");d(this,"placeholderValue","Enter Search");d(this,"placeholderBehavior");d(this,"isPopoverVisibleInState",!1);d(this,"searchClientResponseItems",[]);d(this,"adClientResponseItems",[]);d(this,"searchTerm");d(this,"isFocused",!1);d(this,"breakpointSm",576);d(this,"breakpointMd",768);d(this,"breakpointLg",992);d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"modalElement");d(this,"unsubscribe");d(this,"cleanupCore");d(this,"core");d(this,"handleDocumentClick",t=>{this.hostElement.contains(t.target)||(this.isFocused=!1)});d(this,"handleDocumentKeyDown",t=>{var r;if(t.key===this.hotkey&&this.handleHotkeyPressed(t),!!this.hostElement.contains(document.activeElement))switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.focusOnNextListItem(t.key);break;case"Escape":(r=this.core)==null||r.store.getState().setPopoverVisibility(!1);break;default:return}});d(this,"handleInputInit",()=>{const t=this.hostElement.querySelector(".searchcraft-input-form-input");t==null||t.focus()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t;const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=t.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=t.store.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage}),t.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(t){this.isPopoverVisibleInState=t,document.body.style.overflow=t?"hidden":"auto"}handleInputFocus(){var t;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((t=this.core)==null||t.store.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),this.modalElement.setAttribute("searchcraft-id",this.searchcraftId),this.placeholderValue&&this.modalElement.setAttribute("placeholder-value",this.placeholderValue),this.placeholderBehavior&&this.modalElement.setAttribute("placeholder-behavior",this.placeholderBehavior),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(t){var r;(r=this.core)==null||r.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(t){var r;if(t.ctrlKey&&this.hotkeyModifier==="ctrl"||t.altKey&&this.hotkeyModifier==="alt"||t.metaKey&&this.hotkeyModifier==="meta")if(t.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(r=this.core)==null||r.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(t){var n,o;const r=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=r.indexOf(document.activeElement);if(t==="ArrowDown")(n=r[(a+1)%r.length])==null||n.focus();else if(t==="ArrowUp")if(a>=1)(o=r[a-1])==null||o.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var t,r;return this.searchTerm&&((r=(t=this.searchTerm)==null?void 0:t.trim())==null?void 0:r.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const t=this.hasResultsToShow&&this.isFocused;return f("div",{class:be("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":t})},f("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},f("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),t&&f("div",{class:"searchcraft-popover-form-inline-wrapper"},f("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),f("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderModalPopover(){if(this.isPopoverVisibleInState)return f("div",{class:be("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},f("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),f("div",{class:"searchcraft-popover-form-modal-wrapper"},f("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},f("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),f("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),f("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&f("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),f("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return f("div",{class:be("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},f("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},f("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),f("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),f("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&f("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),f("searchcraft-popover-footer",{searchcraftId:this.searchcraftId}))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[768,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function xn(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(e=>{switch(e){case"searchcraft-popover-form":customElements.get(e)||customElements.define(e,Rc);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-button":customElements.get(e)||Ar();break;case"searchcraft-error-message":customElements.get(e)||_r();break;case"searchcraft-input-form":customElements.get(e)||yn();break;case"searchcraft-input-label":customElements.get(e)||Ls();break;case"searchcraft-popover-footer":customElements.get(e)||kn();break;case"searchcraft-popover-form":customElements.get(e)||xn();break;case"searchcraft-popover-list-item":customElements.get(e)||Os();break;case"searchcraft-popover-list-view":customElements.get(e)||Sn();break}})}const Ec=xn,$c=Os,Ac=Sn,_c=Y(class extends j{constructor(t){super();d(this,"template");d(this,"searchcraftId");d(this,"searchTerm");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"searchResultsCount");d(this,"searchClientRequestProperties");d(this,"count",0);d(this,"range",[0,0]);d(this,"responseTime","0");d(this,"unsubscribe",()=>{});d(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";return!this.searchTerm&&!t||this.searchResultsCount===0?null:f("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:Dt}):`${mn(this.count)} results found in ${this.responseTime}ms`)}},[768,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],count:[32],range:[32],responseTime:[32]}]);function Pc(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(e=>{switch(e){case"searchcraft-results-info":customElements.get(e)||customElements.define(e,_c);break}})}const Ic=Pc,Mc=Y(class extends j{constructor(t){super();d(this,"item");d(this,"index");d(this,"documentPosition",0);d(this,"template");d(this,"searchcraftId");d(this,"templateHtml");d(this,"core");d(this,"cleanupCore");d(this,"handleResultContainerClick",t=>{var h;if(!t.target)return;const a=t.target.closest("a");if(!a||!((h=this.hostElement)!=null&&h.contains(a))||!this.core||!this.core.measureClient)return;const n=this.documentPosition,o=this.core.store.getState().searchTerm,c=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:n,number_of_documents:c,search_term:o})});d(this,"handleKeyDown",()=>{});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t}connectedCallback(){var t;if(this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(t=this.template)==null?void 0:t.call(this,this.item.document,this.index,{html:Dt,source_index:this.item.source_index})}catch(r){console.error("Invalid search result template:",r)}}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){if(this.item)return typeof this.template>"u"?f("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([t,r])=>f("p",{key:t},f("strong",null,t),": ",r))):f("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[768,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function wn(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-result":customElements.get(e)||customElements.define(e,Mc);break}})}const Lc=wn,Oc=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"initialQuery");d(this,"template");d(this,"adClientResponseItems",[]);d(this,"config");d(this,"isSearchInProgress",!0);d(this,"searchClientResponseItems");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"searchTerm","");d(this,"unsubscribe");d(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){var a;const r=t.store.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(a=r.core)==null?void 0:a.config,this.unsubscribe=t.store.subscribe(n=>this.handleStateChange(n))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){var r;this.adClientResponseItems=[...t.adClientResponseItems],this.config=(r=t.core)==null?void 0:r.config,this.isSearchInProgress=t.isSearchInProgress,this.searchClientResponseItems=[...t.searchClientResponseItems],this.searchResultsPage=t.searchResultsPage,this.searchResultsPerPage=t.searchResultsPerPage,this.searchTerm=t.searchTerm}renderEmptyState(){return f("div",{class:"searchcraft-search-results-empty-state"},f("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return f("div",{class:"searchcraft-search-results"},f("div",{class:"searchcraft-search-results-error-message"},f("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var r;const t=this.searchClientResponseItems||[];return f("div",{class:"searchcraft-search-results"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),t.map((a,n)=>f("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:a,template:this.template})))}renderWithCustomAds(){var h,i,u,g,p,y,C,k;const t=[],r=((i=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((g=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:g.adInterstitialQuantity)||1,n=((y=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:y.adStartQuantity)||0,o=((k=(C=this.config)==null?void 0:C.customAdConfig)==null?void 0:k.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let w=0;w<n;w++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${w}-ad`,renderPosition:"top"}));c.forEach((w,L)=>{if(r&&L%r===0&&L+r<c.length&&L>=r)for(let T=0;T<a;T++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${w.id}-ad-${T}`,renderPosition:"interstitial"}));t.push(f("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:w.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+L,index:L,item:w,template:this.template}))});for(let w=0;w<o;w++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${w}-ad`,renderPosition:"bottom"}));return f("div",{class:"searchcraft-search-results"},t)}renderWithNativoAds(){var i,u,g,p,y,C,k,w,L,T;const t=[],r=((u=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:u.adInterstialStartIndex)||0,a=((p=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((C=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:C.adInterstitialQuantity)||1,o=((w=(k=this.config)==null?void 0:k.nativoConfig)==null?void 0:w.adStartQuantity)||0,c=((T=(L=this.config)==null?void 0:L.nativoConfig)==null?void 0:T.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let S=0;S<o;S++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"top"}));h.forEach((S,x)=>{if(a&&(x+r)%a===0&&x+a<h.length&&x>=a)for(let D=0;D<n;D++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S.id}-ad-${D}`,renderPosition:"interstitial"}));t.push(f("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:S.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+x,index:x,item:S,template:this.template}))});for(let S=0;S<c;S++)t.push(f("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"bottom"}));return f("div",{class:"searchcraft-search-results"},t)}renderWithNoAds(){const t=this.searchClientResponseItems||[];return f("div",{class:"searchcraft-search-results"},t.map((r,a)=>f("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:r.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:r,template:this.template})))}render(){var r,a,n;const t=this.searchClientResponseItems||[];return t.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&t.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(r=this.config)!=null&&r.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(n=this.config)!=null&&n.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[772,"searchcraft-search-results",{searchcraftId:[1,"searchcraft-id"],initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Dc(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-results":customElements.get(e)||customElements.define(e,Oc);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-error-message":customElements.get(e)||_r();break;case"searchcraft-search-result":customElements.get(e)||wn();break}})}const Fc=Dc,Nc=Y(class extends j{constructor(t){super();d(this,"caption");d(this,"disabled",!1);d(this,"inputId");d(this,"label");d(this,"labelId");d(this,"name");d(this,"options",[]);d(this,"selectChange");d(this,"searchResultsPerPage");d(this,"setSearchResultsPage",()=>{});d(this,"setSearchResultsPerPage",()=>{});d(this,"handleSelectChange",t=>{this.selectChange.emit(t.target.value)});t!==!1&&this.__registerHost(),this.selectChange=Ke(this,"selectChange")}handleGoToPage(t){this.setSearchResultsPage(t)}render(){return f("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&f("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),f("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},f("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:t,value:r,selected:a})=>f("option",{key:r,value:r,selected:a},t))),f("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),f("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&f("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[768,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Tn(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-select":customElements.get(e)||customElements.define(e,Nc);break}})}const zc=Y(class extends j{constructor(t){super();d(this,"increment",20);d(this,"searchcraftId");d(this,"searchTerm");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"searchResultsCount");d(this,"searchResultsPagesCount");d(this,"searchClientRequestProperties");d(this,"initialSearchResultsPerPage");d(this,"setSearchResultsPerPage",()=>{});d(this,"setSearchResultsPage",()=>{});d(this,"unsubscribe",()=>{});d(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=t.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return f("div",{class:"searchcraft-search-results-per-page"},f("div",{class:"searchcraft-search-results-per-page-select"},f("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),f("div",{class:"searchcraft-search-results-per-page-select-input"},f("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,a)=>{const n=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${n}`,value:n}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[768,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchClientRequestProperties:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Uc(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-search-results-per-page":customElements.get(e)||customElements.define(e,zc);break;case"searchcraft-select":customElements.get(e)||Tn();break}})}const Hc=Uc,Bc=Tn,Vc=bn;function Ds(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nt=Ds();function Rn(s){nt=s}var Vt={exec:()=>null};function B(s,e=""){let t=typeof s=="string"?s:s.source;const r={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(he.caret,"$1"),t=t.replace(a,o),r},getRegex:()=>new RegExp(t,e)};return r}var he={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},qc=/^(?:[ \t]*(?:\n|$))+/,Wc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Fs=/(?:[*+-]|\d{1,9}[.)])/,En=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$n=B(En).replace(/bull/g,Fs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Yc=B(En).replace(/bull/g,Fs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ns=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zc=/^[^\n]+/,zs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Xc=B(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qc=B(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Fs).getRegex(),Lr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Us=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kc=B("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Us).replace("tag",Lr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),An=B(Ns).replace("hr",qt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Lr).getRegex(),Jc=B(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",An).getRegex(),Hs={blockquote:Jc,code:Wc,def:Xc,fences:Gc,heading:jc,hr:qt,html:Kc,lheading:$n,list:Qc,newline:qc,paragraph:An,table:Vt,text:Zc},_n=B("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Lr).getRegex(),el={...Hs,lheading:Yc,table:_n,paragraph:B(Ns).replace("hr",qt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_n).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Lr).getRegex()},tl={...Hs,html:B(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Us).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Vt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B(Ns).replace("hr",qt).replace("heading",` *#{1,6} *[^
12
+ ]`).replace("lheading",$n).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,sl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pn=/^( {2,}|\\)\n(?!\s*$)/,al=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Or=/[\p{P}\p{S}]/u,Bs=/[\s\p{P}\p{S}]/u,In=/[^\s\p{P}\p{S}]/u,nl=B(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bs).getRegex(),Mn=/(?!~)[\p{P}\p{S}]/u,ol=/(?!~)[\s\p{P}\p{S}]/u,il=/(?:[^\s\p{P}\p{S}]|~)/u,cl=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ln=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ll=B(Ln,"u").replace(/punct/g,Or).getRegex(),ul=B(Ln,"u").replace(/punct/g,Mn).getRegex(),On="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hl=B(On,"gu").replace(/notPunctSpace/g,In).replace(/punctSpace/g,Bs).replace(/punct/g,Or).getRegex(),dl=B(On,"gu").replace(/notPunctSpace/g,il).replace(/punctSpace/g,ol).replace(/punct/g,Mn).getRegex(),fl=B("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,In).replace(/punctSpace/g,Bs).replace(/punct/g,Or).getRegex(),pl=B(/\\(punct)/,"gu").replace(/punct/g,Or).getRegex(),ml=B(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gl=B(Us).replace("(?:-->|$)","-->").getRegex(),bl=B("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vl=B(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Dr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Dn=B(/^!?\[(label)\]\[(ref)\]/).replace("label",Dr).replace("ref",zs).getRegex(),Fn=B(/^!?\[(ref)\](?:\[\])?/).replace("ref",zs).getRegex(),yl=B("reflink|nolink(?!\\()","g").replace("reflink",Dn).replace("nolink",Fn).getRegex(),Vs={_backpedal:Vt,anyPunctuation:pl,autolink:ml,blockSkip:cl,br:Pn,code:sl,del:Vt,emStrongLDelim:ll,emStrongRDelimAst:hl,emStrongRDelimUnd:fl,escape:rl,link:vl,nolink:Fn,punctuation:nl,reflink:Dn,reflinkSearch:yl,tag:bl,text:al,url:Vt},Cl={...Vs,link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",Dr).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dr).getRegex()},qs={...Vs,emStrongRDelimAst:dl,emStrongLDelim:ul,url:B(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},kl={...qs,br:B(Pn).replace("{2,}","*").getRegex(),text:B(qs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fr={normal:Hs,gfm:el,pedantic:tl},Wt={normal:Vs,gfm:qs,breaks:kl,pedantic:Cl},Sl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Nn=s=>Sl[s];function Fe(s,e){if(e){if(he.escapeTest.test(s))return s.replace(he.escapeReplace,Nn)}else if(he.escapeTestNoEncode.test(s))return s.replace(he.escapeReplaceNoEncode,Nn);return s}function zn(s){try{s=encodeURI(s).replace(he.percentDecode,"%")}catch{return null}return s}function Un(s,e){var n;const t=s.replace(he.findPipe,(o,c,h)=>{let i=!1,u=c;for(;--u>=0&&h[u]==="\\";)i=!i;return i?"|":" |"}),r=t.split(he.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(he.slashPipe,"|");return r}function Gt(s,e,t){const r=s.length;if(r===0)return"";let a=0;for(;a<r&&s.charAt(r-a-1)===e;)a++;return s.slice(0,r-a)}function xl(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===e[0])t++;else if(s[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function Hn(s,e,t,r,a){const n=e.href,o=e.title||null,c=s[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const h={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:o,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,h}function wl(s,e,t){const r=s.match(t.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.split(`
12
13
  `).map(n=>{const o=n.match(t.other.beginningSpace);if(o===null)return n;const[c]=o;return c.length>=a.length?n.slice(a.length):n}).join(`
13
- `)}var _t=class{constructor(s){u(this,"options");u(this,"rules");u(this,"lexer");this.options=s||Ie}space(s){const e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){const e=this.rules.block.code.exec(s);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ht(t,`
14
- `)}}}fences(s){const e=this.rules.block.fences.exec(s);if(e){const t=e[0],r=cc(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(s){const e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const r=ht(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){const e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:ht(e[0],`
15
- `)}}blockquote(s){const e=this.rules.block.blockquote.exec(s);if(e){let t=ht(e[0],`
14
+ `)}var Nr=class{constructor(s){d(this,"options");d(this,"rules");d(this,"lexer");this.options=s||nt}space(s){const e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){const e=this.rules.block.code.exec(s);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Gt(t,`
15
+ `)}}}fences(s){const e=this.rules.block.fences.exec(s);if(e){const t=e[0],r=wl(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(s){const e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const r=Gt(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){const e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:Gt(e[0],`
16
+ `)}}blockquote(s){const e=this.rules.block.blockquote.exec(s);if(e){let t=Gt(e[0],`
16
17
  `).split(`
17
18
  `),r="",a="";const n=[];for(;t.length>0;){let o=!1;const c=[];let h;for(h=0;h<t.length;h++)if(this.rules.other.blockquoteStart.test(t[h]))c.push(t[h]),o=!0;else if(!o)c.push(t[h]);else break;t=t.slice(h);const i=c.join(`
18
- `),l=i.replace(this.rules.other.blockquoteSetextReplace,`
19
+ `),u=i.replace(this.rules.other.blockquoteSetextReplace,`
19
20
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
20
21
  ${i}`:i,a=a?`${a}
21
- ${l}`:l;const m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=m,t.length===0)break;const p=n.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const g=p,v=g.raw+`
22
+ ${u}`:u;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=g,t.length===0)break;const p=n.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const y=p,C=y.raw+`
22
23
  `+t.join(`
23
- `),y=this.blockquote(v);n[n.length-1]=y,r=r.substring(0,r.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if((p==null?void 0:p.type)==="list"){const g=p,v=g.raw+`
24
+ `),k=this.blockquote(C);n[n.length-1]=k,r=r.substring(0,r.length-y.raw.length)+k.raw,a=a.substring(0,a.length-y.text.length)+k.text;break}else if((p==null?void 0:p.type)==="list"){const y=p,C=y.raw+`
24
25
  `+t.join(`
25
- `),y=this.list(v);n[n.length-1]=y,r=r.substring(0,r.length-p.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,t=v.substring(n.at(-1).raw.length).split(`
26
- `);continue}}return{type:"blockquote",raw:r,tokens:n,text:a}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim();const r=t.length>1,a={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");const n=this.rules.other.listItemRegex(t);let o=!1;for(;s;){let h=!1,i="",l="";if(!(e=n.exec(s))||this.rules.block.hr.test(s))break;i=e[0],s=s.substring(i.length);let m=e[2].split(`
27
- `,1)[0].replace(this.rules.other.listReplaceTabs,P=>" ".repeat(3*P.length)),p=s.split(`
28
- `,1)[0],g=!m.trim(),v=0;if(this.options.pedantic?(v=2,l=m.trimStart()):g?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,l=m.slice(v),v+=e[1].length),g&&this.rules.other.blankLine.test(p)&&(i+=p+`
29
- `,s=s.substring(p.length+1),h=!0),!h){const P=this.rules.other.nextBulletRegex(v),S=this.rules.other.hrRegex(v),k=this.rules.other.fencesBeginRegex(v),T=this.rules.other.headingBeginRegex(v),_=this.rules.other.htmlBeginRegex(v);for(;s;){const R=s.split(`
30
- `,1)[0];let I;if(p=R,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),I=p):I=p.replace(this.rules.other.tabCharGlobal," "),k.test(p)||T.test(p)||_.test(p)||P.test(p)||S.test(p))break;if(I.search(this.rules.other.nonSpaceChar)>=v||!p.trim())l+=`
31
- `+I.slice(v);else{if(g||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(m)||T.test(m)||S.test(m))break;l+=`
32
- `+p}!g&&!p.trim()&&(g=!0),i+=R+`
33
- `,s=s.substring(R.length+1),m=I.slice(v)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(l),y&&(x=y[0]!=="[ ] ",l=l.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:i,task:!!y,checked:x,loose:!1,text:l,tokens:[]}),a.raw+=i}const c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){const i=a.items[h].tokens.filter(m=>m.type==="space"),l=i.length>0&&i.some(m=>this.rules.other.anyLine.test(m.raw));a.loose=l}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(s){const e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){const e=this.rules.block.def.exec(s);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:a}}}table(s){var o;const e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=ya(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
34
- `):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===r.length){for(const c of r)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<t.length;c++)n.header.push({text:t[c],tokens:this.lexer.inline(t[c]),header:!0,align:n.align[c]});for(const c of a)n.rows.push(ya(c,n.header.length).map((h,i)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[i]})));return n}}lheading(s){const e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){const e=this.rules.block.paragraph.exec(s);if(e){const t=e[1].charAt(e[1].length-1)===`
35
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){const e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){const e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){const e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){const e=this.rules.inline.link.exec(s);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const n=ht(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{const n=ic(e[2],"()");if(n===-2)return;if(n>-1){const c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let r=e[2],a="";if(this.options.pedantic){const n=this.rules.other.pedanticHrefTitle.exec(r);n&&(r=n[1],a=n[3])}else a=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),ka(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){const r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[r.toLowerCase()];if(!a){const n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return ka(t,a,t[0],this.lexer,this.rules)}}emStrong(s,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(s);if(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const n=[...r[0]].length-1;let o,c,h=n,i=0;const l=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*s.length+n);(r=l.exec(e))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(c=[...o].length,r[3]||r[4]){h+=c;continue}else if((r[5]||r[6])&&n%3&&!((n+c)%3)){i+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+i);const m=[...r[0]][0].length,p=s.slice(0,n+r.index+m+c);if(Math.min(n,c)%2){const v=p.slice(1,-1);return{type:"em",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}const g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(s){const e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),a=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&a&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(s){const e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s){const e=this.rules.inline.del.exec(s);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){const e=this.rules.inline.autolink.exec(s);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(s){var t;let e;if(e=this.rules.inline.url.exec(s)){let r,a;if(e[2]==="@")r=e[0],a="mailto:"+r;else{let n;do n=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(n!==e[0]);r=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(s){const e=this.rules.inline.text.exec(s);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$e=class ts{constructor(e){u(this,"tokens");u(this,"options");u(this,"state");u(this,"tokenizer");u(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ie,this.options.tokenizer=this.options.tokenizer||new _t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:te,block:At.normal,inline:lt.normal};this.options.pedantic?(t.block=At.pedantic,t.inline=lt.pedantic):this.options.gfm&&(t.block=At.gfm,this.options.breaks?t.inline=lt.breaks:t.inline=lt.gfm),this.tokenizer.rules=t}static get rules(){return{block:At,inline:lt}}static lex(e,t){return new ts(t).lex(e)}static lexInline(e,t){return new ts(t).inlineTokens(e)}lex(e){e=e.replace(te.carriageReturn,`
36
- `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var a,n,o;for(this.options.pedantic&&(e=e.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));e;){let c;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(i=>(c=i.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);const i=t.at(-1);c.raw.length===1&&i!==void 0?i.raw+=`
26
+ `),k=this.list(C);n[n.length-1]=k,r=r.substring(0,r.length-p.raw.length)+k.raw,a=a.substring(0,a.length-y.raw.length)+k.raw,t=C.substring(n.at(-1).raw.length).split(`
27
+ `);continue}}return{type:"blockquote",raw:r,tokens:n,text:a}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim();const r=t.length>1,a={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");const n=this.rules.other.listItemRegex(t);let o=!1;for(;s;){let h=!1,i="",u="";if(!(e=n.exec(s))||this.rules.block.hr.test(s))break;i=e[0],s=s.substring(i.length);let g=e[2].split(`
28
+ `,1)[0].replace(this.rules.other.listReplaceTabs,L=>" ".repeat(3*L.length)),p=s.split(`
29
+ `,1)[0],y=!g.trim(),C=0;if(this.options.pedantic?(C=2,u=g.trimStart()):y?C=e[1].length+1:(C=e[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,u=g.slice(C),C+=e[1].length),y&&this.rules.other.blankLine.test(p)&&(i+=p+`
30
+ `,s=s.substring(p.length+1),h=!0),!h){const L=this.rules.other.nextBulletRegex(C),T=this.rules.other.hrRegex(C),S=this.rules.other.fencesBeginRegex(C),x=this.rules.other.headingBeginRegex(C),D=this.rules.other.htmlBeginRegex(C);for(;s;){const R=s.split(`
31
+ `,1)[0];let z;if(p=R,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),z=p):z=p.replace(this.rules.other.tabCharGlobal," "),S.test(p)||x.test(p)||D.test(p)||L.test(p)||T.test(p))break;if(z.search(this.rules.other.nonSpaceChar)>=C||!p.trim())u+=`
32
+ `+z.slice(C);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(g)||x.test(g)||T.test(g))break;u+=`
33
+ `+p}!y&&!p.trim()&&(y=!0),i+=R+`
34
+ `,s=s.substring(R.length+1),g=z.slice(C)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let k=null,w;this.options.gfm&&(k=this.rules.other.listIsTask.exec(u),k&&(w=k[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:i,task:!!k,checked:w,loose:!1,text:u,tokens:[]}),a.raw+=i}const c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){const i=a.items[h].tokens.filter(g=>g.type==="space"),u=i.length>0&&i.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(s){const e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){const e=this.rules.block.def.exec(s);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:a}}}table(s){var o;const e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=Un(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
35
+ `):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===r.length){for(const c of r)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<t.length;c++)n.header.push({text:t[c],tokens:this.lexer.inline(t[c]),header:!0,align:n.align[c]});for(const c of a)n.rows.push(Un(c,n.header.length).map((h,i)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[i]})));return n}}lheading(s){const e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){const e=this.rules.block.paragraph.exec(s);if(e){const t=e[1].charAt(e[1].length-1)===`
36
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){const e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){const e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){const e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){const e=this.rules.inline.link.exec(s);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const n=Gt(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{const n=xl(e[2],"()");if(n===-2)return;if(n>-1){const c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let r=e[2],a="";if(this.options.pedantic){const n=this.rules.other.pedanticHrefTitle.exec(r);n&&(r=n[1],a=n[3])}else a=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),Hn(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){const r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[r.toLowerCase()];if(!a){const n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return Hn(t,a,t[0],this.lexer,this.rules)}}emStrong(s,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(s);if(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const n=[...r[0]].length-1;let o,c,h=n,i=0;const u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*s.length+n);(r=u.exec(e))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(c=[...o].length,r[3]||r[4]){h+=c;continue}else if((r[5]||r[6])&&n%3&&!((n+c)%3)){i+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+i);const g=[...r[0]][0].length,p=s.slice(0,n+r.index+g+c);if(Math.min(n,c)%2){const C=p.slice(1,-1);return{type:"em",raw:p,text:C,tokens:this.lexer.inlineTokens(C)}}const y=p.slice(2,-2);return{type:"strong",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(s){const e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),a=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&a&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(s){const e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s){const e=this.rules.inline.del.exec(s);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){const e=this.rules.inline.autolink.exec(s);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(s){var t;let e;if(e=this.rules.inline.url.exec(s)){let r,a;if(e[2]==="@")r=e[0],a="mailto:"+r;else{let n;do n=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(n!==e[0]);r=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(s){const e=this.rules.inline.text.exec(s);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},et=class ca{constructor(e){d(this,"tokens");d(this,"options");d(this,"state");d(this,"tokenizer");d(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||nt,this.options.tokenizer=this.options.tokenizer||new Nr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:he,block:Fr.normal,inline:Wt.normal};this.options.pedantic?(t.block=Fr.pedantic,t.inline=Wt.pedantic):this.options.gfm&&(t.block=Fr.gfm,this.options.breaks?t.inline=Wt.breaks:t.inline=Wt.gfm),this.tokenizer.rules=t}static get rules(){return{block:Fr,inline:Wt}}static lex(e,t){return new ca(t).lex(e)}static lexInline(e,t){return new ca(t).inlineTokens(e)}lex(e){e=e.replace(he.carriageReturn,`
37
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var a,n,o;for(this.options.pedantic&&(e=e.replace(he.tabCharGlobal," ").replace(he.spaceLine,""));e;){let c;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(i=>(c=i.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);const i=t.at(-1);c.raw.length===1&&i!==void 0?i.raw+=`
37
38
  `:t.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);const i=t.at(-1);(i==null?void 0:i.type)==="paragraph"||(i==null?void 0:i.type)==="text"?(i.raw+=`
38
39
  `+c.raw,i.text+=`
39
40
  `+c.text,this.inlineQueue.at(-1).src=i.text):t.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);const i=t.at(-1);(i==null?void 0:i.type)==="paragraph"||(i==null?void 0:i.type)==="text"?(i.raw+=`
40
41
  `+c.raw,i.text+=`
41
- `+c.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title});continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),t.push(c);continue}let h=e;if((o=this.options.extensions)!=null&&o.startBlock){let i=1/0;const l=e.slice(1);let m;this.options.extensions.startBlock.forEach(p=>{m=p.call({lexer:this},l),typeof m=="number"&&m>=0&&(i=Math.min(i,m))}),i<1/0&&i>=0&&(h=e.substring(0,i+1))}if(this.state.top&&(c=this.tokenizer.paragraph(h))){const i=t.at(-1);r&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=`
42
+ `+c.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title});continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),t.push(c);continue}let h=e;if((o=this.options.extensions)!=null&&o.startBlock){let i=1/0;const u=e.slice(1);let g;this.options.extensions.startBlock.forEach(p=>{g=p.call({lexer:this},u),typeof g=="number"&&g>=0&&(i=Math.min(i,g))}),i<1/0&&i>=0&&(h=e.substring(0,i+1))}if(this.state.top&&(c=this.tokenizer.paragraph(h))){const i=t.at(-1);r&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=`
42
43
  `+c.raw,i.text+=`
43
44
  `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(c),r=h.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);const i=t.at(-1);(i==null?void 0:i.type)==="text"?(i.raw+=`
44
45
  `+c.raw,i.text+=`
45
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(c);continue}if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var c,h,i;let r=e,a=null;if(this.tokens.links){const l=Object.keys(this.tokens.links);if(l.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let n=!1,o="";for(;e;){n||(o=""),n=!1;let l;if((h=(c=this.options.extensions)==null?void 0:c.inline)!=null&&h.some(p=>(l=p.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);const p=t.at(-1);l.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=l.raw,p.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,r,o)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let m=e;if((i=this.options.extensions)!=null&&i.startInline){let p=1/0;const g=e.slice(1);let v;this.options.extensions.startInline.forEach(y=>{v=y.call({lexer:this},g),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(m=e.substring(0,p+1))}if(l=this.tokenizer.inlineText(m)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),n=!0;const p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=l.raw,p.text+=l.text):t.push(l);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},Mt=class{constructor(s){u(this,"options");u(this,"parser");this.options=s||Ie}space(s){return""}code({text:s,lang:e,escaped:t}){var n;const r=(n=(e||"").match(te.notSpaceStart))==null?void 0:n[0],a=s.replace(te.endingNewline,"")+`
46
- `;return r?'<pre><code class="language-'+ue(r)+'">'+(t?a:ue(a,!0))+`</code></pre>
47
- `:"<pre><code>"+(t?a:ue(a,!0))+`</code></pre>
46
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(c);continue}if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var c,h,i;let r=e,a=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let n=!1,o="";for(;e;){n||(o=""),n=!1;let u;if((h=(c=this.options.extensions)==null?void 0:c.inline)!=null&&h.some(p=>(u=p.call({lexer:this},e,t))?(e=e.substring(u.raw.length),t.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);const p=t.at(-1);u.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):t.push(u);continue}if(u=this.tokenizer.emStrong(e,r,o)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.del(e)){e=e.substring(u.raw.length),t.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),t.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),t.push(u);continue}let g=e;if((i=this.options.extensions)!=null&&i.startInline){let p=1/0;const y=e.slice(1);let C;this.options.extensions.startInline.forEach(k=>{C=k.call({lexer:this},y),typeof C=="number"&&C>=0&&(p=Math.min(p,C))}),p<1/0&&p>=0&&(g=e.substring(0,p+1))}if(u=this.tokenizer.inlineText(g)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(o=u.raw.slice(-1)),n=!0;const p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):t.push(u);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},zr=class{constructor(s){d(this,"options");d(this,"parser");this.options=s||nt}space(s){return""}code({text:s,lang:e,escaped:t}){var n;const r=(n=(e||"").match(he.notSpaceStart))==null?void 0:n[0],a=s.replace(he.endingNewline,"")+`
47
+ `;return r?'<pre><code class="language-'+Fe(r)+'">'+(t?a:Fe(a,!0))+`</code></pre>
48
+ `:"<pre><code>"+(t?a:Fe(a,!0))+`</code></pre>
48
49
  `}blockquote({tokens:s}){return`<blockquote>
49
50
  ${this.parser.parse(s)}</blockquote>
50
51
  `}html({text:s}){return s}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>
51
52
  `}hr(s){return`<hr>
52
53
  `}list(s){const e=s.ordered,t=s.start;let r="";for(let o=0;o<s.items.length;o++){const c=s.items[o];r+=this.listitem(c)}const a=e?"ol":"ul",n=e&&t!==1?' start="'+t+'"':"";return"<"+a+n+`>
53
54
  `+r+"</"+a+`>
54
- `}listitem(s){var t;let e="";if(s.task){const r=this.checkbox({checked:!!s.checked});s.loose?((t=s.tokens[0])==null?void 0:t.type)==="paragraph"?(s.tokens[0].text=r+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=r+" "+ue(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>
55
+ `}listitem(s){var t;let e="";if(s.task){const r=this.checkbox({checked:!!s.checked});s.loose?((t=s.tokens[0])==null?void 0:t.type)==="paragraph"?(s.tokens[0].text=r+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=r+" "+Fe(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>
55
56
  `}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
56
57
  `}table(s){let e="",t="";for(let a=0;a<s.header.length;a++)t+=this.tablecell(s.header[a]);e+=this.tablerow({text:t});let r="";for(let a=0;a<s.rows.length;a++){const n=s.rows[a];t="";for(let o=0;o<n.length;o++)t+=this.tablecell(n[o]);r+=this.tablerow({text:t})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
57
58
  <thead>
@@ -60,10 +61,10 @@ ${this.parser.parse(s)}</blockquote>
60
61
  `}tablerow({text:s}){return`<tr>
61
62
  ${s}</tr>
62
63
  `}tablecell(s){const e=this.parser.parseInline(s.tokens),t=s.header?"th":"td";return(s.align?`<${t} align="${s.align}">`:`<${t}>`)+e+`</${t}>
63
- `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${ue(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){const r=this.parser.parseInline(t),a=va(s);if(a===null)return r;s=a;let n='<a href="'+s+'"';return e&&(n+=' title="'+ue(e)+'"'),n+=">"+r+"</a>",n}image({href:s,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));const a=va(s);if(a===null)return ue(t);s=a;let n=`<img src="${s}" alt="${t}"`;return e&&(n+=` title="${ue(e)}"`),n+=">",n}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:ue(s.text)}},Dr=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},Te=class rs{constructor(e){u(this,"options");u(this,"renderer");u(this,"textRenderer");this.options=e||Ie,this.options.renderer=this.options.renderer||new Mt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dr}static parse(e,t){return new rs(t).parse(e)}static parseInline(e,t){return new rs(t).parseInline(e)}parse(e,t=!0){var a,n;let r="";for(let o=0;o<e.length;o++){const c=e[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[c.type]){const i=c,l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){r+=l||"";continue}}const h=c;switch(h.type){case"space":{r+=this.renderer.space(h);continue}case"hr":{r+=this.renderer.hr(h);continue}case"heading":{r+=this.renderer.heading(h);continue}case"code":{r+=this.renderer.code(h);continue}case"table":{r+=this.renderer.table(h);continue}case"blockquote":{r+=this.renderer.blockquote(h);continue}case"list":{r+=this.renderer.list(h);continue}case"html":{r+=this.renderer.html(h);continue}case"paragraph":{r+=this.renderer.paragraph(h);continue}case"text":{let i=h,l=this.renderer.text(i);for(;o+1<e.length&&e[o+1].type==="text";)i=e[++o],l+=`
64
- `+this.renderer.text(i);t?r+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):r+=l;continue}default:{const i='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}parseInline(e,t=this.renderer){var a,n;let r="";for(let o=0;o<e.length;o++){const c=e[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[c.type]){const i=this.options.extensions.renderers[c.type].call({parser:this},c);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=i||"";continue}}const h=c;switch(h.type){case"escape":{r+=t.text(h);break}case"html":{r+=t.html(h);break}case"link":{r+=t.link(h);break}case"image":{r+=t.image(h);break}case"strong":{r+=t.strong(h);break}case"em":{r+=t.em(h);break}case"codespan":{r+=t.codespan(h);break}case"br":{r+=t.br(h);break}case"del":{r+=t.del(h);break}case"text":{r+=t.text(h);break}default:{const i='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}},Ft=(Ur=class{constructor(s){u(this,"options");u(this,"block");this.options=s||Ie}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?$e.lex:$e.lexInline}provideParser(){return this.block?Te.parse:Te.parseInline}},u(Ur,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ur),lc=class{constructor(...s){u(this,"defaults",Er());u(this,"options",this.setOptions);u(this,"parse",this.parseMarkdown(!0));u(this,"parseInline",this.parseMarkdown(!1));u(this,"Parser",Te);u(this,"Renderer",Mt);u(this,"TextRenderer",Dr);u(this,"Lexer",$e);u(this,"Tokenizer",_t);u(this,"Hooks",Ft);this.use(...s)}walkTokens(s,e){var r,a;let t=[];for(const n of s)switch(t=t.concat(e.call(this,n)),n.type){case"table":{const o=n;for(const c of o.header)t=t.concat(this.walkTokens(c.tokens,e));for(const c of o.rows)for(const h of c)t=t.concat(this.walkTokens(h.tokens,e));break}case"list":{const o=n;t=t.concat(this.walkTokens(o.items,e));break}default:{const o=n;(a=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(c=>{const h=o[c].flat(1/0);t=t.concat(this.walkTokens(h,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...s){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const n=e.renderers[a.name];n?e.renderers[a.name]=function(...o){let c=a.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const n=e[a.level];n?n.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),t.renderer){const a=this.defaults.renderer||new Mt(this.defaults);for(const n in t.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const o=n,c=t.renderer[o],h=a[o];a[o]=(...i)=>{let l=c.apply(a,i);return l===!1&&(l=h.apply(a,i)),l||""}}r.renderer=a}if(t.tokenizer){const a=this.defaults.tokenizer||new _t(this.defaults);for(const n in t.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const o=n,c=t.tokenizer[o],h=a[o];a[o]=(...i)=>{let l=c.apply(a,i);return l===!1&&(l=h.apply(a,i)),l}}r.tokenizer=a}if(t.hooks){const a=this.defaults.hooks||new Ft;for(const n in t.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const o=n,c=t.hooks[o],h=a[o];Ft.passThroughHooks.has(n)?a[o]=i=>{if(this.defaults.async)return Promise.resolve(c.call(a,i)).then(m=>h.call(a,m));const l=c.call(a,i);return h.call(a,l)}:a[o]=(...i)=>{let l=c.apply(a,i);return l===!1&&(l=h.apply(a,i)),l}}r.hooks=a}if(t.walkTokens){const a=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(o){let c=[];return c.push(n.call(this,o)),a&&(c=c.concat(a.call(this,o))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return $e.lex(s,e??this.defaults)}parser(s,e){return Te.parse(s,e??this.defaults)}parseMarkdown(s){return(t,r)=>{const a={...r},n={...this.defaults,...a},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=s);const c=n.hooks?n.hooks.provideLexer():s?$e.lex:$e.lexInline,h=n.hooks?n.hooks.provideParser():s?Te.parse:Te.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(i=>c(i,n)).then(i=>n.hooks?n.hooks.processAllTokens(i):i).then(i=>n.walkTokens?Promise.all(this.walkTokens(i,n.walkTokens)).then(()=>i):i).then(i=>h(i,n)).then(i=>n.hooks?n.hooks.postprocess(i):i).catch(o);try{n.hooks&&(t=n.hooks.preprocess(t));let i=c(t,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let l=h(i,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(i){return o(i)}}}onError(s,e){return t=>{if(t.message+=`
65
- Please report this to https://github.com/markedjs/marked.`,s){const r="<p>An error occurred:</p><pre>"+ue(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},Ae=new lc;function M(s,e){return Ae.parse(s,e)}M.options=M.setOptions=function(s){return Ae.setOptions(s),M.defaults=Ae.defaults,na(M.defaults),M},M.getDefaults=Er,M.defaults=Ie,M.use=function(...s){return Ae.use(...s),M.defaults=Ae.defaults,na(M.defaults),M},M.walkTokens=function(s,e){return Ae.walkTokens(s,e)},M.parseInline=Ae.parseInline,M.Parser=Te,M.parser=Te.parse,M.Renderer=Mt,M.TextRenderer=Dr,M.Lexer=$e,M.lexer=$e.lex,M.Tokenizer=_t,M.Hooks=Ft,M.parse=M;const hc=D(class extends O{constructor(t){super();u(this,"searchcraftId");u(this,"summary","");u(this,"isLoading",!1);u(this,"isSummaryNotEnabled",!1);u(this,"unsubscribe");u(this,"cleanupCore");t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.unsubscribe=t.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=j.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){this.isLoading=t.isSummaryLoading,this.isSummaryNotEnabled=t.isSummaryNotEnabled,this.summary=this.sanitizeMarkdown(t.summary),this.updateContentElement(t.summary)}sanitizeMarkdown(t){return qs.sanitize(M.parse(t))}updateContentElement(t){var a;const r=(a=this.hostElement)==null?void 0:a.querySelector(".searchcraft-summary-box-content");r&&(r.innerHTML=this.sanitizeMarkdown(t))}renderContent(){return this.isLoading?d("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?d("div",{class:"searchcraft-summary-box-content"},"AI summaries are not enabled"):d("div",{class:"searchcraft-summary-box-content"},this.summary)}render(){return d("div",{key:"94033d861f93036430eca149b3c017fb6099fb17",class:"searchcraft-summary-box"},this.renderContent())}},[768,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function uc(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-summary-box":customElements.get(e)||customElements.define(e,hc);break;case"searchcraft-loading":customElements.get(e)||Js();break}})}const dc=uc;var fc=`\uFEFF[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:8px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);gap:8px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:flex}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:flex}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}@media(max-width: 767px){[data-toggle-filter-panel]{cursor:pointer;display:flex !important;align-items:center;justify-content:space-between;width:100%}[data-toggle-filter-panel]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-filter-panel][data-filter-panel-collapsed]::after{transform:rotate(90deg)}[data-toggle-filter-panel][data-filter-panel-expanded]::after{transform:rotate(-90deg)}}@media(min-width: 768px){[data-toggle-filter-panel]{cursor:default}[data-toggle-filter-panel]::after{display:none}}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input.searchcraft-placeholder-hide-on-focus:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;width:0}.searchcraft-popover-form-cancel-button{background:none;border:none;cursor:pointer;font-size:14px}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-modal-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view{flex-grow:1;flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{border-radius:var(--sc-border-radius-2xl);inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-modal-cancel-button{padding:8px 12px}}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-cancel-button{border-radius:var(--sc-border-radius-lg);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-fullscreen-cancel-button{padding:8px 12px}}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 24px}@media(min-width: 576px){.searchcraft-popover-footer{padding:20px 32px}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%;margin-top:4px}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px}.searchcraft-slider-range .searchcraft-slider-input:focus::-webkit-slider-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-range .searchcraft-slider-input:focus::-moz-range-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);justify-content:space-between;margin-top:4px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}.searchcraft-summary-box{padding:20px;border-radius:var(--sc-border-radius);background-color:var(--sc-surface-neutral-secondary);position:relative;min-height:200px;color:var(--sc-content-neutral-primary);font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-summary-box h1,.searchcraft-summary-box h2,.searchcraft-summary-box h3,.searchcraft-summary-box h4,.searchcraft-summary-box h5{padding-top:10px;padding-bottom:10px}.searchcraft-summary-box p{padding-bottom:10px}.searchcraft-summary-box img{max-width:200px}.searchcraft-summary-box ol,.searchcraft-summary-box ul{padding-left:1em;padding-bottom:10px}.searchcraft-summary-box a{color:var(--sc-content-brand)}.searchcraft-loading-label{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin-top:40px;letter-spacing:2px;color:#828282;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-loading-bars{margin:0 auto;width:60px;height:50px;text-align:center;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);display:flex;gap:2px}.searchcraft-loading-bars>div{height:100%;width:8px;-webkit-animation:delay .8s infinite ease-in-out;animation:delay .8s infinite ease-in-out;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-1{background-color:var(--sc-surface-brand-primary);opacity:.1}.searchcraft-loading-bars .searchcraft-loading-bar-2{background-color:var(--sc-surface-brand-primary);animation-delay:-0.7s;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-3{background-color:var(--sc-surface-brand-primary);animation-delay:-0.6s;opacity:.3}.searchcraft-loading-bars .searchcraft-loading-bar-4{background-color:var(--sc-surface-brand-primary);animation-delay:-0.5s;opacity:.4}.searchcraft-loading-bars .searchcraft-loading-bar-5{background-color:var(--sc-surface-brand-primary);animation-delay:-0.4s;opacity:.5}.searchcraft-loading-bars .searchcraft-loading-bar-6{background-color:var(--sc-surface-brand-primary);animation-delay:-0.3s;opacity:.6}@keyframes delay{0%,40%,100%{transform:scaleY(0.05)}20%{transform:scaleY(1)}}/*# sourceMappingURL=hologram.css.map */
66
- `;const pc=D(class extends O{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return d("style",{key:"13c28bb6075d6fcbec33938fd2227d9fb6129bf2"},fc)}},[256,"searchcraft-theme"]);function mc(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(e=>{switch(e){case"searchcraft-theme":customElements.get(e)||customElements.define(e,pc);break}})}const gc=mc,bc=Xs,Ca=()=>{Ao(),Mo(),Lo(),zo(),Go(),Yo(),Xo(),Jo(),ri(),ni(),ii(),ui(),di(),fi(),gi(),vi(),Ri(),Ci(),$i(),Ti(),dc(),gc(),bc()};globalThis.__scDefineCustomElements__=Ca;var W;(function(s){s[s.DEBUG=0]="DEBUG",s[s.INFO=1]="INFO",s[s.WARN=2]="WARN",s[s.ERROR=3]="ERROR",s[s.NONE=4]="NONE"})(W||(W={}));class vc{constructor(e){u(this,"logLevel");u(this,"logFormatter");this.logLevel=e.logLevel||W.INFO,this.logFormatter=e.logFormatter||this.defaultFormatter}defaultFormatter(e,t){return`[${W[e]}] ${new Date().toISOString()}: ${t}`}debug(e){this.logLevel<=W.DEBUG&&console.log(this.logFormatter(W.DEBUG,e))}info(e){this.logLevel<=W.INFO&&console.info(this.logFormatter(W.INFO,e))}warn(e){this.logLevel<=W.WARN&&console.warn(this.logFormatter(W.WARN,e))}error(e){this.logLevel<=W.ERROR&&console.error(this.logFormatter(W.ERROR,e))}log(e,t){switch(e){case W.DEBUG:this.debug(t);break;case W.INFO:this.info(t);break;case W.WARN:this.warn(t);break;case W.ERROR:this.error(t);break}}}const Lt=new vc({logLevel:W.NONE});function be(s,e,t,r){return new(t||(t=Promise))(function(a,n){function o(i){try{h(r.next(i))}catch(l){n(l)}}function c(i){try{h(r.throw(i))}catch(l){n(l)}}function h(i){var l;i.done?a(i.value):(l=i.value,l instanceof t?l:new t(function(m){m(l)})).then(o,c)}h((r=r.apply(s,[])).next())})}function ve(s,e){var t,r,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(h){return function(i){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;n&&(n=0,l[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||l[0]!==6&&l[0]!==2)){o=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(l[0]===6&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(s,o)}catch(m){l=[6,m],r=0}finally{t=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([h,i])}}}typeof SuppressedError=="function"&&SuppressedError;var ye={exclude:[]},xa={},yc={timeout:"true"},he=function(s,e){typeof window<"u"&&(xa[s]=e)},kc=function(){return Object.fromEntries(Object.entries(xa).filter(function(s){var e,t=s[0];return!(!((e=ye==null?void 0:ye.exclude)===null||e===void 0)&&e.includes(t))}).map(function(s){return[s[0],(0,s[1])()]}))};function Ot(s){return s^=s>>>16,s=Math.imul(s,2246822507),s^=s>>>13,s=Math.imul(s,3266489909),(s^=s>>>16)>>>0}var Y=new Uint32Array([597399067,2869860233,951274213,2716044179]);function ce(s,e){return s<<e|s>>>32-e}function zr(s,e){var t;if(e===void 0&&(e=0),e=e?0|e:0,typeof s=="string"&&(t=s,s=new TextEncoder().encode(t).buffer),!(s instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var r=new Uint32Array([e,e,e,e]);(function(n,o){for(var c=n.byteLength/16|0,h=new Uint32Array(n,0,4*c),i=0;i<c;i++){var l=h.subarray(4*i,4*(i+1));l[0]=Math.imul(l[0],Y[0]),l[0]=ce(l[0],15),l[0]=Math.imul(l[0],Y[1]),o[0]=o[0]^l[0],o[0]=ce(o[0],19),o[0]=o[0]+o[1],o[0]=Math.imul(o[0],5)+1444728091,l[1]=Math.imul(l[1],Y[1]),l[1]=ce(l[1],16),l[1]=Math.imul(l[1],Y[2]),o[1]=o[1]^l[1],o[1]=ce(o[1],17),o[1]=o[1]+o[2],o[1]=Math.imul(o[1],5)+197830471,l[2]=Math.imul(l[2],Y[2]),l[2]=ce(l[2],17),l[2]=Math.imul(l[2],Y[3]),o[2]=o[2]^l[2],o[2]=ce(o[2],15),o[2]=o[2]+o[3],o[2]=Math.imul(o[2],5)+2530024501,l[3]=Math.imul(l[3],Y[3]),l[3]=ce(l[3],18),l[3]=Math.imul(l[3],Y[0]),o[3]=o[3]^l[3],o[3]=ce(o[3],13),o[3]=o[3]+o[0],o[3]=Math.imul(o[3],5)+850148119}})(s,r),function(n,o){var c=n.byteLength/16|0,h=n.byteLength%16,i=new Uint32Array(4),l=new Uint8Array(n,16*c,h);switch(h){case 15:i[3]=i[3]^l[14]<<16;case 14:i[3]=i[3]^l[13]<<8;case 13:i[3]=i[3]^l[12]<<0,i[3]=Math.imul(i[3],Y[3]),i[3]=ce(i[3],18),i[3]=Math.imul(i[3],Y[0]),o[3]=o[3]^i[3];case 12:i[2]=i[2]^l[11]<<24;case 11:i[2]=i[2]^l[10]<<16;case 10:i[2]=i[2]^l[9]<<8;case 9:i[2]=i[2]^l[8]<<0,i[2]=Math.imul(i[2],Y[2]),i[2]=ce(i[2],17),i[2]=Math.imul(i[2],Y[3]),o[2]=o[2]^i[2];case 8:i[1]=i[1]^l[7]<<24;case 7:i[1]=i[1]^l[6]<<16;case 6:i[1]=i[1]^l[5]<<8;case 5:i[1]=i[1]^l[4]<<0,i[1]=Math.imul(i[1],Y[1]),i[1]=ce(i[1],16),i[1]=Math.imul(i[1],Y[2]),o[1]=o[1]^i[1];case 4:i[0]=i[0]^l[3]<<24;case 3:i[0]=i[0]^l[2]<<16;case 2:i[0]=i[0]^l[1]<<8;case 1:i[0]=i[0]^l[0]<<0,i[0]=Math.imul(i[0],Y[0]),i[0]=ce(i[0],15),i[0]=Math.imul(i[0],Y[1]),o[0]=o[0]^i[0]}}(s,r),function(n,o){o[0]=o[0]^n.byteLength,o[1]=o[1]^n.byteLength,o[2]=o[2]^n.byteLength,o[3]=o[3]^n.byteLength,o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0,o[0]=Ot(o[0]),o[1]=Ot(o[1]),o[2]=Ot(o[2]),o[3]=Ot(o[3]),o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0}(s,r);var a=new Uint8Array(r.buffer);return Array.from(a).map(function(n){return n.toString(16).padStart(2,"0")}).join("")}function Cc(s,e){return new Promise(function(t){setTimeout(function(){return t(e)},s)})}function xc(s,e,t){return Promise.all(s.map(function(r){return Promise.race([r,Cc(e,t)])}))}function Sc(){return be(this,void 0,void 0,function(){var s,e,t,r,a;return ve(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),s=kc(),e=Object.keys(s),[4,xc(Object.values(s),(ye==null?void 0:ye.timeout)||1e3,yc)];case 1:return t=n.sent(),r=t.filter(function(o){return o!==void 0}),a={},r.forEach(function(o,c){a[e[c]]=o}),[2,Sa(a,ye.exclude||[])];case 2:throw n.sent();case 3:return[2]}})})}function Sa(s,e){var t={},r=function(n){if(s.hasOwnProperty(n)){var o=s[n];if(typeof o!="object"||Array.isArray(o))e.includes(n)||(t[n]=o);else{var c=Sa(o,e.map(function(h){return h.startsWith(n+".")?h.slice(n.length+1):h}));Object.keys(c).length>0&&(t[n]=c)}}};for(var a in s)r(a);return t}function wc(s){return be(this,void 0,void 0,function(){var e,t;return ve(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Sc()];case 1:return e=r.sent(),t=zr(JSON.stringify(e)),[2,t.toString()];case 2:throw r.sent();case 3:return[2]}})})}function Rc(s){for(var e=0,t=0;t<s.length;++t)e+=Math.abs(s[t]);return e}function wa(s,e,t){for(var r=[],a=0;a<s[0].data.length;a++){for(var n=[],o=0;o<s.length;o++)n.push(s[o].data[a]);r.push($c(n))}var c=new Uint8ClampedArray(r);return new ImageData(c,e,t)}function $c(s){if(s.length===0)return 0;for(var e={},t=0,r=s;t<r.length;t++)e[n=r[t]]=(e[n]||0)+1;var a=s[0];for(var n in e)e[n]>e[a]&&(a=parseInt(n,10));return a}function ut(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var s=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},t=0,r=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];t<r.length;t++){var a=r[t],n=s.match(a);if(n&&n.groups)return{name:e[n.groups.name]||n.groups.name,version:n.groups.version}}return{name:"unknown",version:"unknown"}}he("audio",function(){return be(this,void 0,void 0,function(){return ve(this,function(s){return[2,new Promise(function(e,t){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=r.createBufferSource(),n=r.createOscillator();n.frequency.value=1e3;var o,c=r.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,n.connect(c),c.connect(r.destination),n.start(),r.oncomplete=function(h){o=h.renderedBuffer.getChannelData(0),e({sampleHash:Rc(o),oscillator:n.type,maxChannels:r.destination.maxChannelCount,channelCountMode:a.channelCountMode})},r.startRendering()}catch(h){console.error("Error creating audio fingerprint:",h),t(h)}})]})})});var Tc=ut().name!=="SamsungBrowser"?1:3,Ra=280,$a=20;ut().name!="Firefox"&&he("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(s){var e=Array.from({length:Tc},function(){return function(){var t=document.createElement("canvas"),r=t.getContext("2d");if(!r)return new ImageData(1,1);t.width=Ra,t.height=$a;var a=r.createLinearGradient(0,0,t.width,t.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),r.fillStyle=a,r.fillRect(0,0,t.width,t.height);var n="Random Text WMwmil10Oo";r.font="23.123px Arial",r.fillStyle="black",r.fillText(n,-5,15),r.fillStyle="rgba(0, 0, 255, 0.5)",r.fillText(n,-3.3,17.7),r.beginPath(),r.moveTo(0,0),r.lineTo(2*t.width/7,t.height),r.strokeStyle="white",r.lineWidth=2,r.stroke();var o=r.getImageData(0,0,t.width,t.height);return o}()});s({commonImageDataHash:zr(wa(e,Ra,$a).data.toString()).toString()})})});var Nr,Ec=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],Pc=["monospace","sans-serif","serif"];function Ta(s,e){if(!s)throw new Error("Canvas context not supported");return s.font="72px ".concat(e),s.measureText("WwMmLli0Oo").width}function Ic(){var s,e=document.createElement("canvas"),t=(s=e.getContext("webgl"))!==null&&s!==void 0?s:e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var r=(t.getParameter(t.VENDOR)||"").toString(),a=(t.getParameter(t.RENDERER)||"").toString(),n={vendor:r,renderer:a,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!r.length){var o=t.getExtension("WEBGL_debug_renderer_info");if(o){var c=(t.getParameter(o.UNMASKED_VENDOR_WEBGL)||"").toString(),h=(t.getParameter(o.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(n.vendorUnmasked=c),h&&(n.rendererUnmasked=h)}}return n}catch{}return"undefined"}function Ac(){var s=new Float32Array(1),e=new Uint8Array(s.buffer);return s[0]=1/0,s[0]=s[0]-s[0],e[3]}function _c(s,e){var t={};return e.forEach(function(r){var a=function(n){if(n.length===0)return null;var o={};n.forEach(function(i){var l=String(i);o[l]=(o[l]||0)+1});var c=n[0],h=1;return Object.keys(o).forEach(function(i){o[i]>h&&(c=i,h=o[i])}),c}(s.map(function(n){return r in n?n[r]:void 0}).filter(function(n){return n!==void 0}));a&&(t[r]=a)}),t}function Mc(){var s=[],e={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(e).forEach(function(t){e[t].forEach(function(r){matchMedia("(".concat(t,": ").concat(r,")")).matches&&s.push("".concat(t,": ").concat(r))})}),s}function Fc(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var s=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(s(e))return e}catch{return 0}return 0}ut().name!="Firefox"&&he("fonts",function(){var s=this;return new Promise(function(e,t){try{(function(r){var a;be(this,void 0,void 0,function(){var n,o,c;return ve(this,function(h){switch(h.label){case 0:return document.body?[3,2]:[4,(i=50,new Promise(function(m){return setTimeout(m,i,l)}))];case 1:return h.sent(),[3,0];case 2:if((n=document.createElement("iframe")).setAttribute("frameBorder","0"),(o=n.style).setProperty("position","fixed"),o.setProperty("display","block","important"),o.setProperty("visibility","visible"),o.setProperty("border","0"),o.setProperty("opacity","0"),n.src="about:blank",document.body.appendChild(n),!(c=n.contentDocument||((a=n.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return r({iframe:c}),setTimeout(function(){document.body.removeChild(n)},0),[2]}var i,l})})})(function(r){var a=r.iframe;return be(s,void 0,void 0,function(){var n,o,c,h;return ve(this,function(i){return n=a.createElement("canvas"),o=n.getContext("2d"),c=Pc.map(function(l){return Ta(o,l)}),h={},Ec.forEach(function(l){var m=Ta(o,l);c.includes(m)||(h[l]=m)}),e(h),[2]})})})}catch{t({error:"unsupported"})}})}),he("hardware",function(){return new Promise(function(s,e){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,r=window.performance&&window.performance.memory?window.performance.memory:0;s({videocard:Ic(),architecture:Ac(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:r.jsHeapSizeLimit||0})})}),he("locales",function(){return new Promise(function(s){s({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),he("permissions",function(){return be(this,void 0,void 0,function(){var s;return ve(this,function(e){return Nr=(ye==null?void 0:ye.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],s=Array.from({length:(ye==null?void 0:ye.retries)||3},function(){return function(){return be(this,void 0,void 0,function(){var t,r,a,n,o;return ve(this,function(c){switch(c.label){case 0:t={},r=0,a=Nr,c.label=1;case 1:if(!(r<a.length))return[3,6];n=a[r],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:n})];case 3:return o=c.sent(),t[n]=o.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return r++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(s).then(function(t){return _c(t,Nr)})]})})}),he("plugins",function(){var s=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var t=navigator.plugins[e];s.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(r){r({plugins:s})})}),he("screen",function(){return new Promise(function(s){s({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Mc()})})}),he("system",function(){return new Promise(function(s){var e=ut();s({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:Fc()})})});var re,Lc=ut().name!=="SamsungBrowser"?1:3,$=null;he("webgl",function(){return be(this,void 0,void 0,function(){var s;return ve(this,function(e){typeof document<"u"&&((re=document.createElement("canvas")).width=200,re.height=100,$=re.getContext("webgl"));try{if(!$)throw new Error("WebGL not supported");return s=Array.from({length:Lc},function(){return function(){try{if(!$)throw new Error("WebGL not supported");var t=`
64
+ `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Fe(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){const r=this.parser.parseInline(t),a=zn(s);if(a===null)return r;s=a;let n='<a href="'+s+'"';return e&&(n+=' title="'+Fe(e)+'"'),n+=">"+r+"</a>",n}image({href:s,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));const a=zn(s);if(a===null)return Fe(t);s=a;let n=`<img src="${s}" alt="${t}"`;return e&&(n+=` title="${Fe(e)}"`),n+=">",n}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Fe(s.text)}},Ws=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},tt=class la{constructor(e){d(this,"options");d(this,"renderer");d(this,"textRenderer");this.options=e||nt,this.options.renderer=this.options.renderer||new zr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ws}static parse(e,t){return new la(t).parse(e)}static parseInline(e,t){return new la(t).parseInline(e)}parse(e,t=!0){var a,n;let r="";for(let o=0;o<e.length;o++){const c=e[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[c.type]){const i=c,u=this.options.extensions.renderers[i.type].call({parser:this},i);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){r+=u||"";continue}}const h=c;switch(h.type){case"space":{r+=this.renderer.space(h);continue}case"hr":{r+=this.renderer.hr(h);continue}case"heading":{r+=this.renderer.heading(h);continue}case"code":{r+=this.renderer.code(h);continue}case"table":{r+=this.renderer.table(h);continue}case"blockquote":{r+=this.renderer.blockquote(h);continue}case"list":{r+=this.renderer.list(h);continue}case"html":{r+=this.renderer.html(h);continue}case"paragraph":{r+=this.renderer.paragraph(h);continue}case"text":{let i=h,u=this.renderer.text(i);for(;o+1<e.length&&e[o+1].type==="text";)i=e[++o],u+=`
65
+ `+this.renderer.text(i);t?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{const i='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}parseInline(e,t=this.renderer){var a,n;let r="";for(let o=0;o<e.length;o++){const c=e[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[c.type]){const i=this.options.extensions.renderers[c.type].call({parser:this},c);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=i||"";continue}}const h=c;switch(h.type){case"escape":{r+=t.text(h);break}case"html":{r+=t.html(h);break}case"link":{r+=t.link(h);break}case"image":{r+=t.image(h);break}case"strong":{r+=t.strong(h);break}case"em":{r+=t.em(h);break}case"codespan":{r+=t.codespan(h);break}case"br":{r+=t.br(h);break}case"del":{r+=t.del(h);break}case"text":{r+=t.text(h);break}default:{const i='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}},Ur=(Zs=class{constructor(s){d(this,"options");d(this,"block");this.options=s||nt}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?et.lex:et.lexInline}provideParser(){return this.block?tt.parse:tt.parseInline}},d(Zs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Zs),Tl=class{constructor(...s){d(this,"defaults",Ds());d(this,"options",this.setOptions);d(this,"parse",this.parseMarkdown(!0));d(this,"parseInline",this.parseMarkdown(!1));d(this,"Parser",tt);d(this,"Renderer",zr);d(this,"TextRenderer",Ws);d(this,"Lexer",et);d(this,"Tokenizer",Nr);d(this,"Hooks",Ur);this.use(...s)}walkTokens(s,e){var r,a;let t=[];for(const n of s)switch(t=t.concat(e.call(this,n)),n.type){case"table":{const o=n;for(const c of o.header)t=t.concat(this.walkTokens(c.tokens,e));for(const c of o.rows)for(const h of c)t=t.concat(this.walkTokens(h.tokens,e));break}case"list":{const o=n;t=t.concat(this.walkTokens(o.items,e));break}default:{const o=n;(a=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(c=>{const h=o[c].flat(1/0);t=t.concat(this.walkTokens(h,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...s){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const n=e.renderers[a.name];n?e.renderers[a.name]=function(...o){let c=a.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const n=e[a.level];n?n.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),t.renderer){const a=this.defaults.renderer||new zr(this.defaults);for(const n in t.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const o=n,c=t.renderer[o],h=a[o];a[o]=(...i)=>{let u=c.apply(a,i);return u===!1&&(u=h.apply(a,i)),u||""}}r.renderer=a}if(t.tokenizer){const a=this.defaults.tokenizer||new Nr(this.defaults);for(const n in t.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const o=n,c=t.tokenizer[o],h=a[o];a[o]=(...i)=>{let u=c.apply(a,i);return u===!1&&(u=h.apply(a,i)),u}}r.tokenizer=a}if(t.hooks){const a=this.defaults.hooks||new Ur;for(const n in t.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const o=n,c=t.hooks[o],h=a[o];Ur.passThroughHooks.has(n)?a[o]=i=>{if(this.defaults.async)return Promise.resolve(c.call(a,i)).then(g=>h.call(a,g));const u=c.call(a,i);return h.call(a,u)}:a[o]=(...i)=>{let u=c.apply(a,i);return u===!1&&(u=h.apply(a,i)),u}}r.hooks=a}if(t.walkTokens){const a=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(o){let c=[];return c.push(n.call(this,o)),a&&(c=c.concat(a.call(this,o))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return et.lex(s,e??this.defaults)}parser(s,e){return tt.parse(s,e??this.defaults)}parseMarkdown(s){return(t,r)=>{const a={...r},n={...this.defaults,...a},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=s);const c=n.hooks?n.hooks.provideLexer():s?et.lex:et.lexInline,h=n.hooks?n.hooks.provideParser():s?tt.parse:tt.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(i=>c(i,n)).then(i=>n.hooks?n.hooks.processAllTokens(i):i).then(i=>n.walkTokens?Promise.all(this.walkTokens(i,n.walkTokens)).then(()=>i):i).then(i=>h(i,n)).then(i=>n.hooks?n.hooks.postprocess(i):i).catch(o);try{n.hooks&&(t=n.hooks.preprocess(t));let i=c(t,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let u=h(i,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(i){return o(i)}}}onError(s,e){return t=>{if(t.message+=`
66
+ Please report this to https://github.com/markedjs/marked.`,s){const r="<p>An error occurred:</p><pre>"+Fe(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},ot=new Tl;function W(s,e){return ot.parse(s,e)}W.options=W.setOptions=function(s){return ot.setOptions(s),W.defaults=ot.defaults,Rn(W.defaults),W},W.getDefaults=Ds,W.defaults=nt,W.use=function(...s){return ot.use(...s),W.defaults=ot.defaults,Rn(W.defaults),W},W.walkTokens=function(s,e){return ot.walkTokens(s,e)},W.parseInline=ot.parseInline,W.Parser=tt,W.parser=tt.parse,W.Renderer=zr,W.TextRenderer=Ws,W.Lexer=et,W.lexer=et.lex,W.Tokenizer=Nr,W.Hooks=Ur,W.parse=W;const Rl=Y(class extends j{constructor(t){super();d(this,"searchcraftId");d(this,"summary","");d(this,"isLoading",!1);d(this,"isSummaryNotEnabled",!1);d(this,"unsubscribe");d(this,"cleanupCore");t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.unsubscribe=t.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){this.isLoading=t.isSummaryLoading,this.isSummaryNotEnabled=t.isSummaryNotEnabled,this.summary=this.sanitizeMarkdown(t.summary),this.updateContentElement(t.summary)}sanitizeMarkdown(t){return Ka.sanitize(W.parse(t))}updateContentElement(t){var a;const r=(a=this.hostElement)==null?void 0:a.querySelector(".searchcraft-summary-box-content");r&&(r.innerHTML=this.sanitizeMarkdown(t))}renderContent(){return this.isLoading?f("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?f("div",{class:"searchcraft-summary-box-content"},"AI summaries are not enabled"):f("div",{class:"searchcraft-summary-box-content"},this.summary)}render(){return f("div",{key:"94033d861f93036430eca149b3c017fb6099fb17",class:"searchcraft-summary-box"},this.renderContent())}},[768,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function El(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-summary-box":customElements.get(e)||customElements.define(e,Rl);break;case"searchcraft-loading":customElements.get(e)||Cn();break}})}const $l=El;var Al=`\uFEFF[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:8px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);gap:8px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:flex}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:flex}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-facet-list-wrapper{display:flex;flex-direction:column;width:100%;min-height:0}.searchcraft-facet-list-content{display:flex;flex-direction:column;gap:8px;min-height:0;flex-shrink:0}.searchcraft-facet-list-view-more{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:none;color:var(--sc-content-brand);cursor:pointer;padding:8px 0;text-align:left;text-decoration:underline}.searchcraft-facet-list-view-more:hover{color:var(--sc-surface-brand-primary-hover)}.searchcraft-facet-list-view-more:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}[data-toggle-facet-section]{cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;position:relative}[data-toggle-facet-section]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-facet-section][data-facet-section-collapsed]::after{transform:rotate(90deg)}[data-toggle-facet-section][data-facet-section-expanded]::after{transform:rotate(-90deg)}@media(max-width: 767px){[data-toggle-filter-panel]{cursor:pointer;display:flex !important;align-items:center;justify-content:space-between;width:100%}[data-toggle-filter-panel]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-filter-panel][data-filter-panel-collapsed]::after{transform:rotate(90deg)}[data-toggle-filter-panel][data-filter-panel-expanded]::after{transform:rotate(-90deg)}}@media(min-width: 768px){[data-toggle-filter-panel]{cursor:default}[data-toggle-filter-panel]::after{display:none}}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input.searchcraft-placeholder-hide-on-focus:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;width:0}.searchcraft-popover-form-cancel-button{background:none;border:none;cursor:pointer;font-size:14px}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-modal-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view{flex-grow:1;flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{border-radius:var(--sc-border-radius-2xl);inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-modal-cancel-button{padding:8px 12px}}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-cancel-button{border-radius:var(--sc-border-radius-lg);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-fullscreen-cancel-button{padding:8px 12px}}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 24px}@media(min-width: 576px){.searchcraft-popover-footer{padding:20px 32px}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%;margin-top:4px}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px}.searchcraft-slider-range .searchcraft-slider-input:focus::-webkit-slider-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-range .searchcraft-slider-input:focus::-moz-range-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);justify-content:space-between;margin-top:4px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}.searchcraft-summary-box{padding:20px;border-radius:var(--sc-border-radius);background-color:var(--sc-surface-neutral-secondary);position:relative;min-height:200px;color:var(--sc-content-neutral-primary);font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-summary-box h1,.searchcraft-summary-box h2,.searchcraft-summary-box h3,.searchcraft-summary-box h4,.searchcraft-summary-box h5{padding-top:10px;padding-bottom:10px}.searchcraft-summary-box p{padding-bottom:10px}.searchcraft-summary-box img{max-width:200px}.searchcraft-summary-box ol,.searchcraft-summary-box ul{padding-left:1em;padding-bottom:10px}.searchcraft-summary-box a{color:var(--sc-content-brand)}.searchcraft-loading-label{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin-top:40px;letter-spacing:2px;color:#828282;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-loading-bars{margin:0 auto;width:60px;height:50px;text-align:center;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);display:flex;gap:2px}.searchcraft-loading-bars>div{height:100%;width:8px;-webkit-animation:delay .8s infinite ease-in-out;animation:delay .8s infinite ease-in-out;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-1{background-color:var(--sc-surface-brand-primary);opacity:.1}.searchcraft-loading-bars .searchcraft-loading-bar-2{background-color:var(--sc-surface-brand-primary);animation-delay:-0.7s;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-3{background-color:var(--sc-surface-brand-primary);animation-delay:-0.6s;opacity:.3}.searchcraft-loading-bars .searchcraft-loading-bar-4{background-color:var(--sc-surface-brand-primary);animation-delay:-0.5s;opacity:.4}.searchcraft-loading-bars .searchcraft-loading-bar-5{background-color:var(--sc-surface-brand-primary);animation-delay:-0.4s;opacity:.5}.searchcraft-loading-bars .searchcraft-loading-bar-6{background-color:var(--sc-surface-brand-primary);animation-delay:-0.3s;opacity:.6}@keyframes delay{0%,40%,100%{transform:scaleY(0.05)}20%{transform:scaleY(1)}}/*# sourceMappingURL=hologram.css.map */
67
+ `;const _l=Y(class extends j{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return f("style",{key:"13c28bb6075d6fcbec33938fd2227d9fb6129bf2"},Al)}},[256,"searchcraft-theme"]);function Pl(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(e=>{switch(e){case"searchcraft-theme":customElements.get(e)||customElements.define(e,_l);break}})}const Il=Pl,Ml=vn,Bn=()=>{Ri(),$i(),_i(),ec(),lc(),dc(),fc(),mc(),vc(),kc(),xc(),Ec(),$c(),Ac(),Ic(),Lc(),Hc(),Fc(),Bc(),Vc(),$l(),Il(),Ml()};globalThis.__scDefineCustomElements__=Bn;var se;(function(s){s[s.DEBUG=0]="DEBUG",s[s.INFO=1]="INFO",s[s.WARN=2]="WARN",s[s.ERROR=3]="ERROR",s[s.NONE=4]="NONE"})(se||(se={}));class Ll{constructor(e){d(this,"logLevel");d(this,"logFormatter");this.logLevel=e.logLevel||se.INFO,this.logFormatter=e.logFormatter||this.defaultFormatter}defaultFormatter(e,t){return`[${se[e]}] ${new Date().toISOString()}: ${t}`}debug(e){this.logLevel<=se.DEBUG&&console.log(this.logFormatter(se.DEBUG,e))}info(e){this.logLevel<=se.INFO&&console.info(this.logFormatter(se.INFO,e))}warn(e){this.logLevel<=se.WARN&&console.warn(this.logFormatter(se.WARN,e))}error(e){this.logLevel<=se.ERROR&&console.error(this.logFormatter(se.ERROR,e))}log(e,t){switch(e){case se.DEBUG:this.debug(t);break;case se.INFO:this.info(t);break;case se.WARN:this.warn(t);break;case se.ERROR:this.error(t);break}}}const Hr=new Ll({logLevel:se.NONE});function He(s,e,t,r){return new(t||(t=Promise))(function(a,n){function o(i){try{h(r.next(i))}catch(u){n(u)}}function c(i){try{h(r.throw(i))}catch(u){n(u)}}function h(i){var u;i.done?a(i.value):(u=i.value,u instanceof t?u:new t(function(g){g(u)})).then(o,c)}h((r=r.apply(s,[])).next())})}function Be(s,e){var t,r,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(h){return function(i){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;n&&(n=0,u[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(s,o)}catch(g){u=[6,g],r=0}finally{t=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([h,i])}}}typeof SuppressedError=="function"&&SuppressedError;var Ve={exclude:[]},Vn={},Ol={timeout:"true"},Pe=function(s,e){typeof window<"u"&&(Vn[s]=e)},Dl=function(){return Object.fromEntries(Object.entries(Vn).filter(function(s){var e,t=s[0];return!(!((e=Ve==null?void 0:Ve.exclude)===null||e===void 0)&&e.includes(t))}).map(function(s){return[s[0],(0,s[1])()]}))};function Br(s){return s^=s>>>16,s=Math.imul(s,2246822507),s^=s>>>13,s=Math.imul(s,3266489909),(s^=s>>>16)>>>0}var ae=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Ee(s,e){return s<<e|s>>>32-e}function Gs(s,e){var t;if(e===void 0&&(e=0),e=e?0|e:0,typeof s=="string"&&(t=s,s=new TextEncoder().encode(t).buffer),!(s instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var r=new Uint32Array([e,e,e,e]);(function(n,o){for(var c=n.byteLength/16|0,h=new Uint32Array(n,0,4*c),i=0;i<c;i++){var u=h.subarray(4*i,4*(i+1));u[0]=Math.imul(u[0],ae[0]),u[0]=Ee(u[0],15),u[0]=Math.imul(u[0],ae[1]),o[0]=o[0]^u[0],o[0]=Ee(o[0],19),o[0]=o[0]+o[1],o[0]=Math.imul(o[0],5)+1444728091,u[1]=Math.imul(u[1],ae[1]),u[1]=Ee(u[1],16),u[1]=Math.imul(u[1],ae[2]),o[1]=o[1]^u[1],o[1]=Ee(o[1],17),o[1]=o[1]+o[2],o[1]=Math.imul(o[1],5)+197830471,u[2]=Math.imul(u[2],ae[2]),u[2]=Ee(u[2],17),u[2]=Math.imul(u[2],ae[3]),o[2]=o[2]^u[2],o[2]=Ee(o[2],15),o[2]=o[2]+o[3],o[2]=Math.imul(o[2],5)+2530024501,u[3]=Math.imul(u[3],ae[3]),u[3]=Ee(u[3],18),u[3]=Math.imul(u[3],ae[0]),o[3]=o[3]^u[3],o[3]=Ee(o[3],13),o[3]=o[3]+o[0],o[3]=Math.imul(o[3],5)+850148119}})(s,r),function(n,o){var c=n.byteLength/16|0,h=n.byteLength%16,i=new Uint32Array(4),u=new Uint8Array(n,16*c,h);switch(h){case 15:i[3]=i[3]^u[14]<<16;case 14:i[3]=i[3]^u[13]<<8;case 13:i[3]=i[3]^u[12]<<0,i[3]=Math.imul(i[3],ae[3]),i[3]=Ee(i[3],18),i[3]=Math.imul(i[3],ae[0]),o[3]=o[3]^i[3];case 12:i[2]=i[2]^u[11]<<24;case 11:i[2]=i[2]^u[10]<<16;case 10:i[2]=i[2]^u[9]<<8;case 9:i[2]=i[2]^u[8]<<0,i[2]=Math.imul(i[2],ae[2]),i[2]=Ee(i[2],17),i[2]=Math.imul(i[2],ae[3]),o[2]=o[2]^i[2];case 8:i[1]=i[1]^u[7]<<24;case 7:i[1]=i[1]^u[6]<<16;case 6:i[1]=i[1]^u[5]<<8;case 5:i[1]=i[1]^u[4]<<0,i[1]=Math.imul(i[1],ae[1]),i[1]=Ee(i[1],16),i[1]=Math.imul(i[1],ae[2]),o[1]=o[1]^i[1];case 4:i[0]=i[0]^u[3]<<24;case 3:i[0]=i[0]^u[2]<<16;case 2:i[0]=i[0]^u[1]<<8;case 1:i[0]=i[0]^u[0]<<0,i[0]=Math.imul(i[0],ae[0]),i[0]=Ee(i[0],15),i[0]=Math.imul(i[0],ae[1]),o[0]=o[0]^i[0]}}(s,r),function(n,o){o[0]=o[0]^n.byteLength,o[1]=o[1]^n.byteLength,o[2]=o[2]^n.byteLength,o[3]=o[3]^n.byteLength,o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0,o[0]=Br(o[0]),o[1]=Br(o[1]),o[2]=Br(o[2]),o[3]=Br(o[3]),o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0}(s,r);var a=new Uint8Array(r.buffer);return Array.from(a).map(function(n){return n.toString(16).padStart(2,"0")}).join("")}function Fl(s,e){return new Promise(function(t){setTimeout(function(){return t(e)},s)})}function Nl(s,e,t){return Promise.all(s.map(function(r){return Promise.race([r,Fl(e,t)])}))}function zl(){return He(this,void 0,void 0,function(){var s,e,t,r,a;return Be(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),s=Dl(),e=Object.keys(s),[4,Nl(Object.values(s),(Ve==null?void 0:Ve.timeout)||1e3,Ol)];case 1:return t=n.sent(),r=t.filter(function(o){return o!==void 0}),a={},r.forEach(function(o,c){a[e[c]]=o}),[2,qn(a,Ve.exclude||[])];case 2:throw n.sent();case 3:return[2]}})})}function qn(s,e){var t={},r=function(n){if(s.hasOwnProperty(n)){var o=s[n];if(typeof o!="object"||Array.isArray(o))e.includes(n)||(t[n]=o);else{var c=qn(o,e.map(function(h){return h.startsWith(n+".")?h.slice(n.length+1):h}));Object.keys(c).length>0&&(t[n]=c)}}};for(var a in s)r(a);return t}function Ul(s){return He(this,void 0,void 0,function(){var e,t;return Be(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,zl()];case 1:return e=r.sent(),t=Gs(JSON.stringify(e)),[2,t.toString()];case 2:throw r.sent();case 3:return[2]}})})}function Hl(s){for(var e=0,t=0;t<s.length;++t)e+=Math.abs(s[t]);return e}function Wn(s,e,t){for(var r=[],a=0;a<s[0].data.length;a++){for(var n=[],o=0;o<s.length;o++)n.push(s[o].data[a]);r.push(Bl(n))}var c=new Uint8ClampedArray(r);return new ImageData(c,e,t)}function Bl(s){if(s.length===0)return 0;for(var e={},t=0,r=s;t<r.length;t++)e[n=r[t]]=(e[n]||0)+1;var a=s[0];for(var n in e)e[n]>e[a]&&(a=parseInt(n,10));return a}function jt(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var s=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},t=0,r=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];t<r.length;t++){var a=r[t],n=s.match(a);if(n&&n.groups)return{name:e[n.groups.name]||n.groups.name,version:n.groups.version}}return{name:"unknown",version:"unknown"}}Pe("audio",function(){return He(this,void 0,void 0,function(){return Be(this,function(s){return[2,new Promise(function(e,t){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=r.createBufferSource(),n=r.createOscillator();n.frequency.value=1e3;var o,c=r.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,n.connect(c),c.connect(r.destination),n.start(),r.oncomplete=function(h){o=h.renderedBuffer.getChannelData(0),e({sampleHash:Hl(o),oscillator:n.type,maxChannels:r.destination.maxChannelCount,channelCountMode:a.channelCountMode})},r.startRendering()}catch(h){console.error("Error creating audio fingerprint:",h),t(h)}})]})})});var Vl=jt().name!=="SamsungBrowser"?1:3,Gn=280,jn=20;jt().name!="Firefox"&&Pe("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(s){var e=Array.from({length:Vl},function(){return function(){var t=document.createElement("canvas"),r=t.getContext("2d");if(!r)return new ImageData(1,1);t.width=Gn,t.height=jn;var a=r.createLinearGradient(0,0,t.width,t.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),r.fillStyle=a,r.fillRect(0,0,t.width,t.height);var n="Random Text WMwmil10Oo";r.font="23.123px Arial",r.fillStyle="black",r.fillText(n,-5,15),r.fillStyle="rgba(0, 0, 255, 0.5)",r.fillText(n,-3.3,17.7),r.beginPath(),r.moveTo(0,0),r.lineTo(2*t.width/7,t.height),r.strokeStyle="white",r.lineWidth=2,r.stroke();var o=r.getImageData(0,0,t.width,t.height);return o}()});s({commonImageDataHash:Gs(Wn(e,Gn,jn).data.toString()).toString()})})});var js,ql=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],Wl=["monospace","sans-serif","serif"];function Yn(s,e){if(!s)throw new Error("Canvas context not supported");return s.font="72px ".concat(e),s.measureText("WwMmLli0Oo").width}function Gl(){var s,e=document.createElement("canvas"),t=(s=e.getContext("webgl"))!==null&&s!==void 0?s:e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var r=(t.getParameter(t.VENDOR)||"").toString(),a=(t.getParameter(t.RENDERER)||"").toString(),n={vendor:r,renderer:a,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!r.length){var o=t.getExtension("WEBGL_debug_renderer_info");if(o){var c=(t.getParameter(o.UNMASKED_VENDOR_WEBGL)||"").toString(),h=(t.getParameter(o.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(n.vendorUnmasked=c),h&&(n.rendererUnmasked=h)}}return n}catch{}return"undefined"}function jl(){var s=new Float32Array(1),e=new Uint8Array(s.buffer);return s[0]=1/0,s[0]=s[0]-s[0],e[3]}function Yl(s,e){var t={};return e.forEach(function(r){var a=function(n){if(n.length===0)return null;var o={};n.forEach(function(i){var u=String(i);o[u]=(o[u]||0)+1});var c=n[0],h=1;return Object.keys(o).forEach(function(i){o[i]>h&&(c=i,h=o[i])}),c}(s.map(function(n){return r in n?n[r]:void 0}).filter(function(n){return n!==void 0}));a&&(t[r]=a)}),t}function Zl(){var s=[],e={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(e).forEach(function(t){e[t].forEach(function(r){matchMedia("(".concat(t,": ").concat(r,")")).matches&&s.push("".concat(t,": ").concat(r))})}),s}function Xl(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var s=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(s(e))return e}catch{return 0}return 0}jt().name!="Firefox"&&Pe("fonts",function(){var s=this;return new Promise(function(e,t){try{(function(r){var a;He(this,void 0,void 0,function(){var n,o,c;return Be(this,function(h){switch(h.label){case 0:return document.body?[3,2]:[4,(i=50,new Promise(function(g){return setTimeout(g,i,u)}))];case 1:return h.sent(),[3,0];case 2:if((n=document.createElement("iframe")).setAttribute("frameBorder","0"),(o=n.style).setProperty("position","fixed"),o.setProperty("display","block","important"),o.setProperty("visibility","visible"),o.setProperty("border","0"),o.setProperty("opacity","0"),n.src="about:blank",document.body.appendChild(n),!(c=n.contentDocument||((a=n.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return r({iframe:c}),setTimeout(function(){document.body.removeChild(n)},0),[2]}var i,u})})})(function(r){var a=r.iframe;return He(s,void 0,void 0,function(){var n,o,c,h;return Be(this,function(i){return n=a.createElement("canvas"),o=n.getContext("2d"),c=Wl.map(function(u){return Yn(o,u)}),h={},ql.forEach(function(u){var g=Yn(o,u);c.includes(g)||(h[u]=g)}),e(h),[2]})})})}catch{t({error:"unsupported"})}})}),Pe("hardware",function(){return new Promise(function(s,e){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,r=window.performance&&window.performance.memory?window.performance.memory:0;s({videocard:Gl(),architecture:jl(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:r.jsHeapSizeLimit||0})})}),Pe("locales",function(){return new Promise(function(s){s({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),Pe("permissions",function(){return He(this,void 0,void 0,function(){var s;return Be(this,function(e){return js=(Ve==null?void 0:Ve.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],s=Array.from({length:(Ve==null?void 0:Ve.retries)||3},function(){return function(){return He(this,void 0,void 0,function(){var t,r,a,n,o;return Be(this,function(c){switch(c.label){case 0:t={},r=0,a=js,c.label=1;case 1:if(!(r<a.length))return[3,6];n=a[r],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:n})];case 3:return o=c.sent(),t[n]=o.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return r++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(s).then(function(t){return Yl(t,js)})]})})}),Pe("plugins",function(){var s=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var t=navigator.plugins[e];s.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(r){r({plugins:s})})}),Pe("screen",function(){return new Promise(function(s){s({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Zl()})})}),Pe("system",function(){return new Promise(function(s){var e=jt();s({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:Xl()})})});var de,Ql=jt().name!=="SamsungBrowser"?1:3,E=null;Pe("webgl",function(){return He(this,void 0,void 0,function(){var s;return Be(this,function(e){typeof document<"u"&&((de=document.createElement("canvas")).width=200,de.height=100,E=de.getContext("webgl"));try{if(!E)throw new Error("WebGL not supported");return s=Array.from({length:Ql},function(){return function(){try{if(!E)throw new Error("WebGL not supported");var t=`
67
68
  attribute vec2 position;
68
69
  void main() {
69
70
  gl_Position = vec4(position, 0.0, 1.0);
@@ -73,5 +74,5 @@ Please report this to https://github.com/markedjs/marked.`,s){const r="<p>An err
73
74
  void main() {
74
75
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
75
76
  }
76
- `,a=$.createShader($.VERTEX_SHADER),n=$.createShader($.FRAGMENT_SHADER);if(!a||!n)throw new Error("Failed to create shaders");if($.shaderSource(a,t),$.shaderSource(n,r),$.compileShader(a),!$.getShaderParameter(a,$.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+$.getShaderInfoLog(a));if($.compileShader(n),!$.getShaderParameter(n,$.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+$.getShaderInfoLog(n));var o=$.createProgram();if(!o)throw new Error("Failed to create shader program");if($.attachShader(o,a),$.attachShader(o,n),$.linkProgram(o),!$.getProgramParameter(o,$.LINK_STATUS))throw new Error("Shader program linking failed: "+$.getProgramInfoLog(o));$.useProgram(o);for(var c=137,h=new Float32Array(4*c),i=2*Math.PI/c,l=0;l<c;l++){var m=l*i;h[4*l]=0,h[4*l+1]=0,h[4*l+2]=Math.cos(m)*(re.width/2),h[4*l+3]=Math.sin(m)*(re.height/2)}var p=$.createBuffer();$.bindBuffer($.ARRAY_BUFFER,p),$.bufferData($.ARRAY_BUFFER,h,$.STATIC_DRAW);var g=$.getAttribLocation(o,"position");$.enableVertexAttribArray(g),$.vertexAttribPointer(g,2,$.FLOAT,!1,0,0),$.viewport(0,0,re.width,re.height),$.clearColor(0,0,0,1),$.clear($.COLOR_BUFFER_BIT),$.drawArrays($.LINES,0,2*c);var v=new Uint8ClampedArray(re.width*re.height*4);return $.readPixels(0,0,re.width,re.height,$.RGBA,$.UNSIGNED_BYTE,v),new ImageData(v,re.width,re.height)}catch{return new ImageData(1,1)}finally{$&&($.bindBuffer($.ARRAY_BUFFER,null),$.useProgram(null),$.viewport(0,0,$.drawingBufferWidth,$.drawingBufferHeight),$.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:zr(wa(s,re.width,re.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var _e=function(s,e,t,r){for(var a=(t-e)/r,n=0,o=0;o<r;o++)n+=s(e+(o+.5)*a);return n*a};he("math",function(){return be(void 0,void 0,void 0,function(){return ve(this,function(s){return[2,{acos:Math.acos(.5),asin:_e(Math.asin,-1,1,97),atan:_e(Math.atan,-1,1,97),cos:_e(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:_e(Math.sin,-Math.PI,Math.PI,97),sinh:_e(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:_e(Math.tan,0,2*Math.PI,97),tanh:_e(Math.tanh,-9/7,7/9,97)}]})})});class Hr{constructor(e){u(this,"config");this.config=e}async getAds(e){return[]}async onQuerySubmitted(e){}async onQueryFetched(e,t){}async onInputCleared(){}async onAdContainerRendered(e){}async onAdContainerViewed(e){}}class Oc extends Hr{async getAds(e){const t=this.config.admAdConfig;if(!(t!=null&&t.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:t.sub,qt:e.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${t.textAdQuantity||0}`,"results-pa":`${t.productAdQuantity||0}`}).toString()}`,o=await(await fetch(a,{method:"GET"})).json(),c=o.product_ads.map(l=>({id:Pe(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:l})),h=o.text_ads.map(l=>({id:Pe(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:l}));return c.concat(h)}async onAdContainerViewed(e){var r;const t=e.adClientResponseItem;(r=t.admAd)!=null&&r.impression_url&&fetch(t.admAd.impression_url)}}class Dc extends Hr{async getAds(e){return[]}}const zc=1e3;class Nc extends Hr{constructor(t){super(t);u(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var a;if((((a=r.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(zc)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const Hc=600;class Uc{constructor(e,t,r,a){u(this,"measureRequestTimeout");u(this,"measureRequestsBatched",[]);u(this,"config");u(this,"sdkInfo");u(this,"userId");u(this,"userType");u(this,"sessionId");u(this,"sendMeasureEvent",async(e,t={},r={})=>{const a={event_name:e,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...t},user:{...this.measureRequestUser,...r}};if(e==="document_clicked"){const n=JSON.stringify(a),o=`${this.baseMeasureUrl}/event`;try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){console.error("Error sending MeasureRequest:",c)}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(()=>{const n=JSON.stringify({items:this.measureRequestsBatched}),o=`${this.baseMeasureUrl}/batch`;(async()=>{try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});this.measureRequestsBatched=[],c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",c)}})().catch(c=>{console.error("Unhandled error in MeasureRequest batch:",c)})},Hc)});this.config=e,this.sdkInfo=t,this.userId=r,this.userType=a,this.sessionId=Pe(),this.sendMeasureEvent("sdk_initialized").catch(n=>{console.error("Error sending sdk_initialized event:",n)})}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const Bc=s=>s.endsWith("/")?s.slice(0,-1):s,Dt=s=>{let e="";if(e=s.trim(),e=e.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(e.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return e},Vc=500;class qc{constructor(e,t,r){u(this,"config");u(this,"userId");u(this,"parent");u(this,"searchCompletedEventTimeout");u(this,"abortController");u(this,"supplementalAbortController");u(this,"abortRequests",()=>{var e,t;(e=this.abortController)==null||e.abort("The pending search request has been cancelled."),(t=this.supplementalAbortController)==null||t.abort("The pending search request has been cancelled.")});u(this,"getSearchResponseItems",async(e,t=!1)=>{var o,c,h,i,l,m,p;let r,a="",n;return t?((o=this.supplementalAbortController)==null||o.abort("A newer search request has replaced this one."),n=new AbortController,this.supplementalAbortController=n):((c=this.abortController)==null||c.abort("A newer search request has replaced this one."),n=new AbortController,this.abortController=n),typeof e=="string"?a=Dt(e):(e.searchTerm=Dt(e.searchTerm),a=e.searchTerm),(h=this.parent.measureClient)==null||h.sendMeasureEvent("search_requested",{search_term:a}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:a}}),(i=this.parent.adClient)==null||i.onQuerySubmitted(typeof e=="string"?{searchTerm:a,mode:"exact"}:e),typeof e=="string"?r=await this.handleGetSearchResponseItemsWithString(a,n):r=await this.handleGetSearchResponseItemsWithObject(e,n),t||((l=this.parent.measureClient)==null||l.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:r.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var g;(g=this.parent.measureClient)==null||g.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:r.data.count})},Vc),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((m=r.data.hits)==null?void 0:m.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(p=this.parent.adClient)==null||p.onQueryFetched(typeof e=="string"?{searchTerm:a,mode:"exact"}:e,r)),r});u(this,"handleGetSearchResponseItemsWithString",async(e,t)=>{var n;let r;try{r=JSON.parse(e),r={limit:this.config.searchResultsPerPage,...r}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||Pe(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});u(this,"handleGetSearchResponseItemsWithObject",async(e,t)=>{var n;const r={query:this.formatParamsForRequest(e),offset:e.offset||0,limit:e.limit||this.config.searchResultsPerPage||20,...e.order_by&&{order_by:e.order_by},...e.sort&&{sort:e.sort}};this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||Pe(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=e,this.config=t,this.userId=r}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(e){const t=[];let r="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(o=>{var h;const c=(h=e.facetPathsForIndexFields)==null?void 0:h[o];c&&(r="must",t.push({occur:"must",exact:{ctx:Dt(c.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(o=>{var h;const c=(h=e.rangeValueForIndexFields)==null?void 0:h[o];c&&(r="must",t.push({occur:"must",exact:{ctx:Dt(c.value)}}))});const a=e.searchTerm,n=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":r,...n}),t}}const Ea=s=>{let e;const t=new Set,r=(i,l)=>{const m=typeof i=="function"?i(e):i;if(!Object.is(m,e)){const p=e;e=l??(typeof m!="object"||m===null)?m:Object.assign({},e,m),t.forEach(g=>g(e,p))}},a=()=>e,c={setState:r,getState:a,getInitialState:()=>h,subscribe:i=>(t.add(i),()=>t.delete(i))},h=e=s(r,a,c);return c},jc=s=>s?Ea(s):Ea,Wc=1e3;class Gc{constructor(e,t){u(this,"set");u(this,"get");u(this,"abortController");u(this,"timeout");this.get=e,this.set=t}streamSummaryData(){var r;const e=async()=>{var h,i,l,m,p,g,v,y,x,P;const a=this.get(),n=(h=a.core)==null?void 0:h.config;if(!n){console.error("Could not stream summary data, no config found.");return}if(!n.cortexURL){console.error("Could not stream summary data, cortexURL was not specified in the config.");return}const o=(i=a.core)==null?void 0:i.config.indexName;if(!a.hasSummaryBox||!o)return;(l=this.abortController)==null||l.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,summary:""});const c=`${n.cortexURL.replace(/\/$/,"")}/api/search/summary`;try{const S=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((m=a.core)==null?void 0:m.config.readKey)||"","X-Sc-User-Id":((p=a.core)==null?void 0:p.userId)||"","X-Sc-Session-Id":((v=(g=a.core)==null?void 0:g.measureClient)==null?void 0:v.sessionId)||"","X-Sc-User-Type":((y=a.core)==null?void 0:y.userType)||"anonymous"},body:JSON.stringify({searchQuery:a.searchClientRequest,summaryInstructionsPrompt:(x=a.core)==null?void 0:x.config.summaryInstructionsPrompt,indexName:o,endpointUrl:(P=a.core)==null?void 0:P.config.endpointURL}),signal:this.abortController.signal});if(!S)throw new Error("Invalid fetch response");if(!S.body)throw new Error("Invalid fetch response");if(!S.ok){if(S.status===403){console.warn("Please contact Searchcraft to enable AI summaries with your account"),this.set({isSummaryLoading:!1,isSummaryNotEnabled:!0});return}throw new Error(`HTTP ${S.status}`)}const k=S.body.getReader(),T=new TextDecoder;let _=!1;do{const{done:R,value:I}=await k.read();_=R;const z=T.decode(I,{stream:!0});this.set(fe=>({isSummaryLoading:!1,summary:`${fe.summary}${z}`}))}while(!_)}catch(S){S instanceof Error&&console.error(S.message),this.set({isSummaryLoading:!1})}},t=((r=this.get().core)==null?void 0:r.config.summaryDebounceDelay)||Wc;clearTimeout(this.timeout),this.timeout=setTimeout(()=>e(),t)}}const Pa={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isFilterPanelVisible:!0,isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],cachedSearchResponseFacetPrime:void 0,cachedSupplementalFacetPrime:void 0,cachedSearchResponseTimeTaken:void 0,cachedSearchResultsCount:void 0,cachedSearchClientRequestProperties:void 0,searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,summary:"",hasSummaryBox:!1,summaryClient:void 0,isSummaryLoading:!1,isSummaryNotEnabled:!1},zt={},Zc=(s,e={})=>{const t=s||fr;if(zt[t])return zt[t].setState(e),zt[t];const r=jc((a,n)=>{const o={addFacetPathsForIndexField:h=>{a(i=>({facetPathsForIndexFields:{...i.facetPathsForIndexFields,[h.fieldName]:h},searchResultsPage:1}))},addRangeValueForIndexField:h=>a(i=>({rangeValueForIndexFields:{...i.rangeValueForIndexFields,[h.fieldName]:h}})),removeFacetPathsForIndexField:h=>{console.log("[FACET] removeFacetPathsForIndexField",{fieldName:h,currentPage:n().searchResultsPage,stackTrace:new Error().stack}),a(i=>{const l=i.facetPathsForIndexFields;return delete l[h],{facetPathsForIndexFields:{...l},searchResultsPage:1}})},removeRangeValueForIndexField:h=>a(i=>{const l=i.rangeValueForIndexFields;return delete l[h],{rangeValueForIndexFields:{...l}}}),resetSearchValues:()=>{var i,l;const h=n();(l=(i=h.core)==null?void 0:i.searchClient)==null||l.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...h.cachedSearchClientResponseItems],adClientResponseItems:[...h.cachedAdClientResponseItems]})},search:async h=>{var y,x,P;const i=n();if(!i.core)throw new Error("Searchcraft instance is not initialized.");i.core.config.cortexURL&&!(h!=null&&h.skipSummary)&&((y=i.summaryClient)==null||y.streamSummaryData());const l=typeof i.cachedSearchClientRequestProperties=="string"&&i.searchTerm.trim()==="",m=Object.keys(i.facetPathsForIndexFields).length>0||Object.keys(i.rangeValueForIndexFields).length>0,p=i.searchResultsPage!==1,g=i.searchMode!=="fuzzy";if(!i.searchTerm.trim()){if(l&&(m||p||g)){const S=JSON.parse(i.cachedSearchClientRequestProperties);a({isSearchInProgress:!0});const T=[...Array.isArray(S.query)?S.query.filter(R=>!R.occur):[S.query]];i.facetPathsForIndexFields&&Object.keys(i.facetPathsForIndexFields).forEach(R=>{var z;const I=(z=i.facetPathsForIndexFields)==null?void 0:z[R];I&&T.push({occur:"must",exact:{ctx:I.value}})}),i.rangeValueForIndexFields&&Object.keys(i.rangeValueForIndexFields).forEach(R=>{var z;const I=(z=i.rangeValueForIndexFields)==null?void 0:z[R];I&&T.push({occur:"must",exact:{ctx:I.value}})});const _={...S,query:T,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};i.core.getResponseItems({requestProperties:JSON.stringify(_),shouldCacheResultsForEmptyState:!1});return}(P=(x=i.core)==null?void 0:x.searchClient)==null||P.abortRequests(),a({searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const v={searchTerm:i.searchTerm,mode:i.searchMode,sort:i.sortType,order_by:i.orderByField,facetPathsForIndexFields:i.facetPathsForIndexFields,rangeValueForIndexFields:i.rangeValueForIndexFields,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};i.core.getResponseItems({requestProperties:v,shouldCacheResultsForEmptyState:!1})},setFilterPanelVisibility:h=>a({isFilterPanelVisible:h}),setPopoverVisibility:h=>a({isPopoverVisible:h}),setSearchMode:h=>a({searchMode:h}),setSortOrder:({orderByField:h,sortType:i})=>a({sortType:i,orderByField:h}),setSearchTerm:h=>{var l;const i=n();h.length===0&&((l=i.core)==null||l.handleInputCleared()),a({searchTerm:h,searchResultsPage:1,...h.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties}})},setSearchResultsCount:h=>a({searchResultsCount:h}),setSearchResultsPage:async h=>{a({searchResultsPage:h}),await o.search({skipSummary:!0})},setSearchResultsPerPage:async h=>{a({searchResultsPerPage:h}),await o.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(h,i)=>{const{hotkey:l,hotkeyModifier:m}=Pa;a({hotkey:h||l,hotkeyModifier:i||m})}};return{...Pa,...e,...o,summaryClient:new Gc(n,a)}});return zt[t]=r,r};class Qc{constructor(e,t,r){u(this,"store");u(this,"config");u(this,"measureClient");u(this,"searchClient");u(this,"adClient");u(this,"userId");u(this,"userType");u(this,"requestTimeout");u(this,"subscriptionEvents",{});u(this,"getResponseItems",e=>{const t=async()=>{(async()=>{var o,c;if(!this.searchClient){console.error("Search client was not initialized.");return}let r;try{r=await this.searchClient.getSearchResponseItems(e.requestProperties,!1)}catch(h){Lt.info(`Search request error: ${h}`);return}if(!r){Lt.info("Search request error: Search response was undefined");return}const a=(r.data.hits||[]).filter(h=>!!h.doc).map(h=>({id:Pe(),document:h.doc||{id:-1},source_index:h.source_index,type:"SearchDocument"}));let n;if(typeof e.requestProperties=="object"){if(e.requestProperties.facetPathsForIndexFields&&Object.keys(e.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:h,...i}=e.requestProperties;try{n=await((o=this==null?void 0:this.searchClient)==null?void 0:o.getSearchResponseItems(i,!0))}catch(l){Lt.info(`Search request error: ${l}`);return}}}else if(typeof e.requestProperties=="string"){const h=JSON.parse(e.requestProperties),i=Array.isArray(h.query)?h.query:[h.query];if(i.length>1){const l=i.filter(p=>p.occur!=="must"),m={...h,query:l.length>0?l:i.slice(0,1)};try{n=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(JSON.stringify(m),!0))}catch(p){Lt.info(`Search request error: ${p}`);return}}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:r.data.time_taken,searchResultsCount:r.data.count,searchResponseFacetPrime:r.data.facets,supplementalFacetPrime:n==null?void 0:n.data.facets,searchClientRequestProperties:e.requestProperties,...e.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a,cachedSearchResponseFacetPrime:r.data.facets,cachedSupplementalFacetPrime:n==null?void 0:n.data.facets,cachedSearchResponseTimeTaken:r.data.time_taken,cachedSearchResultsCount:r.data.count,cachedSearchClientRequestProperties:e.requestProperties}})})(),(async()=>{if(this.adClient&&typeof e.requestProperties!="string"){const r=await this.adClient.getAds(e.requestProperties);this.store.setState({adClientResponseItems:r,...e.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:r}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(t,this.config.searchDebounceDelay):t()});if(!e.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!e.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!e.indexName&&!e.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(e.indexName&&e.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...e,endpointURL:Bc(e.endpointURL)},this.userId="",this.userType="anonymous",typeof window<"u"&&typeof customElements<"u"&&t.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=Zc(r,{core:this,searchResultsPerPage:e.searchResultsPerPage||20}),j.addCoreInstance(this,r),(async a=>{typeof window<"u"&&await this.initClients(a,t),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(e,t){let r=this.config.measureUserIdentifier;r?(this.userType="authenticated",await Promise.resolve()):(r=await wc(),this.userType="anonymous"),this.measureClient=new Uc(e,t,r,this.userType),this.searchClient=new qc(this,e,r),e.customAdConfig?this.adClient=new Dc(e):e.nativoConfig?this.adClient=new Nc(e):e.admAdConfig&&(this.adClient=new Oc(e)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(e,t){var r;(r=this.subscriptionEvents[e])==null||r.forEach(a=>{a(t)})}subscribe(e,t){return this.subscriptionEvents[e]||(this.subscriptionEvents[e]=[]),this.subscriptionEvents[e].push(t),()=>{this.subscriptionEvents[e]=this.subscriptionEvents[e].filter(r=>r!==t)}}handleAdContainerRendered(e){var t;(t=this.adClient)==null||t.onAdContainerRendered(e),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleAdContainerViewed(e){var t;(t=this.adClient)==null||t.onAdContainerViewed(e),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleInputCleared(){var e;this.emitEvent("input_cleared",{name:"input_cleared"}),(e=this.adClient)==null||e.onInputCleared()}}const Yc="@searchcraft/vue-sdk",Xc="0.13.1",Nt="routerLink",Ia="navManager",Kc="router",Jc="aria",dt=Symbol(),Aa={default:dt},_a=s=>(s==null?void 0:s.split(" "))||[],el=(s,e,t=[])=>{var r;return[...Array.from(((r=s.value)==null?void 0:r.classList)||[]),...t].filter((a,n,o)=>!e.has(a)&&o.indexOf(a)===n)},de=(s,e,t=[],r=[],a,n)=>{e!==void 0&&e();const o=B.defineComponent((c,{attrs:h,slots:i,emit:l})=>{var P;const m=B.ref(),p=new Set(_a(h.class));B.onMounted(()=>{r.forEach(S=>{m.value.addEventListener(S,k=>{l(S,k)})})});const g=B.getCurrentInstance(),y=((P=g==null?void 0:g.appContext)==null?void 0:P.provides[Ia])?B.inject(Ia):void 0,x=S=>{const{routerLink:k}=c;if(k!==dt)if(y!==void 0){S.preventDefault();let T={event:S};for(const _ in c){const R=c[_];c.hasOwnProperty(_)&&_.startsWith(Kc)&&R!==dt&&(T[_]=R)}y.navigate(T)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],_a(h.class).forEach(R=>{p.add(R)});const S=c.onClick,k=R=>{S!==void 0&&S(R),R.defaultPrevented||x(R)};let T={ref:m,class:el(m,p),onClick:k};for(const R in c){const I=c[R];(c.hasOwnProperty(R)&&I!==dt||R.startsWith(Jc))&&(T[R]=I);const z="on"+R.slice(0,1).toUpperCase()+R.slice(1),fe=h[z];m.value&&h.hasOwnProperty(z)&&"addEventListener"in m.value&&m.value.addEventListener(R,fe)}return Nt in c&&c[Nt]!==dt&&(T={...T,href:c[Nt]}),B.h(s,T,i.default&&i.default())}});if(typeof o!="function"){let c=[],h={};h[Nt]=Aa,t.forEach(i=>h[i]=Aa),c=r,o.name=s,o.emits=c,o.props=h}return o},tl=de("searchcraft-filter-panel",()=>{},["searchcraftId","items","responsiveBreakpoint","responsiveBehavior"]),rl=de("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","value","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),sl=de("searchcraft-pagination",()=>{},["searchcraftId"]),al=de("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),nl=de("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior"]),ol=de("searchcraft-results-info",()=>{},["template","searchcraftId"]),il=de("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),cl=de("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),ll=de("searchcraft-summary-box",()=>{},["searchcraftId"]),hl=de("searchcraft-theme",()=>{}),ul=il,dl=tl,fl=rl,pl=al,ml=nl,gl=ol,bl=hl,vl=sl,yl=cl,kl=ll;class Cl extends Qc{constructor(e,t=void 0){super(e,{sdkName:Yc,sdkVersion:Xc},t)}}Ca(),L.Searchcraft=Cl,L.SearchcraftFilterPanel=dl,L.SearchcraftInputForm=fl,L.SearchcraftPagination=vl,L.SearchcraftPopoverButton=pl,L.SearchcraftPopoverForm=ml,L.SearchcraftResultsInfo=gl,L.SearchcraftSearchResults=ul,L.SearchcraftSearchResultsPerPage=yl,L.SearchcraftSummaryBox=kl,L.SearchcraftTheme=bl,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
77
+ `,a=E.createShader(E.VERTEX_SHADER),n=E.createShader(E.FRAGMENT_SHADER);if(!a||!n)throw new Error("Failed to create shaders");if(E.shaderSource(a,t),E.shaderSource(n,r),E.compileShader(a),!E.getShaderParameter(a,E.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+E.getShaderInfoLog(a));if(E.compileShader(n),!E.getShaderParameter(n,E.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+E.getShaderInfoLog(n));var o=E.createProgram();if(!o)throw new Error("Failed to create shader program");if(E.attachShader(o,a),E.attachShader(o,n),E.linkProgram(o),!E.getProgramParameter(o,E.LINK_STATUS))throw new Error("Shader program linking failed: "+E.getProgramInfoLog(o));E.useProgram(o);for(var c=137,h=new Float32Array(4*c),i=2*Math.PI/c,u=0;u<c;u++){var g=u*i;h[4*u]=0,h[4*u+1]=0,h[4*u+2]=Math.cos(g)*(de.width/2),h[4*u+3]=Math.sin(g)*(de.height/2)}var p=E.createBuffer();E.bindBuffer(E.ARRAY_BUFFER,p),E.bufferData(E.ARRAY_BUFFER,h,E.STATIC_DRAW);var y=E.getAttribLocation(o,"position");E.enableVertexAttribArray(y),E.vertexAttribPointer(y,2,E.FLOAT,!1,0,0),E.viewport(0,0,de.width,de.height),E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT),E.drawArrays(E.LINES,0,2*c);var C=new Uint8ClampedArray(de.width*de.height*4);return E.readPixels(0,0,de.width,de.height,E.RGBA,E.UNSIGNED_BYTE,C),new ImageData(C,de.width,de.height)}catch{return new ImageData(1,1)}finally{E&&(E.bindBuffer(E.ARRAY_BUFFER,null),E.useProgram(null),E.viewport(0,0,E.drawingBufferWidth,E.drawingBufferHeight),E.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Gs(Wn(s,de.width,de.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var it=function(s,e,t,r){for(var a=(t-e)/r,n=0,o=0;o<r;o++)n+=s(e+(o+.5)*a);return n*a};Pe("math",function(){return He(void 0,void 0,void 0,function(){return Be(this,function(s){return[2,{acos:Math.acos(.5),asin:it(Math.asin,-1,1,97),atan:it(Math.atan,-1,1,97),cos:it(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:it(Math.sin,-Math.PI,Math.PI,97),sinh:it(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:it(Math.tan,0,2*Math.PI,97),tanh:it(Math.tanh,-9/7,7/9,97)}]})})});class Ys{constructor(e){d(this,"config");this.config=e}async getAds(e){return[]}async onQuerySubmitted(e){}async onQueryFetched(e,t){}async onInputCleared(){}async onAdContainerRendered(e){}async onAdContainerViewed(e){}}class Kl extends Ys{async getAds(e){const t=this.config.admAdConfig;if(!(t!=null&&t.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:t.sub,qt:e.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${t.textAdQuantity||0}`,"results-pa":`${t.productAdQuantity||0}`}).toString()}`,o=await(await fetch(a,{method:"GET"})).json(),c=o.product_ads.map(u=>({id:at(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:u})),h=o.text_ads.map(u=>({id:at(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:u}));return c.concat(h)}async onAdContainerViewed(e){var r;const t=e.adClientResponseItem;(r=t.admAd)!=null&&r.impression_url&&fetch(t.admAd.impression_url)}}class Jl extends Ys{async getAds(e){return[]}}const eu=1e3;class tu extends Ys{constructor(t){super(t);d(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var a;if((((a=r.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(eu)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const ru=600;class su{constructor(e,t,r,a){d(this,"measureRequestTimeout");d(this,"measureRequestsBatched",[]);d(this,"config");d(this,"sdkInfo");d(this,"userId");d(this,"userType");d(this,"sessionId");d(this,"sendMeasureEvent",async(e,t={},r={})=>{const a={event_name:e,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...t},user:{...this.measureRequestUser,...r}};if(e==="document_clicked"){const n=JSON.stringify(a),o=`${this.baseMeasureUrl}/event`;try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){console.error("Error sending MeasureRequest:",c)}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(()=>{const n=JSON.stringify({items:this.measureRequestsBatched}),o=`${this.baseMeasureUrl}/batch`;(async()=>{try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});this.measureRequestsBatched=[],c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",c)}})().catch(c=>{console.error("Unhandled error in MeasureRequest batch:",c)})},ru)});this.config=e,this.sdkInfo=t,this.userId=r,this.userType=a,this.sessionId=at(),this.sendMeasureEvent("sdk_initialized").catch(n=>{console.error("Error sending sdk_initialized event:",n)})}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const au=s=>s.endsWith("/")?s.slice(0,-1):s,Vr=s=>{let e="";if(e=s.trim(),e=e.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(e.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return e},nu=500;class ou{constructor(e,t,r){d(this,"config");d(this,"userId");d(this,"parent");d(this,"searchCompletedEventTimeout");d(this,"abortController");d(this,"supplementalAbortController");d(this,"abortRequests",()=>{var e,t;(e=this.abortController)==null||e.abort("The pending search request has been cancelled."),(t=this.supplementalAbortController)==null||t.abort("The pending search request has been cancelled.")});d(this,"getSearchResponseItems",async(e,t=!1)=>{var o,c,h,i,u,g,p;let r,a="",n;return t?((o=this.supplementalAbortController)==null||o.abort("A newer search request has replaced this one."),n=new AbortController,this.supplementalAbortController=n):((c=this.abortController)==null||c.abort("A newer search request has replaced this one."),n=new AbortController,this.abortController=n),typeof e=="string"?a=Vr(e):(e.searchTerm=Vr(e.searchTerm),a=e.searchTerm),(h=this.parent.measureClient)==null||h.sendMeasureEvent("search_requested",{search_term:a}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:a}}),(i=this.parent.adClient)==null||i.onQuerySubmitted(typeof e=="string"?{searchTerm:a,mode:"exact"}:e),typeof e=="string"?r=await this.handleGetSearchResponseItemsWithString(a,n):r=await this.handleGetSearchResponseItemsWithObject(e,n),t||((u=this.parent.measureClient)==null||u.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:r.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var y;(y=this.parent.measureClient)==null||y.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:r.data.count})},nu),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((g=r.data.hits)==null?void 0:g.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(p=this.parent.adClient)==null||p.onQueryFetched(typeof e=="string"?{searchTerm:a,mode:"exact"}:e,r)),r});d(this,"handleGetSearchResponseItemsWithString",async(e,t)=>{var n;let r;try{r=JSON.parse(e),r={limit:this.config.searchResultsPerPage,...r}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||at(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});d(this,"handleGetSearchResponseItemsWithObject",async(e,t)=>{var n;const r={query:this.formatParamsForRequest(e),offset:e.offset||0,limit:e.limit||this.config.searchResultsPerPage||20,...e.order_by&&{order_by:e.order_by},...e.sort&&{sort:e.sort}};this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||at(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=e,this.config=t,this.userId=r}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(e){const t=[];let r="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(o=>{var h;const c=(h=e.facetPathsForIndexFields)==null?void 0:h[o];c&&(r="must",t.push({occur:"must",exact:{ctx:Vr(c.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(o=>{var h;const c=(h=e.rangeValueForIndexFields)==null?void 0:h[o];c&&(r="must",t.push({occur:"must",exact:{ctx:Vr(c.value)}}))});const a=e.searchTerm,n=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":r,...n}),t}}const Zn=s=>{let e;const t=new Set,r=(i,u)=>{const g=typeof i=="function"?i(e):i;if(!Object.is(g,e)){const p=e;e=u??(typeof g!="object"||g===null)?g:Object.assign({},e,g),t.forEach(y=>y(e,p))}},a=()=>e,c={setState:r,getState:a,getInitialState:()=>h,subscribe:i=>(t.add(i),()=>t.delete(i))},h=e=s(r,a,c);return c},iu=s=>s?Zn(s):Zn,cu=1e3;class lu{constructor(e,t){d(this,"set");d(this,"get");d(this,"abortController");d(this,"timeout");this.get=e,this.set=t}streamSummaryData(){var r;const e=async()=>{var h,i,u,g,p,y,C,k,w,L;const a=this.get(),n=(h=a.core)==null?void 0:h.config;if(!n){console.error("Could not stream summary data, no config found.");return}if(!n.cortexURL){console.error("Could not stream summary data, cortexURL was not specified in the config.");return}const o=(i=a.core)==null?void 0:i.config.indexName;if(!a.hasSummaryBox||!o)return;(u=this.abortController)==null||u.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,summary:""});const c=`${n.cortexURL.replace(/\/$/,"")}/api/search/summary`;try{const T=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((g=a.core)==null?void 0:g.config.readKey)||"","X-Sc-User-Id":((p=a.core)==null?void 0:p.userId)||"","X-Sc-Session-Id":((C=(y=a.core)==null?void 0:y.measureClient)==null?void 0:C.sessionId)||"","X-Sc-User-Type":((k=a.core)==null?void 0:k.userType)||"anonymous"},body:JSON.stringify({searchQuery:a.searchClientRequest,summaryInstructionsPrompt:(w=a.core)==null?void 0:w.config.summaryInstructionsPrompt,indexName:o,endpointUrl:(L=a.core)==null?void 0:L.config.endpointURL}),signal:this.abortController.signal});if(!T)throw new Error("Invalid fetch response");if(!T.body)throw new Error("Invalid fetch response");if(!T.ok){if(T.status===403){console.warn("Please contact Searchcraft to enable AI summaries with your account"),this.set({isSummaryLoading:!1,isSummaryNotEnabled:!0});return}throw new Error(`HTTP ${T.status}`)}const S=T.body.getReader(),x=new TextDecoder;let D=!1;do{const{done:R,value:z}=await S.read();D=R;const q=x.decode(z,{stream:!0});this.set($e=>({isSummaryLoading:!1,summary:`${$e.summary}${q}`}))}while(!D)}catch(T){T instanceof Error&&console.error(T.message),this.set({isSummaryLoading:!1})}},t=((r=this.get().core)==null?void 0:r.config.summaryDebounceDelay)||cu;clearTimeout(this.timeout),this.timeout=setTimeout(()=>e(),t)}}const Xn={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isFilterPanelVisible:!0,isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],cachedSearchResponseFacetPrime:void 0,cachedSupplementalFacetPrime:void 0,cachedSearchResponseTimeTaken:void 0,cachedSearchResultsCount:void 0,cachedSearchClientRequestProperties:void 0,searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,summary:"",hasSummaryBox:!1,summaryClient:void 0,isSummaryLoading:!1,isSummaryNotEnabled:!1},qr={},uu=(s,e={})=>{const t=s||ds;if(qr[t])return qr[t].setState(e),qr[t];const r=iu((a,n)=>{const o={addFacetPathsForIndexField:h=>{a(i=>({facetPathsForIndexFields:{...i.facetPathsForIndexFields,[h.fieldName]:h},searchResultsPage:1}))},addRangeValueForIndexField:h=>a(i=>({rangeValueForIndexFields:{...i.rangeValueForIndexFields,[h.fieldName]:h}})),removeFacetPathsForIndexField:h=>{console.log("[FACET] removeFacetPathsForIndexField",{fieldName:h,currentPage:n().searchResultsPage,stackTrace:new Error().stack}),a(i=>{const u=i.facetPathsForIndexFields;return delete u[h],{facetPathsForIndexFields:{...u},searchResultsPage:1}})},removeRangeValueForIndexField:h=>a(i=>{const u=i.rangeValueForIndexFields;return delete u[h],{rangeValueForIndexFields:{...u}}}),resetSearchValues:()=>{var i,u;const h=n();(u=(i=h.core)==null?void 0:i.searchClient)==null||u.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...h.cachedSearchClientResponseItems],adClientResponseItems:[...h.cachedAdClientResponseItems]})},search:async h=>{var k,w,L;const i=n();if(!i.core)throw new Error("Searchcraft instance is not initialized.");i.core.config.cortexURL&&!(h!=null&&h.skipSummary)&&((k=i.summaryClient)==null||k.streamSummaryData());const u=typeof i.cachedSearchClientRequestProperties=="string"&&i.searchTerm.trim()==="",g=Object.keys(i.facetPathsForIndexFields).length>0||Object.keys(i.rangeValueForIndexFields).length>0,p=i.searchResultsPage!==1,y=i.searchMode!=="fuzzy";if(!i.searchTerm.trim()){if(u&&(g||p||y)){const T=JSON.parse(i.cachedSearchClientRequestProperties);a({isSearchInProgress:!0});const x=[...Array.isArray(T.query)?T.query.filter(R=>!R.occur):[T.query]];i.facetPathsForIndexFields&&Object.keys(i.facetPathsForIndexFields).forEach(R=>{var q;const z=(q=i.facetPathsForIndexFields)==null?void 0:q[R];z&&x.push({occur:"must",exact:{ctx:z.value}})}),i.rangeValueForIndexFields&&Object.keys(i.rangeValueForIndexFields).forEach(R=>{var q;const z=(q=i.rangeValueForIndexFields)==null?void 0:q[R];z&&x.push({occur:"must",exact:{ctx:z.value}})});const D={...T,query:x,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};i.core.getResponseItems({requestProperties:JSON.stringify(D),shouldCacheResultsForEmptyState:!1});return}(L=(w=i.core)==null?void 0:w.searchClient)==null||L.abortRequests(),a({searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const C={searchTerm:i.searchTerm,mode:i.searchMode,sort:i.sortType,order_by:i.orderByField,facetPathsForIndexFields:i.facetPathsForIndexFields,rangeValueForIndexFields:i.rangeValueForIndexFields,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};i.core.getResponseItems({requestProperties:C,shouldCacheResultsForEmptyState:!1})},setFilterPanelVisibility:h=>a({isFilterPanelVisible:h}),setPopoverVisibility:h=>a({isPopoverVisible:h}),setSearchMode:h=>a({searchMode:h}),setSortOrder:({orderByField:h,sortType:i})=>a({sortType:i,orderByField:h}),setSearchTerm:h=>{var u;const i=n();h.length===0&&((u=i.core)==null||u.handleInputCleared()),a({searchTerm:h,searchResultsPage:1,...h.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties}})},setSearchResultsCount:h=>a({searchResultsCount:h}),setSearchResultsPage:async h=>{a({searchResultsPage:h}),await o.search({skipSummary:!0})},setSearchResultsPerPage:async h=>{a({searchResultsPerPage:h}),await o.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(h,i)=>{const{hotkey:u,hotkeyModifier:g}=Xn;a({hotkey:h||u,hotkeyModifier:i||g})}};return{...Xn,...e,...o,summaryClient:new lu(n,a)}});return qr[t]=r,r};class hu{constructor(e,t,r){d(this,"store");d(this,"config");d(this,"measureClient");d(this,"searchClient");d(this,"adClient");d(this,"userId");d(this,"userType");d(this,"requestTimeout");d(this,"subscriptionEvents",{});d(this,"getResponseItems",e=>{const t=async()=>{(async()=>{var o,c;if(!this.searchClient){console.error("Search client was not initialized.");return}let r;try{r=await this.searchClient.getSearchResponseItems(e.requestProperties,!1)}catch(h){Hr.info(`Search request error: ${h}`);return}if(!r){Hr.info("Search request error: Search response was undefined");return}const a=(r.data.hits||[]).filter(h=>!!h.doc).map(h=>({id:at(),document:h.doc||{id:-1},source_index:h.source_index,type:"SearchDocument"}));let n;if(typeof e.requestProperties=="object"){if(e.requestProperties.facetPathsForIndexFields&&Object.keys(e.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:h,...i}=e.requestProperties;try{n=await((o=this==null?void 0:this.searchClient)==null?void 0:o.getSearchResponseItems(i,!0))}catch(u){Hr.info(`Search request error: ${u}`);return}}}else if(typeof e.requestProperties=="string"){const h=JSON.parse(e.requestProperties),i=Array.isArray(h.query)?h.query:[h.query];if(i.length>1){const u=i.filter(p=>p.occur!=="must"),g={...h,query:u.length>0?u:i.slice(0,1)};try{n=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(JSON.stringify(g),!0))}catch(p){Hr.info(`Search request error: ${p}`);return}}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:r.data.time_taken,searchResultsCount:r.data.count,searchResponseFacetPrime:r.data.facets,supplementalFacetPrime:n==null?void 0:n.data.facets,searchClientRequestProperties:e.requestProperties,...e.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a,cachedSearchResponseFacetPrime:r.data.facets,cachedSupplementalFacetPrime:n==null?void 0:n.data.facets,cachedSearchResponseTimeTaken:r.data.time_taken,cachedSearchResultsCount:r.data.count,cachedSearchClientRequestProperties:e.requestProperties}})})(),(async()=>{if(this.adClient&&typeof e.requestProperties!="string"){const r=await this.adClient.getAds(e.requestProperties);this.store.setState({adClientResponseItems:r,...e.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:r}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(t,this.config.searchDebounceDelay):t()});if(!e.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!e.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!e.indexName&&!e.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(e.indexName&&e.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...e,endpointURL:au(e.endpointURL)},this.userId="",this.userType="anonymous",typeof window<"u"&&typeof customElements<"u"&&t.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=uu(r,{core:this,searchResultsPerPage:e.searchResultsPerPage||20}),re.addCoreInstance(this,r),(async a=>{typeof window<"u"&&await this.initClients(a,t),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(e,t){let r=this.config.measureUserIdentifier;r?(this.userType="authenticated",await Promise.resolve()):(r=await Ul(),this.userType="anonymous"),this.measureClient=new su(e,t,r,this.userType),this.searchClient=new ou(this,e,r),e.customAdConfig?this.adClient=new Jl(e):e.nativoConfig?this.adClient=new tu(e):e.admAdConfig&&(this.adClient=new Kl(e)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(e,t){var r;(r=this.subscriptionEvents[e])==null||r.forEach(a=>{a(t)})}subscribe(e,t){return this.subscriptionEvents[e]||(this.subscriptionEvents[e]=[]),this.subscriptionEvents[e].push(t),()=>{this.subscriptionEvents[e]=this.subscriptionEvents[e].filter(r=>r!==t)}}handleAdContainerRendered(e){var t;(t=this.adClient)==null||t.onAdContainerRendered(e),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleAdContainerViewed(e){var t;(t=this.adClient)==null||t.onAdContainerViewed(e),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleInputCleared(){var e;this.emitEvent("input_cleared",{name:"input_cleared"}),(e=this.adClient)==null||e.onInputCleared()}}const du="@searchcraft/vue-sdk",fu="0.13.3",Wr="routerLink",Qn="navManager",pu="router",mu="aria",Yt=Symbol(),Kn={default:Yt},Jn=s=>(s==null?void 0:s.split(" "))||[],gu=(s,e,t=[])=>{var r;return[...Array.from(((r=s.value)==null?void 0:r.classList)||[]),...t].filter((a,n,o)=>!e.has(a)&&o.indexOf(a)===n)},Ne=(s,e,t=[],r=[],a,n)=>{e!==void 0&&e();const o=te.defineComponent((c,{attrs:h,slots:i,emit:u})=>{var L;const g=te.ref(),p=new Set(Jn(h.class));te.onMounted(()=>{r.forEach(T=>{g.value.addEventListener(T,S=>{u(T,S)})})});const y=te.getCurrentInstance(),k=((L=y==null?void 0:y.appContext)==null?void 0:L.provides[Qn])?te.inject(Qn):void 0,w=T=>{const{routerLink:S}=c;if(S!==Yt)if(k!==void 0){T.preventDefault();let x={event:T};for(const D in c){const R=c[D];c.hasOwnProperty(D)&&D.startsWith(pu)&&R!==Yt&&(x[D]=R)}k.navigate(x)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],Jn(h.class).forEach(R=>{p.add(R)});const T=c.onClick,S=R=>{T!==void 0&&T(R),R.defaultPrevented||w(R)};let x={ref:g,class:gu(g,p),onClick:S};for(const R in c){const z=c[R];(c.hasOwnProperty(R)&&z!==Yt||R.startsWith(mu))&&(x[R]=z);const q="on"+R.slice(0,1).toUpperCase()+R.slice(1),$e=h[q];g.value&&h.hasOwnProperty(q)&&"addEventListener"in g.value&&g.value.addEventListener(R,$e)}return Wr in c&&c[Wr]!==Yt&&(x={...x,href:c[Wr]}),te.h(s,x,i.default&&i.default())}});if(typeof o!="function"){let c=[],h={};h[Wr]=Kn,t.forEach(i=>h[i]=Kn),c=r,o.name=s,o.emits=c,o.props=h}return o},bu=Ne("searchcraft-filter-panel",()=>{},["searchcraftId","items","responsiveBreakpoint","responsiveBehavior"]),vu=Ne("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","value","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),yu=Ne("searchcraft-pagination",()=>{},["searchcraftId","scrollToTop"]),Cu=Ne("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),ku=Ne("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior"]),Su=Ne("searchcraft-results-info",()=>{},["template","searchcraftId"]),xu=Ne("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),wu=Ne("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),Tu=Ne("searchcraft-summary-box",()=>{},["searchcraftId"]),Ru=Ne("searchcraft-theme",()=>{}),Eu=xu,$u=bu,Au=vu,_u=Cu,Pu=ku,Iu=Su,Mu=Ru,Lu=yu,Ou=wu,Du=Tu;class Fu extends hu{constructor(e,t=void 0){super(e,{sdkName:du,sdkVersion:fu},t)}}Bn(),G.Searchcraft=Fu,G.SearchcraftFilterPanel=$u,G.SearchcraftInputForm=Au,G.SearchcraftPagination=Lu,G.SearchcraftPopoverButton=_u,G.SearchcraftPopoverForm=Pu,G.SearchcraftResultsInfo=Iu,G.SearchcraftSearchResults=Eu,G.SearchcraftSearchResultsPerPage=Ou,G.SearchcraftSummaryBox=Du,G.SearchcraftTheme=Mu,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
77
78
  //# sourceMappingURL=index.umd.js.map