@searchcraft/vue-sdk 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,14 +1,14 @@
1
- (function(K,fe){typeof exports=="object"&&typeof module<"u"?fe(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],fe):(K=typeof globalThis<"u"?globalThis:K||self,fe(K.SearchcraftVueSdk={},K.Vue))})(this,function(K,fe){"use strict";var Sc=Object.defineProperty;var Rc=(K,fe,dt)=>fe in K?Sc(K,fe,{enumerable:!0,configurable:!0,writable:!0,value:dt}):K[fe]=dt;var c=(K,fe,dt)=>Rc(K,typeof fe!="symbol"?fe+"":fe,dt);const dt="searchcraft-javascript-sdk",pt={experimentalSlotFixes:!1,hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var en=Object.defineProperty,tn=(r,e)=>{for(var t in e)en(r,t,{get:e[t],enumerable:!0})},rn="http://www.w3.org/2000/svg",sn="http://www.w3.org/1999/xhtml",an=(r,e)=>{var t;const s=e.$cmpMeta$;Object.entries((t=s.$members$)!=null?t:{}).map(([o,[n]])=>{if(n&31||n&32){const l=r[o],u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),o);Object.defineProperty(r,o,{get(){return u.get.call(this)},set(d){u.set.call(this,d)},configurable:!0,enumerable:!0}),r[o]=e.$instanceValues$.has(o)?e.$instanceValues$.get(o):l}})},$r=new WeakMap,nn=r=>$r.delete(r),Xe=r=>$r.get(r),on=(r,e)=>{const t={$flags$:0,$hostElement$:r,$cmpMeta$:e,$instanceValues$:new Map};t.$onReadyPromise$=new Promise(a=>t.$onReadyResolve$=a),r["s-p"]=[],r["s-rc"]=[];const s=$r.set(r,t);return an(r,t),s},Ts=(r,e)=>e in r,Zt=(r,e)=>(0,console.error)(r,e),Yt=typeof window<"u"?window:{},mt=Yt.document||{head:{}},X=Yt.HTMLElement||class{},xe={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,e,t,s)=>r.addEventListener(e,t,s),rel:(r,e,t,s)=>r.removeEventListener(e,t,s),ce:(r,e)=>new CustomEvent(r,e)},cn=pt.shadowDom,ln=r=>Promise.resolve(r),_r=!1,Ps=[],$s=[],un=(r,e)=>t=>{r.push(t),_r||(_r=!0,xe.$flags$&4?Ar(Ir):xe.raf(Ir))},_s=r=>{for(let e=0;e<r.length;e++)try{r[e](performance.now())}catch(t){Zt(t)}r.length=0},Ir=()=>{_s(Ps),_s($s),(_r=Ps.length>0)&&xe.raf(Ir)},Ar=r=>ln().then(r),hn=un($s),Mr=r=>(r=typeof r,r==="object"||r==="function"),fn={};tn(fn,{err:()=>Is,map:()=>dn,ok:()=>Or,unwrap:()=>pn,unwrapErr:()=>mn});var Or=r=>({isOk:!0,isErr:!1,value:r}),Is=r=>({isOk:!1,isErr:!0,value:r});function dn(r,e){if(r.isOk){const t=e(r.value);return t instanceof Promise?t.then(s=>Or(s)):Or(t)}if(r.isErr){const t=r.value;return Is(t)}throw"should never get here"}var pn=r=>{if(r.isOk)return r.value;throw r.value},mn=r=>{if(r.isErr)return r.value;throw r.value},As=r=>{const e=r.__childNodes||r.childNodes;r.tagName&&r.tagName.includes("-")&&r["s-cr"]&&r.tagName!=="SLOT-FB"&&Ms(e,r.tagName).forEach(t=>{var s;t.nodeType===1&&t.tagName==="SLOT-FB"&&((s=gn(t,t["s-sn"],!1))!=null&&s.length?t.hidden=!0:t.hidden=!1)});for(const t of e)t.nodeType===1&&(t.__childNodes||t.childNodes).length&&As(t)};function Ms(r,e,t){let s=0,a=[],o;for(;s<r.length;s++)o=r[s],o["s-sr"]&&o["s-hn"]===e&&t===void 0&&a.push(o),a=[...a,...Ms(o.childNodes,e,t)];return a}var gn=(r,e,t=!0)=>{const s=[];for((t&&r["s-sr"]||!r["s-sr"])&&s.push(r);(r=r.nextSibling)&&r["s-sn"]===e;)s.push(r);return s},Os=(r,e)=>r.nodeType===1?r.getAttribute("slot")===null&&e===""||r.getAttribute("slot")===e:r["s-sn"]===e?!0:e==="",$t=(r,e="")=>()=>{},p=(r,e,...t)=>{let s=null,a=null,o=null,n=!1,l=!1;const u=[],d=C=>{for(let E=0;E<C.length;E++)s=C[E],Array.isArray(s)?d(s):s!=null&&typeof s!="boolean"&&((n=typeof r!="function"&&!Mr(s))&&(s=String(s)),n&&l?u[u.length-1].$text$+=s:u.push(n?Qt(null,s):s),l=n)};if(d(t),e){e.key&&(a=e.key),e.name&&(o=e.name);{const C=e.className||e.class;C&&(e.class=typeof C!="object"?C:Object.keys(C).filter(E=>C[E]).join(" "))}}if(typeof r=="function")return r(e===null?{}:e,u,yn);const m=Qt(r,null);return m.$attrs$=e,u.length>0&&(m.$children$=u),m.$key$=a,m.$name$=o,m},Qt=(r,e)=>{const t={$flags$:0,$tag$:r,$text$:e,$elm$:null,$children$:null};return t.$attrs$=null,t.$key$=null,t.$name$=null,t},bn={},vn=r=>r&&r.$tag$===bn,yn={forEach:(r,e)=>r.map(Ls).forEach(e),map:(r,e)=>r.map(Ls).map(e).map(kn)},Ls=r=>({vattrs:r.$attrs$,vchildren:r.$children$,vkey:r.$key$,vname:r.$name$,vtag:r.$tag$,vtext:r.$text$}),kn=r=>{if(typeof r.vtag=="function"){const t={...r.vattrs};return r.vkey&&(t.key=r.vkey),r.vname&&(t.name=r.vname),p(r.vtag,t,...r.vchildren||[])}const e=Qt(r.vtag,r.vtext);return e.$attrs$=r.vattrs,e.$children$=r.vchildren,e.$key$=r.vkey,e.$name$=r.vname,e},Fs=(r,e)=>r!=null&&!Mr(r)?e&4?r==="false"?!1:r===""||!!r:e&2?parseFloat(r):e&1?String(r):r:r,Cn=r=>r,Je=(r,e,t)=>{const s=Cn(r);return{emit:a=>Ds(s,e,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Ds=(r,e,t)=>{const s=xe.ce(e,t);return r.dispatchEvent(s),s},Kt=new WeakMap,Ns=(r,e,t,s,a,o)=>{if(t!==s){let n=Ts(r,e),l=e.toLowerCase();if(e==="class"){const u=r.classList,d=zs(t);let m=zs(s);r["s-si"]?(m.push(r["s-si"]),d.forEach(C=>{C.startsWith(r["s-si"])&&m.push(C)}),m=[...new Set(m)],u.add(...m),delete r["s-si"]):(u.remove(...d.filter(C=>C&&!m.includes(C))),u.add(...m.filter(C=>C&&!d.includes(C))))}else if(e==="style"){for(const u in t)(!s||s[u]==null)&&(u.includes("-")?r.style.removeProperty(u):r.style[u]="");for(const u in s)(!t||s[u]!==t[u])&&(u.includes("-")?r.style.setProperty(u,s[u]):r.style[u]=s[u])}else if(e!=="key")if(!r.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):Ts(Yt,l)?e=l.slice(2):e=l[2]+e.slice(3),t||s){const u=e.endsWith(Hs);e=e.replace(wn,""),t&&xe.rel(r,e,t,u),s&&xe.ael(r,e,s,u)}}else{const u=Mr(s);if((n||u&&s!==null)&&!a)try{if(r.tagName.includes("-"))r[e]!==s&&(r[e]=s);else{const d=s??"";e==="list"?n=!1:(t==null||r[e]!=d)&&(typeof r.__lookupSetter__(e)=="function"?r[e]=d:r.setAttribute(e,d))}}catch{}s==null||s===!1?(s!==!1||r.getAttribute(e)==="")&&r.removeAttribute(e):(!n||o&4||a)&&!u&&(s=s===!0?"":s,r.setAttribute(e,s))}}},xn=/\s/,zs=r=>(typeof r=="object"&&"baseVal"in r&&(r=r.baseVal),r?r.split(xn):[]),Hs="Capture",wn=new RegExp(Hs+"$"),Us=(r,e,t)=>{const s=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,a=r&&r.$attrs$||{},o=e.$attrs$||{};for(const n of Bs(Object.keys(a)))n in o||Ns(s,n,a[n],void 0,t,e.$flags$);for(const n of Bs(Object.keys(o)))Ns(s,n,a[n],o[n],t,e.$flags$)};function Bs(r){return r.includes("ref")?[...r.filter(e=>e!=="ref"),"ref"]:r}var Lr,Fr,Xt=!1,Jt=!1,Dr=!1,Te=!1,er=(r,e,t)=>{var s;const a=e.$children$[t];let o=0,n,l,u;if(Xt||(Dr=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=mt.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=mt.createTextNode("");else{if(Te||(Te=a.$tag$==="svg"),n=a.$elm$=mt.createElementNS(Te?rn:sn,!Xt&&pt.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),Te&&a.$tag$==="foreignObject"&&(Te=!1),Us(null,a,Te),a.$children$)for(o=0;o<a.$children$.length;++o)l=er(r,a,o),l&&n.appendChild(l);a.$tag$==="svg"?Te=!1:n.tagName==="foreignObject"&&(Te=!0)}return n["s-hn"]=Fr,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Lr,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,u=r&&r.$children$&&r.$children$[t],u&&u.$tag$===a.$tag$&&r.$elm$&&_t(r.$elm$,!1)),n},_t=(r,e)=>{xe.$flags$|=1;const t=Array.from(r.__childNodes||r.childNodes);r["s-sr"]&&pt.experimentalSlotFixes;for(let s=t.length-1;s>=0;s--){const a=t[s];a["s-hn"]!==Fr&&a["s-ol"]&&(et(It(a).parentNode,a,It(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Dr=!0),e&&_t(a,e)}xe.$flags$&=-2},js=(r,e,t,s,a,o)=>{let n=r["s-cr"]&&r["s-cr"].parentNode||r,l;for(;a<=o;++a)s[a]&&(l=er(null,t,a),l&&(s[a].$elm$=l,et(n,l,It(e))))},Vs=(r,e,t)=>{for(let s=e;s<=t;++s){const a=r[s];if(a){const o=a.$elm$;o&&(Jt=!0,o["s-ol"]?o["s-ol"].remove():_t(o,!0),o.remove())}}},Sn=(r,e,t,s,a=!1)=>{let o=0,n=0,l=0,u=0,d=e.length-1,m=e[0],C=e[d],E=s.length-1,$=s[0],I=s[E],H,D;for(;o<=d&&n<=E;)if(m==null)m=e[++o];else if(C==null)C=e[--d];else if($==null)$=s[++n];else if(I==null)I=s[--E];else if(tr(m,$,a))gt(m,$,a),m=e[++o],$=s[++n];else if(tr(C,I,a))gt(C,I,a),C=e[--d],I=s[--E];else if(tr(m,I,a))(m.$tag$==="slot"||I.$tag$==="slot")&&_t(m.$elm$.parentNode,!1),gt(m,I,a),et(r,m.$elm$,C.$elm$.nextSibling),m=e[++o],I=s[--E];else if(tr(C,$,a))(m.$tag$==="slot"||I.$tag$==="slot")&&_t(C.$elm$.parentNode,!1),gt(C,$,a),et(r,C.$elm$,m.$elm$),C=e[--d],$=s[++n];else{for(l=-1,u=o;u<=d;++u)if(e[u]&&e[u].$key$!==null&&e[u].$key$===$.$key$){l=u;break}l>=0?(D=e[l],D.$tag$!==$.$tag$?H=er(e&&e[n],t,l):(gt(D,$,a),e[l]=void 0,H=D.$elm$),$=s[++n]):(H=er(e&&e[n],t,n),$=s[++n]),H&&et(It(m.$elm$).parentNode,H,It(m.$elm$))}o>d?js(r,s[E+1]==null?null:s[E+1].$elm$,t,s,n,E):n>E&&Vs(e,o,d)},tr=(r,e,t=!1)=>r.$tag$===e.$tag$?r.$tag$==="slot"?r.$name$===e.$name$:t?(t&&!r.$key$&&e.$key$&&(r.$key$=e.$key$),!0):r.$key$===e.$key$:!1,It=r=>r&&r["s-ol"]||r,gt=(r,e,t=!1)=>{const s=e.$elm$=r.$elm$,a=r.$children$,o=e.$children$,n=e.$tag$,l=e.$text$;let u;l===null?(Te=n==="svg"?!0:n==="foreignObject"?!1:Te,n==="slot"&&!Xt||Us(r,e,Te),a!==null&&o!==null?Sn(s,a,e,o,t):o!==null?(r.$text$!==null&&(s.textContent=""),js(s,null,e,o,0,o.length-1)):!t&&pt.updatable&&a!==null&&Vs(a,0,a.length-1),Te&&n==="svg"&&(Te=!1)):(u=s["s-cr"])?u.parentNode.textContent=l:r.$text$!==l&&(s.data=l)},ze=[],qs=r=>{let e,t,s;const a=r.__childNodes||r.childNodes;for(const o of a){if(o["s-sr"]&&(e=o["s-cr"])&&e.parentNode){t=e.parentNode.__childNodes||e.parentNode.childNodes;const n=o["s-sn"];for(s=t.length-1;s>=0;s--)if(e=t[s],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==o["s-hn"])if(Os(e,n)){let l=ze.find(u=>u.$nodeToRelocate$===e);Jt=!0,e["s-sn"]=e["s-sn"]||n,l?(l.$nodeToRelocate$["s-sh"]=o["s-hn"],l.$slotRefNode$=o):(e["s-sh"]=o["s-hn"],ze.push({$slotRefNode$:o,$nodeToRelocate$:e})),e["s-sr"]&&ze.map(u=>{Os(u.$nodeToRelocate$,e["s-sn"])&&(l=ze.find(d=>d.$nodeToRelocate$===e),l&&!u.$slotRefNode$&&(u.$slotRefNode$=l.$slotRefNode$))})}else ze.some(l=>l.$nodeToRelocate$===e)||ze.push({$nodeToRelocate$:e})}o.nodeType===1&&qs(o)}},et=(r,e,t)=>r==null?void 0:r.insertBefore(e,t),Rn=(r,e,t=!1)=>{var s,a,o,n;const l=r.$hostElement$,u=r.$vnode$||Qt(null,null),d=vn(e)?e:p(null,null,e);if(Fr=l.tagName,t&&d.$attrs$)for(const m of Object.keys(d.$attrs$))l.hasAttribute(m)&&!["key","ref","style","class"].includes(m)&&(d.$attrs$[m]=l[m]);d.$tag$=null,d.$flags$|=4,r.$vnode$=d,d.$elm$=u.$elm$=l,Xt=cn,Lr=l["s-cr"],Jt=!1,gt(u,d,t);{if(xe.$flags$|=1,Dr){qs(d.$elm$);for(const m of ze){const C=m.$nodeToRelocate$;if(!C["s-ol"]){const E=mt.createTextNode("");E["s-nr"]=C,et(C.parentNode,C["s-ol"]=E,C)}}for(const m of ze){const C=m.$nodeToRelocate$,E=m.$slotRefNode$;if(E){const $=E.parentNode;let I=E.nextSibling;{let P=(s=C["s-ol"])==null?void 0:s.previousSibling;for(;P;){let A=(a=P["s-nr"])!=null?a:null;if(A&&A["s-sn"]===C["s-sn"]&&$===(A.__parentNode||A.parentNode)){for(A=A.nextSibling;A===C||A!=null&&A["s-sr"];)A=A==null?void 0:A.nextSibling;if(!A||!A["s-nr"]){I=A;break}}P=P.previousSibling}}const H=C.__parentNode||C.parentNode,D=C.__nextSibling||C.nextSibling;(!I&&$!==H||D!==I)&&C!==I&&(!C["s-hn"]&&C["s-ol"]&&(C["s-hn"]=C["s-ol"].parentNode.nodeName),et($,C,I),C.nodeType===1&&C.tagName!=="SLOT-FB"&&(C.hidden=(o=C["s-ih"])!=null?o:!1)),C&&typeof E["s-rf"]=="function"&&E["s-rf"](C)}else C.nodeType===1&&(t&&(C["s-ih"]=(n=C.hidden)!=null?n:!1),C.hidden=!0)}}Jt&&As(d.$elm$),xe.$flags$&=-2,ze.length=0}Lr=void 0},Gs=(r,e)=>{if(e&&!r.$onRenderResolve$&&e["s-p"]){const t=e["s-p"].push(new Promise(s=>r.$onRenderResolve$=()=>{e["s-p"].splice(t-1,1),s()}))}},Nr=(r,e)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return Gs(r,r.$ancestorComponent$),hn(()=>En(r,e))},En=(r,e)=>{const t=r.$hostElement$,s=$t("scheduleUpdate",r.$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 o;return s(),Tn(o,()=>$n(r,a,e))},Tn=(r,e)=>Pn(r)?r.then(e).catch(t=>{console.error(t),e()}):e(),Pn=r=>r instanceof Promise||r&&r.then&&typeof r.then=="function",$n=async(r,e,t)=>{var s;const a=r.$hostElement$,o=$t("update",r.$cmpMeta$.$tagName$),n=a["s-rc"],l=$t("render",r.$cmpMeta$.$tagName$);_n(r,e,a,t),n&&(n.map(u=>u()),a["s-rc"]=void 0),l(),o();{const u=(s=a["s-p"])!=null?s:[],d=()=>In(r);u.length===0?d():(Promise.all(u).then(d),r.$flags$|=4,u.length=0)}},_n=(r,e,t,s)=>{try{e=e.render(),r.$flags$&=-17,r.$flags$|=2,Rn(r,e,s)}catch(a){Zt(a,r.$hostElement$)}return null},In=r=>{const e=r.$cmpMeta$.$tagName$,t=r.$hostElement$,s=$t("postUpdate",e),a=t,o=r.$ancestorComponent$;r.$flags$&64?s():(r.$flags$|=64,Ws(t),Mn(a,"componentDidLoad",void 0,t),s(),r.$onReadyResolve$(t),o||An()),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Ar(()=>Nr(r,!1)),r.$flags$&=-517},An=r=>{Ws(mt.documentElement),Ar(()=>Ds(Yt,"appload",{detail:{namespace:dt}}))},Mn=(r,e,t,s)=>{if(r&&r[e])try{return r[e](t)}catch(a){Zt(a,s)}},Ws=r=>{var e;return r.classList.add((e=pt.hydratedSelectorName)!=null?e:"hydrated")},On=(r,e)=>Xe(r).$instanceValues$.get(e),Zs=(r,e,t,s)=>{const a=Xe(r),o=r,n=a.$instanceValues$.get(e),l=a.$flags$,u=o;t=Fs(t,s.$members$[e][0]);const d=Number.isNaN(n)&&Number.isNaN(t);if(t!==n&&!d){a.$instanceValues$.set(e,t);{if(s.$watchers$&&l&128){const C=s.$watchers$[e];C&&C.map(E=>{try{u[E](t,n,e)}catch($){Zt($,o)}})}(l&18)===2&&Nr(a,!1)}}},Ln=(r,e,t)=>{var s,a;const o=r.prototype;if(e.$members$||e.$watchers$||r.watchers){r.watchers&&!e.$watchers$&&(e.$watchers$=r.watchers);const n=Object.entries((s=e.$members$)!=null?s:{});n.map(([l,[u]])=>{if(u&31||u&32){const{get:d,set:m}=Object.getOwnPropertyDescriptor(o,l)||{};d&&(e.$members$[l][0]|=2048),m&&(e.$members$[l][0]|=4096),Object.defineProperty(o,l,{get(){return d?d.apply(this):On(this,l)},configurable:!0,enumerable:!0}),Object.defineProperty(o,l,{set(C){const E=Xe(this);if(m){const $=u&32?this[l]:E.$hostElement$[l];typeof $>"u"&&E.$instanceValues$.get(l)?C=E.$instanceValues$.get(l):!E.$instanceValues$.get(l)&&$&&E.$instanceValues$.set(l,$),m.apply(this,[Fs(C,u)]),C=u&32?this[l]:E.$hostElement$[l],Zs(this,l,C,e);return}{Zs(this,l,C,e);return}}})}});{const l=new Map;o.attributeChangedCallback=function(u,d,m){xe.jmp(()=>{var C;const E=l.get(u);if(!(this.hasOwnProperty(E)&&pt.lazyLoad)){if(o.hasOwnProperty(E)&&typeof this[E]=="number"&&this[E]==m)return;if(E==null){const I=Xe(this),H=I==null?void 0:I.$flags$;if(H&&!(H&8)&&H&128&&m!==d){const P=this,A=(C=e.$watchers$)==null?void 0:C[u];A==null||A.forEach(B=>{P[B]!=null&&P[B].call(P,m,d,u)})}return}}const $=Object.getOwnPropertyDescriptor(o,E);m=m===null&&typeof this[E]=="boolean"?!1:m,m!==this[E]&&(!$.get||$.set)&&(this[E]=m)})},r.observedAttributes=Array.from(new Set([...Object.keys((a=e.$watchers$)!=null?a:{}),...n.filter(([u,d])=>d[0]&15).map(([u,d])=>{const m=d[1]||u;return l.set(m,u),m})]))}}return r},Fn=async(r,e,t,s)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const n=r.localName;customElements.whenDefined(n).then(()=>e.$flags$|=128)}}const a=e.$ancestorComponent$,o=()=>Nr(e,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Dn=(r,e)=>{},Nn=r=>{if(!(xe.$flags$&1)){const e=Xe(r),t=e.$cmpMeta$,s=$t("connectedCallback",t.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>Dn());else{e.$flags$|=1,t.$flags$&12&&zn(r);{let a=r;for(;a=a.parentNode||a.host;)if(a["s-p"]){Gs(e,e.$ancestorComponent$=a);break}}t.$members$&&Object.entries(t.$members$).map(([a,[o]])=>{if(o&31&&r.hasOwnProperty(a)){const n=r[a];delete r[a],r[a]=n}}),Fn(r,e)}s()}},zn=r=>{const e=r["s-cr"]=mt.createComment("");e["s-cn"]=!0,et(r,e,r.firstChild)},Hn=async r=>{xe.$flags$&1||Xe(r),Kt.has(r)&&Kt.delete(r),r.shadowRoot&&Kt.has(r.shadowRoot)&&Kt.delete(r.shadowRoot)},J=(r,e)=>{const t={$flags$:e[0],$tagName$:e[1]};t.$members$=e[2],t.$watchers$=r.$watchers$;const s=r.prototype.connectedCallback,a=r.prototype.disconnectedCallback;return Object.assign(r.prototype,{__hasHostListenerAttached:!1,__registerHost(){on(this,t)},connectedCallback(){this.__hasHostListenerAttached||(Xe(this),this.__hasHostListenerAttached=!0),Nn(this),s&&s.call(this)},disconnectedCallback(){Hn(this),a&&a.call(this),xe.raf(()=>{var o;const n=Xe(this);((o=n==null?void 0:n.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!n.$vnode$.$elm$.isConnected&&delete n.$vnode$,this instanceof Node&&!this.isConnected&&nn(this)})},__attachShadow(){this.shadowRoot=this}}),r.is=t.$tagName$,Ln(r,t)},Un=(r,e)=>e,Ys={exports:{}};/*!
1
+ (function(K,de){typeof exports=="object"&&typeof module<"u"?de(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],de):(K=typeof globalThis<"u"?globalThis:K||self,de(K.SearchcraftVueSdk={},K.Vue))})(this,function(K,de){"use strict";var Rc=Object.defineProperty;var Ec=(K,de,ft)=>de in K?Rc(K,de,{enumerable:!0,configurable:!0,writable:!0,value:ft}):K[de]=ft;var c=(K,de,ft)=>Ec(K,typeof de!="symbol"?de+"":de,ft);const ft="searchcraft-javascript-sdk",pt={experimentalSlotFixes:!1,hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var Ja=Object.defineProperty,en=(r,t)=>{for(var e in t)Ja(r,e,{get:t[e],enumerable:!0})},tn="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml",sn=(r,t)=>{var e;const s=t.$cmpMeta$;Object.entries((e=s.$members$)!=null?e:{}).map(([o,[n]])=>{if(n&31||n&32){const l=r[o],u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),o);Object.defineProperty(r,o,{get(){return u.get.call(this)},set(f){u.set.call(this,f)},configurable:!0,enumerable:!0}),r[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):l}})},$r=new WeakMap,an=r=>$r.delete(r),Xe=r=>$r.get(r),nn=(r,t)=>{const e={$flags$:0,$hostElement$:r,$cmpMeta$:t,$instanceValues$:new Map};e.$onReadyPromise$=new Promise(a=>e.$onReadyResolve$=a),r["s-p"]=[],r["s-rc"]=[];const s=$r.set(r,e);return sn(r,e),s},Rs=(r,t)=>t in r,Zt=(r,t)=>(0,console.error)(r,t),Yt=typeof window<"u"?window:{},mt=Yt.document||{head:{}},X=Yt.HTMLElement||class{},xe={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,t,e,s)=>r.addEventListener(t,e,s),rel:(r,t,e,s)=>r.removeEventListener(t,e,s),ce:(r,t)=>new CustomEvent(r,t)},on=pt.shadowDom,cn=r=>Promise.resolve(r),_r=!1,Es=[],Ts=[],ln=(r,t)=>e=>{r.push(e),_r||(_r=!0,xe.$flags$&4?Ar(Ir):xe.raf(Ir))},Ps=r=>{for(let t=0;t<r.length;t++)try{r[t](performance.now())}catch(e){Zt(e)}r.length=0},Ir=()=>{Ps(Es),Ps(Ts),(_r=Es.length>0)&&xe.raf(Ir)},Ar=r=>cn().then(r),un=ln(Ts),Mr=r=>(r=typeof r,r==="object"||r==="function"),hn={};en(hn,{err:()=>$s,map:()=>dn,ok:()=>Or,unwrap:()=>fn,unwrapErr:()=>pn});var Or=r=>({isOk:!0,isErr:!1,value:r}),$s=r=>({isOk:!1,isErr:!0,value:r});function dn(r,t){if(r.isOk){const e=t(r.value);return e instanceof Promise?e.then(s=>Or(s)):Or(e)}if(r.isErr){const e=r.value;return $s(e)}throw"should never get here"}var fn=r=>{if(r.isOk)return r.value;throw r.value},pn=r=>{if(r.isErr)return r.value;throw r.value},_s=r=>{const t=r.__childNodes||r.childNodes;r.tagName&&r.tagName.includes("-")&&r["s-cr"]&&r.tagName!=="SLOT-FB"&&Is(t,r.tagName).forEach(e=>{var s;e.nodeType===1&&e.tagName==="SLOT-FB"&&((s=mn(e,e["s-sn"],!1))!=null&&s.length?e.hidden=!0:e.hidden=!1)});for(const e of t)e.nodeType===1&&(e.__childNodes||e.childNodes).length&&_s(e)};function Is(r,t,e){let s=0,a=[],o;for(;s<r.length;s++)o=r[s],o["s-sr"]&&o["s-hn"]===t&&e===void 0&&a.push(o),a=[...a,...Is(o.childNodes,t,e)];return a}var mn=(r,t,e=!0)=>{const s=[];for((e&&r["s-sr"]||!r["s-sr"])&&s.push(r);(r=r.nextSibling)&&r["s-sn"]===t;)s.push(r);return s},As=(r,t)=>r.nodeType===1?r.getAttribute("slot")===null&&t===""||r.getAttribute("slot")===t:r["s-sn"]===t?!0:t==="",$t=(r,t="")=>()=>{},p=(r,t,...e)=>{let s=null,a=null,o=null,n=!1,l=!1;const u=[],f=C=>{for(let E=0;E<C.length;E++)s=C[E],Array.isArray(s)?f(s):s!=null&&typeof s!="boolean"&&((n=typeof r!="function"&&!Mr(s))&&(s=String(s)),n&&l?u[u.length-1].$text$+=s:u.push(n?Qt(null,s):s),l=n)};if(f(e),t){t.key&&(a=t.key),t.name&&(o=t.name);{const C=t.className||t.class;C&&(t.class=typeof C!="object"?C:Object.keys(C).filter(E=>C[E]).join(" "))}}if(typeof r=="function")return r(t===null?{}:t,u,vn);const m=Qt(r,null);return m.$attrs$=t,u.length>0&&(m.$children$=u),m.$key$=a,m.$name$=o,m},Qt=(r,t)=>{const e={$flags$:0,$tag$:r,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},gn={},bn=r=>r&&r.$tag$===gn,vn={forEach:(r,t)=>r.map(Ms).forEach(t),map:(r,t)=>r.map(Ms).map(t).map(yn)},Ms=r=>({vattrs:r.$attrs$,vchildren:r.$children$,vkey:r.$key$,vname:r.$name$,vtag:r.$tag$,vtext:r.$text$}),yn=r=>{if(typeof r.vtag=="function"){const e={...r.vattrs};return r.vkey&&(e.key=r.vkey),r.vname&&(e.name=r.vname),p(r.vtag,e,...r.vchildren||[])}const t=Qt(r.vtag,r.vtext);return t.$attrs$=r.vattrs,t.$children$=r.vchildren,t.$key$=r.vkey,t.$name$=r.vname,t},Os=(r,t)=>r!=null&&!Mr(r)?t&4?r==="false"?!1:r===""||!!r:t&2?parseFloat(r):t&1?String(r):r:r,kn=r=>r,Je=(r,t,e)=>{const s=kn(r);return{emit:a=>Ls(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Ls=(r,t,e)=>{const s=xe.ce(t,e);return r.dispatchEvent(s),s},Kt=new WeakMap,Fs=(r,t,e,s,a,o)=>{if(e!==s){let n=Rs(r,t),l=t.toLowerCase();if(t==="class"){const u=r.classList,f=Ds(e);let m=Ds(s);r["s-si"]?(m.push(r["s-si"]),f.forEach(C=>{C.startsWith(r["s-si"])&&m.push(C)}),m=[...new Set(m)],u.add(...m),delete r["s-si"]):(u.remove(...f.filter(C=>C&&!m.includes(C))),u.add(...m.filter(C=>C&&!f.includes(C))))}else if(t==="style"){for(const u in e)(!s||s[u]==null)&&(u.includes("-")?r.style.removeProperty(u):r.style[u]="");for(const u in s)(!e||s[u]!==e[u])&&(u.includes("-")?r.style.setProperty(u,s[u]):r.style[u]=s[u])}else if(t!=="key")if(!r.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Rs(Yt,l)?t=l.slice(2):t=l[2]+t.slice(3),e||s){const u=t.endsWith(Ns);t=t.replace(xn,""),e&&xe.rel(r,t,e,u),s&&xe.ael(r,t,s,u)}}else{const u=Mr(s);if((n||u&&s!==null)&&!a)try{if(r.tagName.includes("-"))r[t]!==s&&(r[t]=s);else{const f=s??"";t==="list"?n=!1:(e==null||r[t]!=f)&&(typeof r.__lookupSetter__(t)=="function"?r[t]=f:r.setAttribute(t,f))}}catch{}s==null||s===!1?(s!==!1||r.getAttribute(t)==="")&&r.removeAttribute(t):(!n||o&4||a)&&!u&&(s=s===!0?"":s,r.setAttribute(t,s))}}},Cn=/\s/,Ds=r=>(typeof r=="object"&&"baseVal"in r&&(r=r.baseVal),r?r.split(Cn):[]),Ns="Capture",xn=new RegExp(Ns+"$"),zs=(r,t,e)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=r&&r.$attrs$||{},o=t.$attrs$||{};for(const n of Hs(Object.keys(a)))n in o||Fs(s,n,a[n],void 0,e,t.$flags$);for(const n of Hs(Object.keys(o)))Fs(s,n,a[n],o[n],e,t.$flags$)};function Hs(r){return r.includes("ref")?[...r.filter(t=>t!=="ref"),"ref"]:r}var Lr,Fr,Xt=!1,Jt=!1,Dr=!1,Te=!1,er=(r,t,e)=>{var s;const a=t.$children$[e];let o=0,n,l,u;if(Xt||(Dr=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=mt.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=mt.createTextNode("");else{if(Te||(Te=a.$tag$==="svg"),n=a.$elm$=mt.createElementNS(Te?tn:rn,!Xt&&pt.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),Te&&a.$tag$==="foreignObject"&&(Te=!1),zs(null,a,Te),a.$children$)for(o=0;o<a.$children$.length;++o)l=er(r,a,o),l&&n.appendChild(l);a.$tag$==="svg"?Te=!1:n.tagName==="foreignObject"&&(Te=!0)}return n["s-hn"]=Fr,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Lr,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,u=r&&r.$children$&&r.$children$[e],u&&u.$tag$===a.$tag$&&r.$elm$&&_t(r.$elm$,!1)),n},_t=(r,t)=>{xe.$flags$|=1;const e=Array.from(r.__childNodes||r.childNodes);r["s-sr"]&&pt.experimentalSlotFixes;for(let s=e.length-1;s>=0;s--){const a=e[s];a["s-hn"]!==Fr&&a["s-ol"]&&(et(It(a).parentNode,a,It(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Dr=!0),t&&_t(a,t)}xe.$flags$&=-2},Us=(r,t,e,s,a,o)=>{let n=r["s-cr"]&&r["s-cr"].parentNode||r,l;for(;a<=o;++a)s[a]&&(l=er(null,e,a),l&&(s[a].$elm$=l,et(n,l,It(t))))},Bs=(r,t,e)=>{for(let s=t;s<=e;++s){const a=r[s];if(a){const o=a.$elm$;o&&(Jt=!0,o["s-ol"]?o["s-ol"].remove():_t(o,!0),o.remove())}}},wn=(r,t,e,s,a=!1)=>{let o=0,n=0,l=0,u=0,f=t.length-1,m=t[0],C=t[f],E=s.length-1,P=s[0],I=s[E],H,D;for(;o<=f&&n<=E;)if(m==null)m=t[++o];else if(C==null)C=t[--f];else if(P==null)P=s[++n];else if(I==null)I=s[--E];else if(tr(m,P,a))gt(m,P,a),m=t[++o],P=s[++n];else if(tr(C,I,a))gt(C,I,a),C=t[--f],I=s[--E];else if(tr(m,I,a))(m.$tag$==="slot"||I.$tag$==="slot")&&_t(m.$elm$.parentNode,!1),gt(m,I,a),et(r,m.$elm$,C.$elm$.nextSibling),m=t[++o],I=s[--E];else if(tr(C,P,a))(m.$tag$==="slot"||I.$tag$==="slot")&&_t(C.$elm$.parentNode,!1),gt(C,P,a),et(r,C.$elm$,m.$elm$),C=t[--f],P=s[++n];else{for(l=-1,u=o;u<=f;++u)if(t[u]&&t[u].$key$!==null&&t[u].$key$===P.$key$){l=u;break}l>=0?(D=t[l],D.$tag$!==P.$tag$?H=er(t&&t[n],e,l):(gt(D,P,a),t[l]=void 0,H=D.$elm$),P=s[++n]):(H=er(t&&t[n],e,n),P=s[++n]),H&&et(It(m.$elm$).parentNode,H,It(m.$elm$))}o>f?Us(r,s[E+1]==null?null:s[E+1].$elm$,e,s,n,E):n>E&&Bs(t,o,f)},tr=(r,t,e=!1)=>r.$tag$===t.$tag$?r.$tag$==="slot"?r.$name$===t.$name$:e?(e&&!r.$key$&&t.$key$&&(r.$key$=t.$key$),!0):r.$key$===t.$key$:!1,It=r=>r&&r["s-ol"]||r,gt=(r,t,e=!1)=>{const s=t.$elm$=r.$elm$,a=r.$children$,o=t.$children$,n=t.$tag$,l=t.$text$;let u;l===null?(Te=n==="svg"?!0:n==="foreignObject"?!1:Te,n==="slot"&&!Xt||zs(r,t,Te),a!==null&&o!==null?wn(s,a,t,o,e):o!==null?(r.$text$!==null&&(s.textContent=""),Us(s,null,t,o,0,o.length-1)):!e&&pt.updatable&&a!==null&&Bs(a,0,a.length-1),Te&&n==="svg"&&(Te=!1)):(u=s["s-cr"])?u.parentNode.textContent=l:r.$text$!==l&&(s.data=l)},ze=[],Vs=r=>{let t,e,s;const a=r.__childNodes||r.childNodes;for(const o of a){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){e=t.parentNode.__childNodes||t.parentNode.childNodes;const n=o["s-sn"];for(s=e.length-1;s>=0;s--)if(t=e[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(As(t,n)){let l=ze.find(u=>u.$nodeToRelocate$===t);Jt=!0,t["s-sn"]=t["s-sn"]||n,l?(l.$nodeToRelocate$["s-sh"]=o["s-hn"],l.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],ze.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&ze.map(u=>{As(u.$nodeToRelocate$,t["s-sn"])&&(l=ze.find(f=>f.$nodeToRelocate$===t),l&&!u.$slotRefNode$&&(u.$slotRefNode$=l.$slotRefNode$))})}else ze.some(l=>l.$nodeToRelocate$===t)||ze.push({$nodeToRelocate$:t})}o.nodeType===1&&Vs(o)}},et=(r,t,e)=>r==null?void 0:r.insertBefore(t,e),Sn=(r,t,e=!1)=>{var s,a,o,n;const l=r.$hostElement$,u=r.$vnode$||Qt(null,null),f=bn(t)?t:p(null,null,t);if(Fr=l.tagName,e&&f.$attrs$)for(const m of Object.keys(f.$attrs$))l.hasAttribute(m)&&!["key","ref","style","class"].includes(m)&&(f.$attrs$[m]=l[m]);f.$tag$=null,f.$flags$|=4,r.$vnode$=f,f.$elm$=u.$elm$=l,Xt=on,Lr=l["s-cr"],Jt=!1,gt(u,f,e);{if(xe.$flags$|=1,Dr){Vs(f.$elm$);for(const m of ze){const C=m.$nodeToRelocate$;if(!C["s-ol"]){const E=mt.createTextNode("");E["s-nr"]=C,et(C.parentNode,C["s-ol"]=E,C)}}for(const m of ze){const C=m.$nodeToRelocate$,E=m.$slotRefNode$;if(E){const P=E.parentNode;let I=E.nextSibling;{let $=(s=C["s-ol"])==null?void 0:s.previousSibling;for(;$;){let A=(a=$["s-nr"])!=null?a:null;if(A&&A["s-sn"]===C["s-sn"]&&P===(A.__parentNode||A.parentNode)){for(A=A.nextSibling;A===C||A!=null&&A["s-sr"];)A=A==null?void 0:A.nextSibling;if(!A||!A["s-nr"]){I=A;break}}$=$.previousSibling}}const H=C.__parentNode||C.parentNode,D=C.__nextSibling||C.nextSibling;(!I&&P!==H||D!==I)&&C!==I&&(!C["s-hn"]&&C["s-ol"]&&(C["s-hn"]=C["s-ol"].parentNode.nodeName),et(P,C,I),C.nodeType===1&&C.tagName!=="SLOT-FB"&&(C.hidden=(o=C["s-ih"])!=null?o:!1)),C&&typeof E["s-rf"]=="function"&&E["s-rf"](C)}else C.nodeType===1&&(e&&(C["s-ih"]=(n=C.hidden)!=null?n:!1),C.hidden=!0)}}Jt&&_s(f.$elm$),xe.$flags$&=-2,ze.length=0}Lr=void 0},js=(r,t)=>{if(t&&!r.$onRenderResolve$&&t["s-p"]){const e=t["s-p"].push(new Promise(s=>r.$onRenderResolve$=()=>{t["s-p"].splice(e-1,1),s()}))}},Nr=(r,t)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return js(r,r.$ancestorComponent$),un(()=>Rn(r,t))},Rn=(r,t)=>{const e=r.$hostElement$,s=$t("scheduleUpdate",r.$cmpMeta$.$tagName$),a=e;if(!a)throw new Error(`Can't render component <${e.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 o;return s(),En(o,()=>Pn(r,a,t))},En=(r,t)=>Tn(r)?r.then(t).catch(e=>{console.error(e),t()}):t(),Tn=r=>r instanceof Promise||r&&r.then&&typeof r.then=="function",Pn=async(r,t,e)=>{var s;const a=r.$hostElement$,o=$t("update",r.$cmpMeta$.$tagName$),n=a["s-rc"],l=$t("render",r.$cmpMeta$.$tagName$);$n(r,t,a,e),n&&(n.map(u=>u()),a["s-rc"]=void 0),l(),o();{const u=(s=a["s-p"])!=null?s:[],f=()=>_n(r);u.length===0?f():(Promise.all(u).then(f),r.$flags$|=4,u.length=0)}},$n=(r,t,e,s)=>{try{t=t.render(),r.$flags$&=-17,r.$flags$|=2,Sn(r,t,s)}catch(a){Zt(a,r.$hostElement$)}return null},_n=r=>{const t=r.$cmpMeta$.$tagName$,e=r.$hostElement$,s=$t("postUpdate",t),a=e,o=r.$ancestorComponent$;r.$flags$&64?s():(r.$flags$|=64,qs(e),An(a,"componentDidLoad",void 0,e),s(),r.$onReadyResolve$(e),o||In()),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Ar(()=>Nr(r,!1)),r.$flags$&=-517},In=r=>{qs(mt.documentElement),Ar(()=>Ls(Yt,"appload",{detail:{namespace:ft}}))},An=(r,t,e,s)=>{if(r&&r[t])try{return r[t](e)}catch(a){Zt(a,s)}},qs=r=>{var t;return r.classList.add((t=pt.hydratedSelectorName)!=null?t:"hydrated")},Mn=(r,t)=>Xe(r).$instanceValues$.get(t),Gs=(r,t,e,s)=>{const a=Xe(r),o=r,n=a.$instanceValues$.get(t),l=a.$flags$,u=o;e=Os(e,s.$members$[t][0]);const f=Number.isNaN(n)&&Number.isNaN(e);if(e!==n&&!f){a.$instanceValues$.set(t,e);{if(s.$watchers$&&l&128){const C=s.$watchers$[t];C&&C.map(E=>{try{u[E](e,n,t)}catch(P){Zt(P,o)}})}(l&18)===2&&Nr(a,!1)}}},On=(r,t,e)=>{var s,a;const o=r.prototype;if(t.$members$||t.$watchers$||r.watchers){r.watchers&&!t.$watchers$&&(t.$watchers$=r.watchers);const n=Object.entries((s=t.$members$)!=null?s:{});n.map(([l,[u]])=>{if(u&31||u&32){const{get:f,set:m}=Object.getOwnPropertyDescriptor(o,l)||{};f&&(t.$members$[l][0]|=2048),m&&(t.$members$[l][0]|=4096),Object.defineProperty(o,l,{get(){return f?f.apply(this):Mn(this,l)},configurable:!0,enumerable:!0}),Object.defineProperty(o,l,{set(C){const E=Xe(this);if(m){const P=u&32?this[l]:E.$hostElement$[l];typeof P>"u"&&E.$instanceValues$.get(l)?C=E.$instanceValues$.get(l):!E.$instanceValues$.get(l)&&P&&E.$instanceValues$.set(l,P),m.apply(this,[Os(C,u)]),C=u&32?this[l]:E.$hostElement$[l],Gs(this,l,C,t);return}{Gs(this,l,C,t);return}}})}});{const l=new Map;o.attributeChangedCallback=function(u,f,m){xe.jmp(()=>{var C;const E=l.get(u);if(!(this.hasOwnProperty(E)&&pt.lazyLoad)){if(o.hasOwnProperty(E)&&typeof this[E]=="number"&&this[E]==m)return;if(E==null){const I=Xe(this),H=I==null?void 0:I.$flags$;if(H&&!(H&8)&&H&128&&m!==f){const $=this,A=(C=t.$watchers$)==null?void 0:C[u];A==null||A.forEach(B=>{$[B]!=null&&$[B].call($,m,f,u)})}return}}const P=Object.getOwnPropertyDescriptor(o,E);m=m===null&&typeof this[E]=="boolean"?!1:m,m!==this[E]&&(!P.get||P.set)&&(this[E]=m)})},r.observedAttributes=Array.from(new Set([...Object.keys((a=t.$watchers$)!=null?a:{}),...n.filter(([u,f])=>f[0]&15).map(([u,f])=>{const m=f[1]||u;return l.set(m,u),m})]))}}return r},Ln=async(r,t,e,s)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const n=r.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}}const a=t.$ancestorComponent$,o=()=>Nr(t,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Fn=(r,t)=>{},Dn=r=>{if(!(xe.$flags$&1)){const t=Xe(r),e=t.$cmpMeta$,s=$t("connectedCallback",e.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Fn());else{t.$flags$|=1,e.$flags$&12&&Nn(r);{let a=r;for(;a=a.parentNode||a.host;)if(a["s-p"]){js(t,t.$ancestorComponent$=a);break}}e.$members$&&Object.entries(e.$members$).map(([a,[o]])=>{if(o&31&&r.hasOwnProperty(a)){const n=r[a];delete r[a],r[a]=n}}),Ln(r,t)}s()}},Nn=r=>{const t=r["s-cr"]=mt.createComment("");t["s-cn"]=!0,et(r,t,r.firstChild)},zn=async r=>{xe.$flags$&1||Xe(r),Kt.has(r)&&Kt.delete(r),r.shadowRoot&&Kt.has(r.shadowRoot)&&Kt.delete(r.shadowRoot)},J=(r,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$watchers$=r.$watchers$;const s=r.prototype.connectedCallback,a=r.prototype.disconnectedCallback;return Object.assign(r.prototype,{__hasHostListenerAttached:!1,__registerHost(){nn(this,e)},connectedCallback(){this.__hasHostListenerAttached||(Xe(this),this.__hasHostListenerAttached=!0),Dn(this),s&&s.call(this)},disconnectedCallback(){zn(this),a&&a.call(this),xe.raf(()=>{var o;const n=Xe(this);((o=n==null?void 0:n.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!n.$vnode$.$elm$.isConnected&&delete n.$vnode$,this instanceof Node&&!this.isConnected&&an(this)})},__attachShadow(){this.shadowRoot=this}}),r.is=e.$tagName$,On(r,e)},Hn=(r,t)=>t,Ws={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var o="",n=0;n<arguments.length;n++){var l=arguments[n];l&&(o=a(o,s(l)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var l in o)e.call(o,l)&&o[l]&&(n=a(n,l));return n}function a(o,n){return n?o?o+" "+n:o+n:o}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(Ys);const we=Ys.exports;var Qs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ks={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(r,e){(function(t,s){r.exports=s()})(Qs,function(){const{entries:t,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:l,seal:u,create:d}=Object,{apply:m,construct:C}=typeof Reflect<"u"&&Reflect;l||(l=function(O){return O}),u||(u=function(O){return O}),m||(m=function(O,V,j){return O.apply(V,j)}),C||(C=function(O,V){return new O(...V)});const E=ce(Array.prototype.forEach),$=ce(Array.prototype.lastIndexOf),I=ce(Array.prototype.pop),H=ce(Array.prototype.push),D=ce(Array.prototype.splice),P=ce(String.prototype.toLowerCase),A=ce(String.prototype.toString),B=ce(String.prototype.match),Z=ce(String.prototype.replace),oe=ce(String.prototype.indexOf),Y=ce(String.prototype.trim),be=ce(Object.prototype.hasOwnProperty),re=ce(RegExp.prototype.test),Le=os(TypeError);function ce(U){return function(O){for(var V=arguments.length,j=new Array(V>1?V-1:0),le=1;le<V;le++)j[le-1]=arguments[le];return m(U,O,j)}}function os(U){return function(){for(var O=arguments.length,V=new Array(O),j=0;j<O;j++)V[j]=arguments[j];return C(U,V)}}function N(U,O){let V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P;s&&s(U,null);let j=O.length;for(;j--;){let le=O[j];if(typeof le=="string"){const Se=V(le);Se!==le&&(a(O)||(O[j]=Se),le=Se)}U[le]=!0}return U}function is(U){for(let O=0;O<U.length;O++)be(U,O)||(U[O]=null);return U}function Ae(U){const O=d(null);for(const[V,j]of t(U))be(U,V)&&(Array.isArray(j)?O[V]=is(j):j&&typeof j=="object"&&j.constructor===Object?O[V]=Ae(j):O[V]=j);return O}function it(U,O){for(;U!==null;){const j=n(U,O);if(j){if(j.get)return ce(j.get);if(typeof j.value=="function")return ce(j.value)}U=o(U)}function V(){return null}return V}const lr=l(["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","section","select","shadow","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"]),tt=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ct=l(["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"]),cs=l(["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"]),yt=l(["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"]),ls=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kt=l(["#text"]),Ft=l(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Dt=l(["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","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"]),ur=l(["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"]),Ct=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),us=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hr=u(/<%[\w\W]*|[\w\W]*%>/gm),hs=u(/\$\{[\w\W]*/gm),xt=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nt=u(/^aria-[\-\w]+$/),zt=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fs=u(/^(?:\w+script|data):/i),fr=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dr=u(/^html$/i),ds=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var pr=Object.freeze({__proto__:null,ARIA_ATTR:Nt,ATTR_WHITESPACE:fr,CUSTOM_ELEMENT:ds,DATA_ATTR:xt,DOCTYPE_NAME:dr,ERB_EXPR:hr,IS_ALLOWED_URI:zt,IS_SCRIPT_OR_DATA:fs,MUSTACHE_EXPR:us,TMPLIT_EXPR:hs});const rt={element:1,text:3,progressingInstruction:7,comment:8,document:9},ps=function(){return typeof window>"u"?null:window},ms=function(O,V){if(typeof O!="object"||typeof O.createPolicy!="function")return null;let j=null;const le="data-tt-policy-suffix";V&&V.hasAttribute(le)&&(j=V.getAttribute(le));const Se="dompurify"+(j?"#"+j:"");try{return O.createPolicy(Se,{createHTML(st){return st},createScriptURL(st){return st}})}catch{return console.warn("TrustedTypes policy "+Se+" could not be created."),null}},Ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mr(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ps();const O=L=>mr(L);if(O.version="3.2.4",O.removed=[],!U||!U.document||U.document.nodeType!==rt.document||!U.Element)return O.isSupported=!1,O;let{document:V}=U;const j=V,le=j.currentScript,{DocumentFragment:Se,HTMLTemplateElement:st,Node:wt,Element:Ut,NodeFilter:lt,NamedNodeMap:Bt=U.NamedNodeMap||U.MozNamedAttrMap,HTMLFormElement:bs,DOMParser:jt,trustedTypes:St}=U,Fe=Ut.prototype,ut=it(Fe,"cloneNode"),vs=it(Fe,"remove"),gr=it(Fe,"nextSibling"),$e=it(Fe,"childNodes"),ht=it(Fe,"parentNode");if(typeof st=="function"){const L=V.createElement("template");L.content&&L.content.ownerDocument&&(V=L.content.ownerDocument)}let ue,Me="";const{implementation:Vt,createNodeIterator:br,createDocumentFragment:ys,getElementsByTagName:ft}=V,{importNode:_e}=j;let se=Ht();O.isSupported=typeof t=="function"&&typeof ht=="function"&&Vt&&Vt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:at,ERB_EXPR:Re,TMPLIT_EXPR:je,DATA_ATTR:vr,ARIA_ATTR:Ve,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:yr,CUSTOM_ELEMENT:ks}=pr;let{IS_ALLOWED_URI:kr}=pr,ae=null;const Cr=N({},[...lr,...tt,...ct,...yt,...kt]);let ie=null;const xr=N({},[...Ft,...Dt,...ur,...Ct]);let te=Object.seal(d(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}})),qe=null,f=null,i=!0,h=!0,g=!1,v=!0,y=!1,S=!0,k=!1,T=!1,x=!1,w=!1,W=!1,_=!1,ne=!0,G=!1;const ve="user-content-";let Rt=!0,Ge=!1,We={},Ze=null;const qt=N({},["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 wr=null;const Et=N({},["audio","video","img","source","image","track"]);let Ye=null;const Ua=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sr="http://www.w3.org/1998/Math/MathML",Rr="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Tt=Qe,Cs=!1,xs=null;const bc=N({},[Sr,Rr,Qe],A);let Er=N({},["mi","mo","mn","ms","mtext"]),Tr=N({},["annotation-xml"]);const vc=N({},["title","style","font","a","script"]);let Gt=null;const yc=["application/xhtml+xml","text/html"],kc="text/html";let he=null,Pt=null;const Cc=V.createElement("form"),Ba=function(b){return b instanceof RegExp||b instanceof Function},ws=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===b)){if((!b||typeof b!="object")&&(b={}),b=Ae(b),Gt=yc.indexOf(b.PARSER_MEDIA_TYPE)===-1?kc:b.PARSER_MEDIA_TYPE,he=Gt==="application/xhtml+xml"?A:P,ae=be(b,"ALLOWED_TAGS")?N({},b.ALLOWED_TAGS,he):Cr,ie=be(b,"ALLOWED_ATTR")?N({},b.ALLOWED_ATTR,he):xr,xs=be(b,"ALLOWED_NAMESPACES")?N({},b.ALLOWED_NAMESPACES,A):bc,Ye=be(b,"ADD_URI_SAFE_ATTR")?N(Ae(Ua),b.ADD_URI_SAFE_ATTR,he):Ua,wr=be(b,"ADD_DATA_URI_TAGS")?N(Ae(Et),b.ADD_DATA_URI_TAGS,he):Et,Ze=be(b,"FORBID_CONTENTS")?N({},b.FORBID_CONTENTS,he):qt,qe=be(b,"FORBID_TAGS")?N({},b.FORBID_TAGS,he):{},f=be(b,"FORBID_ATTR")?N({},b.FORBID_ATTR,he):{},We=be(b,"USE_PROFILES")?b.USE_PROFILES:!1,i=b.ALLOW_ARIA_ATTR!==!1,h=b.ALLOW_DATA_ATTR!==!1,g=b.ALLOW_UNKNOWN_PROTOCOLS||!1,v=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,y=b.SAFE_FOR_TEMPLATES||!1,S=b.SAFE_FOR_XML!==!1,k=b.WHOLE_DOCUMENT||!1,w=b.RETURN_DOM||!1,W=b.RETURN_DOM_FRAGMENT||!1,_=b.RETURN_TRUSTED_TYPE||!1,x=b.FORCE_BODY||!1,ne=b.SANITIZE_DOM!==!1,G=b.SANITIZE_NAMED_PROPS||!1,Rt=b.KEEP_CONTENT!==!1,Ge=b.IN_PLACE||!1,kr=b.ALLOWED_URI_REGEXP||zt,Tt=b.NAMESPACE||Qe,Er=b.MATHML_TEXT_INTEGRATION_POINTS||Er,Tr=b.HTML_INTEGRATION_POINTS||Tr,te=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&Ba(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(te.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&Ba(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(te.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(h=!1),W&&(w=!0),We&&(ae=N({},kt),ie=[],We.html===!0&&(N(ae,lr),N(ie,Ft)),We.svg===!0&&(N(ae,tt),N(ie,Dt),N(ie,Ct)),We.svgFilters===!0&&(N(ae,ct),N(ie,Dt),N(ie,Ct)),We.mathMl===!0&&(N(ae,yt),N(ie,ur),N(ie,Ct))),b.ADD_TAGS&&(ae===Cr&&(ae=Ae(ae)),N(ae,b.ADD_TAGS,he)),b.ADD_ATTR&&(ie===xr&&(ie=Ae(ie)),N(ie,b.ADD_ATTR,he)),b.ADD_URI_SAFE_ATTR&&N(Ye,b.ADD_URI_SAFE_ATTR,he),b.FORBID_CONTENTS&&(Ze===qt&&(Ze=Ae(Ze)),N(Ze,b.FORBID_CONTENTS,he)),Rt&&(ae["#text"]=!0),k&&N(ae,["html","head","body"]),ae.table&&(N(ae,["tbody"]),delete qe.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw Le('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Le('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ue=b.TRUSTED_TYPES_POLICY,Me=ue.createHTML("")}else ue===void 0&&(ue=ms(St,le)),ue!==null&&typeof Me=="string"&&(Me=ue.createHTML(""));l&&l(b),Pt=b}},ja=N({},[...tt,...ct,...cs]),Va=N({},[...yt,...ls]),xc=function(b){let R=ht(b);(!R||!R.tagName)&&(R={namespaceURI:Tt,tagName:"template"});const M=P(b.tagName),Q=P(R.tagName);return xs[b.namespaceURI]?b.namespaceURI===Rr?R.namespaceURI===Qe?M==="svg":R.namespaceURI===Sr?M==="svg"&&(Q==="annotation-xml"||Er[Q]):!!ja[M]:b.namespaceURI===Sr?R.namespaceURI===Qe?M==="math":R.namespaceURI===Rr?M==="math"&&Tr[Q]:!!Va[M]:b.namespaceURI===Qe?R.namespaceURI===Rr&&!Tr[Q]||R.namespaceURI===Sr&&!Er[Q]?!1:!Va[M]&&(vc[M]||!ja[M]):!!(Gt==="application/xhtml+xml"&&xs[b.namespaceURI]):!1},De=function(b){H(O.removed,{element:b});try{ht(b).removeChild(b)}catch{vs(b)}},Pr=function(b,R){try{H(O.removed,{attribute:R.getAttributeNode(b),from:R})}catch{H(O.removed,{attribute:null,from:R})}if(R.removeAttribute(b),b==="is")if(w||W)try{De(R)}catch{}else try{R.setAttribute(b,"")}catch{}},qa=function(b){let R=null,M=null;if(x)b="<remove></remove>"+b;else{const me=B(b,/^[\r\n\t ]+/);M=me&&me[0]}Gt==="application/xhtml+xml"&&Tt===Qe&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const Q=ue?ue.createHTML(b):b;if(Tt===Qe)try{R=new jt().parseFromString(Q,Gt)}catch{}if(!R||!R.documentElement){R=Vt.createDocument(Tt,"template",null);try{R.documentElement.innerHTML=Cs?Me:Q}catch{}}const ye=R.body||R.documentElement;return b&&M&&ye.insertBefore(V.createTextNode(M),ye.childNodes[0]||null),Tt===Qe?ft.call(R,k?"html":"body")[0]:k?R.documentElement:ye},Ga=function(b){return br.call(b.ownerDocument||b,b,lt.SHOW_ELEMENT|lt.SHOW_COMMENT|lt.SHOW_TEXT|lt.SHOW_PROCESSING_INSTRUCTION|lt.SHOW_CDATA_SECTION,null)},Ss=function(b){return b instanceof bs&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof Bt)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},Wa=function(b){return typeof wt=="function"&&b instanceof wt};function Ke(L,b,R){E(L,M=>{M.call(O,b,R,Pt)})}const Za=function(b){let R=null;if(Ke(se.beforeSanitizeElements,b,null),Ss(b))return De(b),!0;const M=he(b.nodeName);if(Ke(se.uponSanitizeElement,b,{tagName:M,allowedTags:ae}),b.hasChildNodes()&&!Wa(b.firstElementChild)&&re(/<[/\w]/g,b.innerHTML)&&re(/<[/\w]/g,b.textContent)||b.nodeType===rt.progressingInstruction||S&&b.nodeType===rt.comment&&re(/<[/\w]/g,b.data))return De(b),!0;if(!ae[M]||qe[M]){if(!qe[M]&&Qa(M)&&(te.tagNameCheck instanceof RegExp&&re(te.tagNameCheck,M)||te.tagNameCheck instanceof Function&&te.tagNameCheck(M)))return!1;if(Rt&&!Ze[M]){const Q=ht(b)||b.parentNode,ye=$e(b)||b.childNodes;if(ye&&Q){const me=ye.length;for(let Ee=me-1;Ee>=0;--Ee){const Ne=ut(ye[Ee],!0);Ne.__removalCount=(b.__removalCount||0)+1,Q.insertBefore(Ne,gr(b))}}}return De(b),!0}return b instanceof Ut&&!xc(b)||(M==="noscript"||M==="noembed"||M==="noframes")&&re(/<\/no(script|embed|frames)/i,b.innerHTML)?(De(b),!0):(y&&b.nodeType===rt.text&&(R=b.textContent,E([at,Re,je],Q=>{R=Z(R,Q," ")}),b.textContent!==R&&(H(O.removed,{element:b.cloneNode()}),b.textContent=R)),Ke(se.afterSanitizeElements,b,null),!1)},Ya=function(b,R,M){if(ne&&(R==="id"||R==="name")&&(M in V||M in Cc))return!1;if(!(h&&!f[R]&&re(vr,R))){if(!(i&&re(Ve,R))){if(!ie[R]||f[R]){if(!(Qa(b)&&(te.tagNameCheck instanceof RegExp&&re(te.tagNameCheck,b)||te.tagNameCheck instanceof Function&&te.tagNameCheck(b))&&(te.attributeNameCheck instanceof RegExp&&re(te.attributeNameCheck,R)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(R))||R==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&re(te.tagNameCheck,M)||te.tagNameCheck instanceof Function&&te.tagNameCheck(M))))return!1}else if(!Ye[R]){if(!re(kr,Z(M,yr,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&b!=="script"&&oe(M,"data:")===0&&wr[b])){if(!(g&&!re(q,Z(M,yr,"")))){if(M)return!1}}}}}}return!0},Qa=function(b){return b!=="annotation-xml"&&B(b,ks)},Ka=function(b){Ke(se.beforeSanitizeAttributes,b,null);const{attributes:R}=b;if(!R||Ss(b))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie,forceKeepAttr:void 0};let Q=R.length;for(;Q--;){const ye=R[Q],{name:me,namespaceURI:Ee,value:Ne}=ye,Wt=he(me);let Ce=me==="value"?Ne:Y(Ne);if(M.attrName=Wt,M.attrValue=Ce,M.keepAttr=!0,M.forceKeepAttr=void 0,Ke(se.uponSanitizeAttribute,b,M),Ce=M.attrValue,G&&(Wt==="id"||Wt==="name")&&(Pr(me,b),Ce=ve+Ce),S&&re(/((--!?|])>)|<\/(style|title)/i,Ce)){Pr(me,b);continue}if(M.forceKeepAttr||(Pr(me,b),!M.keepAttr))continue;if(!v&&re(/\/>/i,Ce)){Pr(me,b);continue}y&&E([at,Re,je],Ja=>{Ce=Z(Ce,Ja," ")});const Xa=he(b.nodeName);if(Ya(Xa,Wt,Ce)){if(ue&&typeof St=="object"&&typeof St.getAttributeType=="function"&&!Ee)switch(St.getAttributeType(Xa,Wt)){case"TrustedHTML":{Ce=ue.createHTML(Ce);break}case"TrustedScriptURL":{Ce=ue.createScriptURL(Ce);break}}try{Ee?b.setAttributeNS(Ee,me,Ce):b.setAttribute(me,Ce),Ss(b)?De(b):I(O.removed)}catch{}}}Ke(se.afterSanitizeAttributes,b,null)},wc=function L(b){let R=null;const M=Ga(b);for(Ke(se.beforeSanitizeShadowDOM,b,null);R=M.nextNode();)Ke(se.uponSanitizeShadowNode,R,null),Za(R),Ka(R),R.content instanceof Se&&L(R.content);Ke(se.afterSanitizeShadowDOM,b,null)};return O.sanitize=function(L){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,M=null,Q=null,ye=null;if(Cs=!L,Cs&&(L="<!-->"),typeof L!="string"&&!Wa(L))if(typeof L.toString=="function"){if(L=L.toString(),typeof L!="string")throw Le("dirty is not a string, aborting")}else throw Le("toString is not a function");if(!O.isSupported)return L;if(T||ws(b),O.removed=[],typeof L=="string"&&(Ge=!1),Ge){if(L.nodeName){const Ne=he(L.nodeName);if(!ae[Ne]||qe[Ne])throw Le("root node is forbidden and cannot be sanitized in-place")}}else if(L instanceof wt)R=qa("<!---->"),M=R.ownerDocument.importNode(L,!0),M.nodeType===rt.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?R=M:R.appendChild(M);else{if(!w&&!y&&!k&&L.indexOf("<")===-1)return ue&&_?ue.createHTML(L):L;if(R=qa(L),!R)return w?null:_?Me:""}R&&x&&De(R.firstChild);const me=Ga(Ge?L:R);for(;Q=me.nextNode();)Za(Q),Ka(Q),Q.content instanceof Se&&wc(Q.content);if(Ge)return L;if(w){if(W)for(ye=ys.call(R.ownerDocument);R.firstChild;)ye.appendChild(R.firstChild);else ye=R;return(ie.shadowroot||ie.shadowrootmode)&&(ye=_e.call(j,ye,!0)),ye}let Ee=k?R.outerHTML:R.innerHTML;return k&&ae["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&re(dr,R.ownerDocument.doctype.name)&&(Ee="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
6
- `+Ee),y&&E([at,Re,je],Ne=>{Ee=Z(Ee,Ne," ")}),ue&&_?ue.createHTML(Ee):Ee},O.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ws(L),T=!0},O.clearConfig=function(){Pt=null,T=!1},O.isValidAttribute=function(L,b,R){Pt||ws({});const M=he(L),Q=he(b);return Ya(M,Q,R)},O.addHook=function(L,b){typeof b=="function"&&H(se[L],b)},O.removeHook=function(L,b){if(b!==void 0){const R=$(se[L],b);return R===-1?void 0:D(se[L],R,1)[0]}return I(se[L])},O.removeHooks=function(L){se[L]=[]},O.removeAllHooks=function(){se=Ht()},O}var gs=mr();return gs})})(Ks);const zr=Ks.exports,At=(r,...e)=>{let t=r[0];for(let s=0;s<e.length;s++)t+=zr.sanitize(e[s]?String(e[s]):"")+r[s+1];return t||""},Hr="searchcraft";class Bn{constructor(){c(this,"coreInstances",{});c(this,"subscriptions",{})}addCoreInstance(e,t){const s=t||Hr;this.coreInstances[s]=e;for(const a of this.subscriptions[s]||[])a(e)}useCoreInstance(e,t){const s=e||Hr;return this.coreInstances[s]?(t(this.coreInstances[s]),()=>{}):(this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(t),()=>{this.subscriptions[s]&&(this.subscriptions[s]=this.subscriptions[s].filter(a=>a!==t))})}}const de=new Bn,jn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nt=(r=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+=jn[t[r]&63];return e};const Vn=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"adSource","Custom");c(this,"adClientResponseItem");c(this,"renderPosition","interstitial");c(this,"searchTerm");c(this,"isSearchInProgress",!1);c(this,"searchResultCount",0);c(this,"core");c(this,"intersectionObserver");c(this,"storeUnsubscribe");c(this,"cleanupCore");c(this,"adContainerRenderedTimeout");c(this,"isComponentConnected",!1);c(this,"timeTaken");c(this,"adContainerId","");this.__registerHost()}get hostElement(){return this}handleAdRendered(){var t,s,a;this.adContainerId=nt(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var o;(o=this.core)==null||o.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(s=(t=this.core)==null?void 0:t.config)==null?void 0:s.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 s=t.searchClientRequestProperties;s&&typeof s=="object"&&(this.searchTerm=s.searchTerm),this.searchResultCount=t.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(t){const s=t.store.getState();this.isComponentConnected=!0,this.core=s.core,this.isSearchInProgress=s.isSearchInProgress,this.searchResultCount=s.searchClientResponseItems.length,this.timeTaken=s.searchResponseTimeTaken;const a=s.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(s),this.storeUnsubscribe=t.store.subscribe(o=>{this.timeTaken!==o.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(o),this.timeTaken=o.searchResponseTimeTaken,this.isSearchInProgress=o.isSearchInProgress})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([s])=>{s!=null&&s.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var t,s,a;(t=this.storeUnsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,l,u;const t=this.adClientResponseItem;if(!t.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(n=(o=(a=this.core)==null?void 0:a.config)==null?void 0:o.admAdConfig)!=null&&n.template&&(s=(u=(l=this.core)==null?void 0:l.config)==null?void 0:u.admAdConfig.template(t.admAd,{html:At})),p("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:s})}renderCustomAd(){var o,n,l;const t=(l=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdConfig)==null?void 0:l.template,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return t&&(a=t({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:At})),p("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s,a;const t=((a=(s=this.core)==null?void 0:s.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return p("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:we("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}}},[0,"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 rr(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(e=>{switch(e){case"searchcraft-ad":customElements.get(e)||customElements.define(e,Vn);break}})}const qn=rr,Gn=J(class extends X{constructor(){super();c(this,"hierarchy","primary");c(this,"disabled",!1);c(this,"icon");c(this,"iconOnly",!1);c(this,"iconPosition","left");c(this,"label","Search");c(this,"type","button");c(this,"buttonClick");c(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=Je(this,"buttonClick")}render(){return p("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:we("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:p(Un,null,this.iconPosition==="left"&&this.icon,p("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function sr(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-button":customElements.get(e)||customElements.define(e,Gn);break}})}const Wn=sr,Zn=J(class extends X{constructor(){super(),this.__registerHost()}render(){return p("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},p("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function ar(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(e=>{switch(e){case"searchcraft-error-message":customElements.get(e)||customElements.define(e,Zn);break}})}const Yn=ar,Xs=(r,e)=>{let t=r;for(const s of e)t=t==null?void 0:t.children[s];return t},Ur=(r,e)=>{const t={...r};for(const s in e)e.hasOwnProperty(s)&&(e[s]instanceof Object&&r[s]instanceof Object?t[s]=Ur(r[s],e[s]):t[s]=e[s]);return t};function Qn(r){return r.filter((e,t,s)=>!s.some((a,o)=>o!==t&&a.includes(e)))}const Js=(r,e)=>{const t=structuredClone(r),s=(a,o)=>{var u;const n=structuredClone(a),l=Xs(e,o);if(!l)return n;for(const d of Object.keys(a.children))l.children[d]?n.children[d]={...Ur(a.children[d],l.children[d]),count:((u=n.children[d])==null?void 0:u.count)||0}:n.children[d]&&(n.children[d]=s(n.children[d],[...o,d]));return n};return s(t,[])},Br=r=>{const e={path:"/",count:0,children:{}},t=[],s=a=>{if(a.path!=="/"&&t.push({path:a.path,count:a.count}),a.children)for(const o of a.children)s(o)};s(r);for(const{path:a,count:o}of t){const n=a.split("/").filter(Boolean);let l=e;for(const u of n){const d=l.path==="/"?`/${u}`:`${l.path}/${u}`;l.children[u]||(l.children[u]={path:d,count:o,children:{}}),l=l.children[u]}l.count=o}return e},Kn=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"fieldName","");c(this,"facetSelectionUpdated");c(this,"selectedPaths",{});c(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});c(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});c(this,"renderedFacetTree",{path:"/",count:0,children:{}});c(this,"lastTimeTaken");c(this,"lastSearchTerm");c(this,"lastSearchMode");c(this,"lastSortType");c(this,"lastRangeValues");c(this,"lastFacetValues");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"formatFacetName",t=>`${t.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);this.__registerHost(),this.facetSelectionUpdated=Je(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(t=>this.selectedPaths[t])}handleIncomingSearchResponse(t,s){var u,d,m;const a=(u=t.searchResponseFacetPrime)==null?void 0:u.find(C=>this.fieldName===Object.keys(C)[0]),o=a==null?void 0:a[this.fieldName],n=Br({path:"/",count:0,children:o||[]});switch(s){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=n;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(t.supplementalFacetPrime){const C=(d=t.supplementalFacetPrime)==null?void 0:d.find(I=>this.fieldName===Object.keys(I)[0]),E=C==null?void 0:C[this.fieldName],$=Br({path:"/",count:0,children:E||[]});this.facetTreeCollectedFromSearchResponse=Js($,n)}else this.facetTreeCollectedFromSearchResponse=n;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=Js(this.facetTreeCollectedFromSearchResponse,n);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const l={path:"/",count:0,children:[]};for(const C of Object.keys(this.selectedPaths).filter(E=>this.selectedPaths[E])){const E=C.startsWith("/")?C.substring(1).split("/"):C.split("/"),$=!!Xs(this.facetTreeCollectedFromSearchResponse,E),I=E.at(-1);!$&&I&&((m=l.children)==null||m.push({children:[],count:0,path:C}))}this.facetTreeFromFacetPathsNotInSearchResponse=Br(l),this.renderedFacetTree=Ur(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(t){const s={...t};if(s.searchTerm.trim()==="")this.handleIncomingSearchResponse(s,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==s.searchResponseTimeTaken&&s.searchClientRequestProperties&&typeof s.searchClientRequestProperties=="object"){const a=s.searchClientRequestProperties;let o="UNKNOWN";this.lastSearchTerm!==a.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(a.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(a.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==a.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==a.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(a.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(a.facetPathsForIndexFields),this.lastSortType=a.order_by,this.lastSearchMode=a.mode,this.lastSearchTerm=a.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,o)}}onCoreAvailable(t){this.handleStateUpdate(t.store.getState()),this.unsubscribe=t.store.subscribe(s=>{this.handleStateUpdate(s)})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}handleCheckboxChange(t){var n;if(!this.selectedPaths[t])this.selectedPaths={...this.selectedPaths,[t]:!0};else{const l=Object.keys(this.selectedPaths).filter(u=>!u.includes(t));this.selectedPaths=l.reduce((u,d)=>(u[d]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(l=>this.selectedPaths[l]),o=Qn(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}renderFacet(t,s){let a=!1;for(const l of Object.keys(this.selectedPaths))this.selectedPaths[l]&&l.startsWith(s.path)&&l.length>s.path.length&&(a=!0);const o=Object.keys(this.selectedPaths).includes(s.path),n=Object.keys(s.children).length>0&&(o||a)||t==="@@root";return p("div",{class:"searchcraft-facet-list-item"},t!=="@@root"&&p("label",{class:"searchcraft-facet-list-checkbox-label"},p("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},p("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[s.path],onChange:l=>{this.handleCheckboxChange(s.path)},type:"checkbox"}),a?p("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},p("svg",{viewBox:"0 0 14 3",fill:"none"},p("title",null,"Checkbox dash"),p("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):p("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},p("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},p("title",null,"Checkbox check"),p("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),p("span",null,this.formatFacetName(t)," (",s.count,")")),n&&p("div",{class:"searchcraft-facet-list",style:{paddingLeft:t!=="@@root"?"24px":"0px",paddingTop:t!=="@@root"?"6px":"0px"}},Object.keys(s.children).map(l=>{if(s.children[l])return this.renderFacet(l,s.children[l])})))}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?p("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):p("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[0,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function ea(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(e=>{switch(e){case"searchcraft-facet-list":customElements.get(e)||customElements.define(e,Kn);break}})}const Xn=ea;function Mt(r,e){if(r&&e)return e.fieldNames.map(t=>{let s=r[t.fieldName];if(s)switch(t.dataType){case"date":{s=Jn(s,t.dateFormatLocale,t.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(t.numberFormatLocale,t.numberFormatOptions).format(s*(t.numberScale||1));break}}return s}).filter(t=>!!t).join(e.delimiter||" ")}function ta(r){return r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Jn(r,e="en-US",t={day:"numeric",month:"long",year:"numeric"}){const s=new Date(r),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const l=Math.trunc(o/1e3),u=Math.trunc(l/60),d=Math.trunc(u/60),m=Math.trunc(d/24),C=new Intl.RelativeTimeFormat(e,t);return m>=1?C.format(-m,"day"):d>=1?C.format(-d,"hour"):u>=1?C.format(-u,"minute"):C.format(0,"second")}return new Intl.DateTimeFormat(e,t).format(s)}function jr(r,e,t=0){const s=new Date(r);switch(e){case"year":return new Date(s.getFullYear()+t,0,1,0,0,0,0).getTime();case"month":return new Date(s.getFullYear(),s.getMonth()+t,1,0,0,0,0).getTime();case"day":return new Date(s.getFullYear(),s.getMonth(),s.getDate()+t,0,0,0,0).getTime();case"hour":return new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours()+t,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${e}`)}}function eo(r,e,t){const s=new Date(e),a=new Date(t);switch(r){case"year":return Math.abs(a.getFullYear()-s.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(s.getFullYear()*12+s.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${r}`)}}const ra=r=>{if(r>=11&&r<=13)return`${r}th`;switch(r%10){case 1:return`${r}st`;case 2:return`${r}nd`;case 3:return`${r}rd`;default:return`${r}th`}};function to(r,e){const t=new Intl.DateTimeFormat("en-US",{month:"short"});switch(r){case"year":return e.getFullYear().toString();case"month":return`${t.format(e)} ${e.getFullYear()}`;case"day":return`${t.format(e)} ${ra(e.getDate())}, ${e.getFullYear()}`;case"hour":{const s=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${t.format(e)} ${ra(e.getDate())}, ${s.format(e)}`}default:throw new Error(`Unsupported granularity: ${r}`)}}function ro(r,e){let t=!1,s=null;const a=o=>{r(...o),t=!0,setTimeout(()=>{if(t=!1,s){const n=s;s=null,a(n)}},e)};return(...o)=>{t?s=o:a(o)}}const so=J(class extends X{constructor(){super();c(this,"max",100);c(this,"min",0);c(this,"step",1);c(this,"dataType","number");c(this,"dateGranularity");c(this,"lowerBound",0);c(this,"upperBound",1);c(this,"endValue",0);c(this,"startValue",0);c(this,"lastFocusedHandle","max");c(this,"throttledEmitUpdate",()=>{});c(this,"rangeChanged");c(this,"emitUpdate",async()=>{var t,s;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",o=jr(this.min,a,this.lowerBound+this.startValue),n=jr(this.min,a,this.lowerBound+this.endValue+1);(s=this.rangeChanged)==null||s.emit({startValue:o,endValue:n});break}}});c(this,"handleStartValueChange",t=>{const s=t.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});c(this,"handleEndValueChange",t=>{const s=t.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});c(this,"getLabel",t=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const s=this.dateGranularity||"year",a=this.lowerBound+t,o=jr(this.min,s,a);return to(this.dateGranularity||"year",new Date(o))}}});this.__registerHost(),this.rangeChanged=Je(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=eo(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=ro(this.emitUpdate,120)}render(){const t=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,s=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),o=this.getLabel(this.endValue);return p("div",{key:"2c72254f52151edd2e2fa89c092fc788db0b5562",class:"searchcraft-slider"},p("div",{key:"98c25badf2c9386d7173ea552e510dcc168e7fc7",class:"searchcraft-slider-range"},p("div",{key:"50774db2253e34b1bce68acc0a40b2706cab542d",class:"searchcraft-slider-active-range",style:{left:`${t}%`,width:`${s-t}%`}}),p("input",{key:"229afedc1318a63cbd75806805210cf4f5695e6e",class:we("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}),p("input",{key:"6aa038b01daaba86f501ebbbec30fc6720b549b3",class:we("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})),p("div",{key:"f70501538635c3b08ad1e6ac101d0b3192ef8e04",class:"searchcraft-slider-label"},p("span",{key:"ddd539b86774f8900771d77d5ef7eb3a67c98d59",class:"searchcraft-slider-start-label"},a),p("span",{key:"b754a9c8d284e0623032cee6b92f9df88873ec04",class:"searchcraft-slider-end-label"},o)))}},[0,"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 sa(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(e=>{switch(e){case"searchcraft-slider":customElements.get(e)||customElements.define(e,so);break}})}const ao=J(class extends X{constructor(){super();c(this,"label","Toggle");c(this,"subLabel");c(this,"searchcraftId");c(this,"toggleUpdated");c(this,"isActive",!1);c(this,"lastSearchTerm");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleToggle",async()=>{var t;this.isActive=!this.isActive,(t=this.toggleUpdated)==null||t.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=Je(this,"toggleUpdated")}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(s=>{s.searchTerm!==this.lastSearchTerm&&s.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=s.searchTerm})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return p("div",{key:"22a346c471a467b0b38b4cfde59ea70e0941cc93",class:we("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},p("div",{key:"99a2ad545500218f85006a9a0f8bbf18b8f42ed7"},p("p",{key:"5e4a9e3f27af75d0d480dc6b3668963bfcb0d1a2",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&p("p",{key:"c9df9f08270b58a167831d59ae3f9178eb3f6175",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),p("button",{key:"6eebeb90660122d2c12ec91091ed5987478bbec4",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},p("div",{key:"62f9b1397354322986a24e8fe9e8cee62bc96600",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function aa(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-toggle-button":customElements.get(e)||customElements.define(e,ao);break}})}const no=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"items",[]);c(this,"lastSearchTerm");c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){this.core=t,this.setInitialDateRanges(),this.unsubscribe=t.store.subscribe(s=>{this.lastSearchTerm=s.searchTerm||""})}componentDidLoad(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}setInitialDateRanges(){var t,s;for(const a of this.items)if(a.type==="dateRange"){const o=a,n=o.options.minDate,l=o.options.maxDate||new Date;(s=(t=this.core)==null?void 0:t.store.getState())==null||s.addRangeValueForIndexField({fieldName:o.fieldName,value:`${o.fieldName}:[${n.toISOString()} TO ${l.toISOString()}]`})}}handleDateRangeChanged(t,s,a){var l,u,d,m;const o=new Date(s),n=new Date(a);(u=(l=this.core)==null?void 0:l.store.getState())==null||u.addRangeValueForIndexField({fieldName:t.fieldName,value:`${t.fieldName}:[${o.toISOString()} TO ${n.toISOString()}]`}),(m=(d=this.core)==null?void 0:d.store.getState())==null||m.search()}handleNumericRangeChanged(t,s,a){var o,n,l,u;(n=(o=this.core)==null?void 0:o.store.getState())==null||n.addRangeValueForIndexField({fieldName:t,value:`${t}:[${s} TO ${a}]`}),(u=(l=this.core)==null?void 0:l.store.getState())==null||u.search()}handleFacetSelectionUpdated(t,s){var a,o,n,l,u,d;s.length>0?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.addFacetPathsForIndexField({fieldName:t,value:`${t}: IN [${s.join(" ")}]`}):(l=(n=this.core)==null?void 0:n.store.getState())==null||l.removeFacetPathsForIndexField(t),(d=(u=this.core)==null?void 0:u.store.getState())==null||d.search()}handleExactMatchToggleUpdated(t){var s,a,o,n;(a=(s=this.core)==null?void 0:s.store.getState())==null||a.setSearchMode(t?"exact":"fuzzy"),(n=(o=this.core)==null?void 0:o.store.getState())==null||n.search()}handleMostRecentToggleUpdated(t,s){var a,o,n,l,u,d;s?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.setSortOrder({orderByField:t,sortType:"desc"}):(l=(n=this.core)==null?void 0:n.store.getState())==null||l.setSortOrder({orderByField:null,sortType:null}),(d=(u=this.core)==null?void 0:u.store.getState())==null||d.search()}render(){return p("div",{key:"b18a05516bea8d145d1ca015835d63fafbfc8bd8",class:"searchcraft-filter-panel"},this.items.map(t=>{switch(t.type){case"dateRange":{const s=t,a=s.options.maxDate||new Date;return p("div",{class:"searchcraft-filter-panel-section"},p("p",{class:"searchcraft-filter-panel-label"},t.label),p("searchcraft-slider",{min:s.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:s.options.granularity,onRangeChanged:o=>{this.handleDateRangeChanged(s,o.detail.startValue,o.detail.endValue)}}))}case"numericRange":{const s=t;return p("div",{class:"searchcraft-filter-panel-section"},p("p",{class:"searchcraft-filter-panel-label"},t.label),p("searchcraft-slider",{min:s.options.min,max:s.options.max,step:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=t;return p("div",{class:"searchcraft-filter-panel-section"},p("p",{class:"searchcraft-filter-panel-label"},t.label),p("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=t;return p("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=t;return p("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],lastSearchTerm:[32]}]);function oo(){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,no);break;case"searchcraft-facet-list":customElements.get(e)||ea();break;case"searchcraft-slider":customElements.get(e)||sa();break;case"searchcraft-toggle-button":customElements.get(e)||aa();break}})}const io=oo,co=J(class extends X{constructor(){super();c(this,"inputLabelClassName","");c(this,"label","");this.__registerHost()}render(){return p("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:we("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Vr(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-label":customElements.get(e)||customElements.define(e,co);break}})}const lo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"autoSearch",!0);c(this,"buttonPlacement","none");c(this,"buttonLabel");c(this,"inputLabel");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"inputFocus");c(this,"inputBlur");c(this,"inputInit");c(this,"inputValue","");c(this,"searchTerm","");c(this,"error",!1);c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleInput",t=>{var a;const s=t.target;this.inputValue=s.value,(a=this.core)==null||a.store.getState().setSearchTerm(s.value),this.autoSearch&&this.performSearch()});c(this,"performSearch",async()=>{var t;this.error=!1;try{await((t=this.core)==null?void 0:t.store.getState().search())}catch{this.error=!0}});c(this,"handleClearInput",()=>{var t;(t=this.core)==null||t.store.getState().resetSearchValues(),this.error=!1});c(this,"handleFormSubmit",async t=>{t.preventDefault(),await this.performSearch()});this.__registerHost(),this.inputFocus=Je(this,"inputFocus"),this.inputBlur=Je(this,"inputBlur"),this.inputInit=Je(this,"inputInit")}init(){var t;this.core&&((t=this.inputInit)==null||t.emit())}onCoreChange(){this.init()}onCoreAvailable(t){this.core=t,this.init(),this.unsubscribe=t.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.inputValue=s.searchTerm})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const t=this.inputValue.length>0,s=we("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"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return p("form",{key:"c1eea324038f640a9075d5714378d5c4b97168e0",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},p("div",{key:"f157c00510e5c3e75dd703996be24de5e97bbcd9",class:s,style:o},p("div",{key:"c97f3e5ef9ed6aee103dedc76b3ee1620b69ebba",class:"searchcraft-input-form-button"},p("searchcraft-button",{key:"4bb5dfea8b9f8f2f0a7e5fc5c1b199ef9d209278",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&p("div",{key:"aa8beca21ce414d645687ee73b7ca29c740438a2",class:"searchcraft-input-form-label"},p("searchcraft-input-label",{key:"8c15364abcf2e43354b445be6c7ceb9387ea4a67",label:this.inputLabel})),this.error&&p("div",{key:"5987b6da22a25da50613ceb277bfe44b31ba8f37",class:"searchcraft-input-form-error-message"},p("searchcraft-error-message",{key:"f2a230f0cf3cf0bbaddbb37ef2f38afdf73b28f6"},"Something went wrong.")),p("div",{key:"a0862217135ac6f9a96d9e64e6fca5f772eb8f51",class:"searchcraft-input-form-input-wrapper"},p("input",{key:"7071be386f0c73a0230e0815640b134ee5139262",autoComplete:"off",class:we("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),p("div",{key:"178a7a21a84f012662312dc2b9145fff0aec6a44",class:"searchcraft-input-form-input-icon"},p("svg",{key:"7fb86586c155f7075fb65280482eb2ab5ff8a9db",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"},p("title",{key:"0a48667010f2c998917271f941877c5ec826329f"},"Search icon"),p("path",{key:"94c54dfa1406bdc6c2f87f3b31e1b01862b58e08",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&&p("button",{key:"931fc5e8842de1e8f3bab3fa163261c54c24148c",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},p("svg",{key:"0676b050222eb9a7bf2f7c7c112ae40c0644ecf7",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},p("title",{key:"002b23596bc977b5a942776e4f7b513db4584361"},"Clear icon"),p("path",{key:"05346b8f1ede39b9e1924760f400df10d8b0aa49",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"]}}},[0,"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"],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function na(){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,lo);break;case"searchcraft-button":customElements.get(e)||sr();break;case"searchcraft-error-message":customElements.get(e)||ar();break;case"searchcraft-input-label":customElements.get(e)||Vr();break}})}const uo=na,ho=Vr,fo=J(class extends X{constructor(){super();c(this,"label");this.__registerHost()}render(){return p("div",{key:"507cde7e8f74682d0535a65fbc787b18fa4c49f7",class:"searchcraft-loading"},p("div",{key:"de8d4db44bd0d54baa276403063327b040a39ee4",class:"searchcraft-loading-bars"},p("div",{key:"3ef1ad066aef5582de0afe08c598747e48533f0a",class:"searchcraft-loading-bar-1"}),p("div",{key:"0e9b5bfb8c031b1d788b0f39a63b1b325f123aad",class:"searchcraft-loading-bar-2"}),p("div",{key:"b342f47a3869301d17e66f0ae79cbea6b2a7ed41",class:"searchcraft-loading-bar-3"}),p("div",{key:"c11c58254a005b80c54b98f6713acb4c7f376a58",class:"searchcraft-loading-bar-4"}),p("div",{key:"c53ff4d003ed8e1d17fdc2ab8d61b2d3313dd5ac",class:"searchcraft-loading-bar-5"}),p("div",{key:"3f517f20a24a844c04562cbb95b3a39502905405",class:"searchcraft-loading-bar-6"})),p("p",{key:"11a63145472d8ded9d28bf7e9cfde9097e6a02e2",class:"searchcraft-loading-label"},this.label))}},[0,"searchcraft-loading",{label:[1]}]);function oa(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-loading":customElements.get(e)||customElements.define(e,fo);break}})}const po=oa,mo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPerPage");c(this,"searchResultsPage");c(this,"searchResultsCount");c(this,"searchResultsPagesCount",1);c(this,"searchResultsRangeMin",1);c(this,"searchResultsRangeMax",1);c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,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=s.setSearchResultsPage})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}handleGoToPage(t){this.setSearchResultsPage(t)}renderOddPaginationItem(t){return p("li",null,p("button",{class:we("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)?p("li",null,p("button",{class:we("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t)):p("li",null,p("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?p("li",null,p("button",{class:we("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)):p("li",null,p("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return p("div",{class:"searchcraft-pagination"},p("div",{class:"searchcraft-pagination-control"},p("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:p("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("title",null,"Previous page icon"),p("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),p("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)),p("div",{class:"searchcraft-pagination-control"},p("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:p("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("title",null,"Next page icon"),p("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function go(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-pagination":customElements.get(e)||customElements.define(e,mo);break;case"searchcraft-button":customElements.get(e)||sr();break}})}const bo=go,vo=J(class extends X{constructor(){super();c(this,"template");c(this,"type");c(this,"searchcraftId");c(this,"hotkey");c(this,"hotkeyModifier");c(this,"hotkeyModifierSymbol");c(this,"isPopoverVisible");c(this,"userAgent");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");c(this,"core");c(this,"renderOptionSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Option key"),p("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"}),p("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"})));c(this,"renderCtrlSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Ctrl key"),p("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"})));c(this,"renderWindowsMetaSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Windows meta key"),p("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"})));c(this,"renderMacMetaSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Mac meta key"),p("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"})));this.__registerHost()}onCoreAvailable(t){this.core=t;const s=t.store.getState();this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.isPopoverVisible=s.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=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.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 p("div",{class:"searchcraft-popover-button-wrapper"},p("div",{class:"searchcraft-popover-button-input"},p("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"},p("title",null,"Search icon"),p("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"})),p("span",null,"Search")),p("div",{class:"searchcraft-popover-button-keycaps"},p("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},p("span",null,this.hotkeyModifierSymbol)),p("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},p("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return p("div",null,p("slot",null))}}render(){return p("button",{key:"ef815c1ea4ecde68fe152f80b811a95ccb9a38be",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:At}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[4,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function yo(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(e=>{switch(e){case"searchcraft-popover-button":customElements.get(e)||customElements.define(e,vo);break}})}const ko=yo,Co=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"searchResultsCount");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){this.searchResultsCount=t.store.getState().searchResultsCount,this.unsubscribe=t.store.subscribe(s=>{this.searchResultsCount=s.searchResultsCount})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return p("footer",{key:"e12fa32df3c1137e643af22323feb3dc33f7718f",class:"searchcraft-popover-footer"},p("p",{key:"73a33859c1702d82625748f398d5402030cc71f4",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ta(this.searchResultsCount)} Results Found`:" "),p("a",{key:"9d32f6b21b166fef3e17e5b2eb81bfafe32f8d1a",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},p("svg",{key:"e47249460b6e2b5bb2a25d37c33d8a85b8c6013e",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("title",{key:"438e675ff71edfc2176c08abe8efa34aaf7496ca"},"Powered by Searchcraft"),p("path",{key:"484e8935fb1cb84a79b8402748bac1da8171e9de",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"}))))}},[0,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],searchResultsCount:[32]}]);function ia(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(e=>{switch(e){case"searchcraft-popover-footer":customElements.get(e)||customElements.define(e,Co);break}})}const xo=ia,wo=J(class extends X{constructor(){super();c(this,"item");c(this,"popoverResultMappings");c(this,"documentPosition",0);c(this,"searchcraftId");c(this,"title");c(this,"subtitle");c(this,"href");c(this,"imageSource");c(this,"imageAlt");c(this,"core");c(this,"cleanupCore");c(this,"handleLinkClick",()=>{var t;if(this.core){const s=this.documentPosition,a=this.core.store.getState().searchTerm,o=this.core.store.getState().searchClientResponseItems.length||0;(t=this.core.measureClient)==null||t.sendMeasureEvent("document_clicked",{document_position:s,number_of_documents:o,search_term:a})}});this.__registerHost()}mapValuesFromDocument(t){var s,a,o,n,l;this.title=Mt(t,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Mt(t,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Mt(t,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Mt(t,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Mt(t,(l=this.popoverResultMappings)==null?void 0:l.imageAlt)}onCoreAvailable(t){this.core=t}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){return p("div",{key:"fe1f0a2803c05c7f7901a1e34e3751283683b841",class:"searchcraft-popover-list-item"},p("a",{key:"b1765b28e4df4483554e4aa1e776f85817f45709",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&p("div",{key:"d47112466fe3414278f88db73294c829eceb63ba",class:"searchcraft-popover-list-item-image-wrapper"},p("img",{key:"cf65d6520a2586f9b056775a0d1c3e85cb81cdd7",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),p("div",{key:"b6bdaf2e52e216d20c23790b4b53563be8709d40",class:"searchcraft-popover-list-item-content"},this.title&&p("p",{key:"21a6541924914c8ea2b798d0e910c6e4544b7e46",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&p("p",{key:"625a1d6b1a7e6bfb848fd49cb316968b396b0473",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"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 qr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-item":customElements.get(e)||customElements.define(e,wo);break}})}const So=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"popoverResultMappings");c(this,"searchClientResponseItems");c(this,"adClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"config");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){this.config=t.config}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}renderWithADMAds(){var t,s;return p("div",{class:"searchcraft-popover-list-view"},(t=this.adClientResponseItems)==null?void 0:t.map(a=>p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,d,m,C,E,$,I,H;const t=[],s=((d=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:d.adInterstitialInterval)||0,a=((C=(m=this.config)==null?void 0:m.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=(($=(E=this.config)==null?void 0:E.customAdConfig)==null?void 0:$.adStartQuantity)||0,n=((H=(I=this.config)==null?void 0:I.customAdConfig)==null?void 0:H.adEndQuantity)||0,l=this.searchClientResponseItems||[];for(let D=0;D<o;D++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));l.forEach((D,P)=>{if(s&&P%s===0&&P+s<l.length&&P>=s)for(let A=0;A<a;A++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${A}`,renderPosition:"interstitial"}));t.push(p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:D,key:D.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+P}))});for(let D=0;D<n;D++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-popover-list-view"},t)}renderWithNativoAds(){var d,m,C,E,$,I,H,D,P,A;const t=[],s=((m=(d=this.config)==null?void 0:d.nativoConfig)==null?void 0:m.adInterstialStartIndex)||0,a=((E=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:E.adInterstitialInterval)||0,o=((I=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:I.adInterstitialQuantity)||1,n=((D=(H=this.config)==null?void 0:H.nativoConfig)==null?void 0:D.adStartQuantity)||0,l=((A=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:A.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let B=0;B<n;B++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"top"}));u.forEach((B,Z)=>{if(a&&(Z+s)%a===0&&Z+a<u.length&&Z>=a)for(let oe=0;oe<o;oe++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B.id}-ad-${oe}`,renderPosition:"interstitial"}));t.push(p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:B,key:B.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+Z}))});for(let B=0;B<l;B++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-popover-list-view"},t)}renderWithNoAds(){var t;return p("div",{class:"searchcraft-popover-list-view"},(t=this.searchClientResponseItems)==null?void 0:t.map((s,a)=>p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var t,s,a;return(t=this.config)!=null&&t.customAdConfig?this.renderWithCustomAds():(s=this.config)!=null&&s.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[0,"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 ca(){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,So);break;case"searchcraft-ad":customElements.get(e)||rr();break;case"searchcraft-popover-list-item":customElements.get(e)||qr();break}})}const Ro=J(class extends X{constructor(){super();c(this,"type","inline");c(this,"popoverResultMappings");c(this,"hotkey","k");c(this,"hotkeyModifier","meta");c(this,"searchcraftId");c(this,"isPopoverVisibleInState",!1);c(this,"searchClientResponseItems",[]);c(this,"adClientResponseItems",[]);c(this,"searchTerm");c(this,"isFocused",!1);c(this,"breakpointSm",576);c(this,"breakpointMd",768);c(this,"breakpointLg",992);c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"modalElement");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"core");c(this,"handleDocumentClick",t=>{this.hostElement.contains(t.target)||(this.isFocused=!1)});c(this,"handleDocumentKeyDown",t=>{var s;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":(s=this.core)==null||s.store.getState().setPopoverVisibility(!1);break;default:return}});c(this,"handleInputInit",()=>{const t=this.hostElement.querySelector(".searchcraft-input-form-input");t==null||t.focus()});this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t;const s=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(s.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=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.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),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(t){var s;(s=this.core)==null||s.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(t){var s;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(s=this.core)==null||s.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(t){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(l=>!l.hasAttribute("disabled")&&l.offsetParent!==null),a=s.indexOf(document.activeElement);if(t==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(t==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const l=document.querySelector(".searchcraft-input-form-input");l&&(l.focus(),requestAnimationFrame(()=>{l.selectionEnd=l.value.length,l.selectionStart=l.value.length}))}}get hasResultsToShow(){var t,s;return this.searchTerm&&((s=(t=this.searchTerm)==null?void 0:t.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const t=this.hasResultsToShow&&this.isFocused;return p("div",{class:we("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":t})},p("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},p("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId})),t&&p("div",{class:"searchcraft-popover-form-inline-wrapper"},p("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),p("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderModalPopover(){if(this.isPopoverVisibleInState)return p("div",{class:we("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},p("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),p("div",{class:"searchcraft-popover-form-modal-wrapper"},p("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},p("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId}),p("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),p("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&p("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),p("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return p("div",{class:we("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},p("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},p("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId}),p("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),p("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&p("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),p("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()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function la(){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,Ro);break;case"searchcraft-ad":customElements.get(e)||rr();break;case"searchcraft-button":customElements.get(e)||sr();break;case"searchcraft-error-message":customElements.get(e)||ar();break;case"searchcraft-input-form":customElements.get(e)||na();break;case"searchcraft-input-label":customElements.get(e)||Vr();break;case"searchcraft-popover-footer":customElements.get(e)||ia();break;case"searchcraft-popover-form":customElements.get(e)||la();break;case"searchcraft-popover-list-item":customElements.get(e)||qr();break;case"searchcraft-popover-list-view":customElements.get(e)||ca();break}})}const Eo=la,To=qr,Po=ca,$o=J(class extends X{constructor(){super();c(this,"template");c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"count",0);c(this,"range",[0,0]);c(this,"responseTime","0");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsCount=s.searchResultsCount,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=((s.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return!this.searchTerm||this.searchResultsCount===0?null:p("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:At}):`${ta(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function _o(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(e=>{switch(e){case"searchcraft-results-info":customElements.get(e)||customElements.define(e,$o);break}})}const Io=_o,Ao=J(class extends X{constructor(){super();c(this,"item");c(this,"index");c(this,"documentPosition",0);c(this,"template");c(this,"searchcraftId");c(this,"templateHtml");c(this,"core");c(this,"cleanupCore");c(this,"handleResultContainerClick",t=>{var u;if(!t.target)return;const a=t.target.closest("a");if(!a||!((u=this.hostElement)!=null&&u.contains(a))||!this.core||!this.core.measureClient)return;const o=this.documentPosition,n=this.core.store.getState().searchTerm,l=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:l,search_term:n})});c(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t}connectedCallback(){var t;if(this.cleanupCore=de.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:At,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){if(this.item)return typeof this.template>"u"?p("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([t,s])=>p("p",{key:t},p("strong",null,t),": ",s))):p("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function ua(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-result":customElements.get(e)||customElements.define(e,Ao);break}})}const Mo=ua,Oo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"initialQuery");c(this,"template");c(this,"adClientResponseItems",[]);c(this,"config");c(this,"isSearchInProgress",!0);c(this,"searchClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchTerm","");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){var a;const s=t.store.getState();this.handleStateChange(s),this.searchClientResponseItems=s.searchClientResponseItems,this.searchTerm=s.searchTerm,this.config=(a=s.core)==null?void 0:a.config,this.unsubscribe=t.store.subscribe(o=>this.handleStateChange(o))}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(t){var s;this.adClientResponseItems=[...t.adClientResponseItems],this.config=(s=t.core)==null?void 0:s.config,this.isSearchInProgress=t.isSearchInProgress,this.searchClientResponseItems=[...t.searchClientResponseItems],this.searchResultsPage=t.searchResultsPage,this.searchResultsPerPage=t.searchResultsPerPage,this.searchTerm=t.searchTerm}renderEmptyState(){return p("div",{class:"searchcraft-search-results-empty-state"},p("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return p("div",{class:"searchcraft-search-results"},p("div",{class:"searchcraft-search-results-error-message"},p("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s;const t=this.searchClientResponseItems||[];return p("div",{class:"searchcraft-search-results"},(s=this.adClientResponseItems)==null?void 0:s.map(a=>p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),t.map((a,o)=>p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+o,index:o,item:a,template:this.template})))}renderWithCustomAds(){var u,d,m,C,E,$,I,H;const t=[],s=((d=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:d.adInterstitialInterval)||0,a=((C=(m=this.config)==null?void 0:m.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=(($=(E=this.config)==null?void 0:E.customAdConfig)==null?void 0:$.adStartQuantity)||0,n=((H=(I=this.config)==null?void 0:I.customAdConfig)==null?void 0:H.adEndQuantity)||0,l=this.searchClientResponseItems||[];for(let D=0;D<o;D++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));l.forEach((D,P)=>{if(s&&P%s===0&&P+s<l.length&&P>=s)for(let A=0;A<a;A++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${A}`,renderPosition:"interstitial"}));t.push(p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:D.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+P,index:P,item:D,template:this.template}))});for(let D=0;D<n;D++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-search-results"},t)}renderWithNativoAds(){var d,m,C,E,$,I,H,D,P,A;const t=[],s=((m=(d=this.config)==null?void 0:d.nativoConfig)==null?void 0:m.adInterstialStartIndex)||0,a=((E=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:E.adInterstitialInterval)||0,o=((I=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:I.adInterstitialQuantity)||1,n=((D=(H=this.config)==null?void 0:H.nativoConfig)==null?void 0:D.adStartQuantity)||0,l=((A=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:A.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let B=0;B<n;B++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"top"}));u.forEach((B,Z)=>{if(a&&(Z+s)%a===0&&Z+a<u.length&&Z>=a)for(let oe=0;oe<o;oe++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B.id}-ad-${oe}`,renderPosition:"interstitial"}));t.push(p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:B.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+Z,index:Z,item:B,template:this.template}))});for(let B=0;B<l;B++)t.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-search-results"},t)}renderWithNoAds(){const t=this.searchClientResponseItems||[];return p("div",{class:"searchcraft-search-results"},t.map((s,a)=>p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:s.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:s,template:this.template})))}render(){var s,a,o;const t=this.searchClientResponseItems||[];return t.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&t.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(s=this.config)!=null&&s.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(o=this.config)!=null&&o.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[4,"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 Lo(){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,Oo);break;case"searchcraft-ad":customElements.get(e)||rr();break;case"searchcraft-error-message":customElements.get(e)||ar();break;case"searchcraft-search-result":customElements.get(e)||ua();break}})}const Fo=Lo,Do=J(class extends X{constructor(){super();c(this,"caption");c(this,"disabled",!1);c(this,"inputId");c(this,"label");c(this,"labelId");c(this,"name");c(this,"options",[]);c(this,"selectChange");c(this,"searchResultsPerPage");c(this,"setSearchResultsPage",()=>{});c(this,"setSearchResultsPerPage",()=>{});c(this,"handleSelectChange",t=>{this.selectChange.emit(t.target.value)});this.__registerHost(),this.selectChange=Je(this,"selectChange")}handleGoToPage(t){this.setSearchResultsPage(t)}render(){return p("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&p("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),p("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},p("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:s,selected:a})=>p("option",{key:s,value:s,selected:a},t))),p("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"},p("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),p("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&&p("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"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 ha(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-select":customElements.get(e)||customElements.define(e,Do);break}})}const No=J(class extends X{constructor(){super();c(this,"increment",20);c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"searchResultsPagesCount");c(this,"initialSearchResultsPerPage");c(this,"setSearchResultsPerPage",()=>{});c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=s.setSearchResultsPage,this.setSearchResultsPerPage=s.setSearchResultsPerPage}),this.initialSearchResultsPerPage=t.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return p("div",{class:"searchcraft-search-results-per-page"},p("div",{class:"searchcraft-search-results-per-page-select"},p("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),p("div",{class:"searchcraft-search-results-per-page-select-input"},p("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((t,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:t=>{this.setSearchResultsPerPage(Number(t.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function zo(){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,No);break;case"searchcraft-select":customElements.get(e)||ha();break}})}const Ho=zo,Uo=ha,Bo=sa;var Gr={exports:{}};(function(r,e){(function(t,s){r.exports=s()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Qs,function(){var qe;var t={},s=t,a={exports:t},o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,d=(f,i)=>{for(var h in i)o(f,h,{get:i[h],enumerable:!0})},m=(f,i,h,g)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of l(i))!u.call(f,v)&&v!==h&&o(f,v,{get:()=>i[v],enumerable:!(g=n(i,v))||g.enumerable});return f},C=f=>m(o({},"__esModule",{value:!0}),f),E={};d(E,{Hooks:()=>je,Lexer:()=>_e,Marked:()=>vr,Parser:()=>Re,Renderer:()=>se,TextRenderer:()=>at,Tokenizer:()=>ft,defaults:()=>I,getDefaults:()=>$,lexer:()=>te,marked:()=>q,options:()=>yr,parse:()=>ie,parseInline:()=>Cr,parser:()=>xr,setOptions:()=>ks,use:()=>kr,walkTokens:()=>ae}),a.exports=C(E);function $(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I=$();function H(f){I=f}var D={exec:()=>null};function P(f,i=""){let h=typeof f=="string"?f:f.source;const g={replace:(v,y)=>{let S=typeof y=="string"?y:y.source;return S=S.replace(A.caret,"$1"),h=h.replace(v,S),g},getRegex:()=>new RegExp(h,i)};return g}var A={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:f=>new RegExp(`^( {0,3}${f})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}#`),htmlBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}<(?:[a-z].*>|!--)`,"i")},B=/^(?:[ \t]*(?:\n|$))+/,Z=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,be=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,re=/(?:[*+-]|\d{1,9}[.)])/,Le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=P(Le).replace(/bull/g,re).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(),os=P(Le).replace(/bull/g,re).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(),N=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,is=/^[^\n]+/,Ae=/(?!\s*\])(?:\\.|[^\[\]\\])+/,it=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ae).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lr=P(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,re).getRegex(),tt="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",ct=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cs=P("^ {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",ct).replace("tag",tt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yt=P(N).replace("hr",Y).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",tt).getRegex(),ls=P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yt).getRegex(),kt={blockquote:ls,code:Z,def:it,fences:oe,heading:be,hr:Y,html:cs,lheading:ce,list:lr,newline:B,paragraph:yt,table:D,text:is},Ft=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).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",tt).getRegex(),Dt={...kt,lheading:os,table:Ft,paragraph:P(N).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ft).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",tt).getRegex()},ur={...kt,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ct).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:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(N).replace("hr",Y).replace("heading",` *#{1,6} *[^
7
- ]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,us=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hr=/^( {2,}|\\)\n(?!\s*$)/,hs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xt=/[\p{P}\p{S}]/u,Nt=/[\s\p{P}\p{S}]/u,zt=/[^\s\p{P}\p{S}]/u,fs=P(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nt).getRegex(),fr=/(?!~)[\p{P}\p{S}]/u,dr=/(?!~)[\s\p{P}\p{S}]/u,ds=/(?:[^\s\p{P}\p{S}]|~)/u,pr=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,rt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ps=P(rt,"u").replace(/punct/g,xt).getRegex(),ms=P(rt,"u").replace(/punct/g,fr).getRegex(),Ht="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mr=P(Ht,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),gs=P(Ht,"gu").replace(/notPunctSpace/g,ds).replace(/punctSpace/g,dr).replace(/punct/g,fr).getRegex(),U=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),O=P(/\\(punct)/,"gu").replace(/punct/g,xt).getRegex(),V=P(/^<(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(),j=P(ct).replace("(?:-->|$)","-->").getRegex(),le=P("^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",j).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Se=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,st=P(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Se).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wt=P(/^!?\[(label)\]\[(ref)\]/).replace("label",Se).replace("ref",Ae).getRegex(),Ut=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ae).getRegex(),lt=P("reflink|nolink(?!\\()","g").replace("reflink",wt).replace("nolink",Ut).getRegex(),Bt={_backpedal:D,anyPunctuation:O,autolink:V,blockSkip:pr,br:hr,code:us,del:D,emStrongLDelim:ps,emStrongRDelimAst:mr,emStrongRDelimUnd:U,escape:Ct,link:st,nolink:Ut,punctuation:fs,reflink:wt,reflinkSearch:lt,tag:le,text:hs,url:D},bs={...Bt,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",Se).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Se).getRegex()},jt={...Bt,emStrongRDelimAst:gs,emStrongLDelim:ms,url:P(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},St={...jt,br:P(hr).replace("{2,}","*").getRegex(),text:P(jt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fe={normal:kt,gfm:Dt,pedantic:ur},ut={normal:Bt,gfm:jt,breaks:St,pedantic:bs},vs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gr=f=>vs[f];function $e(f,i){if(i){if(A.escapeTest.test(f))return f.replace(A.escapeReplace,gr)}else if(A.escapeTestNoEncode.test(f))return f.replace(A.escapeReplaceNoEncode,gr);return f}function ht(f){try{f=encodeURI(f).replace(A.percentDecode,"%")}catch{return null}return f}function ue(f,i){var y;const h=f.replace(A.findPipe,(S,k,T)=>{let x=!1,w=k;for(;--w>=0&&T[w]==="\\";)x=!x;return x?"|":" |"}),g=h.split(A.splitPipe);let v=0;if(g[0].trim()||g.shift(),g.length>0&&!((y=g.at(-1))!=null&&y.trim())&&g.pop(),i)if(g.length>i)g.splice(i);else for(;g.length<i;)g.push("");for(;v<g.length;v++)g[v]=g[v].trim().replace(A.slashPipe,"|");return g}function Me(f,i,h){const g=f.length;if(g===0)return"";let v=0;for(;v<g&&f.charAt(g-v-1)===i;)v++;return f.slice(0,g-v)}function Vt(f,i){if(f.indexOf(i[1])===-1)return-1;let h=0;for(let g=0;g<f.length;g++)if(f[g]==="\\")g++;else if(f[g]===i[0])h++;else if(f[g]===i[1]&&(h--,h<0))return g;return h>0?-2:-1}function br(f,i,h,g,v){const y=i.href,S=i.title||null,k=f[1].replace(v.other.outputLinkReplace,"$1");g.state.inLink=!0;const T={type:f[0].charAt(0)==="!"?"image":"link",raw:h,href:y,title:S,text:k,tokens:g.inlineTokens(k)};return g.state.inLink=!1,T}function ys(f,i,h){const g=f.match(h.other.indentCodeCompensation);if(g===null)return i;const v=g[1];return i.split(`
5
+ */(function(r){(function(){var t={}.hasOwnProperty;function e(){for(var o="",n=0;n<arguments.length;n++){var l=arguments[n];l&&(o=a(o,s(l)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return e.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var l in o)t.call(o,l)&&o[l]&&(n=a(n,l));return n}function a(o,n){return n?o?o+" "+n:o+n:o}r.exports?(e.default=e,r.exports=e):window.classNames=e})()})(Ws);const we=Ws.exports;var Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ys={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(r,t){(function(e,s){r.exports=s()})(Zs,function(){const{entries:e,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:l,seal:u,create:f}=Object,{apply:m,construct:C}=typeof Reflect<"u"&&Reflect;l||(l=function(O){return O}),u||(u=function(O){return O}),m||(m=function(O,j,V){return O.apply(j,V)}),C||(C=function(O,j){return new O(...j)});const E=ce(Array.prototype.forEach),P=ce(Array.prototype.lastIndexOf),I=ce(Array.prototype.pop),H=ce(Array.prototype.push),D=ce(Array.prototype.splice),$=ce(String.prototype.toLowerCase),A=ce(String.prototype.toString),B=ce(String.prototype.match),Z=ce(String.prototype.replace),oe=ce(String.prototype.indexOf),Y=ce(String.prototype.trim),be=ce(Object.prototype.hasOwnProperty),re=ce(RegExp.prototype.test),Le=as(TypeError);function ce(U){return function(O){for(var j=arguments.length,V=new Array(j>1?j-1:0),le=1;le<j;le++)V[le-1]=arguments[le];return m(U,O,V)}}function as(U){return function(){for(var O=arguments.length,j=new Array(O),V=0;V<O;V++)j[V]=arguments[V];return C(U,j)}}function N(U,O){let j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$;s&&s(U,null);let V=O.length;for(;V--;){let le=O[V];if(typeof le=="string"){const Se=j(le);Se!==le&&(a(O)||(O[V]=Se),le=Se)}U[le]=!0}return U}function ns(U){for(let O=0;O<U.length;O++)be(U,O)||(U[O]=null);return U}function Ae(U){const O=f(null);for(const[j,V]of e(U))be(U,j)&&(Array.isArray(V)?O[j]=ns(V):V&&typeof V=="object"&&V.constructor===Object?O[j]=Ae(V):O[j]=V);return O}function it(U,O){for(;U!==null;){const V=n(U,O);if(V){if(V.get)return ce(V.get);if(typeof V.value=="function")return ce(V.value)}U=o(U)}function j(){return null}return j}const lr=l(["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","section","select","shadow","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"]),tt=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ct=l(["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"]),os=l(["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"]),yt=l(["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"]),is=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kt=l(["#text"]),Ft=l(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Dt=l(["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","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"]),ur=l(["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"]),Ct=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cs=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hr=u(/<%[\w\W]*|[\w\W]*%>/gm),ls=u(/\$\{[\w\W]*/gm),xt=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nt=u(/^aria-[\-\w]+$/),zt=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),us=u(/^(?:\w+script|data):/i),dr=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fr=u(/^html$/i),hs=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var pr=Object.freeze({__proto__:null,ARIA_ATTR:Nt,ATTR_WHITESPACE:dr,CUSTOM_ELEMENT:hs,DATA_ATTR:xt,DOCTYPE_NAME:fr,ERB_EXPR:hr,IS_ALLOWED_URI:zt,IS_SCRIPT_OR_DATA:us,MUSTACHE_EXPR:cs,TMPLIT_EXPR:ls});const rt={element:1,text:3,progressingInstruction:7,comment:8,document:9},ds=function(){return typeof window>"u"?null:window},fs=function(O,j){if(typeof O!="object"||typeof O.createPolicy!="function")return null;let V=null;const le="data-tt-policy-suffix";j&&j.hasAttribute(le)&&(V=j.getAttribute(le));const Se="dompurify"+(V?"#"+V:"");try{return O.createPolicy(Se,{createHTML(st){return st},createScriptURL(st){return st}})}catch{return console.warn("TrustedTypes policy "+Se+" could not be created."),null}},Ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mr(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ds();const O=L=>mr(L);if(O.version="3.2.4",O.removed=[],!U||!U.document||U.document.nodeType!==rt.document||!U.Element)return O.isSupported=!1,O;let{document:j}=U;const V=j,le=V.currentScript,{DocumentFragment:Se,HTMLTemplateElement:st,Node:wt,Element:Ut,NodeFilter:lt,NamedNodeMap:Bt=U.NamedNodeMap||U.MozNamedAttrMap,HTMLFormElement:ms,DOMParser:Vt,trustedTypes:St}=U,Fe=Ut.prototype,ut=it(Fe,"cloneNode"),gs=it(Fe,"remove"),gr=it(Fe,"nextSibling"),$e=it(Fe,"childNodes"),ht=it(Fe,"parentNode");if(typeof st=="function"){const L=j.createElement("template");L.content&&L.content.ownerDocument&&(j=L.content.ownerDocument)}let ue,Me="";const{implementation:jt,createNodeIterator:br,createDocumentFragment:bs,getElementsByTagName:dt}=j,{importNode:_e}=V;let se=Ht();O.isSupported=typeof e=="function"&&typeof ht=="function"&&jt&&jt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:at,ERB_EXPR:Re,TMPLIT_EXPR:Ve,DATA_ATTR:vr,ARIA_ATTR:je,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:yr,CUSTOM_ELEMENT:vs}=pr;let{IS_ALLOWED_URI:kr}=pr,ae=null;const Cr=N({},[...lr,...tt,...ct,...yt,...kt]);let ie=null;const xr=N({},[...Ft,...Dt,...ur,...Ct]);let te=Object.seal(f(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}})),qe=null,d=null,i=!0,h=!0,g=!1,v=!0,y=!1,S=!0,k=!1,T=!1,x=!1,w=!1,W=!1,_=!1,ne=!0,G=!1;const ve="user-content-";let Rt=!0,Ge=!1,We={},Ze=null;const qt=N({},["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 wr=null;const Et=N({},["audio","video","img","source","image","track"]);let Ye=null;const Ha=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sr="http://www.w3.org/1998/Math/MathML",Rr="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Tt=Qe,ys=!1,ks=null;const vc=N({},[Sr,Rr,Qe],A);let Er=N({},["mi","mo","mn","ms","mtext"]),Tr=N({},["annotation-xml"]);const yc=N({},["title","style","font","a","script"]);let Gt=null;const kc=["application/xhtml+xml","text/html"],Cc="text/html";let he=null,Pt=null;const xc=j.createElement("form"),Ua=function(b){return b instanceof RegExp||b instanceof Function},Cs=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===b)){if((!b||typeof b!="object")&&(b={}),b=Ae(b),Gt=kc.indexOf(b.PARSER_MEDIA_TYPE)===-1?Cc:b.PARSER_MEDIA_TYPE,he=Gt==="application/xhtml+xml"?A:$,ae=be(b,"ALLOWED_TAGS")?N({},b.ALLOWED_TAGS,he):Cr,ie=be(b,"ALLOWED_ATTR")?N({},b.ALLOWED_ATTR,he):xr,ks=be(b,"ALLOWED_NAMESPACES")?N({},b.ALLOWED_NAMESPACES,A):vc,Ye=be(b,"ADD_URI_SAFE_ATTR")?N(Ae(Ha),b.ADD_URI_SAFE_ATTR,he):Ha,wr=be(b,"ADD_DATA_URI_TAGS")?N(Ae(Et),b.ADD_DATA_URI_TAGS,he):Et,Ze=be(b,"FORBID_CONTENTS")?N({},b.FORBID_CONTENTS,he):qt,qe=be(b,"FORBID_TAGS")?N({},b.FORBID_TAGS,he):{},d=be(b,"FORBID_ATTR")?N({},b.FORBID_ATTR,he):{},We=be(b,"USE_PROFILES")?b.USE_PROFILES:!1,i=b.ALLOW_ARIA_ATTR!==!1,h=b.ALLOW_DATA_ATTR!==!1,g=b.ALLOW_UNKNOWN_PROTOCOLS||!1,v=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,y=b.SAFE_FOR_TEMPLATES||!1,S=b.SAFE_FOR_XML!==!1,k=b.WHOLE_DOCUMENT||!1,w=b.RETURN_DOM||!1,W=b.RETURN_DOM_FRAGMENT||!1,_=b.RETURN_TRUSTED_TYPE||!1,x=b.FORCE_BODY||!1,ne=b.SANITIZE_DOM!==!1,G=b.SANITIZE_NAMED_PROPS||!1,Rt=b.KEEP_CONTENT!==!1,Ge=b.IN_PLACE||!1,kr=b.ALLOWED_URI_REGEXP||zt,Tt=b.NAMESPACE||Qe,Er=b.MATHML_TEXT_INTEGRATION_POINTS||Er,Tr=b.HTML_INTEGRATION_POINTS||Tr,te=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&Ua(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(te.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&Ua(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(te.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(h=!1),W&&(w=!0),We&&(ae=N({},kt),ie=[],We.html===!0&&(N(ae,lr),N(ie,Ft)),We.svg===!0&&(N(ae,tt),N(ie,Dt),N(ie,Ct)),We.svgFilters===!0&&(N(ae,ct),N(ie,Dt),N(ie,Ct)),We.mathMl===!0&&(N(ae,yt),N(ie,ur),N(ie,Ct))),b.ADD_TAGS&&(ae===Cr&&(ae=Ae(ae)),N(ae,b.ADD_TAGS,he)),b.ADD_ATTR&&(ie===xr&&(ie=Ae(ie)),N(ie,b.ADD_ATTR,he)),b.ADD_URI_SAFE_ATTR&&N(Ye,b.ADD_URI_SAFE_ATTR,he),b.FORBID_CONTENTS&&(Ze===qt&&(Ze=Ae(Ze)),N(Ze,b.FORBID_CONTENTS,he)),Rt&&(ae["#text"]=!0),k&&N(ae,["html","head","body"]),ae.table&&(N(ae,["tbody"]),delete qe.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw Le('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Le('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ue=b.TRUSTED_TYPES_POLICY,Me=ue.createHTML("")}else ue===void 0&&(ue=fs(St,le)),ue!==null&&typeof Me=="string"&&(Me=ue.createHTML(""));l&&l(b),Pt=b}},Ba=N({},[...tt,...ct,...os]),Va=N({},[...yt,...is]),wc=function(b){let R=ht(b);(!R||!R.tagName)&&(R={namespaceURI:Tt,tagName:"template"});const M=$(b.tagName),Q=$(R.tagName);return ks[b.namespaceURI]?b.namespaceURI===Rr?R.namespaceURI===Qe?M==="svg":R.namespaceURI===Sr?M==="svg"&&(Q==="annotation-xml"||Er[Q]):!!Ba[M]:b.namespaceURI===Sr?R.namespaceURI===Qe?M==="math":R.namespaceURI===Rr?M==="math"&&Tr[Q]:!!Va[M]:b.namespaceURI===Qe?R.namespaceURI===Rr&&!Tr[Q]||R.namespaceURI===Sr&&!Er[Q]?!1:!Va[M]&&(yc[M]||!Ba[M]):!!(Gt==="application/xhtml+xml"&&ks[b.namespaceURI]):!1},De=function(b){H(O.removed,{element:b});try{ht(b).removeChild(b)}catch{gs(b)}},Pr=function(b,R){try{H(O.removed,{attribute:R.getAttributeNode(b),from:R})}catch{H(O.removed,{attribute:null,from:R})}if(R.removeAttribute(b),b==="is")if(w||W)try{De(R)}catch{}else try{R.setAttribute(b,"")}catch{}},ja=function(b){let R=null,M=null;if(x)b="<remove></remove>"+b;else{const me=B(b,/^[\r\n\t ]+/);M=me&&me[0]}Gt==="application/xhtml+xml"&&Tt===Qe&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const Q=ue?ue.createHTML(b):b;if(Tt===Qe)try{R=new Vt().parseFromString(Q,Gt)}catch{}if(!R||!R.documentElement){R=jt.createDocument(Tt,"template",null);try{R.documentElement.innerHTML=ys?Me:Q}catch{}}const ye=R.body||R.documentElement;return b&&M&&ye.insertBefore(j.createTextNode(M),ye.childNodes[0]||null),Tt===Qe?dt.call(R,k?"html":"body")[0]:k?R.documentElement:ye},qa=function(b){return br.call(b.ownerDocument||b,b,lt.SHOW_ELEMENT|lt.SHOW_COMMENT|lt.SHOW_TEXT|lt.SHOW_PROCESSING_INSTRUCTION|lt.SHOW_CDATA_SECTION,null)},xs=function(b){return b instanceof ms&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof Bt)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},Ga=function(b){return typeof wt=="function"&&b instanceof wt};function Ke(L,b,R){E(L,M=>{M.call(O,b,R,Pt)})}const Wa=function(b){let R=null;if(Ke(se.beforeSanitizeElements,b,null),xs(b))return De(b),!0;const M=he(b.nodeName);if(Ke(se.uponSanitizeElement,b,{tagName:M,allowedTags:ae}),b.hasChildNodes()&&!Ga(b.firstElementChild)&&re(/<[/\w]/g,b.innerHTML)&&re(/<[/\w]/g,b.textContent)||b.nodeType===rt.progressingInstruction||S&&b.nodeType===rt.comment&&re(/<[/\w]/g,b.data))return De(b),!0;if(!ae[M]||qe[M]){if(!qe[M]&&Ya(M)&&(te.tagNameCheck instanceof RegExp&&re(te.tagNameCheck,M)||te.tagNameCheck instanceof Function&&te.tagNameCheck(M)))return!1;if(Rt&&!Ze[M]){const Q=ht(b)||b.parentNode,ye=$e(b)||b.childNodes;if(ye&&Q){const me=ye.length;for(let Ee=me-1;Ee>=0;--Ee){const Ne=ut(ye[Ee],!0);Ne.__removalCount=(b.__removalCount||0)+1,Q.insertBefore(Ne,gr(b))}}}return De(b),!0}return b instanceof Ut&&!wc(b)||(M==="noscript"||M==="noembed"||M==="noframes")&&re(/<\/no(script|embed|frames)/i,b.innerHTML)?(De(b),!0):(y&&b.nodeType===rt.text&&(R=b.textContent,E([at,Re,Ve],Q=>{R=Z(R,Q," ")}),b.textContent!==R&&(H(O.removed,{element:b.cloneNode()}),b.textContent=R)),Ke(se.afterSanitizeElements,b,null),!1)},Za=function(b,R,M){if(ne&&(R==="id"||R==="name")&&(M in j||M in xc))return!1;if(!(h&&!d[R]&&re(vr,R))){if(!(i&&re(je,R))){if(!ie[R]||d[R]){if(!(Ya(b)&&(te.tagNameCheck instanceof RegExp&&re(te.tagNameCheck,b)||te.tagNameCheck instanceof Function&&te.tagNameCheck(b))&&(te.attributeNameCheck instanceof RegExp&&re(te.attributeNameCheck,R)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(R))||R==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&re(te.tagNameCheck,M)||te.tagNameCheck instanceof Function&&te.tagNameCheck(M))))return!1}else if(!Ye[R]){if(!re(kr,Z(M,yr,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&b!=="script"&&oe(M,"data:")===0&&wr[b])){if(!(g&&!re(q,Z(M,yr,"")))){if(M)return!1}}}}}}return!0},Ya=function(b){return b!=="annotation-xml"&&B(b,vs)},Qa=function(b){Ke(se.beforeSanitizeAttributes,b,null);const{attributes:R}=b;if(!R||xs(b))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie,forceKeepAttr:void 0};let Q=R.length;for(;Q--;){const ye=R[Q],{name:me,namespaceURI:Ee,value:Ne}=ye,Wt=he(me);let Ce=me==="value"?Ne:Y(Ne);if(M.attrName=Wt,M.attrValue=Ce,M.keepAttr=!0,M.forceKeepAttr=void 0,Ke(se.uponSanitizeAttribute,b,M),Ce=M.attrValue,G&&(Wt==="id"||Wt==="name")&&(Pr(me,b),Ce=ve+Ce),S&&re(/((--!?|])>)|<\/(style|title)/i,Ce)){Pr(me,b);continue}if(M.forceKeepAttr||(Pr(me,b),!M.keepAttr))continue;if(!v&&re(/\/>/i,Ce)){Pr(me,b);continue}y&&E([at,Re,Ve],Xa=>{Ce=Z(Ce,Xa," ")});const Ka=he(b.nodeName);if(Za(Ka,Wt,Ce)){if(ue&&typeof St=="object"&&typeof St.getAttributeType=="function"&&!Ee)switch(St.getAttributeType(Ka,Wt)){case"TrustedHTML":{Ce=ue.createHTML(Ce);break}case"TrustedScriptURL":{Ce=ue.createScriptURL(Ce);break}}try{Ee?b.setAttributeNS(Ee,me,Ce):b.setAttribute(me,Ce),xs(b)?De(b):I(O.removed)}catch{}}}Ke(se.afterSanitizeAttributes,b,null)},Sc=function L(b){let R=null;const M=qa(b);for(Ke(se.beforeSanitizeShadowDOM,b,null);R=M.nextNode();)Ke(se.uponSanitizeShadowNode,R,null),Wa(R),Qa(R),R.content instanceof Se&&L(R.content);Ke(se.afterSanitizeShadowDOM,b,null)};return O.sanitize=function(L){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,M=null,Q=null,ye=null;if(ys=!L,ys&&(L="<!-->"),typeof L!="string"&&!Ga(L))if(typeof L.toString=="function"){if(L=L.toString(),typeof L!="string")throw Le("dirty is not a string, aborting")}else throw Le("toString is not a function");if(!O.isSupported)return L;if(T||Cs(b),O.removed=[],typeof L=="string"&&(Ge=!1),Ge){if(L.nodeName){const Ne=he(L.nodeName);if(!ae[Ne]||qe[Ne])throw Le("root node is forbidden and cannot be sanitized in-place")}}else if(L instanceof wt)R=ja("<!---->"),M=R.ownerDocument.importNode(L,!0),M.nodeType===rt.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?R=M:R.appendChild(M);else{if(!w&&!y&&!k&&L.indexOf("<")===-1)return ue&&_?ue.createHTML(L):L;if(R=ja(L),!R)return w?null:_?Me:""}R&&x&&De(R.firstChild);const me=qa(Ge?L:R);for(;Q=me.nextNode();)Wa(Q),Qa(Q),Q.content instanceof Se&&Sc(Q.content);if(Ge)return L;if(w){if(W)for(ye=bs.call(R.ownerDocument);R.firstChild;)ye.appendChild(R.firstChild);else ye=R;return(ie.shadowroot||ie.shadowrootmode)&&(ye=_e.call(V,ye,!0)),ye}let Ee=k?R.outerHTML:R.innerHTML;return k&&ae["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&re(fr,R.ownerDocument.doctype.name)&&(Ee="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
6
+ `+Ee),y&&E([at,Re,Ve],Ne=>{Ee=Z(Ee,Ne," ")}),ue&&_?ue.createHTML(Ee):Ee},O.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cs(L),T=!0},O.clearConfig=function(){Pt=null,T=!1},O.isValidAttribute=function(L,b,R){Pt||Cs({});const M=he(L),Q=he(b);return Za(M,Q,R)},O.addHook=function(L,b){typeof b=="function"&&H(se[L],b)},O.removeHook=function(L,b){if(b!==void 0){const R=P(se[L],b);return R===-1?void 0:D(se[L],R,1)[0]}return I(se[L])},O.removeHooks=function(L){se[L]=[]},O.removeAllHooks=function(){se=Ht()},O}var ps=mr();return ps})})(Ys);const Qs=Ys.exports,At=(r,...t)=>{let e=r[0];for(let s=0;s<t.length;s++)e+=Qs.sanitize(t[s]?String(t[s]):"")+r[s+1];return e||""},zr="searchcraft";class Un{constructor(){c(this,"coreInstances",{});c(this,"subscriptions",{})}addCoreInstance(t,e){const s=e||zr;this.coreInstances[s]=t;for(const a of this.subscriptions[s]||[])a(t)}useCoreInstance(t,e){const s=t||zr;return this.coreInstances[s]?(e(this.coreInstances[s]),()=>{}):(this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(e),()=>{this.subscriptions[s]&&(this.subscriptions[s]=this.subscriptions[s].filter(a=>a!==e))})}}const fe=new Un,Bn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nt=(r=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)t+=Bn[e[r]&63];return t};const Vn=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"adSource","Custom");c(this,"adClientResponseItem");c(this,"renderPosition","interstitial");c(this,"searchTerm");c(this,"isSearchInProgress",!1);c(this,"searchResultCount",0);c(this,"core");c(this,"intersectionObserver");c(this,"storeUnsubscribe");c(this,"cleanupCore");c(this,"adContainerRenderedTimeout");c(this,"isComponentConnected",!1);c(this,"timeTaken");c(this,"adContainerId","");this.__registerHost()}get hostElement(){return this}handleAdRendered(){var e,s,a;this.adContainerId=nt(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var o;(o=this.core)==null||o.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(s=(e=this.core)==null?void 0:e.config)==null?void 0:s.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var e;(e=this.core)==null||e.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(e){const s=e.searchClientRequestProperties;s&&typeof s=="object"&&(this.searchTerm=s.searchTerm),this.searchResultCount=e.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(e){const s=e.store.getState();this.isComponentConnected=!0,this.core=s.core,this.isSearchInProgress=s.isSearchInProgress,this.searchResultCount=s.searchClientResponseItems.length,this.timeTaken=s.searchResponseTimeTaken;const a=s.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(s),this.storeUnsubscribe=e.store.subscribe(o=>{this.timeTaken!==o.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(o),this.timeTaken=o.searchResponseTimeTaken,this.isSearchInProgress=o.isSearchInProgress})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var e;(e=this.intersectionObserver)==null||e.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([s])=>{s!=null&&s.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var e,s,a;(e=this.storeUnsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,l,u;const e=this.adClientResponseItem;if(!e.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(n=(o=(a=this.core)==null?void 0:a.config)==null?void 0:o.admAdConfig)!=null&&n.template&&(s=(u=(l=this.core)==null?void 0:l.config)==null?void 0:u.admAdConfig.template(e.admAd,{html:At})),p("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:s})}renderCustomAd(){var o,n,l;const e=(l=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdConfig)==null?void 0:l.template,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return e&&(a=e({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:At})),p("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s,a;const e=((a=(s=this.core)==null?void 0:s.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return p("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:we("searchcraft-ad",e),"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}}},[0,"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 rr(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,Vn);break}})}const jn=rr,qn=J(class extends X{constructor(){super();c(this,"hierarchy","primary");c(this,"disabled",!1);c(this,"icon");c(this,"iconOnly",!1);c(this,"iconPosition","left");c(this,"label","Search");c(this,"type","button");c(this,"buttonClick");c(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=Je(this,"buttonClick")}render(){return p("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:we("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:p(Hn,null,this.iconPosition==="left"&&this.icon,p("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function sr(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,qn);break}})}const Gn=sr,Wn=J(class extends X{constructor(){super(),this.__registerHost()}render(){return p("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},p("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function ar(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,Wn);break}})}const Zn=ar,Ks=(r,t)=>{let e=r;for(const s of t)e=e==null?void 0:e.children[s];return e},Hr=(r,t)=>{const e={...r};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&r[s]instanceof Object?e[s]=Hr(r[s],t[s]):e[s]=t[s]);return e};function Yn(r){return r.filter((t,e,s)=>!s.some((a,o)=>o!==e&&a.includes(t)))}const Xs=(r,t)=>{const e=structuredClone(r),s=(a,o)=>{var u;const n=structuredClone(a),l=Ks(t,o);if(!l)return n;for(const f of Object.keys(a.children))l.children[f]?n.children[f]={...Hr(a.children[f],l.children[f]),count:((u=n.children[f])==null?void 0:u.count)||0}:n.children[f]&&(n.children[f]=s(n.children[f],[...o,f]));return n};return s(e,[])},Ur=r=>{const t={path:"/",count:0,children:{}},e=[],s=a=>{if(a.path!=="/"&&e.push({path:a.path,count:a.count}),a.children)for(const o of a.children)s(o)};s(r);for(const{path:a,count:o}of e){const n=a.split("/").filter(Boolean);let l=t;for(const u of n){const f=l.path==="/"?`/${u}`:`${l.path}/${u}`;l.children[u]||(l.children[u]={path:f,count:o,children:{}}),l=l.children[u]}l.count=o}return t},Qn=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"fieldName","");c(this,"facetSelectionUpdated");c(this,"selectedPaths",{});c(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});c(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});c(this,"renderedFacetTree",{path:"/",count:0,children:{}});c(this,"lastTimeTaken");c(this,"lastSearchTerm");c(this,"lastSearchMode");c(this,"lastSortType");c(this,"lastRangeValues");c(this,"lastFacetValues");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"formatFacetName",e=>`${e.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);this.__registerHost(),this.facetSelectionUpdated=Je(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(e=>this.selectedPaths[e])}handleIncomingSearchResponse(e,s){var u,f,m;const a=(u=e.searchResponseFacetPrime)==null?void 0:u.find(C=>this.fieldName===Object.keys(C)[0]),o=a==null?void 0:a[this.fieldName],n=Ur({path:"/",count:0,children:o||[]});switch(s){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=n;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(e.supplementalFacetPrime){const C=(f=e.supplementalFacetPrime)==null?void 0:f.find(I=>this.fieldName===Object.keys(I)[0]),E=C==null?void 0:C[this.fieldName],P=Ur({path:"/",count:0,children:E||[]});this.facetTreeCollectedFromSearchResponse=Xs(P,n)}else this.facetTreeCollectedFromSearchResponse=n;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=Xs(this.facetTreeCollectedFromSearchResponse,n);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const l={path:"/",count:0,children:[]};for(const C of Object.keys(this.selectedPaths).filter(E=>this.selectedPaths[E])){const E=C.startsWith("/")?C.substring(1).split("/"):C.split("/"),P=!!Ks(this.facetTreeCollectedFromSearchResponse,E),I=E.at(-1);!P&&I&&((m=l.children)==null||m.push({children:[],count:0,path:C}))}this.facetTreeFromFacetPathsNotInSearchResponse=Ur(l),this.renderedFacetTree=Hr(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(e){const s={...e};if(s.searchTerm.trim()==="")this.handleIncomingSearchResponse(s,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==s.searchResponseTimeTaken&&s.searchClientRequestProperties&&typeof s.searchClientRequestProperties=="object"){const a=s.searchClientRequestProperties;let o="UNKNOWN";this.lastSearchTerm!==a.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(a.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(a.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==a.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==a.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(a.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(a.facetPathsForIndexFields),this.lastSortType=a.order_by,this.lastSearchMode=a.mode,this.lastSearchTerm=a.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,o)}}onCoreAvailable(e){this.handleStateUpdate(e.store.getState()),this.unsubscribe=e.store.subscribe(s=>{this.handleStateUpdate(s)})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleCheckboxChange(e){var n;if(!this.selectedPaths[e])this.selectedPaths={...this.selectedPaths,[e]:!0};else{const l=Object.keys(this.selectedPaths).filter(u=>!u.includes(e));this.selectedPaths=l.reduce((u,f)=>(u[f]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(l=>this.selectedPaths[l]),o=Yn(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}renderFacet(e,s){let a=!1;for(const l of Object.keys(this.selectedPaths))this.selectedPaths[l]&&l.startsWith(s.path)&&l.length>s.path.length&&(a=!0);const o=Object.keys(this.selectedPaths).includes(s.path),n=Object.keys(s.children).length>0&&(o||a)||e==="@@root";return p("div",{class:"searchcraft-facet-list-item"},e!=="@@root"&&p("label",{class:"searchcraft-facet-list-checkbox-label"},p("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},p("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[s.path],onChange:l=>{this.handleCheckboxChange(s.path)},type:"checkbox"}),a?p("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},p("svg",{viewBox:"0 0 14 3",fill:"none"},p("title",null,"Checkbox dash"),p("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):p("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},p("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},p("title",null,"Checkbox check"),p("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),p("span",null,this.formatFacetName(e)," (",s.count,")")),n&&p("div",{class:"searchcraft-facet-list",style:{paddingLeft:e!=="@@root"?"24px":"0px",paddingTop:e!=="@@root"?"6px":"0px"}},Object.keys(s.children).map(l=>{if(s.children[l])return this.renderFacet(l,s.children[l])})))}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?p("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):p("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[0,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function Js(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,Qn);break}})}const Kn=Js;function Mt(r,t){if(r&&t)return t.fieldNames.map(e=>{let s=r[e.fieldName];if(s)switch(e.dataType){case"date":{s=Xn(s,e.dateFormatLocale,e.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(e.numberFormatLocale,e.numberFormatOptions).format(s*(e.numberScale||1));break}}return s}).filter(e=>!!e).join(t.delimiter||" ")}function ea(r){return r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Xn(r,t="en-US",e={day:"numeric",month:"long",year:"numeric"}){const s=new Date(r),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const l=Math.trunc(o/1e3),u=Math.trunc(l/60),f=Math.trunc(u/60),m=Math.trunc(f/24),C=new Intl.RelativeTimeFormat(t,e);return m>=1?C.format(-m,"day"):f>=1?C.format(-f,"hour"):u>=1?C.format(-u,"minute"):C.format(0,"second")}return new Intl.DateTimeFormat(t,e).format(s)}function Br(r,t,e=0){const s=new Date(r);switch(t){case"year":return new Date(s.getFullYear()+e,0,1,0,0,0,0).getTime();case"month":return new Date(s.getFullYear(),s.getMonth()+e,1,0,0,0,0).getTime();case"day":return new Date(s.getFullYear(),s.getMonth(),s.getDate()+e,0,0,0,0).getTime();case"hour":return new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours()+e,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${t}`)}}function Jn(r,t,e){const s=new Date(t),a=new Date(e);switch(r){case"year":return Math.abs(a.getFullYear()-s.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(s.getFullYear()*12+s.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${r}`)}}const ta=r=>{if(r>=11&&r<=13)return`${r}th`;switch(r%10){case 1:return`${r}st`;case 2:return`${r}nd`;case 3:return`${r}rd`;default:return`${r}th`}};function eo(r,t){const e=new Intl.DateTimeFormat("en-US",{month:"short"});switch(r){case"year":return t.getFullYear().toString();case"month":return`${e.format(t)} ${t.getFullYear()}`;case"day":return`${e.format(t)} ${ta(t.getDate())}, ${t.getFullYear()}`;case"hour":{const s=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${e.format(t)} ${ta(t.getDate())}, ${s.format(t)}`}default:throw new Error(`Unsupported granularity: ${r}`)}}function to(r,t){let e=!1,s=null;const a=o=>{r(...o),e=!0,setTimeout(()=>{if(e=!1,s){const n=s;s=null,a(n)}},t)};return(...o)=>{e?s=o:a(o)}}const ro=J(class extends X{constructor(){super();c(this,"max",100);c(this,"min",0);c(this,"step",1);c(this,"dataType","number");c(this,"dateGranularity");c(this,"lowerBound",0);c(this,"upperBound",1);c(this,"endValue",0);c(this,"startValue",0);c(this,"lastFocusedHandle","max");c(this,"throttledEmitUpdate",()=>{});c(this,"rangeChanged");c(this,"emitUpdate",async()=>{var e,s;switch(this.dataType){case"number":(e=this.rangeChanged)==null||e.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",o=Br(this.min,a,this.lowerBound+this.startValue),n=Br(this.min,a,this.lowerBound+this.endValue+1);(s=this.rangeChanged)==null||s.emit({startValue:o,endValue:n});break}}});c(this,"handleStartValueChange",e=>{const s=e.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});c(this,"handleEndValueChange",e=>{const s=e.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});c(this,"getLabel",e=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const s=this.dateGranularity||"year",a=this.lowerBound+e,o=Br(this.min,s,a);return eo(this.dateGranularity||"year",new Date(o))}}});this.__registerHost(),this.rangeChanged=Je(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=Jn(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=to(this.emitUpdate,120)}render(){const e=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,s=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),o=this.getLabel(this.endValue);return p("div",{key:"2c72254f52151edd2e2fa89c092fc788db0b5562",class:"searchcraft-slider"},p("div",{key:"98c25badf2c9386d7173ea552e510dcc168e7fc7",class:"searchcraft-slider-range"},p("div",{key:"50774db2253e34b1bce68acc0a40b2706cab542d",class:"searchcraft-slider-active-range",style:{left:`${e}%`,width:`${s-e}%`}}),p("input",{key:"229afedc1318a63cbd75806805210cf4f5695e6e",class:we("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}),p("input",{key:"6aa038b01daaba86f501ebbbec30fc6720b549b3",class:we("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})),p("div",{key:"f70501538635c3b08ad1e6ac101d0b3192ef8e04",class:"searchcraft-slider-label"},p("span",{key:"ddd539b86774f8900771d77d5ef7eb3a67c98d59",class:"searchcraft-slider-start-label"},a),p("span",{key:"b754a9c8d284e0623032cee6b92f9df88873ec04",class:"searchcraft-slider-end-label"},o)))}},[0,"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 ra(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,ro);break}})}const so=J(class extends X{constructor(){super();c(this,"label","Toggle");c(this,"subLabel");c(this,"searchcraftId");c(this,"toggleUpdated");c(this,"isActive",!1);c(this,"lastSearchTerm");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleToggle",async()=>{var e;this.isActive=!this.isActive,(e=this.toggleUpdated)==null||e.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=Je(this,"toggleUpdated")}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{s.searchTerm!==this.lastSearchTerm&&s.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=s.searchTerm})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return p("div",{key:"ab1d5ee21c7aaa28af1c405edc986556858366e8",class:we("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},p("div",{key:"44f86a16d796d448bdb2fb3af72d4d8e1484364b"},p("p",{key:"9fedb38795d6379cae56dc005ab8e4a944b4261b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&p("p",{key:"44f3d17175184032275fec89a4cfe7f8266b7014",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),p("button",{key:"15fc18906ff2fb21fe646a4e3a8a2ace4a37cae2",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},p("div",{key:"716d29c65a199f63f5fd294dc3e3ad2ea4d53aa3",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function sa(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,so);break}})}const ao=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"items",[]);c(this,"lastSearchTerm");c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.core=e,this.setInitialDateRanges(),this.unsubscribe=e.store.subscribe(s=>{this.lastSearchTerm=s.searchTerm||""})}componentDidLoad(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}setInitialDateRanges(){var e,s;for(const a of this.items)if(a.type==="dateRange"){const o=a,n=o.options.minDate,l=o.options.maxDate||new Date;(s=(e=this.core)==null?void 0:e.store.getState())==null||s.addRangeValueForIndexField({fieldName:o.fieldName,value:`${o.fieldName}:[${n.toISOString()} TO ${l.toISOString()}]`})}}handleDateRangeChanged(e,s,a){var l,u,f,m;const o=new Date(s),n=new Date(a);(u=(l=this.core)==null?void 0:l.store.getState())==null||u.addRangeValueForIndexField({fieldName:e.fieldName,value:`${e.fieldName}:[${o.toISOString()} TO ${n.toISOString()}]`}),(m=(f=this.core)==null?void 0:f.store.getState())==null||m.search()}handleNumericRangeChanged(e,s,a){var o,n,l,u;(n=(o=this.core)==null?void 0:o.store.getState())==null||n.addRangeValueForIndexField({fieldName:e,value:`${e}:[${s} TO ${a}]`}),(u=(l=this.core)==null?void 0:l.store.getState())==null||u.search()}handleFacetSelectionUpdated(e,s){var a,o,n,l,u,f;s.length>0?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.addFacetPathsForIndexField({fieldName:e,value:`${e}: IN [${s.join(" ")}]`}):(l=(n=this.core)==null?void 0:n.store.getState())==null||l.removeFacetPathsForIndexField(e),(f=(u=this.core)==null?void 0:u.store.getState())==null||f.search()}handleExactMatchToggleUpdated(e){var s,a,o,n;(a=(s=this.core)==null?void 0:s.store.getState())==null||a.setSearchMode(e?"exact":"fuzzy"),(n=(o=this.core)==null?void 0:o.store.getState())==null||n.search()}handleMostRecentToggleUpdated(e,s){var a,o,n,l,u,f;s?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.setSortOrder({orderByField:e,sortType:"desc"}):(l=(n=this.core)==null?void 0:n.store.getState())==null||l.setSortOrder({orderByField:null,sortType:null}),(f=(u=this.core)==null?void 0:u.store.getState())==null||f.search()}render(){return p("div",{key:"b18a05516bea8d145d1ca015835d63fafbfc8bd8",class:"searchcraft-filter-panel"},this.items.map(e=>{switch(e.type){case"dateRange":{const s=e,a=s.options.maxDate||new Date;return p("div",{class:"searchcraft-filter-panel-section"},p("p",{class:"searchcraft-filter-panel-label"},e.label),p("searchcraft-slider",{min:s.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:s.options.granularity,onRangeChanged:o=>{this.handleDateRangeChanged(s,o.detail.startValue,o.detail.endValue)}}))}case"numericRange":{const s=e;return p("div",{class:"searchcraft-filter-panel-section"},p("p",{class:"searchcraft-filter-panel-label"},e.label),p("searchcraft-slider",{min:s.options.min,max:s.options.max,step:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=e;return p("div",{class:"searchcraft-filter-panel-section"},p("p",{class:"searchcraft-filter-panel-label"},e.label),p("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=e;return p("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=e;return p("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],lastSearchTerm:[32]}]);function no(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,ao);break;case"searchcraft-facet-list":customElements.get(t)||Js();break;case"searchcraft-slider":customElements.get(t)||ra();break;case"searchcraft-toggle-button":customElements.get(t)||sa();break}})}const oo=no,io=J(class extends X{constructor(){super();c(this,"inputLabelClassName","");c(this,"label","");this.__registerHost()}render(){return p("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:we("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Vr(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,io);break}})}const co=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"autoSearch",!0);c(this,"buttonPlacement","none");c(this,"buttonLabel");c(this,"inputLabel");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"inputFocus");c(this,"inputBlur");c(this,"inputInit");c(this,"inputValue","");c(this,"searchTerm","");c(this,"error",!1);c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleInput",e=>{var a;const s=e.target;this.inputValue=s.value,(a=this.core)==null||a.store.getState().setSearchTerm(s.value),this.autoSearch&&this.performSearch()});c(this,"performSearch",async()=>{var e;this.error=!1;try{await((e=this.core)==null?void 0:e.store.getState().search())}catch{this.error=!0}});c(this,"handleClearInput",()=>{var e;(e=this.core)==null||e.store.getState().resetSearchValues(),this.error=!1});c(this,"handleFormSubmit",async e=>{e.preventDefault(),await this.performSearch()});this.__registerHost(),this.inputFocus=Je(this,"inputFocus"),this.inputBlur=Je(this,"inputBlur"),this.inputInit=Je(this,"inputInit")}init(){var e;this.core&&((e=this.inputInit)==null||e.emit())}onCoreChange(){this.init()}onCoreAvailable(e){this.core=e,this.init(),this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.inputValue=s.searchTerm})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=this.inputValue.length>0,s=we("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"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return p("form",{key:"c1eea324038f640a9075d5714378d5c4b97168e0",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},p("div",{key:"f157c00510e5c3e75dd703996be24de5e97bbcd9",class:s,style:o},p("div",{key:"c97f3e5ef9ed6aee103dedc76b3ee1620b69ebba",class:"searchcraft-input-form-button"},p("searchcraft-button",{key:"4bb5dfea8b9f8f2f0a7e5fc5c1b199ef9d209278",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&p("div",{key:"aa8beca21ce414d645687ee73b7ca29c740438a2",class:"searchcraft-input-form-label"},p("searchcraft-input-label",{key:"8c15364abcf2e43354b445be6c7ceb9387ea4a67",label:this.inputLabel})),this.error&&p("div",{key:"5987b6da22a25da50613ceb277bfe44b31ba8f37",class:"searchcraft-input-form-error-message"},p("searchcraft-error-message",{key:"f2a230f0cf3cf0bbaddbb37ef2f38afdf73b28f6"},"Something went wrong.")),p("div",{key:"a0862217135ac6f9a96d9e64e6fca5f772eb8f51",class:"searchcraft-input-form-input-wrapper"},p("input",{key:"7071be386f0c73a0230e0815640b134ee5139262",autoComplete:"off",class:we("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),p("div",{key:"178a7a21a84f012662312dc2b9145fff0aec6a44",class:"searchcraft-input-form-input-icon"},p("svg",{key:"7fb86586c155f7075fb65280482eb2ab5ff8a9db",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"},p("title",{key:"0a48667010f2c998917271f941877c5ec826329f"},"Search icon"),p("path",{key:"94c54dfa1406bdc6c2f87f3b31e1b01862b58e08",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"}))),e&&p("button",{key:"931fc5e8842de1e8f3bab3fa163261c54c24148c",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},p("svg",{key:"0676b050222eb9a7bf2f7c7c112ae40c0644ecf7",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},p("title",{key:"002b23596bc977b5a942776e4f7b513db4584361"},"Clear icon"),p("path",{key:"05346b8f1ede39b9e1924760f400df10d8b0aa49",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"]}}},[0,"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"],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function aa(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,co);break;case"searchcraft-button":customElements.get(t)||sr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-input-label":customElements.get(t)||Vr();break}})}const lo=aa,uo=Vr,ho=J(class extends X{constructor(){super();c(this,"label");this.__registerHost()}render(){return p("div",{key:"507cde7e8f74682d0535a65fbc787b18fa4c49f7",class:"searchcraft-loading"},p("div",{key:"de8d4db44bd0d54baa276403063327b040a39ee4",class:"searchcraft-loading-bars"},p("div",{key:"3ef1ad066aef5582de0afe08c598747e48533f0a",class:"searchcraft-loading-bar-1"}),p("div",{key:"0e9b5bfb8c031b1d788b0f39a63b1b325f123aad",class:"searchcraft-loading-bar-2"}),p("div",{key:"b342f47a3869301d17e66f0ae79cbea6b2a7ed41",class:"searchcraft-loading-bar-3"}),p("div",{key:"c11c58254a005b80c54b98f6713acb4c7f376a58",class:"searchcraft-loading-bar-4"}),p("div",{key:"c53ff4d003ed8e1d17fdc2ab8d61b2d3313dd5ac",class:"searchcraft-loading-bar-5"}),p("div",{key:"3f517f20a24a844c04562cbb95b3a39502905405",class:"searchcraft-loading-bar-6"})),p("p",{key:"11a63145472d8ded9d28bf7e9cfde9097e6a02e2",class:"searchcraft-loading-label"},this.label))}},[0,"searchcraft-loading",{label:[1]}]);function na(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(t=>{switch(t){case"searchcraft-loading":customElements.get(t)||customElements.define(t,ho);break}})}const fo=na,po=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPerPage");c(this,"searchResultsPage");c(this,"searchResultsCount");c(this,"searchResultsPagesCount",1);c(this,"searchResultsRangeMin",1);c(this,"searchResultsRangeMax",1);c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,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=s.setSearchResultsPage})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleGoToPage(e){this.setSearchResultsPage(e)}renderOddPaginationItem(e){return p("li",null,p("button",{class:we("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===e}),onClick:()=>this.handleGoToPage(e),type:"button"},e))}renderEvenPaginationItem(e){if(!(this.searchResultsPagesCount<=e))return(this.searchResultsPagesCount<=5||e<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=e+1:this.searchResultsPage>=e-1)?p("li",null,p("button",{class:we("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===e}),onClick:()=>this.handleGoToPage(e),type:"button"},e)):p("li",null,p("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?p("li",null,p("button",{class:we("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)):p("li",null,p("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return p("div",{class:"searchcraft-pagination"},p("div",{class:"searchcraft-pagination-control"},p("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:p("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("title",null,"Previous page icon"),p("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),p("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)),p("div",{class:"searchcraft-pagination-control"},p("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:p("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("title",null,"Next page icon"),p("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function mo(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,po);break;case"searchcraft-button":customElements.get(t)||sr();break}})}const go=mo,bo=J(class extends X{constructor(){super();c(this,"template");c(this,"type");c(this,"searchcraftId");c(this,"hotkey");c(this,"hotkeyModifier");c(this,"hotkeyModifierSymbol");c(this,"isPopoverVisible");c(this,"userAgent");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");c(this,"core");c(this,"renderOptionSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Option key"),p("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"}),p("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"})));c(this,"renderCtrlSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Ctrl key"),p("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"})));c(this,"renderWindowsMetaSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Windows meta key"),p("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"})));c(this,"renderMacMetaSymbol",()=>p("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},p("title",null,"Mac meta key"),p("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"})));this.__registerHost()}onCoreAvailable(e){this.core=e;const s=e.store.getState();this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.isPopoverVisible=s.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=e.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var e;(e=this.core)==null||e.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}setUserAgent(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("windows"):return"window";case e.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 p("div",{class:"searchcraft-popover-button-wrapper"},p("div",{class:"searchcraft-popover-button-input"},p("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"},p("title",null,"Search icon"),p("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"})),p("span",null,"Search")),p("div",{class:"searchcraft-popover-button-keycaps"},p("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},p("span",null,this.hotkeyModifierSymbol)),p("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},p("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return p("div",null,p("slot",null))}}render(){return p("button",{key:"ef815c1ea4ecde68fe152f80b811a95ccb9a38be",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:At}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[4,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function vo(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,bo);break}})}const yo=vo,ko=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"searchResultsCount");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.searchResultsCount=e.store.getState().searchResultsCount,this.unsubscribe=e.store.subscribe(s=>{this.searchResultsCount=s.searchResultsCount})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return p("footer",{key:"e12fa32df3c1137e643af22323feb3dc33f7718f",class:"searchcraft-popover-footer"},p("p",{key:"73a33859c1702d82625748f398d5402030cc71f4",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ea(this.searchResultsCount)} Results Found`:" "),p("a",{key:"9d32f6b21b166fef3e17e5b2eb81bfafe32f8d1a",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},p("svg",{key:"e47249460b6e2b5bb2a25d37c33d8a85b8c6013e",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p("title",{key:"438e675ff71edfc2176c08abe8efa34aaf7496ca"},"Powered by Searchcraft"),p("path",{key:"484e8935fb1cb84a79b8402748bac1da8171e9de",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"}))))}},[0,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],searchResultsCount:[32]}]);function oa(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,ko);break}})}const Co=oa,xo=J(class extends X{constructor(){super();c(this,"item");c(this,"popoverResultMappings");c(this,"documentPosition",0);c(this,"searchcraftId");c(this,"title");c(this,"subtitle");c(this,"href");c(this,"imageSource");c(this,"imageAlt");c(this,"core");c(this,"cleanupCore");c(this,"handleLinkClick",()=>{var e;if(this.core){const s=this.documentPosition,a=this.core.store.getState().searchTerm,o=this.core.store.getState().searchClientResponseItems.length||0;(e=this.core.measureClient)==null||e.sendMeasureEvent("document_clicked",{document_position:s,number_of_documents:o,search_term:a})}});this.__registerHost()}mapValuesFromDocument(e){var s,a,o,n,l;this.title=Mt(e,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Mt(e,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Mt(e,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Mt(e,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Mt(e,(l=this.popoverResultMappings)==null?void 0:l.imageAlt)}onCoreAvailable(e){this.core=e}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}render(){return p("div",{key:"fe1f0a2803c05c7f7901a1e34e3751283683b841",class:"searchcraft-popover-list-item"},p("a",{key:"b1765b28e4df4483554e4aa1e776f85817f45709",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&p("div",{key:"d47112466fe3414278f88db73294c829eceb63ba",class:"searchcraft-popover-list-item-image-wrapper"},p("img",{key:"cf65d6520a2586f9b056775a0d1c3e85cb81cdd7",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),p("div",{key:"b6bdaf2e52e216d20c23790b4b53563be8709d40",class:"searchcraft-popover-list-item-content"},this.title&&p("p",{key:"21a6541924914c8ea2b798d0e910c6e4544b7e46",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&p("p",{key:"625a1d6b1a7e6bfb848fd49cb316968b396b0473",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"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 jr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,xo);break}})}const wo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"popoverResultMappings");c(this,"searchClientResponseItems");c(this,"adClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"config");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.config=e.config}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}renderWithADMAds(){var e,s;return p("div",{class:"searchcraft-popover-list-view"},(e=this.adClientResponseItems)==null?void 0:e.map(a=>p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,f,m,C,E,P,I,H;const e=[],s=((f=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:f.adInterstitialInterval)||0,a=((C=(m=this.config)==null?void 0:m.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=((P=(E=this.config)==null?void 0:E.customAdConfig)==null?void 0:P.adStartQuantity)||0,n=((H=(I=this.config)==null?void 0:I.customAdConfig)==null?void 0:H.adEndQuantity)||0,l=this.searchClientResponseItems||[];for(let D=0;D<o;D++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));l.forEach((D,$)=>{if(s&&$%s===0&&$+s<l.length&&$>=s)for(let A=0;A<a;A++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${A}`,renderPosition:"interstitial"}));e.push(p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:D,key:D.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+$}))});for(let D=0;D<n;D++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-popover-list-view"},e)}renderWithNativoAds(){var f,m,C,E,P,I,H,D,$,A;const e=[],s=((m=(f=this.config)==null?void 0:f.nativoConfig)==null?void 0:m.adInterstialStartIndex)||0,a=((E=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:E.adInterstitialInterval)||0,o=((I=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:I.adInterstitialQuantity)||1,n=((D=(H=this.config)==null?void 0:H.nativoConfig)==null?void 0:D.adStartQuantity)||0,l=((A=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:A.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let B=0;B<n;B++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"top"}));u.forEach((B,Z)=>{if(a&&(Z+s)%a===0&&Z+a<u.length&&Z>=a)for(let oe=0;oe<o;oe++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B.id}-ad-${oe}`,renderPosition:"interstitial"}));e.push(p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:B,key:B.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+Z}))});for(let B=0;B<l;B++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-popover-list-view"},e)}renderWithNoAds(){var e;return p("div",{class:"searchcraft-popover-list-view"},(e=this.searchClientResponseItems)==null?void 0:e.map((s,a)=>p("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var e,s,a;return(e=this.config)!=null&&e.customAdConfig?this.renderWithCustomAds():(s=this.config)!=null&&s.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[0,"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 ia(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,wo);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-popover-list-item":customElements.get(t)||jr();break}})}const So=J(class extends X{constructor(){super();c(this,"type","inline");c(this,"popoverResultMappings");c(this,"hotkey","k");c(this,"hotkeyModifier","meta");c(this,"searchcraftId");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"isPopoverVisibleInState",!1);c(this,"searchClientResponseItems",[]);c(this,"adClientResponseItems",[]);c(this,"searchTerm");c(this,"isFocused",!1);c(this,"breakpointSm",576);c(this,"breakpointMd",768);c(this,"breakpointLg",992);c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"modalElement");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"core");c(this,"handleDocumentClick",e=>{this.hostElement.contains(e.target)||(this.isFocused=!1)});c(this,"handleDocumentKeyDown",e=>{var s;if(e.key===this.hotkey&&this.handleHotkeyPressed(e),!!this.hostElement.contains(document.activeElement))switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.focusOnNextListItem(e.key);break;case"Escape":(s=this.core)==null||s.store.getState().setPopoverVisibility(!1);break;default:return}});c(this,"handleInputInit",()=>{const e=this.hostElement.querySelector(".searchcraft-input-form-input");e==null||e.focus()});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e;const s=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=e.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=e.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}),e.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(e){this.isPopoverVisibleInState=e,document.body.style.overflow=e?"hidden":"auto"}handleInputFocus(){var e;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((e=this.core)==null||e.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(e){var s;(s=this.core)==null||s.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(e){var s;if(e.ctrlKey&&this.hotkeyModifier==="ctrl"||e.altKey&&this.hotkeyModifier==="alt"||e.metaKey&&this.hotkeyModifier==="meta")if(e.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(s=this.core)==null||s.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var e;(e=this.core)==null||e.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(e){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(l=>!l.hasAttribute("disabled")&&l.offsetParent!==null),a=s.indexOf(document.activeElement);if(e==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(e==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const l=document.querySelector(".searchcraft-input-form-input");l&&(l.focus(),requestAnimationFrame(()=>{l.selectionEnd=l.value.length,l.selectionStart=l.value.length}))}}get hasResultsToShow(){var e,s;return this.searchTerm&&((s=(e=this.searchTerm)==null?void 0:e.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const e=this.hasResultsToShow&&this.isFocused;return p("div",{class:we("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":e})},p("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},p("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),e&&p("div",{class:"searchcraft-popover-form-inline-wrapper"},p("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),p("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderModalPopover(){if(this.isPopoverVisibleInState)return p("div",{class:we("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},p("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),p("div",{class:"searchcraft-popover-form-modal-wrapper"},p("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},p("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),p("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),p("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&p("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),p("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return p("div",{class:we("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},p("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},p("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),p("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),p("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&p("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),p("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()}}},[0,"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 ca(){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(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,So);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-button":customElements.get(t)||sr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-input-form":customElements.get(t)||aa();break;case"searchcraft-input-label":customElements.get(t)||Vr();break;case"searchcraft-popover-footer":customElements.get(t)||oa();break;case"searchcraft-popover-form":customElements.get(t)||ca();break;case"searchcraft-popover-list-item":customElements.get(t)||jr();break;case"searchcraft-popover-list-view":customElements.get(t)||ia();break}})}const Ro=ca,Eo=jr,To=ia,Po=J(class extends X{constructor(){super();c(this,"template");c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"count",0);c(this,"range",[0,0]);c(this,"responseTime","0");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsCount=s.searchResultsCount,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=((s.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return!this.searchTerm||this.searchResultsCount===0?null:p("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:At}):`${ea(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function $o(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,Po);break}})}const _o=$o,Io=J(class extends X{constructor(){super();c(this,"item");c(this,"index");c(this,"documentPosition",0);c(this,"template");c(this,"searchcraftId");c(this,"templateHtml");c(this,"core");c(this,"cleanupCore");c(this,"handleResultContainerClick",e=>{var u;if(!e.target)return;const a=e.target.closest("a");if(!a||!((u=this.hostElement)!=null&&u.contains(a))||!this.core||!this.core.measureClient)return;const o=this.documentPosition,n=this.core.store.getState().searchTerm,l=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:l,search_term:n})});c(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e}connectedCallback(){var e;if(this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(e=this.template)==null?void 0:e.call(this,this.item.document,this.index,{html:At,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}render(){if(this.item)return typeof this.template>"u"?p("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([e,s])=>p("p",{key:e},p("strong",null,e),": ",s))):p("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function la(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,Io);break}})}const Ao=la,Mo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"initialQuery");c(this,"template");c(this,"adClientResponseItems",[]);c(this,"config");c(this,"isSearchInProgress",!0);c(this,"searchClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchTerm","");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){var a;const s=e.store.getState();this.handleStateChange(s),this.searchClientResponseItems=s.searchClientResponseItems,this.searchTerm=s.searchTerm,this.config=(a=s.core)==null?void 0:a.config,this.unsubscribe=e.store.subscribe(o=>this.handleStateChange(o))}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(e){var s;this.adClientResponseItems=[...e.adClientResponseItems],this.config=(s=e.core)==null?void 0:s.config,this.isSearchInProgress=e.isSearchInProgress,this.searchClientResponseItems=[...e.searchClientResponseItems],this.searchResultsPage=e.searchResultsPage,this.searchResultsPerPage=e.searchResultsPerPage,this.searchTerm=e.searchTerm}renderEmptyState(){return p("div",{class:"searchcraft-search-results-empty-state"},p("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return p("div",{class:"searchcraft-search-results"},p("div",{class:"searchcraft-search-results-error-message"},p("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s;const e=this.searchClientResponseItems||[];return p("div",{class:"searchcraft-search-results"},(s=this.adClientResponseItems)==null?void 0:s.map(a=>p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),e.map((a,o)=>p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+o,index:o,item:a,template:this.template})))}renderWithCustomAds(){var u,f,m,C,E,P,I,H;const e=[],s=((f=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:f.adInterstitialInterval)||0,a=((C=(m=this.config)==null?void 0:m.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=((P=(E=this.config)==null?void 0:E.customAdConfig)==null?void 0:P.adStartQuantity)||0,n=((H=(I=this.config)==null?void 0:I.customAdConfig)==null?void 0:H.adEndQuantity)||0,l=this.searchClientResponseItems||[];for(let D=0;D<o;D++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));l.forEach((D,$)=>{if(s&&$%s===0&&$+s<l.length&&$>=s)for(let A=0;A<a;A++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${A}`,renderPosition:"interstitial"}));e.push(p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:D.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+$,index:$,item:D,template:this.template}))});for(let D=0;D<n;D++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-search-results"},e)}renderWithNativoAds(){var f,m,C,E,P,I,H,D,$,A;const e=[],s=((m=(f=this.config)==null?void 0:f.nativoConfig)==null?void 0:m.adInterstialStartIndex)||0,a=((E=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:E.adInterstitialInterval)||0,o=((I=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:I.adInterstitialQuantity)||1,n=((D=(H=this.config)==null?void 0:H.nativoConfig)==null?void 0:D.adStartQuantity)||0,l=((A=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:A.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let B=0;B<n;B++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"top"}));u.forEach((B,Z)=>{if(a&&(Z+s)%a===0&&Z+a<u.length&&Z>=a)for(let oe=0;oe<o;oe++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B.id}-ad-${oe}`,renderPosition:"interstitial"}));e.push(p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:B.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+Z,index:Z,item:B,template:this.template}))});for(let B=0;B<l;B++)e.push(p("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"bottom"}));return p("div",{class:"searchcraft-search-results"},e)}renderWithNoAds(){const e=this.searchClientResponseItems||[];return p("div",{class:"searchcraft-search-results"},e.map((s,a)=>p("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:s.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:s,template:this.template})))}render(){var s,a,o;const e=this.searchClientResponseItems||[];return e.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&e.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(s=this.config)!=null&&s.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(o=this.config)!=null&&o.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[4,"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 Oo(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-results":customElements.get(t)||customElements.define(t,Mo);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-search-result":customElements.get(t)||la();break}})}const Lo=Oo,Fo=J(class extends X{constructor(){super();c(this,"caption");c(this,"disabled",!1);c(this,"inputId");c(this,"label");c(this,"labelId");c(this,"name");c(this,"options",[]);c(this,"selectChange");c(this,"searchResultsPerPage");c(this,"setSearchResultsPage",()=>{});c(this,"setSearchResultsPerPage",()=>{});c(this,"handleSelectChange",e=>{this.selectChange.emit(e.target.value)});this.__registerHost(),this.selectChange=Je(this,"selectChange")}handleGoToPage(e){this.setSearchResultsPage(e)}render(){return p("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&p("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),p("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},p("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:e,value:s,selected:a})=>p("option",{key:s,value:s,selected:a},e))),p("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"},p("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),p("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&&p("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"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 ua(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Fo);break}})}const Do=J(class extends X{constructor(){super();c(this,"increment",20);c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"searchResultsPagesCount");c(this,"initialSearchResultsPerPage");c(this,"setSearchResultsPerPage",()=>{});c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=s.setSearchResultsPage,this.setSearchResultsPerPage=s.setSearchResultsPerPage}),this.initialSearchResultsPerPage=e.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return p("div",{class:"searchcraft-search-results-per-page"},p("div",{class:"searchcraft-search-results-per-page-select"},p("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),p("div",{class:"searchcraft-search-results-per-page-select-input"},p("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((e,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:e=>{this.setSearchResultsPerPage(Number(e.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function No(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Do);break;case"searchcraft-select":customElements.get(t)||ua();break}})}const zo=No,Ho=ua,Uo=ra;var ha={exports:{}};(function(r,t){(function(e,s){r.exports=s()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Zs,function(){var qe;var e={},s=e,a={exports:e},o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,f=(d,i)=>{for(var h in i)o(d,h,{get:i[h],enumerable:!0})},m=(d,i,h,g)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of l(i))!u.call(d,v)&&v!==h&&o(d,v,{get:()=>i[v],enumerable:!(g=n(i,v))||g.enumerable});return d},C=d=>m(o({},"__esModule",{value:!0}),d),E={};f(E,{Hooks:()=>Ve,Lexer:()=>_e,Marked:()=>vr,Parser:()=>Re,Renderer:()=>se,TextRenderer:()=>at,Tokenizer:()=>dt,defaults:()=>I,getDefaults:()=>P,lexer:()=>te,marked:()=>q,options:()=>yr,parse:()=>ie,parseInline:()=>Cr,parser:()=>xr,setOptions:()=>vs,use:()=>kr,walkTokens:()=>ae}),a.exports=C(E);function P(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I=P();function H(d){I=d}var D={exec:()=>null};function $(d,i=""){let h=typeof d=="string"?d:d.source;const g={replace:(v,y)=>{let S=typeof y=="string"?y:y.source;return S=S.replace(A.caret,"$1"),h=h.replace(v,S),g},getRegex:()=>new RegExp(h,i)};return g}var A={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:d=>new RegExp(`^( {0,3}${d})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:d=>new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:d=>new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:d=>new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:d=>new RegExp(`^ {0,${Math.min(3,d-1)}}#`),htmlBeginRegex:d=>new RegExp(`^ {0,${Math.min(3,d-1)}}<(?:[a-z].*>|!--)`,"i")},B=/^(?:[ \t]*(?:\n|$))+/,Z=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,be=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,re=/(?:[*+-]|\d{1,9}[.)])/,Le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=$(Le).replace(/bull/g,re).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(),as=$(Le).replace(/bull/g,re).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(),N=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ns=/^[^\n]+/,Ae=/(?!\s*\])(?:\\.|[^\[\]\\])+/,it=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ae).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lr=$(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,re).getRegex(),tt="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",ct=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,os=$("^ {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",ct).replace("tag",tt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yt=$(N).replace("hr",Y).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",tt).getRegex(),is=$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yt).getRegex(),kt={blockquote:is,code:Z,def:it,fences:oe,heading:be,hr:Y,html:os,lheading:ce,list:lr,newline:B,paragraph:yt,table:D,text:ns},Ft=$("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).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",tt).getRegex(),Dt={...kt,lheading:as,table:Ft,paragraph:$(N).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ft).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",tt).getRegex()},ur={...kt,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ct).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:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(N).replace("hr",Y).replace("heading",` *#{1,6} *[^
7
+ ]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hr=/^( {2,}|\\)\n(?!\s*$)/,ls=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xt=/[\p{P}\p{S}]/u,Nt=/[\s\p{P}\p{S}]/u,zt=/[^\s\p{P}\p{S}]/u,us=$(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nt).getRegex(),dr=/(?!~)[\p{P}\p{S}]/u,fr=/(?!~)[\s\p{P}\p{S}]/u,hs=/(?:[^\s\p{P}\p{S}]|~)/u,pr=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,rt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ds=$(rt,"u").replace(/punct/g,xt).getRegex(),fs=$(rt,"u").replace(/punct/g,dr).getRegex(),Ht="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mr=$(Ht,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),ps=$(Ht,"gu").replace(/notPunctSpace/g,hs).replace(/punctSpace/g,fr).replace(/punct/g,dr).getRegex(),U=$("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),O=$(/\\(punct)/,"gu").replace(/punct/g,xt).getRegex(),j=$(/^<(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(),V=$(ct).replace("(?:-->|$)","-->").getRegex(),le=$("^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",V).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Se=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,st=$(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Se).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wt=$(/^!?\[(label)\]\[(ref)\]/).replace("label",Se).replace("ref",Ae).getRegex(),Ut=$(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ae).getRegex(),lt=$("reflink|nolink(?!\\()","g").replace("reflink",wt).replace("nolink",Ut).getRegex(),Bt={_backpedal:D,anyPunctuation:O,autolink:j,blockSkip:pr,br:hr,code:cs,del:D,emStrongLDelim:ds,emStrongRDelimAst:mr,emStrongRDelimUnd:U,escape:Ct,link:st,nolink:Ut,punctuation:us,reflink:wt,reflinkSearch:lt,tag:le,text:ls,url:D},ms={...Bt,link:$(/^!?\[(label)\]\((.*?)\)/).replace("label",Se).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Se).getRegex()},Vt={...Bt,emStrongRDelimAst:ps,emStrongLDelim:fs,url:$(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},St={...Vt,br:$(hr).replace("{2,}","*").getRegex(),text:$(Vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fe={normal:kt,gfm:Dt,pedantic:ur},ut={normal:Bt,gfm:Vt,breaks:St,pedantic:ms},gs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gr=d=>gs[d];function $e(d,i){if(i){if(A.escapeTest.test(d))return d.replace(A.escapeReplace,gr)}else if(A.escapeTestNoEncode.test(d))return d.replace(A.escapeReplaceNoEncode,gr);return d}function ht(d){try{d=encodeURI(d).replace(A.percentDecode,"%")}catch{return null}return d}function ue(d,i){var y;const h=d.replace(A.findPipe,(S,k,T)=>{let x=!1,w=k;for(;--w>=0&&T[w]==="\\";)x=!x;return x?"|":" |"}),g=h.split(A.splitPipe);let v=0;if(g[0].trim()||g.shift(),g.length>0&&!((y=g.at(-1))!=null&&y.trim())&&g.pop(),i)if(g.length>i)g.splice(i);else for(;g.length<i;)g.push("");for(;v<g.length;v++)g[v]=g[v].trim().replace(A.slashPipe,"|");return g}function Me(d,i,h){const g=d.length;if(g===0)return"";let v=0;for(;v<g&&d.charAt(g-v-1)===i;)v++;return d.slice(0,g-v)}function jt(d,i){if(d.indexOf(i[1])===-1)return-1;let h=0;for(let g=0;g<d.length;g++)if(d[g]==="\\")g++;else if(d[g]===i[0])h++;else if(d[g]===i[1]&&(h--,h<0))return g;return h>0?-2:-1}function br(d,i,h,g,v){const y=i.href,S=i.title||null,k=d[1].replace(v.other.outputLinkReplace,"$1");g.state.inLink=!0;const T={type:d[0].charAt(0)==="!"?"image":"link",raw:h,href:y,title:S,text:k,tokens:g.inlineTokens(k)};return g.state.inLink=!1,T}function bs(d,i,h){const g=d.match(h.other.indentCodeCompensation);if(g===null)return i;const v=g[1];return i.split(`
8
8
  `).map(y=>{const S=y.match(h.other.beginningSpace);if(S===null)return y;const[k]=S;return k.length>=v.length?y.slice(v.length):y}).join(`
9
- `)}var ft=class{constructor(f){c(this,"options");c(this,"rules");c(this,"lexer");this.options=f||I}space(f){const i=this.rules.block.newline.exec(f);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(f){const i=this.rules.block.code.exec(f);if(i){const h=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?h:Me(h,`
10
- `)}}}fences(f){const i=this.rules.block.fences.exec(f);if(i){const h=i[0],g=ys(h,i[3]||"",this.rules);return{type:"code",raw:h,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:g}}}heading(f){const i=this.rules.block.heading.exec(f);if(i){let h=i[2].trim();if(this.rules.other.endingHash.test(h)){const g=Me(h,"#");(this.options.pedantic||!g||this.rules.other.endingSpaceChar.test(g))&&(h=g.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(f){const i=this.rules.block.hr.exec(f);if(i)return{type:"hr",raw:Me(i[0],`
11
- `)}}blockquote(f){const i=this.rules.block.blockquote.exec(f);if(i){let h=Me(i[0],`
9
+ `)}var dt=class{constructor(d){c(this,"options");c(this,"rules");c(this,"lexer");this.options=d||I}space(d){const i=this.rules.block.newline.exec(d);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(d){const i=this.rules.block.code.exec(d);if(i){const h=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?h:Me(h,`
10
+ `)}}}fences(d){const i=this.rules.block.fences.exec(d);if(i){const h=i[0],g=bs(h,i[3]||"",this.rules);return{type:"code",raw:h,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:g}}}heading(d){const i=this.rules.block.heading.exec(d);if(i){let h=i[2].trim();if(this.rules.other.endingHash.test(h)){const g=Me(h,"#");(this.options.pedantic||!g||this.rules.other.endingSpaceChar.test(g))&&(h=g.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(d){const i=this.rules.block.hr.exec(d);if(i)return{type:"hr",raw:Me(i[0],`
11
+ `)}}blockquote(d){const i=this.rules.block.blockquote.exec(d);if(i){let h=Me(i[0],`
12
12
  `).split(`
13
13
  `),g="",v="";const y=[];for(;h.length>0;){let S=!1;const k=[];let T;for(T=0;T<h.length;T++)if(this.rules.other.blockquoteStart.test(h[T]))k.push(h[T]),S=!0;else if(!S)k.push(h[T]);else break;h=h.slice(T);const x=k.join(`
14
14
  `),w=x.replace(this.rules.other.blockquoteSetextReplace,`
@@ -19,16 +19,16 @@ ${w}`:w;const W=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
19
19
  `),ve=this.blockquote(G);y[y.length-1]=ve,g=g.substring(0,g.length-ne.raw.length)+ve.raw,v=v.substring(0,v.length-ne.text.length)+ve.text;break}else if((_==null?void 0:_.type)==="list"){const ne=_,G=ne.raw+`
20
20
  `+h.join(`
21
21
  `),ve=this.list(G);y[y.length-1]=ve,g=g.substring(0,g.length-_.raw.length)+ve.raw,v=v.substring(0,v.length-ne.raw.length)+ve.raw,h=G.substring(y.at(-1).raw.length).split(`
22
- `);continue}}return{type:"blockquote",raw:g,tokens:y,text:v}}}list(f){let i=this.rules.block.list.exec(f);if(i){let h=i[1].trim();const g=h.length>1,v={type:"list",raw:"",ordered:g,start:g?+h.slice(0,-1):"",loose:!1,items:[]};h=g?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=g?h:"[*+-]");const y=this.rules.other.listItemRegex(h);let S=!1;for(;f;){let T=!1,x="",w="";if(!(i=y.exec(f))||this.rules.block.hr.test(f))break;x=i[0],f=f.substring(x.length);let W=i[2].split(`
23
- `,1)[0].replace(this.rules.other.listReplaceTabs,Ge=>" ".repeat(3*Ge.length)),_=f.split(`
22
+ `);continue}}return{type:"blockquote",raw:g,tokens:y,text:v}}}list(d){let i=this.rules.block.list.exec(d);if(i){let h=i[1].trim();const g=h.length>1,v={type:"list",raw:"",ordered:g,start:g?+h.slice(0,-1):"",loose:!1,items:[]};h=g?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=g?h:"[*+-]");const y=this.rules.other.listItemRegex(h);let S=!1;for(;d;){let T=!1,x="",w="";if(!(i=y.exec(d))||this.rules.block.hr.test(d))break;x=i[0],d=d.substring(x.length);let W=i[2].split(`
23
+ `,1)[0].replace(this.rules.other.listReplaceTabs,Ge=>" ".repeat(3*Ge.length)),_=d.split(`
24
24
  `,1)[0],ne=!W.trim(),G=0;if(this.options.pedantic?(G=2,w=W.trimStart()):ne?G=i[1].length+1:(G=i[2].search(this.rules.other.nonSpaceChar),G=G>4?1:G,w=W.slice(G),G+=i[1].length),ne&&this.rules.other.blankLine.test(_)&&(x+=_+`
25
- `,f=f.substring(_.length+1),T=!0),!T){const Ge=this.rules.other.nextBulletRegex(G),We=this.rules.other.hrRegex(G),Ze=this.rules.other.fencesBeginRegex(G),qt=this.rules.other.headingBeginRegex(G),wr=this.rules.other.htmlBeginRegex(G);for(;f;){const Et=f.split(`
25
+ `,d=d.substring(_.length+1),T=!0),!T){const Ge=this.rules.other.nextBulletRegex(G),We=this.rules.other.hrRegex(G),Ze=this.rules.other.fencesBeginRegex(G),qt=this.rules.other.headingBeginRegex(G),wr=this.rules.other.htmlBeginRegex(G);for(;d;){const Et=d.split(`
26
26
  `,1)[0];let Ye;if(_=Et,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),Ye=_):Ye=_.replace(this.rules.other.tabCharGlobal," "),Ze.test(_)||qt.test(_)||wr.test(_)||Ge.test(_)||We.test(_))break;if(Ye.search(this.rules.other.nonSpaceChar)>=G||!_.trim())w+=`
27
27
  `+Ye.slice(G);else{if(ne||W.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ze.test(W)||qt.test(W)||We.test(W))break;w+=`
28
28
  `+_}!ne&&!_.trim()&&(ne=!0),x+=Et+`
29
- `,f=f.substring(Et.length+1),W=Ye.slice(G)}}v.loose||(S?v.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(S=!0));let ve=null,Rt;this.options.gfm&&(ve=this.rules.other.listIsTask.exec(w),ve&&(Rt=ve[0]!=="[ ] ",w=w.replace(this.rules.other.listReplaceTask,""))),v.items.push({type:"list_item",raw:x,task:!!ve,checked:Rt,loose:!1,text:w,tokens:[]}),v.raw+=x}const k=v.items.at(-1);if(k)k.raw=k.raw.trimEnd(),k.text=k.text.trimEnd();else return;v.raw=v.raw.trimEnd();for(let T=0;T<v.items.length;T++)if(this.lexer.state.top=!1,v.items[T].tokens=this.lexer.blockTokens(v.items[T].text,[]),!v.loose){const x=v.items[T].tokens.filter(W=>W.type==="space"),w=x.length>0&&x.some(W=>this.rules.other.anyLine.test(W.raw));v.loose=w}if(v.loose)for(let T=0;T<v.items.length;T++)v.items[T].loose=!0;return v}}html(f){const i=this.rules.block.html.exec(f);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(f){const i=this.rules.block.def.exec(f);if(i){const h=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),g=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:h,raw:i[0],href:g,title:v}}}table(f){var S;const i=this.rules.block.table.exec(f);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const h=ue(i[1]),g=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),v=(S=i[3])!=null&&S.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
- `):[],y={type:"table",raw:i[0],header:[],align:[],rows:[]};if(h.length===g.length){for(const k of g)this.rules.other.tableAlignRight.test(k)?y.align.push("right"):this.rules.other.tableAlignCenter.test(k)?y.align.push("center"):this.rules.other.tableAlignLeft.test(k)?y.align.push("left"):y.align.push(null);for(let k=0;k<h.length;k++)y.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:y.align[k]});for(const k of v)y.rows.push(ue(k,y.header.length).map((T,x)=>({text:T,tokens:this.lexer.inline(T),header:!1,align:y.align[x]})));return y}}lheading(f){const i=this.rules.block.lheading.exec(f);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(f){const i=this.rules.block.paragraph.exec(f);if(i){const h=i[1].charAt(i[1].length-1)===`
31
- `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:h,tokens:this.lexer.inline(h)}}}text(f){const i=this.rules.block.text.exec(f);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(f){const i=this.rules.inline.escape.exec(f);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(f){const i=this.rules.inline.tag.exec(f);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(f){const i=this.rules.inline.link.exec(f);if(i){const h=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;const y=Me(h.slice(0,-1),"\\");if((h.length-y.length)%2===0)return}else{const y=Vt(i[2],"()");if(y===-2)return;if(y>-1){const k=(i[0].indexOf("!")===0?5:4)+i[1].length+y;i[2]=i[2].substring(0,y),i[0]=i[0].substring(0,k).trim(),i[3]=""}}let g=i[2],v="";if(this.options.pedantic){const y=this.rules.other.pedanticHrefTitle.exec(g);y&&(g=y[1],v=y[3])}else v=i[3]?i[3].slice(1,-1):"";return g=g.trim(),this.rules.other.startAngleBracket.test(g)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?g=g.slice(1):g=g.slice(1,-1)),br(i,{href:g&&g.replace(this.rules.inline.anyPunctuation,"$1"),title:v&&v.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(f,i){let h;if((h=this.rules.inline.reflink.exec(f))||(h=this.rules.inline.nolink.exec(f))){const g=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),v=i[g.toLowerCase()];if(!v){const y=h[0].charAt(0);return{type:"text",raw:y,text:y}}return br(h,v,h[0],this.lexer,this.rules)}}emStrong(f,i,h=""){let g=this.rules.inline.emStrongLDelim.exec(f);if(!g||g[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(g[1]||g[2]||"")||!h||this.rules.inline.punctuation.exec(h)){const y=[...g[0]].length-1;let S,k,T=y,x=0;const w=g[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,i=i.slice(-1*f.length+y);(g=w.exec(i))!=null;){if(S=g[1]||g[2]||g[3]||g[4]||g[5]||g[6],!S)continue;if(k=[...S].length,g[3]||g[4]){T+=k;continue}else if((g[5]||g[6])&&y%3&&!((y+k)%3)){x+=k;continue}if(T-=k,T>0)continue;k=Math.min(k,k+T+x);const W=[...g[0]][0].length,_=f.slice(0,y+g.index+W+k);if(Math.min(y,k)%2){const G=_.slice(1,-1);return{type:"em",raw:_,text:G,tokens:this.lexer.inlineTokens(G)}}const ne=_.slice(2,-2);return{type:"strong",raw:_,text:ne,tokens:this.lexer.inlineTokens(ne)}}}}codespan(f){const i=this.rules.inline.code.exec(f);if(i){let h=i[2].replace(this.rules.other.newLineCharGlobal," ");const g=this.rules.other.nonSpaceChar.test(h),v=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return g&&v&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:i[0],text:h}}}br(f){const i=this.rules.inline.br.exec(f);if(i)return{type:"br",raw:i[0]}}del(f){const i=this.rules.inline.del.exec(f);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(f){const i=this.rules.inline.autolink.exec(f);if(i){let h,g;return i[2]==="@"?(h=i[1],g="mailto:"+h):(h=i[1],g=h),{type:"link",raw:i[0],text:h,href:g,tokens:[{type:"text",raw:h,text:h}]}}}url(f){var h;let i;if(i=this.rules.inline.url.exec(f)){let g,v;if(i[2]==="@")g=i[0],v="mailto:"+g;else{let y;do y=i[0],i[0]=((h=this.rules.inline._backpedal.exec(i[0]))==null?void 0:h[0])??"";while(y!==i[0]);g=i[0],i[1]==="www."?v="http://"+i[0]:v=i[0]}return{type:"link",raw:i[0],text:g,href:v,tokens:[{type:"text",raw:g,text:g}]}}}inlineText(f){const i=this.rules.inline.text.exec(f);if(i){const h=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:h}}}},_e=class Rs{constructor(i){c(this,"tokens");c(this,"options");c(this,"state");c(this,"tokenizer");c(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||I,this.options.tokenizer=this.options.tokenizer||new ft,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 h={other:A,block:Fe.normal,inline:ut.normal};this.options.pedantic?(h.block=Fe.pedantic,h.inline=ut.pedantic):this.options.gfm&&(h.block=Fe.gfm,this.options.breaks?h.inline=ut.breaks:h.inline=ut.gfm),this.tokenizer.rules=h}static get rules(){return{block:Fe,inline:ut}}static lex(i,h){return new Rs(h).lex(i)}static lexInline(i,h){return new Rs(h).inlineTokens(i)}lex(i){i=i.replace(A.carriageReturn,`
29
+ `,d=d.substring(Et.length+1),W=Ye.slice(G)}}v.loose||(S?v.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(S=!0));let ve=null,Rt;this.options.gfm&&(ve=this.rules.other.listIsTask.exec(w),ve&&(Rt=ve[0]!=="[ ] ",w=w.replace(this.rules.other.listReplaceTask,""))),v.items.push({type:"list_item",raw:x,task:!!ve,checked:Rt,loose:!1,text:w,tokens:[]}),v.raw+=x}const k=v.items.at(-1);if(k)k.raw=k.raw.trimEnd(),k.text=k.text.trimEnd();else return;v.raw=v.raw.trimEnd();for(let T=0;T<v.items.length;T++)if(this.lexer.state.top=!1,v.items[T].tokens=this.lexer.blockTokens(v.items[T].text,[]),!v.loose){const x=v.items[T].tokens.filter(W=>W.type==="space"),w=x.length>0&&x.some(W=>this.rules.other.anyLine.test(W.raw));v.loose=w}if(v.loose)for(let T=0;T<v.items.length;T++)v.items[T].loose=!0;return v}}html(d){const i=this.rules.block.html.exec(d);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(d){const i=this.rules.block.def.exec(d);if(i){const h=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),g=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:h,raw:i[0],href:g,title:v}}}table(d){var S;const i=this.rules.block.table.exec(d);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const h=ue(i[1]),g=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),v=(S=i[3])!=null&&S.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],y={type:"table",raw:i[0],header:[],align:[],rows:[]};if(h.length===g.length){for(const k of g)this.rules.other.tableAlignRight.test(k)?y.align.push("right"):this.rules.other.tableAlignCenter.test(k)?y.align.push("center"):this.rules.other.tableAlignLeft.test(k)?y.align.push("left"):y.align.push(null);for(let k=0;k<h.length;k++)y.header.push({text:h[k],tokens:this.lexer.inline(h[k]),header:!0,align:y.align[k]});for(const k of v)y.rows.push(ue(k,y.header.length).map((T,x)=>({text:T,tokens:this.lexer.inline(T),header:!1,align:y.align[x]})));return y}}lheading(d){const i=this.rules.block.lheading.exec(d);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(d){const i=this.rules.block.paragraph.exec(d);if(i){const h=i[1].charAt(i[1].length-1)===`
31
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:h,tokens:this.lexer.inline(h)}}}text(d){const i=this.rules.block.text.exec(d);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(d){const i=this.rules.inline.escape.exec(d);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(d){const i=this.rules.inline.tag.exec(d);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(d){const i=this.rules.inline.link.exec(d);if(i){const h=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(h)){if(!this.rules.other.endAngleBracket.test(h))return;const y=Me(h.slice(0,-1),"\\");if((h.length-y.length)%2===0)return}else{const y=jt(i[2],"()");if(y===-2)return;if(y>-1){const k=(i[0].indexOf("!")===0?5:4)+i[1].length+y;i[2]=i[2].substring(0,y),i[0]=i[0].substring(0,k).trim(),i[3]=""}}let g=i[2],v="";if(this.options.pedantic){const y=this.rules.other.pedanticHrefTitle.exec(g);y&&(g=y[1],v=y[3])}else v=i[3]?i[3].slice(1,-1):"";return g=g.trim(),this.rules.other.startAngleBracket.test(g)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(h)?g=g.slice(1):g=g.slice(1,-1)),br(i,{href:g&&g.replace(this.rules.inline.anyPunctuation,"$1"),title:v&&v.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(d,i){let h;if((h=this.rules.inline.reflink.exec(d))||(h=this.rules.inline.nolink.exec(d))){const g=(h[2]||h[1]).replace(this.rules.other.multipleSpaceGlobal," "),v=i[g.toLowerCase()];if(!v){const y=h[0].charAt(0);return{type:"text",raw:y,text:y}}return br(h,v,h[0],this.lexer,this.rules)}}emStrong(d,i,h=""){let g=this.rules.inline.emStrongLDelim.exec(d);if(!g||g[3]&&h.match(this.rules.other.unicodeAlphaNumeric))return;if(!(g[1]||g[2]||"")||!h||this.rules.inline.punctuation.exec(h)){const y=[...g[0]].length-1;let S,k,T=y,x=0;const w=g[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,i=i.slice(-1*d.length+y);(g=w.exec(i))!=null;){if(S=g[1]||g[2]||g[3]||g[4]||g[5]||g[6],!S)continue;if(k=[...S].length,g[3]||g[4]){T+=k;continue}else if((g[5]||g[6])&&y%3&&!((y+k)%3)){x+=k;continue}if(T-=k,T>0)continue;k=Math.min(k,k+T+x);const W=[...g[0]][0].length,_=d.slice(0,y+g.index+W+k);if(Math.min(y,k)%2){const G=_.slice(1,-1);return{type:"em",raw:_,text:G,tokens:this.lexer.inlineTokens(G)}}const ne=_.slice(2,-2);return{type:"strong",raw:_,text:ne,tokens:this.lexer.inlineTokens(ne)}}}}codespan(d){const i=this.rules.inline.code.exec(d);if(i){let h=i[2].replace(this.rules.other.newLineCharGlobal," ");const g=this.rules.other.nonSpaceChar.test(h),v=this.rules.other.startingSpaceChar.test(h)&&this.rules.other.endingSpaceChar.test(h);return g&&v&&(h=h.substring(1,h.length-1)),{type:"codespan",raw:i[0],text:h}}}br(d){const i=this.rules.inline.br.exec(d);if(i)return{type:"br",raw:i[0]}}del(d){const i=this.rules.inline.del.exec(d);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(d){const i=this.rules.inline.autolink.exec(d);if(i){let h,g;return i[2]==="@"?(h=i[1],g="mailto:"+h):(h=i[1],g=h),{type:"link",raw:i[0],text:h,href:g,tokens:[{type:"text",raw:h,text:h}]}}}url(d){var h;let i;if(i=this.rules.inline.url.exec(d)){let g,v;if(i[2]==="@")g=i[0],v="mailto:"+g;else{let y;do y=i[0],i[0]=((h=this.rules.inline._backpedal.exec(i[0]))==null?void 0:h[0])??"";while(y!==i[0]);g=i[0],i[1]==="www."?v="http://"+i[0]:v=i[0]}return{type:"link",raw:i[0],text:g,href:v,tokens:[{type:"text",raw:g,text:g}]}}}inlineText(d){const i=this.rules.inline.text.exec(d);if(i){const h=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:h}}}},_e=class ws{constructor(i){c(this,"tokens");c(this,"options");c(this,"state");c(this,"tokenizer");c(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||I,this.options.tokenizer=this.options.tokenizer||new dt,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 h={other:A,block:Fe.normal,inline:ut.normal};this.options.pedantic?(h.block=Fe.pedantic,h.inline=ut.pedantic):this.options.gfm&&(h.block=Fe.gfm,this.options.breaks?h.inline=ut.breaks:h.inline=ut.gfm),this.tokenizer.rules=h}static get rules(){return{block:Fe,inline:ut}}static lex(i,h){return new ws(h).lex(i)}static lexInline(i,h){return new ws(h).inlineTokens(i)}lex(i){i=i.replace(A.carriageReturn,`
32
32
  `),this.blockTokens(i,this.tokens);for(let h=0;h<this.inlineQueue.length;h++){const g=this.inlineQueue[h];this.inlineTokens(g.src,g.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,h=[],g=!1){var v,y,S;for(this.options.pedantic&&(i=i.replace(A.tabCharGlobal," ").replace(A.spaceLine,""));i;){let k;if((y=(v=this.options.extensions)==null?void 0:v.block)!=null&&y.some(x=>(k=x.call({lexer:this},i,h))?(i=i.substring(k.raw.length),h.push(k),!0):!1))continue;if(k=this.tokenizer.space(i)){i=i.substring(k.raw.length);const x=h.at(-1);k.raw.length===1&&x!==void 0?x.raw+=`
33
33
  `:h.push(k);continue}if(k=this.tokenizer.code(i)){i=i.substring(k.raw.length);const x=h.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=`
34
34
  `+k.raw,x.text+=`
@@ -38,28 +38,28 @@ ${w}`:w;const W=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
38
38
  `+k.raw,x.text+=`
39
39
  `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):h.push(k),g=T.length!==i.length,i=i.substring(k.raw.length);continue}if(k=this.tokenizer.text(i)){i=i.substring(k.raw.length);const x=h.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=`
40
40
  `+k.raw,x.text+=`
41
- `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):h.push(k);continue}if(i){const x="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return this.state.top=!0,h}inline(i,h=[]){return this.inlineQueue.push({src:i,tokens:h}),h}inlineTokens(i,h=[]){var k,T,x;let g=i,v=null;if(this.tokens.links){const w=Object.keys(this.tokens.links);if(w.length>0)for(;(v=this.tokenizer.rules.inline.reflinkSearch.exec(g))!=null;)w.includes(v[0].slice(v[0].lastIndexOf("[")+1,-1))&&(g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(v=this.tokenizer.rules.inline.anyPunctuation.exec(g))!=null;)g=g.slice(0,v.index)+"++"+g.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(v=this.tokenizer.rules.inline.blockSkip.exec(g))!=null;)g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let y=!1,S="";for(;i;){y||(S=""),y=!1;let w;if((T=(k=this.options.extensions)==null?void 0:k.inline)!=null&&T.some(_=>(w=_.call({lexer:this},i,h))?(i=i.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(w.raw.length);const _=h.at(-1);w.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=w.raw,_.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(i,g,S)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(i)){i=i.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(i))){i=i.substring(w.raw.length),h.push(w);continue}let W=i;if((x=this.options.extensions)!=null&&x.startInline){let _=1/0;const ne=i.slice(1);let G;this.options.extensions.startInline.forEach(ve=>{G=ve.call({lexer:this},ne),typeof G=="number"&&G>=0&&(_=Math.min(_,G))}),_<1/0&&_>=0&&(W=i.substring(0,_+1))}if(w=this.tokenizer.inlineText(W)){i=i.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(S=w.raw.slice(-1)),y=!0;const _=h.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=w.raw,_.text+=w.text):h.push(w);continue}if(i){const _="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return h}},se=class{constructor(f){c(this,"options");c(this,"parser");this.options=f||I}space(f){return""}code({text:f,lang:i,escaped:h}){var y;const g=(y=(i||"").match(A.notSpaceStart))==null?void 0:y[0],v=f.replace(A.endingNewline,"")+`
41
+ `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):h.push(k);continue}if(i){const x="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return this.state.top=!0,h}inline(i,h=[]){return this.inlineQueue.push({src:i,tokens:h}),h}inlineTokens(i,h=[]){var k,T,x;let g=i,v=null;if(this.tokens.links){const w=Object.keys(this.tokens.links);if(w.length>0)for(;(v=this.tokenizer.rules.inline.reflinkSearch.exec(g))!=null;)w.includes(v[0].slice(v[0].lastIndexOf("[")+1,-1))&&(g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(v=this.tokenizer.rules.inline.anyPunctuation.exec(g))!=null;)g=g.slice(0,v.index)+"++"+g.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(v=this.tokenizer.rules.inline.blockSkip.exec(g))!=null;)g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let y=!1,S="";for(;i;){y||(S=""),y=!1;let w;if((T=(k=this.options.extensions)==null?void 0:k.inline)!=null&&T.some(_=>(w=_.call({lexer:this},i,h))?(i=i.substring(w.raw.length),h.push(w),!0):!1))continue;if(w=this.tokenizer.escape(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.tag(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.link(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(w.raw.length);const _=h.at(-1);w.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=w.raw,_.text+=w.text):h.push(w);continue}if(w=this.tokenizer.emStrong(i,g,S)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.codespan(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.br(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.del(i)){i=i.substring(w.raw.length),h.push(w);continue}if(w=this.tokenizer.autolink(i)){i=i.substring(w.raw.length),h.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(i))){i=i.substring(w.raw.length),h.push(w);continue}let W=i;if((x=this.options.extensions)!=null&&x.startInline){let _=1/0;const ne=i.slice(1);let G;this.options.extensions.startInline.forEach(ve=>{G=ve.call({lexer:this},ne),typeof G=="number"&&G>=0&&(_=Math.min(_,G))}),_<1/0&&_>=0&&(W=i.substring(0,_+1))}if(w=this.tokenizer.inlineText(W)){i=i.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(S=w.raw.slice(-1)),y=!0;const _=h.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=w.raw,_.text+=w.text):h.push(w);continue}if(i){const _="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return h}},se=class{constructor(d){c(this,"options");c(this,"parser");this.options=d||I}space(d){return""}code({text:d,lang:i,escaped:h}){var y;const g=(y=(i||"").match(A.notSpaceStart))==null?void 0:y[0],v=d.replace(A.endingNewline,"")+`
42
42
  `;return g?'<pre><code class="language-'+$e(g)+'">'+(h?v:$e(v,!0))+`</code></pre>
43
43
  `:"<pre><code>"+(h?v:$e(v,!0))+`</code></pre>
44
- `}blockquote({tokens:f}){return`<blockquote>
45
- ${this.parser.parse(f)}</blockquote>
46
- `}html({text:f}){return f}heading({tokens:f,depth:i}){return`<h${i}>${this.parser.parseInline(f)}</h${i}>
47
- `}hr(f){return`<hr>
48
- `}list(f){const i=f.ordered,h=f.start;let g="";for(let S=0;S<f.items.length;S++){const k=f.items[S];g+=this.listitem(k)}const v=i?"ol":"ul",y=i&&h!==1?' start="'+h+'"':"";return"<"+v+y+`>
44
+ `}blockquote({tokens:d}){return`<blockquote>
45
+ ${this.parser.parse(d)}</blockquote>
46
+ `}html({text:d}){return d}heading({tokens:d,depth:i}){return`<h${i}>${this.parser.parseInline(d)}</h${i}>
47
+ `}hr(d){return`<hr>
48
+ `}list(d){const i=d.ordered,h=d.start;let g="";for(let S=0;S<d.items.length;S++){const k=d.items[S];g+=this.listitem(k)}const v=i?"ol":"ul",y=i&&h!==1?' start="'+h+'"':"";return"<"+v+y+`>
49
49
  `+g+"</"+v+`>
50
- `}listitem(f){var h;let i="";if(f.task){const g=this.checkbox({checked:!!f.checked});f.loose?((h=f.tokens[0])==null?void 0:h.type)==="paragraph"?(f.tokens[0].text=g+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=g+" "+$e(f.tokens[0].tokens[0].text),f.tokens[0].tokens[0].escaped=!0)):f.tokens.unshift({type:"text",raw:g+" ",text:g+" ",escaped:!0}):i+=g+" "}return i+=this.parser.parse(f.tokens,!!f.loose),`<li>${i}</li>
51
- `}checkbox({checked:f}){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:f}){return`<p>${this.parser.parseInline(f)}</p>
52
- `}table(f){let i="",h="";for(let v=0;v<f.header.length;v++)h+=this.tablecell(f.header[v]);i+=this.tablerow({text:h});let g="";for(let v=0;v<f.rows.length;v++){const y=f.rows[v];h="";for(let S=0;S<y.length;S++)h+=this.tablecell(y[S]);g+=this.tablerow({text:h})}return g&&(g=`<tbody>${g}</tbody>`),`<table>
50
+ `}listitem(d){var h;let i="";if(d.task){const g=this.checkbox({checked:!!d.checked});d.loose?((h=d.tokens[0])==null?void 0:h.type)==="paragraph"?(d.tokens[0].text=g+" "+d.tokens[0].text,d.tokens[0].tokens&&d.tokens[0].tokens.length>0&&d.tokens[0].tokens[0].type==="text"&&(d.tokens[0].tokens[0].text=g+" "+$e(d.tokens[0].tokens[0].text),d.tokens[0].tokens[0].escaped=!0)):d.tokens.unshift({type:"text",raw:g+" ",text:g+" ",escaped:!0}):i+=g+" "}return i+=this.parser.parse(d.tokens,!!d.loose),`<li>${i}</li>
51
+ `}checkbox({checked:d}){return"<input "+(d?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:d}){return`<p>${this.parser.parseInline(d)}</p>
52
+ `}table(d){let i="",h="";for(let v=0;v<d.header.length;v++)h+=this.tablecell(d.header[v]);i+=this.tablerow({text:h});let g="";for(let v=0;v<d.rows.length;v++){const y=d.rows[v];h="";for(let S=0;S<y.length;S++)h+=this.tablecell(y[S]);g+=this.tablerow({text:h})}return g&&(g=`<tbody>${g}</tbody>`),`<table>
53
53
  <thead>
54
54
  `+i+`</thead>
55
55
  `+g+`</table>
56
- `}tablerow({text:f}){return`<tr>
57
- ${f}</tr>
58
- `}tablecell(f){const i=this.parser.parseInline(f.tokens),h=f.header?"th":"td";return(f.align?`<${h} align="${f.align}">`:`<${h}>`)+i+`</${h}>
59
- `}strong({tokens:f}){return`<strong>${this.parser.parseInline(f)}</strong>`}em({tokens:f}){return`<em>${this.parser.parseInline(f)}</em>`}codespan({text:f}){return`<code>${$e(f,!0)}</code>`}br(f){return"<br>"}del({tokens:f}){return`<del>${this.parser.parseInline(f)}</del>`}link({href:f,title:i,tokens:h}){const g=this.parser.parseInline(h),v=ht(f);if(v===null)return g;f=v;let y='<a href="'+f+'"';return i&&(y+=' title="'+$e(i)+'"'),y+=">"+g+"</a>",y}image({href:f,title:i,text:h,tokens:g}){g&&(h=this.parser.parseInline(g,this.parser.textRenderer));const v=ht(f);if(v===null)return $e(h);f=v;let y=`<img src="${f}" alt="${h}"`;return i&&(y+=` title="${$e(i)}"`),y+=">",y}text(f){return"tokens"in f&&f.tokens?this.parser.parseInline(f.tokens):"escaped"in f&&f.escaped?f.text:$e(f.text)}},at=class{strong({text:f}){return f}em({text:f}){return f}codespan({text:f}){return f}del({text:f}){return f}html({text:f}){return f}text({text:f}){return f}link({text:f}){return""+f}image({text:f}){return""+f}br(){return""}},Re=class Es{constructor(i){c(this,"options");c(this,"renderer");c(this,"textRenderer");this.options=i||I,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new at}static parse(i,h){return new Es(h).parse(i)}static parseInline(i,h){return new Es(h).parseInline(i)}parse(i,h=!0){var v,y;let g="";for(let S=0;S<i.length;S++){const k=i[S];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=k,w=this.options.extensions.renderers[x.type].call({parser:this},x);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(x.type)){g+=w||"";continue}}const T=k;switch(T.type){case"space":{g+=this.renderer.space(T);continue}case"hr":{g+=this.renderer.hr(T);continue}case"heading":{g+=this.renderer.heading(T);continue}case"code":{g+=this.renderer.code(T);continue}case"table":{g+=this.renderer.table(T);continue}case"blockquote":{g+=this.renderer.blockquote(T);continue}case"list":{g+=this.renderer.list(T);continue}case"html":{g+=this.renderer.html(T);continue}case"paragraph":{g+=this.renderer.paragraph(T);continue}case"text":{let x=T,w=this.renderer.text(x);for(;S+1<i.length&&i[S+1].type==="text";)x=i[++S],w+=`
60
- `+this.renderer.text(x);h?g+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):g+=w;continue}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}parseInline(i,h=this.renderer){var v,y;let g="";for(let S=0;S<i.length;S++){const k=i[S];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=this.options.extensions.renderers[k.type].call({parser:this},k);if(x!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(k.type)){g+=x||"";continue}}const T=k;switch(T.type){case"escape":{g+=h.text(T);break}case"html":{g+=h.html(T);break}case"link":{g+=h.link(T);break}case"image":{g+=h.image(T);break}case"strong":{g+=h.strong(T);break}case"em":{g+=h.em(T);break}case"codespan":{g+=h.codespan(T);break}case"br":{g+=h.br(T);break}case"del":{g+=h.del(T);break}case"text":{g+=h.text(T);break}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}},je=(qe=class{constructor(f){c(this,"options");c(this,"block");this.options=f||I}preprocess(f){return f}postprocess(f){return f}processAllTokens(f){return f}provideLexer(){return this.block?_e.lex:_e.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},c(qe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),qe),vr=class{constructor(...f){c(this,"defaults",$());c(this,"options",this.setOptions);c(this,"parse",this.parseMarkdown(!0));c(this,"parseInline",this.parseMarkdown(!1));c(this,"Parser",Re);c(this,"Renderer",se);c(this,"TextRenderer",at);c(this,"Lexer",_e);c(this,"Tokenizer",ft);c(this,"Hooks",je);this.use(...f)}walkTokens(f,i){var g,v;let h=[];for(const y of f)switch(h=h.concat(i.call(this,y)),y.type){case"table":{const S=y;for(const k of S.header)h=h.concat(this.walkTokens(k.tokens,i));for(const k of S.rows)for(const T of k)h=h.concat(this.walkTokens(T.tokens,i));break}case"list":{const S=y;h=h.concat(this.walkTokens(S.items,i));break}default:{const S=y;(v=(g=this.defaults.extensions)==null?void 0:g.childTokens)!=null&&v[S.type]?this.defaults.extensions.childTokens[S.type].forEach(k=>{const T=S[k].flat(1/0);h=h.concat(this.walkTokens(T,i))}):S.tokens&&(h=h.concat(this.walkTokens(S.tokens,i)))}}return h}use(...f){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return f.forEach(h=>{const g={...h};if(g.async=this.defaults.async||g.async||!1,h.extensions&&(h.extensions.forEach(v=>{if(!v.name)throw new Error("extension name required");if("renderer"in v){const y=i.renderers[v.name];y?i.renderers[v.name]=function(...S){let k=v.renderer.apply(this,S);return k===!1&&(k=y.apply(this,S)),k}:i.renderers[v.name]=v.renderer}if("tokenizer"in v){if(!v.level||v.level!=="block"&&v.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=i[v.level];y?y.unshift(v.tokenizer):i[v.level]=[v.tokenizer],v.start&&(v.level==="block"?i.startBlock?i.startBlock.push(v.start):i.startBlock=[v.start]:v.level==="inline"&&(i.startInline?i.startInline.push(v.start):i.startInline=[v.start]))}"childTokens"in v&&v.childTokens&&(i.childTokens[v.name]=v.childTokens)}),g.extensions=i),h.renderer){const v=this.defaults.renderer||new se(this.defaults);for(const y in h.renderer){if(!(y in v))throw new Error(`renderer '${y}' does not exist`);if(["options","parser"].includes(y))continue;const S=y,k=h.renderer[S],T=v[S];v[S]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w||""}}g.renderer=v}if(h.tokenizer){const v=this.defaults.tokenizer||new ft(this.defaults);for(const y in h.tokenizer){if(!(y in v))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const S=y,k=h.tokenizer[S],T=v[S];v[S]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w}}g.tokenizer=v}if(h.hooks){const v=this.defaults.hooks||new je;for(const y in h.hooks){if(!(y in v))throw new Error(`hook '${y}' does not exist`);if(["options","block"].includes(y))continue;const S=y,k=h.hooks[S],T=v[S];je.passThroughHooks.has(y)?v[S]=x=>{if(this.defaults.async)return Promise.resolve(k.call(v,x)).then(W=>T.call(v,W));const w=k.call(v,x);return T.call(v,w)}:v[S]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w}}g.hooks=v}if(h.walkTokens){const v=this.defaults.walkTokens,y=h.walkTokens;g.walkTokens=function(S){let k=[];return k.push(y.call(this,S)),v&&(k=k.concat(v.call(this,S))),k}}this.defaults={...this.defaults,...g}}),this}setOptions(f){return this.defaults={...this.defaults,...f},this}lexer(f,i){return _e.lex(f,i??this.defaults)}parser(f,i){return Re.parse(f,i??this.defaults)}parseMarkdown(f){return(h,g)=>{const v={...g},y={...this.defaults,...v},S=this.onError(!!y.silent,!!y.async);if(this.defaults.async===!0&&v.async===!1)return S(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 h>"u"||h===null)return S(new Error("marked(): input parameter is undefined or null"));if(typeof h!="string")return S(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(h)+", string expected"));y.hooks&&(y.hooks.options=y,y.hooks.block=f);const k=y.hooks?y.hooks.provideLexer():f?_e.lex:_e.lexInline,T=y.hooks?y.hooks.provideParser():f?Re.parse:Re.parseInline;if(y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(h):h).then(x=>k(x,y)).then(x=>y.hooks?y.hooks.processAllTokens(x):x).then(x=>y.walkTokens?Promise.all(this.walkTokens(x,y.walkTokens)).then(()=>x):x).then(x=>T(x,y)).then(x=>y.hooks?y.hooks.postprocess(x):x).catch(S);try{y.hooks&&(h=y.hooks.preprocess(h));let x=k(h,y);y.hooks&&(x=y.hooks.processAllTokens(x)),y.walkTokens&&this.walkTokens(x,y.walkTokens);let w=T(x,y);return y.hooks&&(w=y.hooks.postprocess(w)),w}catch(x){return S(x)}}}onError(f,i){return h=>{if(h.message+=`
61
- Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An error occurred:</p><pre>"+$e(h.message+"",!0)+"</pre>";return i?Promise.resolve(g):g}if(i)return Promise.reject(h);throw h}}},Ve=new vr;function q(f,i){return Ve.parse(f,i)}q.options=q.setOptions=function(f){return Ve.setOptions(f),q.defaults=Ve.defaults,H(q.defaults),q},q.getDefaults=$,q.defaults=I,q.use=function(...f){return Ve.use(...f),q.defaults=Ve.defaults,H(q.defaults),q},q.walkTokens=function(f,i){return Ve.walkTokens(f,i)},q.parseInline=Ve.parseInline,q.Parser=Re,q.parser=Re.parse,q.Renderer=se,q.TextRenderer=at,q.Lexer=_e,q.lexer=_e.lex,q.Tokenizer=ft,q.Hooks=je,q.parse=q;var yr=q.options,ks=q.setOptions,kr=q.use,ae=q.walkTokens,Cr=q.parseInline,ie=q,xr=Re.parse,te=_e.lex;return s!=t&&(a.exports=t),a.exports})})(Gr);const jo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"summary","");c(this,"isLoading",!1);c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.unsubscribe=t.store.subscribe(s=>{var o;this.summary=zr.sanitize(Gr.exports.marked.parse(s.summary)),this.isLoading=s.isSummaryLoading;const a=(o=this.hostElement)==null?void 0:o.querySelector(".searchcraft-summary-box-content");a&&(a.innerHTML=zr.sanitize(Gr.exports.marked.parse(s.summary)))})}connectedCallback(){this.cleanupCore=de.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,s;(t=this.unsubscribe)==null||t.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return p("div",{key:"71173c93d5230610c52dfda79e23ae116e55331b",class:"searchcraft-summary-box"},this.isLoading&&p("searchcraft-loading",{key:"a9a51922a4bedc975d3a76008fad5c014e8810ad",label:"LOADING"}),!this.isLoading&&p("div",{key:"bb2440d7e36972c85b1887a609fd19c463f44bc9",class:"searchcraft-summary-box-content"},this.summary))}},[0,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],isLoading:[32]}]);function Vo(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-summary-box":customElements.get(e)||customElements.define(e,jo);break;case"searchcraft-loading":customElements.get(e)||oa();break}})}const qo=Vo,Go=`[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)}: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 */
62
- `,Wo=J(class extends X{constructor(){super(),this.__registerHost()}render(){return p("style",{key:"7380c677cd9edda898cdfccf8cdb3d60e8602f14"},Go)}},[0,"searchcraft-theme"]);function Zo(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(e=>{switch(e){case"searchcraft-theme":customElements.get(e)||customElements.define(e,Wo);break}})}const Yo=Zo,Qo=aa,fa=()=>{qn(),Wn(),Yn(),Xn(),io(),uo(),ho(),po(),bo(),ko(),xo(),Eo(),To(),Po(),Io(),Mo(),Ho(),Fo(),Uo(),Bo(),qo(),Yo(),Qo()};globalThis.__scDefineCustomElements__=fa;var pe;(function(r){r[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r[r.NONE=4]="NONE"})(pe||(pe={}));class Ko{constructor(e){c(this,"logLevel");c(this,"logFormatter");this.logLevel=e.logLevel||pe.INFO,this.logFormatter=e.logFormatter||this.defaultFormatter}defaultFormatter(e,t){return`[${pe[e]}] ${new Date().toISOString()}: ${t}`}debug(e){this.logLevel<=pe.DEBUG&&console.log(this.logFormatter(pe.DEBUG,e))}info(e){this.logLevel<=pe.INFO&&console.info(this.logFormatter(pe.INFO,e))}warn(e){this.logLevel<=pe.WARN&&console.warn(this.logFormatter(pe.WARN,e))}error(e){this.logLevel<=pe.ERROR&&console.error(this.logFormatter(pe.ERROR,e))}log(e,t){switch(e){case pe.DEBUG:this.debug(t);break;case pe.INFO:this.info(t);break;case pe.WARN:this.warn(t);break;case pe.ERROR:this.error(t);break}}}const Wr=new Ko({logLevel:pe.NONE});function He(r,e,t,s){return new(t||(t=Promise))(function(a,o){function n(d){try{u(s.next(d))}catch(m){o(m)}}function l(d){try{u(s.throw(d))}catch(m){o(m)}}function u(d){var m;d.done?a(d.value):(m=d.value,m instanceof t?m:new t(function(C){C(m)})).then(n,l)}u((s=s.apply(r,[])).next())})}function Ue(r,e){var t,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(d){return function(m){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,m[0]&&(n=0)),n;)try{if(t=1,s&&(a=2&m[0]?s.return:m[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,m[1])).done)return a;switch(s=0,a&&(m=[2&m[0],a.value]),m[0]){case 0:case 1:a=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,s=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||m[0]!==6&&m[0]!==2)){n=0;continue}if(m[0]===3&&(!a||m[1]>a[0]&&m[1]<a[3])){n.label=m[1];break}if(m[0]===6&&n.label<a[1]){n.label=a[1],a=m;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(m);break}a[2]&&n.ops.pop(),n.trys.pop();continue}m=e.call(r,n)}catch(C){m=[6,C],s=0}finally{t=a=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([u,d])}}}typeof SuppressedError=="function"&&SuppressedError;var Be={exclude:[]},da={},Xo={timeout:"true"},Ie=function(r,e){typeof window<"u"&&(da[r]=e)},Jo=function(){return Object.fromEntries(Object.entries(da).filter(function(r){var e,t=r[0];return!(!((e=Be==null?void 0:Be.exclude)===null||e===void 0)&&e.includes(t))}).map(function(r){return[r[0],(0,r[1])()]}))};function nr(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var ge=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Pe(r,e){return r<<e|r>>>32-e}function Zr(r,e){var t;if(e===void 0&&(e=0),e=e?0|e:0,typeof r=="string"&&(t=r,r=new TextEncoder().encode(t).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var s=new Uint32Array([e,e,e,e]);(function(o,n){for(var l=o.byteLength/16|0,u=new Uint32Array(o,0,4*l),d=0;d<l;d++){var m=u.subarray(4*d,4*(d+1));m[0]=Math.imul(m[0],ge[0]),m[0]=Pe(m[0],15),m[0]=Math.imul(m[0],ge[1]),n[0]=n[0]^m[0],n[0]=Pe(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,m[1]=Math.imul(m[1],ge[1]),m[1]=Pe(m[1],16),m[1]=Math.imul(m[1],ge[2]),n[1]=n[1]^m[1],n[1]=Pe(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,m[2]=Math.imul(m[2],ge[2]),m[2]=Pe(m[2],17),m[2]=Math.imul(m[2],ge[3]),n[2]=n[2]^m[2],n[2]=Pe(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,m[3]=Math.imul(m[3],ge[3]),m[3]=Pe(m[3],18),m[3]=Math.imul(m[3],ge[0]),n[3]=n[3]^m[3],n[3]=Pe(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(r,s),function(o,n){var l=o.byteLength/16|0,u=o.byteLength%16,d=new Uint32Array(4),m=new Uint8Array(o,16*l,u);switch(u){case 15:d[3]=d[3]^m[14]<<16;case 14:d[3]=d[3]^m[13]<<8;case 13:d[3]=d[3]^m[12]<<0,d[3]=Math.imul(d[3],ge[3]),d[3]=Pe(d[3],18),d[3]=Math.imul(d[3],ge[0]),n[3]=n[3]^d[3];case 12:d[2]=d[2]^m[11]<<24;case 11:d[2]=d[2]^m[10]<<16;case 10:d[2]=d[2]^m[9]<<8;case 9:d[2]=d[2]^m[8]<<0,d[2]=Math.imul(d[2],ge[2]),d[2]=Pe(d[2],17),d[2]=Math.imul(d[2],ge[3]),n[2]=n[2]^d[2];case 8:d[1]=d[1]^m[7]<<24;case 7:d[1]=d[1]^m[6]<<16;case 6:d[1]=d[1]^m[5]<<8;case 5:d[1]=d[1]^m[4]<<0,d[1]=Math.imul(d[1],ge[1]),d[1]=Pe(d[1],16),d[1]=Math.imul(d[1],ge[2]),n[1]=n[1]^d[1];case 4:d[0]=d[0]^m[3]<<24;case 3:d[0]=d[0]^m[2]<<16;case 2:d[0]=d[0]^m[1]<<8;case 1:d[0]=d[0]^m[0]<<0,d[0]=Math.imul(d[0],ge[0]),d[0]=Pe(d[0],15),d[0]=Math.imul(d[0],ge[1]),n[0]=n[0]^d[0]}}(r,s),function(o,n){n[0]=n[0]^o.byteLength,n[1]=n[1]^o.byteLength,n[2]=n[2]^o.byteLength,n[3]=n[3]^o.byteLength,n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0,n[0]=nr(n[0]),n[1]=nr(n[1]),n[2]=nr(n[2]),n[3]=nr(n[3]),n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0}(r,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function ei(r,e){return new Promise(function(t){setTimeout(function(){return t(e)},r)})}function ti(r,e,t){return Promise.all(r.map(function(s){return Promise.race([s,ei(e,t)])}))}function ri(){return He(this,void 0,void 0,function(){var r,e,t,s,a;return Ue(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=Jo(),e=Object.keys(r),[4,ti(Object.values(r),(Be==null?void 0:Be.timeout)||1e3,Xo)];case 1:return t=o.sent(),s=t.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,l){a[e[l]]=n}),[2,pa(a,Be.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function pa(r,e){var t={},s=function(o){if(r.hasOwnProperty(o)){var n=r[o];if(typeof n!="object"||Array.isArray(n))e.includes(o)||(t[o]=n);else{var l=pa(n,e.map(function(u){return u.startsWith(o+".")?u.slice(o.length+1):u}));Object.keys(l).length>0&&(t[o]=l)}}};for(var a in r)s(a);return t}function si(r){return He(this,void 0,void 0,function(){var e,t;return Ue(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,ri()];case 1:return e=s.sent(),t=Zr(JSON.stringify(e)),[2,t.toString()];case 2:throw s.sent();case 3:return[2]}})})}function ai(r){for(var e=0,t=0;t<r.length;++t)e+=Math.abs(r[t]);return e}function ma(r,e,t){for(var s=[],a=0;a<r[0].data.length;a++){for(var o=[],n=0;n<r.length;n++)o.push(r[n].data[a]);s.push(ni(o))}var l=new Uint8ClampedArray(s);return new ImageData(l,e,t)}function ni(r){if(r.length===0)return 0;for(var e={},t=0,s=r;t<s.length;t++)e[o=s[t]]=(e[o]||0)+1;var a=r[0];for(var o in e)e[o]>e[a]&&(a=parseInt(o,10));return a}function Ot(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var r=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},t=0,s=[/(?<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<s.length;t++){var a=s[t],o=r.match(a);if(o&&o.groups)return{name:e[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}Ie("audio",function(){return He(this,void 0,void 0,function(){return Ue(this,function(r){return[2,new Promise(function(e,t){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,l=s.createDynamicsCompressor();l.threshold.value=-50,l.knee.value=40,l.ratio.value=12,l.attack.value=0,l.release.value=.2,o.connect(l),l.connect(s.destination),o.start(),s.oncomplete=function(u){n=u.renderedBuffer.getChannelData(0),e({sampleHash:ai(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),t(u)}})]})})});var oi=Ot().name!=="SamsungBrowser"?1:3,ga=280,ba=20;Ot().name!="Firefox"&&Ie("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(r){var e=Array.from({length:oi},function(){return function(){var t=document.createElement("canvas"),s=t.getContext("2d");if(!s)return new ImageData(1,1);t.width=ga,t.height=ba;var a=s.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"),s.fillStyle=a,s.fillRect(0,0,t.width,t.height);var o="Random Text WMwmil10Oo";s.font="23.123px Arial",s.fillStyle="black",s.fillText(o,-5,15),s.fillStyle="rgba(0, 0, 255, 0.5)",s.fillText(o,-3.3,17.7),s.beginPath(),s.moveTo(0,0),s.lineTo(2*t.width/7,t.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,t.width,t.height);return n}()});r({commonImageDataHash:Zr(ma(e,ga,ba).data.toString()).toString()})})});var Yr,ii=["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"],ci=["monospace","sans-serif","serif"];function va(r,e){if(!r)throw new Error("Canvas context not supported");return r.font="72px ".concat(e),r.measureText("WwMmLli0Oo").width}function li(){var r,e=document.createElement("canvas"),t=(r=e.getContext("webgl"))!==null&&r!==void 0?r:e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var s=(t.getParameter(t.VENDOR)||"").toString(),a=(t.getParameter(t.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=t.getExtension("WEBGL_debug_renderer_info");if(n){var l=(t.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(t.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();l&&(o.vendorUnmasked=l),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function ui(){var r=new Float32Array(1),e=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],e[3]}function hi(r,e){var t={};return e.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(d){var m=String(d);n[m]=(n[m]||0)+1});var l=o[0],u=1;return Object.keys(n).forEach(function(d){n[d]>u&&(l=d,u=n[d])}),l}(r.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(t[s]=a)}),t}function fi(){var r=[],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(s){matchMedia("(".concat(t,": ").concat(s,")")).matches&&r.push("".concat(t,": ").concat(s))})}),r}function di(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var r=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(r(e))return e}catch{return 0}return 0}Ot().name!="Firefox"&&Ie("fonts",function(){var r=this;return new Promise(function(e,t){try{(function(s){var a;He(this,void 0,void 0,function(){var o,n,l;return Ue(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(d=50,new Promise(function(C){return setTimeout(C,d,m)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=o.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(l=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:l}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var d,m})})})(function(s){var a=s.iframe;return He(r,void 0,void 0,function(){var o,n,l,u;return Ue(this,function(d){return o=a.createElement("canvas"),n=o.getContext("2d"),l=ci.map(function(m){return va(n,m)}),u={},ii.forEach(function(m){var C=va(n,m);l.includes(C)||(u[m]=C)}),e(u),[2]})})})}catch{t({error:"unsupported"})}})}),Ie("hardware",function(){return new Promise(function(r,e){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:li(),architecture:ui(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),Ie("locales",function(){return new Promise(function(r){r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),Ie("permissions",function(){return He(this,void 0,void 0,function(){var r;return Ue(this,function(e){return Yr=(Be==null?void 0:Be.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"],r=Array.from({length:(Be==null?void 0:Be.retries)||3},function(){return function(){return He(this,void 0,void 0,function(){var t,s,a,o,n;return Ue(this,function(l){switch(l.label){case 0:t={},s=0,a=Yr,l.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],l.label=2;case 2:return l.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=l.sent(),t[o]=n.state.toString(),[3,5];case 4:return l.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(r).then(function(t){return hi(t,Yr)})]})})}),Ie("plugins",function(){var r=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var t=navigator.plugins[e];r.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(s){s({plugins:r})})}),Ie("screen",function(){return new Promise(function(r){r({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:fi()})})}),Ie("system",function(){return new Promise(function(r){var e=Ot();r({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:di()})})});var ke,pi=Ot().name!=="SamsungBrowser"?1:3,F=null;Ie("webgl",function(){return He(this,void 0,void 0,function(){var r;return Ue(this,function(e){typeof document<"u"&&((ke=document.createElement("canvas")).width=200,ke.height=100,F=ke.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return r=Array.from({length:pi},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var t=`
56
+ `}tablerow({text:d}){return`<tr>
57
+ ${d}</tr>
58
+ `}tablecell(d){const i=this.parser.parseInline(d.tokens),h=d.header?"th":"td";return(d.align?`<${h} align="${d.align}">`:`<${h}>`)+i+`</${h}>
59
+ `}strong({tokens:d}){return`<strong>${this.parser.parseInline(d)}</strong>`}em({tokens:d}){return`<em>${this.parser.parseInline(d)}</em>`}codespan({text:d}){return`<code>${$e(d,!0)}</code>`}br(d){return"<br>"}del({tokens:d}){return`<del>${this.parser.parseInline(d)}</del>`}link({href:d,title:i,tokens:h}){const g=this.parser.parseInline(h),v=ht(d);if(v===null)return g;d=v;let y='<a href="'+d+'"';return i&&(y+=' title="'+$e(i)+'"'),y+=">"+g+"</a>",y}image({href:d,title:i,text:h,tokens:g}){g&&(h=this.parser.parseInline(g,this.parser.textRenderer));const v=ht(d);if(v===null)return $e(h);d=v;let y=`<img src="${d}" alt="${h}"`;return i&&(y+=` title="${$e(i)}"`),y+=">",y}text(d){return"tokens"in d&&d.tokens?this.parser.parseInline(d.tokens):"escaped"in d&&d.escaped?d.text:$e(d.text)}},at=class{strong({text:d}){return d}em({text:d}){return d}codespan({text:d}){return d}del({text:d}){return d}html({text:d}){return d}text({text:d}){return d}link({text:d}){return""+d}image({text:d}){return""+d}br(){return""}},Re=class Ss{constructor(i){c(this,"options");c(this,"renderer");c(this,"textRenderer");this.options=i||I,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new at}static parse(i,h){return new Ss(h).parse(i)}static parseInline(i,h){return new Ss(h).parseInline(i)}parse(i,h=!0){var v,y;let g="";for(let S=0;S<i.length;S++){const k=i[S];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=k,w=this.options.extensions.renderers[x.type].call({parser:this},x);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(x.type)){g+=w||"";continue}}const T=k;switch(T.type){case"space":{g+=this.renderer.space(T);continue}case"hr":{g+=this.renderer.hr(T);continue}case"heading":{g+=this.renderer.heading(T);continue}case"code":{g+=this.renderer.code(T);continue}case"table":{g+=this.renderer.table(T);continue}case"blockquote":{g+=this.renderer.blockquote(T);continue}case"list":{g+=this.renderer.list(T);continue}case"html":{g+=this.renderer.html(T);continue}case"paragraph":{g+=this.renderer.paragraph(T);continue}case"text":{let x=T,w=this.renderer.text(x);for(;S+1<i.length&&i[S+1].type==="text";)x=i[++S],w+=`
60
+ `+this.renderer.text(x);h?g+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):g+=w;continue}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}parseInline(i,h=this.renderer){var v,y;let g="";for(let S=0;S<i.length;S++){const k=i[S];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=this.options.extensions.renderers[k.type].call({parser:this},k);if(x!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(k.type)){g+=x||"";continue}}const T=k;switch(T.type){case"escape":{g+=h.text(T);break}case"html":{g+=h.html(T);break}case"link":{g+=h.link(T);break}case"image":{g+=h.image(T);break}case"strong":{g+=h.strong(T);break}case"em":{g+=h.em(T);break}case"codespan":{g+=h.codespan(T);break}case"br":{g+=h.br(T);break}case"del":{g+=h.del(T);break}case"text":{g+=h.text(T);break}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}},Ve=(qe=class{constructor(d){c(this,"options");c(this,"block");this.options=d||I}preprocess(d){return d}postprocess(d){return d}processAllTokens(d){return d}provideLexer(){return this.block?_e.lex:_e.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},c(qe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),qe),vr=class{constructor(...d){c(this,"defaults",P());c(this,"options",this.setOptions);c(this,"parse",this.parseMarkdown(!0));c(this,"parseInline",this.parseMarkdown(!1));c(this,"Parser",Re);c(this,"Renderer",se);c(this,"TextRenderer",at);c(this,"Lexer",_e);c(this,"Tokenizer",dt);c(this,"Hooks",Ve);this.use(...d)}walkTokens(d,i){var g,v;let h=[];for(const y of d)switch(h=h.concat(i.call(this,y)),y.type){case"table":{const S=y;for(const k of S.header)h=h.concat(this.walkTokens(k.tokens,i));for(const k of S.rows)for(const T of k)h=h.concat(this.walkTokens(T.tokens,i));break}case"list":{const S=y;h=h.concat(this.walkTokens(S.items,i));break}default:{const S=y;(v=(g=this.defaults.extensions)==null?void 0:g.childTokens)!=null&&v[S.type]?this.defaults.extensions.childTokens[S.type].forEach(k=>{const T=S[k].flat(1/0);h=h.concat(this.walkTokens(T,i))}):S.tokens&&(h=h.concat(this.walkTokens(S.tokens,i)))}}return h}use(...d){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return d.forEach(h=>{const g={...h};if(g.async=this.defaults.async||g.async||!1,h.extensions&&(h.extensions.forEach(v=>{if(!v.name)throw new Error("extension name required");if("renderer"in v){const y=i.renderers[v.name];y?i.renderers[v.name]=function(...S){let k=v.renderer.apply(this,S);return k===!1&&(k=y.apply(this,S)),k}:i.renderers[v.name]=v.renderer}if("tokenizer"in v){if(!v.level||v.level!=="block"&&v.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=i[v.level];y?y.unshift(v.tokenizer):i[v.level]=[v.tokenizer],v.start&&(v.level==="block"?i.startBlock?i.startBlock.push(v.start):i.startBlock=[v.start]:v.level==="inline"&&(i.startInline?i.startInline.push(v.start):i.startInline=[v.start]))}"childTokens"in v&&v.childTokens&&(i.childTokens[v.name]=v.childTokens)}),g.extensions=i),h.renderer){const v=this.defaults.renderer||new se(this.defaults);for(const y in h.renderer){if(!(y in v))throw new Error(`renderer '${y}' does not exist`);if(["options","parser"].includes(y))continue;const S=y,k=h.renderer[S],T=v[S];v[S]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w||""}}g.renderer=v}if(h.tokenizer){const v=this.defaults.tokenizer||new dt(this.defaults);for(const y in h.tokenizer){if(!(y in v))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const S=y,k=h.tokenizer[S],T=v[S];v[S]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w}}g.tokenizer=v}if(h.hooks){const v=this.defaults.hooks||new Ve;for(const y in h.hooks){if(!(y in v))throw new Error(`hook '${y}' does not exist`);if(["options","block"].includes(y))continue;const S=y,k=h.hooks[S],T=v[S];Ve.passThroughHooks.has(y)?v[S]=x=>{if(this.defaults.async)return Promise.resolve(k.call(v,x)).then(W=>T.call(v,W));const w=k.call(v,x);return T.call(v,w)}:v[S]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w}}g.hooks=v}if(h.walkTokens){const v=this.defaults.walkTokens,y=h.walkTokens;g.walkTokens=function(S){let k=[];return k.push(y.call(this,S)),v&&(k=k.concat(v.call(this,S))),k}}this.defaults={...this.defaults,...g}}),this}setOptions(d){return this.defaults={...this.defaults,...d},this}lexer(d,i){return _e.lex(d,i??this.defaults)}parser(d,i){return Re.parse(d,i??this.defaults)}parseMarkdown(d){return(h,g)=>{const v={...g},y={...this.defaults,...v},S=this.onError(!!y.silent,!!y.async);if(this.defaults.async===!0&&v.async===!1)return S(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 h>"u"||h===null)return S(new Error("marked(): input parameter is undefined or null"));if(typeof h!="string")return S(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(h)+", string expected"));y.hooks&&(y.hooks.options=y,y.hooks.block=d);const k=y.hooks?y.hooks.provideLexer():d?_e.lex:_e.lexInline,T=y.hooks?y.hooks.provideParser():d?Re.parse:Re.parseInline;if(y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(h):h).then(x=>k(x,y)).then(x=>y.hooks?y.hooks.processAllTokens(x):x).then(x=>y.walkTokens?Promise.all(this.walkTokens(x,y.walkTokens)).then(()=>x):x).then(x=>T(x,y)).then(x=>y.hooks?y.hooks.postprocess(x):x).catch(S);try{y.hooks&&(h=y.hooks.preprocess(h));let x=k(h,y);y.hooks&&(x=y.hooks.processAllTokens(x)),y.walkTokens&&this.walkTokens(x,y.walkTokens);let w=T(x,y);return y.hooks&&(w=y.hooks.postprocess(w)),w}catch(x){return S(x)}}}onError(d,i){return h=>{if(h.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,d){const g="<p>An error occurred:</p><pre>"+$e(h.message+"",!0)+"</pre>";return i?Promise.resolve(g):g}if(i)return Promise.reject(h);throw h}}},je=new vr;function q(d,i){return je.parse(d,i)}q.options=q.setOptions=function(d){return je.setOptions(d),q.defaults=je.defaults,H(q.defaults),q},q.getDefaults=P,q.defaults=I,q.use=function(...d){return je.use(...d),q.defaults=je.defaults,H(q.defaults),q},q.walkTokens=function(d,i){return je.walkTokens(d,i)},q.parseInline=je.parseInline,q.Parser=Re,q.parser=Re.parse,q.Renderer=se,q.TextRenderer=at,q.Lexer=_e,q.lexer=_e.lex,q.Tokenizer=dt,q.Hooks=Ve,q.parse=q;var yr=q.options,vs=q.setOptions,kr=q.use,ae=q.walkTokens,Cr=q.parseInline,ie=q,xr=Re.parse,te=_e.lex;return s!=e&&(a.exports=e),a.exports})})(ha);const Bo=J(class extends X{constructor(){super();c(this,"searchcraftId");c(this,"summary","");c(this,"isLoading",!1);c(this,"isSummaryNotEnabled",!1);c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){e.store.setState({hasSummaryBox:!0}),this.unsubscribe=e.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=fe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(e){this.isLoading=e.isSummaryLoading,this.isSummaryNotEnabled=e.isSummaryNotEnabled,this.summary=this.sanitizeMarkdown(e.summary),this.updateContentElement(e.summary)}sanitizeMarkdown(e){return Qs.sanitize(ha.exports.marked.parse(e))}updateContentElement(e){var a;const s=(a=this.hostElement)==null?void 0:a.querySelector(".searchcraft-summary-box-content");s&&(s.innerHTML=this.sanitizeMarkdown(e))}renderContent(){return this.isLoading?p("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?p("div",{class:"searchcraft-summary-box-content"},"AI summaries are not enabled"):p("div",{class:"searchcraft-summary-box-content"},this.summary)}render(){return p("div",{key:"c88d0bf7e12ad0fa0c019d207854a6e92babc683",class:"searchcraft-summary-box"},this.renderContent())}},[0,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function Vo(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(t=>{switch(t){case"searchcraft-summary-box":customElements.get(t)||customElements.define(t,Bo);break;case"searchcraft-loading":customElements.get(t)||na();break}})}const jo=Vo,qo=`[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)}: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 */
62
+ `,Go=J(class extends X{constructor(){super(),this.__registerHost()}render(){return p("style",{key:"ef26626cdfa4fa98d516802d71443c49a9c6ecf9"},qo)}},[0,"searchcraft-theme"]);function Wo(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,Go);break}})}const Zo=Wo,Yo=sa,da=()=>{jn(),Gn(),Zn(),Kn(),oo(),lo(),uo(),fo(),go(),yo(),Co(),Ro(),Eo(),To(),_o(),Ao(),zo(),Lo(),Ho(),Uo(),jo(),Zo(),Yo()};globalThis.__scDefineCustomElements__=da;var pe;(function(r){r[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r[r.NONE=4]="NONE"})(pe||(pe={}));class Qo{constructor(t){c(this,"logLevel");c(this,"logFormatter");this.logLevel=t.logLevel||pe.INFO,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,e){return`[${pe[t]}] ${new Date().toISOString()}: ${e}`}debug(t){this.logLevel<=pe.DEBUG&&console.log(this.logFormatter(pe.DEBUG,t))}info(t){this.logLevel<=pe.INFO&&console.info(this.logFormatter(pe.INFO,t))}warn(t){this.logLevel<=pe.WARN&&console.warn(this.logFormatter(pe.WARN,t))}error(t){this.logLevel<=pe.ERROR&&console.error(this.logFormatter(pe.ERROR,t))}log(t,e){switch(t){case pe.DEBUG:this.debug(e);break;case pe.INFO:this.info(e);break;case pe.WARN:this.warn(e);break;case pe.ERROR:this.error(e);break}}}const qr=new Qo({logLevel:pe.NONE});function He(r,t,e,s){return new(e||(e=Promise))(function(a,o){function n(f){try{u(s.next(f))}catch(m){o(m)}}function l(f){try{u(s.throw(f))}catch(m){o(m)}}function u(f){var m;f.done?a(f.value):(m=f.value,m instanceof e?m:new e(function(C){C(m)})).then(n,l)}u((s=s.apply(r,[])).next())})}function Ue(r,t){var e,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(f){return function(m){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,m[0]&&(n=0)),n;)try{if(e=1,s&&(a=2&m[0]?s.return:m[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,m[1])).done)return a;switch(s=0,a&&(m=[2&m[0],a.value]),m[0]){case 0:case 1:a=m;break;case 4:return n.label++,{value:m[1],done:!1};case 5:n.label++,s=m[1],m=[0];continue;case 7:m=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||m[0]!==6&&m[0]!==2)){n=0;continue}if(m[0]===3&&(!a||m[1]>a[0]&&m[1]<a[3])){n.label=m[1];break}if(m[0]===6&&n.label<a[1]){n.label=a[1],a=m;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(m);break}a[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(r,n)}catch(C){m=[6,C],s=0}finally{e=a=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([u,f])}}}typeof SuppressedError=="function"&&SuppressedError;var Be={exclude:[]},fa={},Ko={timeout:"true"},Ie=function(r,t){typeof window<"u"&&(fa[r]=t)},Xo=function(){return Object.fromEntries(Object.entries(fa).filter(function(r){var t,e=r[0];return!(!((t=Be==null?void 0:Be.exclude)===null||t===void 0)&&t.includes(e))}).map(function(r){return[r[0],(0,r[1])()]}))};function nr(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var ge=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Pe(r,t){return r<<t|r>>>32-t}function Gr(r,t){var e;if(t===void 0&&(t=0),t=t?0|t:0,typeof r=="string"&&(e=r,r=new TextEncoder().encode(e).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var s=new Uint32Array([t,t,t,t]);(function(o,n){for(var l=o.byteLength/16|0,u=new Uint32Array(o,0,4*l),f=0;f<l;f++){var m=u.subarray(4*f,4*(f+1));m[0]=Math.imul(m[0],ge[0]),m[0]=Pe(m[0],15),m[0]=Math.imul(m[0],ge[1]),n[0]=n[0]^m[0],n[0]=Pe(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,m[1]=Math.imul(m[1],ge[1]),m[1]=Pe(m[1],16),m[1]=Math.imul(m[1],ge[2]),n[1]=n[1]^m[1],n[1]=Pe(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,m[2]=Math.imul(m[2],ge[2]),m[2]=Pe(m[2],17),m[2]=Math.imul(m[2],ge[3]),n[2]=n[2]^m[2],n[2]=Pe(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,m[3]=Math.imul(m[3],ge[3]),m[3]=Pe(m[3],18),m[3]=Math.imul(m[3],ge[0]),n[3]=n[3]^m[3],n[3]=Pe(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(r,s),function(o,n){var l=o.byteLength/16|0,u=o.byteLength%16,f=new Uint32Array(4),m=new Uint8Array(o,16*l,u);switch(u){case 15:f[3]=f[3]^m[14]<<16;case 14:f[3]=f[3]^m[13]<<8;case 13:f[3]=f[3]^m[12]<<0,f[3]=Math.imul(f[3],ge[3]),f[3]=Pe(f[3],18),f[3]=Math.imul(f[3],ge[0]),n[3]=n[3]^f[3];case 12:f[2]=f[2]^m[11]<<24;case 11:f[2]=f[2]^m[10]<<16;case 10:f[2]=f[2]^m[9]<<8;case 9:f[2]=f[2]^m[8]<<0,f[2]=Math.imul(f[2],ge[2]),f[2]=Pe(f[2],17),f[2]=Math.imul(f[2],ge[3]),n[2]=n[2]^f[2];case 8:f[1]=f[1]^m[7]<<24;case 7:f[1]=f[1]^m[6]<<16;case 6:f[1]=f[1]^m[5]<<8;case 5:f[1]=f[1]^m[4]<<0,f[1]=Math.imul(f[1],ge[1]),f[1]=Pe(f[1],16),f[1]=Math.imul(f[1],ge[2]),n[1]=n[1]^f[1];case 4:f[0]=f[0]^m[3]<<24;case 3:f[0]=f[0]^m[2]<<16;case 2:f[0]=f[0]^m[1]<<8;case 1:f[0]=f[0]^m[0]<<0,f[0]=Math.imul(f[0],ge[0]),f[0]=Pe(f[0],15),f[0]=Math.imul(f[0],ge[1]),n[0]=n[0]^f[0]}}(r,s),function(o,n){n[0]=n[0]^o.byteLength,n[1]=n[1]^o.byteLength,n[2]=n[2]^o.byteLength,n[3]=n[3]^o.byteLength,n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0,n[0]=nr(n[0]),n[1]=nr(n[1]),n[2]=nr(n[2]),n[3]=nr(n[3]),n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0}(r,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Jo(r,t){return new Promise(function(e){setTimeout(function(){return e(t)},r)})}function ei(r,t,e){return Promise.all(r.map(function(s){return Promise.race([s,Jo(t,e)])}))}function ti(){return He(this,void 0,void 0,function(){var r,t,e,s,a;return Ue(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=Xo(),t=Object.keys(r),[4,ei(Object.values(r),(Be==null?void 0:Be.timeout)||1e3,Ko)];case 1:return e=o.sent(),s=e.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,l){a[t[l]]=n}),[2,pa(a,Be.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function pa(r,t){var e={},s=function(o){if(r.hasOwnProperty(o)){var n=r[o];if(typeof n!="object"||Array.isArray(n))t.includes(o)||(e[o]=n);else{var l=pa(n,t.map(function(u){return u.startsWith(o+".")?u.slice(o.length+1):u}));Object.keys(l).length>0&&(e[o]=l)}}};for(var a in r)s(a);return e}function ri(r){return He(this,void 0,void 0,function(){var t,e;return Ue(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,ti()];case 1:return t=s.sent(),e=Gr(JSON.stringify(t)),[2,e.toString()];case 2:throw s.sent();case 3:return[2]}})})}function si(r){for(var t=0,e=0;e<r.length;++e)t+=Math.abs(r[e]);return t}function ma(r,t,e){for(var s=[],a=0;a<r[0].data.length;a++){for(var o=[],n=0;n<r.length;n++)o.push(r[n].data[a]);s.push(ai(o))}var l=new Uint8ClampedArray(s);return new ImageData(l,t,e)}function ai(r){if(r.length===0)return 0;for(var t={},e=0,s=r;e<s.length;e++)t[o=s[e]]=(t[o]||0)+1;var a=r[0];for(var o in t)t[o]>t[a]&&(a=parseInt(o,10));return a}function Ot(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var r=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},e=0,s=[/(?<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+)?)/];e<s.length;e++){var a=s[e],o=r.match(a);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}Ie("audio",function(){return He(this,void 0,void 0,function(){return Ue(this,function(r){return[2,new Promise(function(t,e){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,l=s.createDynamicsCompressor();l.threshold.value=-50,l.knee.value=40,l.ratio.value=12,l.attack.value=0,l.release.value=.2,o.connect(l),l.connect(s.destination),o.start(),s.oncomplete=function(u){n=u.renderedBuffer.getChannelData(0),t({sampleHash:si(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),e(u)}})]})})});var ni=Ot().name!=="SamsungBrowser"?1:3,ga=280,ba=20;Ot().name!="Firefox"&&Ie("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(r){var t=Array.from({length:ni},function(){return function(){var e=document.createElement("canvas"),s=e.getContext("2d");if(!s)return new ImageData(1,1);e.width=ga,e.height=ba;var a=s.createLinearGradient(0,0,e.width,e.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"),s.fillStyle=a,s.fillRect(0,0,e.width,e.height);var o="Random Text WMwmil10Oo";s.font="23.123px Arial",s.fillStyle="black",s.fillText(o,-5,15),s.fillStyle="rgba(0, 0, 255, 0.5)",s.fillText(o,-3.3,17.7),s.beginPath(),s.moveTo(0,0),s.lineTo(2*e.width/7,e.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,e.width,e.height);return n}()});r({commonImageDataHash:Gr(ma(t,ga,ba).data.toString()).toString()})})});var Wr,oi=["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"],ii=["monospace","sans-serif","serif"];function va(r,t){if(!r)throw new Error("Canvas context not supported");return r.font="72px ".concat(t),r.measureText("WwMmLli0Oo").width}function ci(){var r,t=document.createElement("canvas"),e=(r=t.getContext("webgl"))!==null&&r!==void 0?r:t.getContext("experimental-webgl");if(e&&"getParameter"in e)try{var s=(e.getParameter(e.VENDOR)||"").toString(),a=(e.getParameter(e.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(e.getParameter(e.VERSION)||"").toString(),shadingLanguageVersion:(e.getParameter(e.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=e.getExtension("WEBGL_debug_renderer_info");if(n){var l=(e.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(e.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();l&&(o.vendorUnmasked=l),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function li(){var r=new Float32Array(1),t=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],t[3]}function ui(r,t){var e={};return t.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(f){var m=String(f);n[m]=(n[m]||0)+1});var l=o[0],u=1;return Object.keys(n).forEach(function(f){n[f]>u&&(l=f,u=n[f])}),l}(r.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(e[s]=a)}),e}function hi(){var r=[],t={"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(t).forEach(function(e){t[e].forEach(function(s){matchMedia("(".concat(e,": ").concat(s,")")).matches&&r.push("".concat(e,": ").concat(s))})}),r}function di(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var r=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(r(t))return t}catch{return 0}return 0}Ot().name!="Firefox"&&Ie("fonts",function(){var r=this;return new Promise(function(t,e){try{(function(s){var a;He(this,void 0,void 0,function(){var o,n,l;return Ue(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(f=50,new Promise(function(C){return setTimeout(C,f,m)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=o.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(l=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:l}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var f,m})})})(function(s){var a=s.iframe;return He(r,void 0,void 0,function(){var o,n,l,u;return Ue(this,function(f){return o=a.createElement("canvas"),n=o.getContext("2d"),l=ii.map(function(m){return va(n,m)}),u={},oi.forEach(function(m){var C=va(n,m);l.includes(C)||(u[m]=C)}),t(u),[2]})})})}catch{e({error:"unsupported"})}})}),Ie("hardware",function(){return new Promise(function(r,t){var e=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:ci(),architecture:li(),deviceMemory:e.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),Ie("locales",function(){return new Promise(function(r){r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),Ie("permissions",function(){return He(this,void 0,void 0,function(){var r;return Ue(this,function(t){return Wr=(Be==null?void 0:Be.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"],r=Array.from({length:(Be==null?void 0:Be.retries)||3},function(){return function(){return He(this,void 0,void 0,function(){var e,s,a,o,n;return Ue(this,function(l){switch(l.label){case 0:e={},s=0,a=Wr,l.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],l.label=2;case 2:return l.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=l.sent(),e[o]=n.state.toString(),[3,5];case 4:return l.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,e]}})})}()}),[2,Promise.all(r).then(function(e){return ui(e,Wr)})]})})}),Ie("plugins",function(){var r=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var e=navigator.plugins[t];r.push([e.name,e.filename,e.description].join("|"))}return new Promise(function(s){s({plugins:r})})}),Ie("screen",function(){return new Promise(function(r){r({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:hi()})})}),Ie("system",function(){return new Promise(function(r){var t=Ot();r({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:di()})})});var ke,fi=Ot().name!=="SamsungBrowser"?1:3,F=null;Ie("webgl",function(){return He(this,void 0,void 0,function(){var r;return Ue(this,function(t){typeof document<"u"&&((ke=document.createElement("canvas")).width=200,ke.height=100,F=ke.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return r=Array.from({length:fi},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var e=`
63
63
  attribute vec2 position;
64
64
  void main() {
65
65
  gl_Position = vec4(position, 0.0, 1.0);
@@ -69,7 +69,7 @@ Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An err
69
69
  void main() {
70
70
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
71
71
  }
72
- `,a=F.createShader(F.VERTEX_SHADER),o=F.createShader(F.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(F.shaderSource(a,t),F.shaderSource(o,s),F.compileShader(a),!F.getShaderParameter(a,F.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+F.getShaderInfoLog(a));if(F.compileShader(o),!F.getShaderParameter(o,F.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+F.getShaderInfoLog(o));var n=F.createProgram();if(!n)throw new Error("Failed to create shader program");if(F.attachShader(n,a),F.attachShader(n,o),F.linkProgram(n),!F.getProgramParameter(n,F.LINK_STATUS))throw new Error("Shader program linking failed: "+F.getProgramInfoLog(n));F.useProgram(n);for(var l=137,u=new Float32Array(4*l),d=2*Math.PI/l,m=0;m<l;m++){var C=m*d;u[4*m]=0,u[4*m+1]=0,u[4*m+2]=Math.cos(C)*(ke.width/2),u[4*m+3]=Math.sin(C)*(ke.height/2)}var E=F.createBuffer();F.bindBuffer(F.ARRAY_BUFFER,E),F.bufferData(F.ARRAY_BUFFER,u,F.STATIC_DRAW);var $=F.getAttribLocation(n,"position");F.enableVertexAttribArray($),F.vertexAttribPointer($,2,F.FLOAT,!1,0,0),F.viewport(0,0,ke.width,ke.height),F.clearColor(0,0,0,1),F.clear(F.COLOR_BUFFER_BIT),F.drawArrays(F.LINES,0,2*l);var I=new Uint8ClampedArray(ke.width*ke.height*4);return F.readPixels(0,0,ke.width,ke.height,F.RGBA,F.UNSIGNED_BYTE,I),new ImageData(I,ke.width,ke.height)}catch{return new ImageData(1,1)}finally{F&&(F.bindBuffer(F.ARRAY_BUFFER,null),F.useProgram(null),F.viewport(0,0,F.drawingBufferWidth,F.drawingBufferHeight),F.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Zr(ma(r,ke.width,ke.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var ot=function(r,e,t,s){for(var a=(t-e)/s,o=0,n=0;n<s;n++)o+=r(e+(n+.5)*a);return o*a};Ie("math",function(){return He(void 0,void 0,void 0,function(){return Ue(this,function(r){return[2,{acos:Math.acos(.5),asin:ot(Math.asin,-1,1,97),atan:ot(Math.atan,-1,1,97),cos:ot(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:ot(Math.sin,-Math.PI,Math.PI,97),sinh:ot(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:ot(Math.tan,0,2*Math.PI,97),tanh:ot(Math.tanh,-9/7,7/9,97)}]})})});class Qr{constructor(e){c(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 mi extends Qr{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()}`,n=await(await fetch(a,{method:"GET"})).json(),l=n.product_ads.map(m=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:m})),u=n.text_ads.map(m=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:m}));return l.concat(u)}async onAdContainerViewed(e){var s;const t=e.adClientResponseItem;(s=t.admAd)!=null&&s.impression_url&&fetch(t.admAd.impression_url)}}class gi extends Qr{async getAds(e){return[]}}const bi=1e3;class vi extends Qr{constructor(t){super(t);c(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,s){var a;if((((a=s.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(bi)}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(s){console.error(s)}},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 yi=600;class ki{constructor(e,t,s){c(this,"measureRequestTimeout");c(this,"measureRequestsBatched",[]);c(this,"config");c(this,"sdkInfo");c(this,"userId");c(this,"sessionId");c(this,"sendMeasureEvent",async(e,t={},s={})=>{const a={event_name:e,properties:{searchcraft_index_names:[this.config.indexName],session_id:this.sessionId,...t},user:{...this.measureRequestUser,...s}};if(e==="document_clicked"){const o=JSON.stringify(a),n=`${this.baseMeasureUrl}/event`;try{const l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(!l.ok)throw new Error(`Failed to send request: ${l.status} ${l.statusText}`)}catch(l){throw console.error("Error sending MeasureRequest:",l),l}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const o=JSON.stringify({items:this.measureRequestsBatched}),n=`${this.baseMeasureUrl}/batch`;try{const l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(this.measureRequestsBatched=[],!l.ok)throw new Error(`Failed to send request: ${l.status} ${l.statusText}`);return}catch(l){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",l),l}},yi)});this.config=e,this.sdkInfo=t,this.userId=s,this.sessionId=nt(),this.sendMeasureEvent("sdk_initialized")}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 Ci=r=>r.endsWith("/")?r.slice(0,-1):r,or=r=>{let e="";if(e=r.trim(),e=e.replace(/[‘’“”]/g,s=>({"‘":"'","’":"'","“":'"',"”":'"'})[s]||s),(e.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return e},xi=500;class wi{constructor(e,t,s){c(this,"config");c(this,"userId");c(this,"parent");c(this,"searchCompletedEventTimeout");c(this,"abortController");c(this,"supplementalAbortController");c(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.")});c(this,"getSearchResponseItems",async(e,t=!1)=>{var n,l,u,d,m,C,E;let s,a="",o;return t?((n=this.supplementalAbortController)==null||n.abort("A newer search request has replaced this one."),o=new AbortController,this.supplementalAbortController=o):((l=this.abortController)==null||l.abort("A newer search request has replaced this one."),o=new AbortController,this.abortController=o),typeof e=="string"?a=or(e):(e.searchTerm=or(e.searchTerm),a=e.searchTerm),(u=this.parent.measureClient)==null||u.sendMeasureEvent("search_requested",{search_term:a}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:a}}),(d=this.parent.adClient)==null||d.onQuerySubmitted(typeof e=="string"?{searchTerm:a,mode:"exact"}:e),typeof e=="string"?s=await this.handleGetSearchResponseItemsWithString(a,o):s=await this.handleGetSearchResponseItemsWithObject(e,o),t||((m=this.parent.measureClient)==null||m.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:s.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var $;($=this.parent.measureClient)==null||$.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:s.data.count})},xi),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((C=s.data.hits)==null?void 0:C.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(E=this.parent.adClient)==null||E.onQueryFetched(typeof e=="string"?{searchTerm:a,mode:"exact"}:e,s)),s});c(this,"handleGetSearchResponseItemsWithString",async(e,t)=>{var o;let s;try{s=JSON.parse(e),s={limit:this.config.searchResultsPerPage,...s}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:s});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":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});c(this,"handleGetSearchResponseItemsWithObject",async(e,t)=>{var o;const s={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:s});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":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),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=s}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(e){const t=[];let s="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(n=>{var u;const l=(u=e.facetPathsForIndexFields)==null?void 0:u[n];l&&(s="must",t.push({occur:"must",exact:{ctx:or(l.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(n=>{var u;const l=(u=e.rangeValueForIndexFields)==null?void 0:u[n];l&&(s="must",t.push({occur:"must",exact:{ctx:or(l.value)}}))});const a=e.searchTerm,o=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":s,...o}),t}}var ya={},Kr={};const ka=r=>{let e;const t=new Set,s=(d,m)=>{const C=typeof d=="function"?d(e):d;if(!Object.is(C,e)){const E=e;e=m??(typeof C!="object"||C===null)?C:Object.assign({},e,C),t.forEach($=>$(e,E))}},a=()=>e,l={setState:s,getState:a,getInitialState:()=>u,subscribe:d=>(t.add(d),()=>t.delete(d))},u=e=r(s,a,l);return l},Si=r=>r?ka(r):ka;Kr.createStore=Si;var Xr={},Ca={exports:{}},z={};/**
72
+ `,a=F.createShader(F.VERTEX_SHADER),o=F.createShader(F.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(F.shaderSource(a,e),F.shaderSource(o,s),F.compileShader(a),!F.getShaderParameter(a,F.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+F.getShaderInfoLog(a));if(F.compileShader(o),!F.getShaderParameter(o,F.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+F.getShaderInfoLog(o));var n=F.createProgram();if(!n)throw new Error("Failed to create shader program");if(F.attachShader(n,a),F.attachShader(n,o),F.linkProgram(n),!F.getProgramParameter(n,F.LINK_STATUS))throw new Error("Shader program linking failed: "+F.getProgramInfoLog(n));F.useProgram(n);for(var l=137,u=new Float32Array(4*l),f=2*Math.PI/l,m=0;m<l;m++){var C=m*f;u[4*m]=0,u[4*m+1]=0,u[4*m+2]=Math.cos(C)*(ke.width/2),u[4*m+3]=Math.sin(C)*(ke.height/2)}var E=F.createBuffer();F.bindBuffer(F.ARRAY_BUFFER,E),F.bufferData(F.ARRAY_BUFFER,u,F.STATIC_DRAW);var P=F.getAttribLocation(n,"position");F.enableVertexAttribArray(P),F.vertexAttribPointer(P,2,F.FLOAT,!1,0,0),F.viewport(0,0,ke.width,ke.height),F.clearColor(0,0,0,1),F.clear(F.COLOR_BUFFER_BIT),F.drawArrays(F.LINES,0,2*l);var I=new Uint8ClampedArray(ke.width*ke.height*4);return F.readPixels(0,0,ke.width,ke.height,F.RGBA,F.UNSIGNED_BYTE,I),new ImageData(I,ke.width,ke.height)}catch{return new ImageData(1,1)}finally{F&&(F.bindBuffer(F.ARRAY_BUFFER,null),F.useProgram(null),F.viewport(0,0,F.drawingBufferWidth,F.drawingBufferHeight),F.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Gr(ma(r,ke.width,ke.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var ot=function(r,t,e,s){for(var a=(e-t)/s,o=0,n=0;n<s;n++)o+=r(t+(n+.5)*a);return o*a};Ie("math",function(){return He(void 0,void 0,void 0,function(){return Ue(this,function(r){return[2,{acos:Math.acos(.5),asin:ot(Math.asin,-1,1,97),atan:ot(Math.atan,-1,1,97),cos:ot(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:ot(Math.sin,-Math.PI,Math.PI,97),sinh:ot(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:ot(Math.tan,0,2*Math.PI,97),tanh:ot(Math.tanh,-9/7,7/9,97)}]})})});class Zr{constructor(t){c(this,"config");this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,e){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class pi extends Zr{async getAds(t){const e=this.config.admAdConfig;if(!(e!=null&&e.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:e.sub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${e.textAdQuantity||0}`,"results-pa":`${e.productAdQuantity||0}`}).toString()}`,n=await(await fetch(a,{method:"GET"})).json(),l=n.product_ads.map(m=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:m})),u=n.text_ads.map(m=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:m}));return l.concat(u)}async onAdContainerViewed(t){var s;const e=t.adClientResponseItem;(s=e.admAd)!=null&&s.impression_url&&fetch(e.admAd.impression_url)}}class mi extends Zr{async getAds(t){return[]}}const gi=1e3;class bi extends Zr{constructor(e){super(e);c(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(e){this.addScriptTagToDocument()}async onQueryFetched(e,s){var a;if((((a=s.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(gi)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(e){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(s){console.error(s)}},e)}async getAds(e){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const e=document.createElement("script");e.type="text/javascript",e.src="https://s.ntv.io/serve/load.js",e.id="nativo-tag",e.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(e)}}removeScriptTagFromDocument(){const e=document.head.querySelector("#nativo-tag");e&&document.head.removeChild(e)}}const vi=600;class yi{constructor(t,e,s){c(this,"measureRequestTimeout");c(this,"measureRequestsBatched",[]);c(this,"config");c(this,"sdkInfo");c(this,"userId");c(this,"sessionId");c(this,"sendMeasureEvent",async(t,e={},s={})=>{const a={event_name:t,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...e},user:{...this.measureRequestUser,...s}};if(t==="document_clicked"){const o=JSON.stringify(a),n=`${this.baseMeasureUrl}/event`;try{const l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(!l.ok)throw new Error(`Failed to send request: ${l.status} ${l.statusText}`)}catch(l){throw console.error("Error sending MeasureRequest:",l),l}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const o=JSON.stringify({items:this.measureRequestsBatched}),n=`${this.baseMeasureUrl}/batch`;try{const l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(this.measureRequestsBatched=[],!l.ok)throw new Error(`Failed to send request: ${l.status} ${l.statusText}`);return}catch(l){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",l),l}},vi)});this.config=t,this.sdkInfo=e,this.userId=s,this.sessionId=nt(),this.sendMeasureEvent("sdk_initialized")}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 ki=r=>r.endsWith("/")?r.slice(0,-1):r,or=r=>{let t="";if(t=r.trim(),t=t.replace(/[‘’“”]/g,s=>({"‘":"'","’":"'","“":'"',"”":'"'})[s]||s),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},Ci=500;class xi{constructor(t,e,s){c(this,"config");c(this,"userId");c(this,"parent");c(this,"searchCompletedEventTimeout");c(this,"abortController");c(this,"supplementalAbortController");c(this,"abortRequests",()=>{var t,e;(t=this.abortController)==null||t.abort("The pending search request has been cancelled."),(e=this.supplementalAbortController)==null||e.abort("The pending search request has been cancelled.")});c(this,"getSearchResponseItems",async(t,e=!1)=>{var n,l,u,f,m,C,E;let s,a="",o;return e?((n=this.supplementalAbortController)==null||n.abort("A newer search request has replaced this one."),o=new AbortController,this.supplementalAbortController=o):((l=this.abortController)==null||l.abort("A newer search request has replaced this one."),o=new AbortController,this.abortController=o),typeof t=="string"?a=or(t):(t.searchTerm=or(t.searchTerm),a=t.searchTerm),(u=this.parent.measureClient)==null||u.sendMeasureEvent("search_requested",{search_term:a}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:a}}),(f=this.parent.adClient)==null||f.onQuerySubmitted(typeof t=="string"?{searchTerm:a,mode:"exact"}:t),typeof t=="string"?s=await this.handleGetSearchResponseItemsWithString(a,o):s=await this.handleGetSearchResponseItemsWithObject(t,o),e||((m=this.parent.measureClient)==null||m.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:s.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var P;(P=this.parent.measureClient)==null||P.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:s.data.count})},Ci),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((C=s.data.hits)==null?void 0:C.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(E=this.parent.adClient)==null||E.onQueryFetched(typeof t=="string"?{searchTerm:a,mode:"exact"}:t,s)),s});c(this,"handleGetSearchResponseItemsWithString",async(t,e)=>{var o;let s;try{s=JSON.parse(t),s={limit:this.config.searchResultsPerPage,...s}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:s});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":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:e.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});c(this,"handleGetSearchResponseItemsWithObject",async(t,e)=>{var o;const s={query:this.formatParamsForRequest(t),offset:t.offset||0,limit:t.limit||this.config.searchResultsPerPage||20,...t.order_by&&{order_by:t.order_by},...t.sort&&{sort:t.sort}};this.parent.store.setState({searchClientRequest:s});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":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:e.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=t,this.config=e,this.userId=s}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(t){const e=[];let s="should";t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(n=>{var u;const l=(u=t.facetPathsForIndexFields)==null?void 0:u[n];l&&(s="must",e.push({occur:"must",exact:{ctx:or(l.value)}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(n=>{var u;const l=(u=t.rangeValueForIndexFields)==null?void 0:u[n];l&&(s="must",e.push({occur:"must",exact:{ctx:or(l.value)}}))});const a=t.searchTerm,o=t.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return e.push({occur:t.mode==="exact"?"must":s,...o}),e}}var ya={},Yr={};const ka=r=>{let t;const e=new Set,s=(f,m)=>{const C=typeof f=="function"?f(t):f;if(!Object.is(C,t)){const E=t;t=m??(typeof C!="object"||C===null)?C:Object.assign({},t,C),e.forEach(P=>P(t,E))}},a=()=>t,l={setState:s,getState:a,getInitialState:()=>u,subscribe:f=>(e.add(f),()=>e.delete(f))},u=t=r(s,a,l);return l},wi=r=>r?ka(r):ka;Yr.createStore=wi;var Qr={},Ca={exports:{}},z={};/**
73
73
  * @license React
74
74
  * react.production.js
75
75
  *
@@ -77,5 +77,5 @@ Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An err
77
77
  *
78
78
  * This source code is licensed under the MIT license found in the
79
79
  * LICENSE file in the root directory of this source tree.
80
- */var Jr=Symbol.for("react.transitional.element"),Ri=Symbol.for("react.portal"),Ei=Symbol.for("react.fragment"),Ti=Symbol.for("react.strict_mode"),Pi=Symbol.for("react.profiler"),$i=Symbol.for("react.consumer"),_i=Symbol.for("react.context"),Ii=Symbol.for("react.forward_ref"),Ai=Symbol.for("react.suspense"),Mi=Symbol.for("react.memo"),xa=Symbol.for("react.lazy"),wa=Symbol.iterator;function Oi(r){return r===null||typeof r!="object"?null:(r=wa&&r[wa]||r["@@iterator"],typeof r=="function"?r:null)}var Sa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ra=Object.assign,Ea={};function bt(r,e,t){this.props=r,this.context=e,this.refs=Ea,this.updater=t||Sa}bt.prototype.isReactComponent={},bt.prototype.setState=function(r,e){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,e,"setState")},bt.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Ta(){}Ta.prototype=bt.prototype;function es(r,e,t){this.props=r,this.context=e,this.refs=Ea,this.updater=t||Sa}var ts=es.prototype=new Ta;ts.constructor=es,Ra(ts,bt.prototype),ts.isPureReactComponent=!0;var Pa=Array.isArray,ee={H:null,A:null,T:null,S:null},$a=Object.prototype.hasOwnProperty;function rs(r,e,t,s,a,o){return t=o.ref,{$$typeof:Jr,type:r,key:e,ref:t!==void 0?t:null,props:o}}function Li(r,e){return rs(r.type,e,void 0,void 0,void 0,r.props)}function ss(r){return typeof r=="object"&&r!==null&&r.$$typeof===Jr}function Fi(r){var e={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(t){return e[t]})}var _a=/\/+/g;function as(r,e){return typeof r=="object"&&r!==null&&r.key!=null?Fi(""+r.key):e.toString(36)}function Ia(){}function Di(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(Ia,Ia):(r.status="pending",r.then(function(e){r.status==="pending"&&(r.status="fulfilled",r.value=e)},function(e){r.status==="pending"&&(r.status="rejected",r.reason=e)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function vt(r,e,t,s,a){var o=typeof r;(o==="undefined"||o==="boolean")&&(r=null);var n=!1;if(r===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(r.$$typeof){case Jr:case Ri:n=!0;break;case xa:return n=r._init,vt(n(r._payload),e,t,s,a)}}if(n)return a=a(r),n=s===""?"."+as(r,0):s,Pa(a)?(t="",n!=null&&(t=n.replace(_a,"$&/")+"/"),vt(a,e,t,"",function(d){return d})):a!=null&&(ss(a)&&(a=Li(a,t+(a.key==null||r&&r.key===a.key?"":(""+a.key).replace(_a,"$&/")+"/")+n)),e.push(a)),1;n=0;var l=s===""?".":s+":";if(Pa(r))for(var u=0;u<r.length;u++)s=r[u],o=l+as(s,u),n+=vt(s,e,t,o,a);else if(u=Oi(r),typeof u=="function")for(r=u.call(r),u=0;!(s=r.next()).done;)s=s.value,o=l+as(s,u++),n+=vt(s,e,t,o,a);else if(o==="object"){if(typeof r.then=="function")return vt(Di(r),e,t,s,a);throw e=String(r),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return n}function ir(r,e,t){if(r==null)return r;var s=[],a=0;return vt(r,s,"","",function(o){return e.call(t,o,a++)}),s}function Ni(r){if(r._status===-1){var e=r._result;e=e(),e.then(function(t){(r._status===0||r._status===-1)&&(r._status=1,r._result=t)},function(t){(r._status===0||r._status===-1)&&(r._status=2,r._result=t)}),r._status===-1&&(r._status=0,r._result=e)}if(r._status===1)return r._result.default;throw r._result}var Aa=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)};function zi(){}z.Children={map:ir,forEach:function(r,e,t){ir(r,function(){e.apply(this,arguments)},t)},count:function(r){var e=0;return ir(r,function(){e++}),e},toArray:function(r){return ir(r,function(e){return e})||[]},only:function(r){if(!ss(r))throw Error("React.Children.only expected to receive a single React element child.");return r}},z.Component=bt,z.Fragment=Ei,z.Profiler=Pi,z.PureComponent=es,z.StrictMode=Ti,z.Suspense=Ai,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,z.act=function(){throw Error("act(...) is not supported in production builds of React.")},z.cache=function(r){return function(){return r.apply(null,arguments)}},z.cloneElement=function(r,e,t){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var s=Ra({},r.props),a=r.key,o=void 0;if(e!=null)for(n in e.ref!==void 0&&(o=void 0),e.key!==void 0&&(a=""+e.key),e)!$a.call(e,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&e.ref===void 0||(s[n]=e[n]);var n=arguments.length-2;if(n===1)s.children=t;else if(1<n){for(var l=Array(n),u=0;u<n;u++)l[u]=arguments[u+2];s.children=l}return rs(r.type,a,void 0,void 0,o,s)},z.createContext=function(r){return r={$$typeof:_i,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:$i,_context:r},r},z.createElement=function(r,e,t){var s,a={},o=null;if(e!=null)for(s in e.key!==void 0&&(o=""+e.key),e)$a.call(e,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=e[s]);var n=arguments.length-2;if(n===1)a.children=t;else if(1<n){for(var l=Array(n),u=0;u<n;u++)l[u]=arguments[u+2];a.children=l}if(r&&r.defaultProps)for(s in n=r.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return rs(r,o,void 0,void 0,null,a)},z.createRef=function(){return{current:null}},z.forwardRef=function(r){return{$$typeof:Ii,render:r}},z.isValidElement=ss,z.lazy=function(r){return{$$typeof:xa,_payload:{_status:-1,_result:r},_init:Ni}},z.memo=function(r,e){return{$$typeof:Mi,type:r,compare:e===void 0?null:e}},z.startTransition=function(r){var e=ee.T,t={};ee.T=t;try{var s=r(),a=ee.S;a!==null&&a(t,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(zi,Aa)}catch(o){Aa(o)}finally{ee.T=e}},z.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},z.use=function(r){return ee.H.use(r)},z.useActionState=function(r,e,t){return ee.H.useActionState(r,e,t)},z.useCallback=function(r,e){return ee.H.useCallback(r,e)},z.useContext=function(r){return ee.H.useContext(r)},z.useDebugValue=function(){},z.useDeferredValue=function(r,e){return ee.H.useDeferredValue(r,e)},z.useEffect=function(r,e){return ee.H.useEffect(r,e)},z.useId=function(){return ee.H.useId()},z.useImperativeHandle=function(r,e,t){return ee.H.useImperativeHandle(r,e,t)},z.useInsertionEffect=function(r,e){return ee.H.useInsertionEffect(r,e)},z.useLayoutEffect=function(r,e){return ee.H.useLayoutEffect(r,e)},z.useMemo=function(r,e){return ee.H.useMemo(r,e)},z.useOptimistic=function(r,e){return ee.H.useOptimistic(r,e)},z.useReducer=function(r,e,t){return ee.H.useReducer(r,e,t)},z.useRef=function(r){return ee.H.useRef(r)},z.useState=function(r){return ee.H.useState(r)},z.useSyncExternalStore=function(r,e,t){return ee.H.useSyncExternalStore(r,e,t)},z.useTransition=function(){return ee.H.useTransition()},z.version="19.0.0",Ca.exports=z;var Ma=Ca.exports,Hi=Kr;const Ui=r=>r;function Oa(r,e=Ui){const t=Ma.useSyncExternalStore(r.subscribe,()=>e(r.getState()),()=>e(r.getInitialState()));return Ma.useDebugValue(t),t}const La=r=>{const e=Hi.createStore(r),t=s=>Oa(e,s);return Object.assign(t,e),t},Bi=r=>r?La(r):La;Xr.create=Bi,Xr.useStore=Oa,function(r){var e=Kr,t=Xr;Object.keys(e).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[s]}})}),Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return t[s]}})})}(ya);const ji=1e3;class Vi{constructor(e,t){c(this,"set");c(this,"get");c(this,"abortController");c(this,"timeout");this.get=e,this.set=t}streamSummaryData(){var s;const e=async()=>{var u,d,m,C,E,$;const a=this.get(),o=(u=a.core)==null?void 0:u.config;if(!o){console.error("Could not stream summary data, no config found.");return}if(!o.cortexURL){console.error("Could not stream summary data, cortexURL was not specified in the config.");return}const n=(d=a.core)==null?void 0:d.config.indexName;if(!a.hasSummaryBox||!n)return;(m=this.abortController)==null||m.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,summary:""});const l=`${o.cortexURL.replace(/\/$/,"")}/api/search/summary`;try{const I=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((C=a.core)==null?void 0:C.config.readKey)||""},body:JSON.stringify({searchQuery:a.searchClientRequest,summaryInstructionsPrompt:(E=a.core)==null?void 0:E.config.summaryInstructionsPrompt,indexName:n,endpointUrl:($=a.core)==null?void 0:$.config.endpointURL}),signal:this.abortController.signal});if(!I)throw new Error("Invalid fetch response");if(!I.body)throw new Error("Invalid fetch response");if(!I.ok)throw new Error(`HTTP ${I.status}`);const H=I.body.getReader(),D=new TextDecoder;let P=!1;do{const{done:A,value:B}=await H.read();P=A;const Z=D.decode(B,{stream:!0});this.set(oe=>({isSummaryLoading:!1,summary:`${oe.summary}${Z}`}))}while(!P)}catch(I){I instanceof Error&&console.error(I.message),this.set({isSummaryLoading:!1})}},t=((s=this.get().core)==null?void 0:s.config.summaryDebounceDelay)||ji;clearTimeout(this.timeout),this.timeout=setTimeout(()=>e(),t)}}const Fa={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],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},cr={},qi=(r,e={})=>{const t=r||Hr;if(cr[t])return cr[t].setState(e),cr[t];const s=ya.createStore((a,o)=>{const n={addFacetPathsForIndexField:u=>a(d=>({facetPathsForIndexFields:{...d.facetPathsForIndexFields,[u.fieldName]:u}})),addRangeValueForIndexField:u=>a(d=>({rangeValueForIndexFields:{...d.rangeValueForIndexFields,[u.fieldName]:u}})),removeFacetPathsForIndexField:u=>a(d=>{const m=d.facetPathsForIndexFields;return delete m[u],{facetPathsForIndexFields:{...m}}}),removeRangeValueForIndexField:u=>a(d=>{const m=d.rangeValueForIndexFields;return delete m[u],{rangeValueForIndexFields:{...m}}}),resetSearchValues:()=>{var d,m;const u=o();(m=(d=u.core)==null?void 0:d.searchClient)==null||m.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems]})},search:async()=>{var m,C,E;const u=o();if(!u.core)throw new Error("Searchcraft instance is not initialized.");if(u.core.config.cortexURL&&((m=u.summaryClient)==null||m.streamSummaryData()),!u.searchTerm.trim()){(E=(C=u.core)==null?void 0:C.searchClient)==null||E.abortRequests(),a({searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const d={searchTerm:u.searchTerm,mode:u.searchMode,sort:u.sortType,order_by:u.orderByField,facetPathsForIndexFields:u.facetPathsForIndexFields,rangeValueForIndexFields:u.rangeValueForIndexFields,offset:u.searchResultsPerPage?u.searchResultsPerPage*(u.searchResultsPage-1):0,limit:u.searchResultsPerPage};u.core.getResponseItems({requestProperties:d,shouldCacheResultsForEmptyState:!1})},setPopoverVisibility:u=>a({isPopoverVisible:u}),setSearchMode:u=>a({searchMode:u}),setSortOrder:({orderByField:u,sortType:d})=>a({sortType:d,orderByField:u}),setSearchTerm:u=>{var m;const d=o();u.length===0&&((m=d.core)==null||m.handleInputCleared()),a({searchTerm:u,searchResultsPage:1,...u.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...d.cachedSearchClientResponseItems],adClientResponseItems:[...d.cachedAdClientResponseItems]}})},setSearchResultsCount:u=>a({searchResultsCount:u}),setSearchResultsPage:async u=>{a({searchResultsPage:u}),await n.search()},setSearchResultsPerPage:async u=>{a({searchResultsPerPage:u}),await n.search()},setHotKeyAndHotKeyModifier:(u,d)=>{const{hotkey:m,hotkeyModifier:C}=Fa;a({hotkey:u||m,hotkeyModifier:d||C})}};return{...Fa,...e,...n,summaryClient:new Vi(o,a)}});return cr[t]=s,s};class Gi{constructor(e,t,s){c(this,"store");c(this,"config");c(this,"measureClient");c(this,"searchClient");c(this,"adClient");c(this,"userId");c(this,"requestTimeout");c(this,"subscriptionEvents",{});c(this,"getResponseItems",e=>{const t=async()=>{(async()=>{var n;if(!this.searchClient){console.error("Search client was not initialized.");return}let s;try{s=await this.searchClient.getSearchResponseItems(e.requestProperties,!1)}catch(l){Wr.info(`Search request error: ${l}`);return}if(!s){Wr.info("Search request error: Search response was undefined");return}const a=(s.data.hits||[]).filter(l=>!!l.doc).map(l=>({id:nt(),document:l.doc||{id:-1},source_index:l.source_index,type:"SearchDocument"}));let o;if(typeof e.requestProperties=="object"&&e.requestProperties.facetPathsForIndexFields&&Object.keys(e.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:l,...u}=e.requestProperties;try{o=await((n=this==null?void 0:this.searchClient)==null?void 0:n.getSearchResponseItems(u,!0))}catch(d){Wr.info(`Search request error: ${d}`);return}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:s.data.time_taken,searchResultsCount:s.data.count,searchResponseFacetPrime:s.data.facets,supplementalFacetPrime:o==null?void 0:o.data.facets,searchClientRequestProperties:e.requestProperties,...e.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a}})})(),(async()=>{if(this.adClient&&typeof e.requestProperties!="string"){const s=await this.adClient.getAds(e.requestProperties);this.store.setState({adClientResponseItems:s,...e.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:s}})}})()};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)throw new Error("SDK Configuration Error: indexName not specified.");this.config={...e,endpointURL:Ci(e.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&t.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=qi(s,{core:this,searchResultsPerPage:e.searchResultsPerPage||20}),de.addCoreInstance(this,s),(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 s=this.config.measureUserIdentifier;s||(s=await si()),this.measureClient=new ki(e,t,s),this.searchClient=new wi(this,e,s),e.customAdConfig?this.adClient=new gi(e):e.nativoConfig?this.adClient=new vi(e):e.admAdConfig&&(this.adClient=new mi(e)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(e,t){var s;(s=this.subscriptionEvents[e])==null||s.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(s=>s!==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 Da={name:"@searchcraft/vue-sdk",version:"0.11.1"},ns="routerLink",Na="navManager",Wi="router",Zi="aria",Lt=Symbol(),za={default:Lt},Ha=r=>(r==null?void 0:r.split(" "))||[],Yi=(r,e,t=[])=>{var s;return[...Array.from(((s=r.value)==null?void 0:s.classList)||[]),...t].filter((a,o,n)=>!e.has(a)&&n.indexOf(a)===o)},Oe=(r,e,t=[],s=[],a,o)=>{e!==void 0&&e();const n=fe.defineComponent((l,{attrs:u,slots:d,emit:m})=>{var P;const C=fe.ref(),E=new Set(Ha(u.class)),$=fe.getCurrentInstance(),H=((P=$==null?void 0:$.appContext)==null?void 0:P.provides[Na])?fe.inject(Na):void 0,D=A=>{const{routerLink:B}=l;if(B!==Lt)if(H!==void 0){A.preventDefault();let Z={event:A};for(const oe in l){const Y=l[oe];l.hasOwnProperty(oe)&&oe.startsWith(Wi)&&Y!==Lt&&(Z[oe]=Y)}H.navigate(Z)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{l[a],Ha(u.class).forEach(Y=>{E.add(Y)});const A=l.onClick,B=Y=>{A!==void 0&&A(Y),Y.defaultPrevented||D(Y)};let Z={ref:C,class:Yi(C,E),onClick:B};for(const Y in l){const be=l[Y];(l.hasOwnProperty(Y)&&be!==Lt||Y.startsWith(Zi))&&(Z[Y]=be);const re="on"+Y.slice(0,1).toUpperCase()+Y.slice(1),Le=u[re];C.value&&u.hasOwnProperty(re)&&"addEventListener"in C.value&&C.value.addEventListener(Y,Le)}return ns in l&&l[ns]!==Lt&&(Z={...Z,href:l[ns]}),fe.h(r,Z,d.default&&d.default())}});if(typeof n!="function"){let l=[],u={};u.ROUTER_LINK_VALUE=za,t.forEach(d=>u[d]=za),l=s,n.name=r,n.emits=l,n.props=u}return n},Qi=Oe("searchcraft-filter-panel",()=>{},["searchcraftId","items"]),Ki=Oe("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Xi=Oe("searchcraft-pagination",()=>{},["searchcraftId"]),Ji=Oe("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),ec=Oe("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId"]),tc=Oe("searchcraft-results-info",()=>{},["template","searchcraftId"]),rc=Oe("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),sc=Oe("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),ac=Oe("searchcraft-summary-box",()=>{},["searchcraftId"]),nc=Oe("searchcraft-theme",()=>{}),oc=rc,ic=Qi,cc=Ki,lc=Ji,uc=ec,hc=tc,fc=nc,dc=Xi,pc=sc,mc=ac;class gc extends Gi{constructor(e,t=void 0){super(e,{sdkName:Da.name,sdkVersion:Da.version},t)}}fa(),K.Searchcraft=gc,K.SearchcraftFilterPanel=ic,K.SearchcraftInputForm=cc,K.SearchcraftPagination=dc,K.SearchcraftPopoverButton=lc,K.SearchcraftPopoverForm=uc,K.SearchcraftResultsInfo=hc,K.SearchcraftSearchResults=oc,K.SearchcraftSearchResultsPerPage=pc,K.SearchcraftSummaryBox=mc,K.SearchcraftTheme=fc,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
80
+ */var Kr=Symbol.for("react.transitional.element"),Si=Symbol.for("react.portal"),Ri=Symbol.for("react.fragment"),Ei=Symbol.for("react.strict_mode"),Ti=Symbol.for("react.profiler"),Pi=Symbol.for("react.consumer"),$i=Symbol.for("react.context"),_i=Symbol.for("react.forward_ref"),Ii=Symbol.for("react.suspense"),Ai=Symbol.for("react.memo"),xa=Symbol.for("react.lazy"),wa=Symbol.iterator;function Mi(r){return r===null||typeof r!="object"?null:(r=wa&&r[wa]||r["@@iterator"],typeof r=="function"?r:null)}var Sa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ra=Object.assign,Ea={};function bt(r,t,e){this.props=r,this.context=t,this.refs=Ea,this.updater=e||Sa}bt.prototype.isReactComponent={},bt.prototype.setState=function(r,t){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,t,"setState")},bt.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Ta(){}Ta.prototype=bt.prototype;function Xr(r,t,e){this.props=r,this.context=t,this.refs=Ea,this.updater=e||Sa}var Jr=Xr.prototype=new Ta;Jr.constructor=Xr,Ra(Jr,bt.prototype),Jr.isPureReactComponent=!0;var Pa=Array.isArray,ee={H:null,A:null,T:null,S:null},$a=Object.prototype.hasOwnProperty;function es(r,t,e,s,a,o){return e=o.ref,{$$typeof:Kr,type:r,key:t,ref:e!==void 0?e:null,props:o}}function Oi(r,t){return es(r.type,t,void 0,void 0,void 0,r.props)}function ts(r){return typeof r=="object"&&r!==null&&r.$$typeof===Kr}function Li(r){var t={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(e){return t[e]})}var _a=/\/+/g;function rs(r,t){return typeof r=="object"&&r!==null&&r.key!=null?Li(""+r.key):t.toString(36)}function Ia(){}function Fi(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(Ia,Ia):(r.status="pending",r.then(function(t){r.status==="pending"&&(r.status="fulfilled",r.value=t)},function(t){r.status==="pending"&&(r.status="rejected",r.reason=t)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function vt(r,t,e,s,a){var o=typeof r;(o==="undefined"||o==="boolean")&&(r=null);var n=!1;if(r===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(r.$$typeof){case Kr:case Si:n=!0;break;case xa:return n=r._init,vt(n(r._payload),t,e,s,a)}}if(n)return a=a(r),n=s===""?"."+rs(r,0):s,Pa(a)?(e="",n!=null&&(e=n.replace(_a,"$&/")+"/"),vt(a,t,e,"",function(f){return f})):a!=null&&(ts(a)&&(a=Oi(a,e+(a.key==null||r&&r.key===a.key?"":(""+a.key).replace(_a,"$&/")+"/")+n)),t.push(a)),1;n=0;var l=s===""?".":s+":";if(Pa(r))for(var u=0;u<r.length;u++)s=r[u],o=l+rs(s,u),n+=vt(s,t,e,o,a);else if(u=Mi(r),typeof u=="function")for(r=u.call(r),u=0;!(s=r.next()).done;)s=s.value,o=l+rs(s,u++),n+=vt(s,t,e,o,a);else if(o==="object"){if(typeof r.then=="function")return vt(Fi(r),t,e,s,a);throw t=String(r),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function ir(r,t,e){if(r==null)return r;var s=[],a=0;return vt(r,s,"","",function(o){return t.call(e,o,a++)}),s}function Di(r){if(r._status===-1){var t=r._result;t=t(),t.then(function(e){(r._status===0||r._status===-1)&&(r._status=1,r._result=e)},function(e){(r._status===0||r._status===-1)&&(r._status=2,r._result=e)}),r._status===-1&&(r._status=0,r._result=t)}if(r._status===1)return r._result.default;throw r._result}var Aa=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)};function Ni(){}z.Children={map:ir,forEach:function(r,t,e){ir(r,function(){t.apply(this,arguments)},e)},count:function(r){var t=0;return ir(r,function(){t++}),t},toArray:function(r){return ir(r,function(t){return t})||[]},only:function(r){if(!ts(r))throw Error("React.Children.only expected to receive a single React element child.");return r}},z.Component=bt,z.Fragment=Ri,z.Profiler=Ti,z.PureComponent=Xr,z.StrictMode=Ei,z.Suspense=Ii,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,z.act=function(){throw Error("act(...) is not supported in production builds of React.")},z.cache=function(r){return function(){return r.apply(null,arguments)}},z.cloneElement=function(r,t,e){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var s=Ra({},r.props),a=r.key,o=void 0;if(t!=null)for(n in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(a=""+t.key),t)!$a.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=e;else if(1<n){for(var l=Array(n),u=0;u<n;u++)l[u]=arguments[u+2];s.children=l}return es(r.type,a,void 0,void 0,o,s)},z.createContext=function(r){return r={$$typeof:$i,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:Pi,_context:r},r},z.createElement=function(r,t,e){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)$a.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=e;else if(1<n){for(var l=Array(n),u=0;u<n;u++)l[u]=arguments[u+2];a.children=l}if(r&&r.defaultProps)for(s in n=r.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return es(r,o,void 0,void 0,null,a)},z.createRef=function(){return{current:null}},z.forwardRef=function(r){return{$$typeof:_i,render:r}},z.isValidElement=ts,z.lazy=function(r){return{$$typeof:xa,_payload:{_status:-1,_result:r},_init:Di}},z.memo=function(r,t){return{$$typeof:Ai,type:r,compare:t===void 0?null:t}},z.startTransition=function(r){var t=ee.T,e={};ee.T=e;try{var s=r(),a=ee.S;a!==null&&a(e,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Ni,Aa)}catch(o){Aa(o)}finally{ee.T=t}},z.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},z.use=function(r){return ee.H.use(r)},z.useActionState=function(r,t,e){return ee.H.useActionState(r,t,e)},z.useCallback=function(r,t){return ee.H.useCallback(r,t)},z.useContext=function(r){return ee.H.useContext(r)},z.useDebugValue=function(){},z.useDeferredValue=function(r,t){return ee.H.useDeferredValue(r,t)},z.useEffect=function(r,t){return ee.H.useEffect(r,t)},z.useId=function(){return ee.H.useId()},z.useImperativeHandle=function(r,t,e){return ee.H.useImperativeHandle(r,t,e)},z.useInsertionEffect=function(r,t){return ee.H.useInsertionEffect(r,t)},z.useLayoutEffect=function(r,t){return ee.H.useLayoutEffect(r,t)},z.useMemo=function(r,t){return ee.H.useMemo(r,t)},z.useOptimistic=function(r,t){return ee.H.useOptimistic(r,t)},z.useReducer=function(r,t,e){return ee.H.useReducer(r,t,e)},z.useRef=function(r){return ee.H.useRef(r)},z.useState=function(r){return ee.H.useState(r)},z.useSyncExternalStore=function(r,t,e){return ee.H.useSyncExternalStore(r,t,e)},z.useTransition=function(){return ee.H.useTransition()},z.version="19.0.0",Ca.exports=z;var Ma=Ca.exports,zi=Yr;const Hi=r=>r;function Oa(r,t=Hi){const e=Ma.useSyncExternalStore(r.subscribe,()=>t(r.getState()),()=>t(r.getInitialState()));return Ma.useDebugValue(e),e}const La=r=>{const t=zi.createStore(r),e=s=>Oa(t,s);return Object.assign(e,t),e},Ui=r=>r?La(r):La;Qr.create=Ui,Qr.useStore=Oa,function(r){var t=Yr,e=Qr;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(e).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[s]}})})}(ya);const Bi=1e3;class Vi{constructor(t,e){c(this,"set");c(this,"get");c(this,"abortController");c(this,"timeout");this.get=t,this.set=e}streamSummaryData(){var s;const t=async()=>{var u,f,m,C,E,P;const a=this.get(),o=(u=a.core)==null?void 0:u.config;if(!o){console.error("Could not stream summary data, no config found.");return}if(!o.cortexURL){console.error("Could not stream summary data, cortexURL was not specified in the config.");return}const n=(f=a.core)==null?void 0:f.config.indexName;if(!a.hasSummaryBox||!n)return;(m=this.abortController)==null||m.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,summary:""});const l=`${o.cortexURL.replace(/\/$/,"")}/api/search/summary`;try{const I=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((C=a.core)==null?void 0:C.config.readKey)||""},body:JSON.stringify({searchQuery:a.searchClientRequest,summaryInstructionsPrompt:(E=a.core)==null?void 0:E.config.summaryInstructionsPrompt,indexName:n,endpointUrl:(P=a.core)==null?void 0:P.config.endpointURL}),signal:this.abortController.signal});if(!I)throw new Error("Invalid fetch response");if(!I.body)throw new Error("Invalid fetch response");if(!I.ok){if(I.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 ${I.status}`)}const H=I.body.getReader(),D=new TextDecoder;let $=!1;do{const{done:A,value:B}=await H.read();$=A;const Z=D.decode(B,{stream:!0});this.set(oe=>({isSummaryLoading:!1,summary:`${oe.summary}${Z}`}))}while(!$)}catch(I){I instanceof Error&&console.error(I.message),this.set({isSummaryLoading:!1})}},e=((s=this.get().core)==null?void 0:s.config.summaryDebounceDelay)||Bi;clearTimeout(this.timeout),this.timeout=setTimeout(()=>t(),e)}}const Fa={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],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},cr={},ji=(r,t={})=>{const e=r||zr;if(cr[e])return cr[e].setState(t),cr[e];const s=ya.createStore((a,o)=>{const n={addFacetPathsForIndexField:u=>a(f=>({facetPathsForIndexFields:{...f.facetPathsForIndexFields,[u.fieldName]:u}})),addRangeValueForIndexField:u=>a(f=>({rangeValueForIndexFields:{...f.rangeValueForIndexFields,[u.fieldName]:u}})),removeFacetPathsForIndexField:u=>a(f=>{const m=f.facetPathsForIndexFields;return delete m[u],{facetPathsForIndexFields:{...m}}}),removeRangeValueForIndexField:u=>a(f=>{const m=f.rangeValueForIndexFields;return delete m[u],{rangeValueForIndexFields:{...m}}}),resetSearchValues:()=>{var f,m;const u=o();(m=(f=u.core)==null?void 0:f.searchClient)==null||m.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems]})},search:async u=>{var C,E,P;const f=o();if(!f.core)throw new Error("Searchcraft instance is not initialized.");if(f.core.config.cortexURL&&!(u!=null&&u.skipSummary)&&((C=f.summaryClient)==null||C.streamSummaryData()),!f.searchTerm.trim()){(P=(E=f.core)==null?void 0:E.searchClient)==null||P.abortRequests(),a({searchClientResponseItems:[...f.cachedSearchClientResponseItems],adClientResponseItems:[...f.cachedAdClientResponseItems],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const m={searchTerm:f.searchTerm,mode:f.searchMode,sort:f.sortType,order_by:f.orderByField,facetPathsForIndexFields:f.facetPathsForIndexFields,rangeValueForIndexFields:f.rangeValueForIndexFields,offset:f.searchResultsPerPage?f.searchResultsPerPage*(f.searchResultsPage-1):0,limit:f.searchResultsPerPage};f.core.getResponseItems({requestProperties:m,shouldCacheResultsForEmptyState:!1})},setPopoverVisibility:u=>a({isPopoverVisible:u}),setSearchMode:u=>a({searchMode:u}),setSortOrder:({orderByField:u,sortType:f})=>a({sortType:f,orderByField:u}),setSearchTerm:u=>{var m;const f=o();u.length===0&&((m=f.core)==null||m.handleInputCleared()),a({searchTerm:u,searchResultsPage:1,...u.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...f.cachedSearchClientResponseItems],adClientResponseItems:[...f.cachedAdClientResponseItems]}})},setSearchResultsCount:u=>a({searchResultsCount:u}),setSearchResultsPage:async u=>{a({searchResultsPage:u}),await n.search({skipSummary:!0})},setSearchResultsPerPage:async u=>{a({searchResultsPerPage:u}),await n.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(u,f)=>{const{hotkey:m,hotkeyModifier:C}=Fa;a({hotkey:u||m,hotkeyModifier:f||C})}};return{...Fa,...t,...n,summaryClient:new Vi(o,a)}});return cr[e]=s,s};class qi{constructor(t,e,s){c(this,"store");c(this,"config");c(this,"measureClient");c(this,"searchClient");c(this,"adClient");c(this,"userId");c(this,"requestTimeout");c(this,"subscriptionEvents",{});c(this,"getResponseItems",t=>{const e=async()=>{(async()=>{var n;if(!this.searchClient){console.error("Search client was not initialized.");return}let s;try{s=await this.searchClient.getSearchResponseItems(t.requestProperties,!1)}catch(l){qr.info(`Search request error: ${l}`);return}if(!s){qr.info("Search request error: Search response was undefined");return}const a=(s.data.hits||[]).filter(l=>!!l.doc).map(l=>({id:nt(),document:l.doc||{id:-1},source_index:l.source_index,type:"SearchDocument"}));let o;if(typeof t.requestProperties=="object"&&t.requestProperties.facetPathsForIndexFields&&Object.keys(t.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:l,...u}=t.requestProperties;try{o=await((n=this==null?void 0:this.searchClient)==null?void 0:n.getSearchResponseItems(u,!0))}catch(f){qr.info(`Search request error: ${f}`);return}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:s.data.time_taken,searchResultsCount:s.data.count,searchResponseFacetPrime:s.data.facets,supplementalFacetPrime:o==null?void 0:o.data.facets,searchClientRequestProperties:t.requestProperties,...t.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a}})})(),(async()=>{if(this.adClient&&typeof t.requestProperties!="string"){const s=await this.adClient.getAds(t.requestProperties);this.store.setState({adClientResponseItems:s,...t.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:s}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(e,this.config.searchDebounceDelay):e()});if(!t.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!t.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!t.indexName&&!t.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(t.indexName&&t.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...t,endpointURL:ki(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&e.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=ji(s,{core:this,searchResultsPerPage:t.searchResultsPerPage||20}),fe.addCoreInstance(this,s),(async a=>{typeof window<"u"&&await this.initClients(a,e),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(t,e){let s=this.config.measureUserIdentifier;s||(s=await ri()),this.measureClient=new yi(t,e,s),this.searchClient=new xi(this,t,s),t.customAdConfig?this.adClient=new mi(t):t.nativoConfig?this.adClient=new bi(t):t.admAdConfig&&(this.adClient=new pi(t)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(t,e){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(e)})}subscribe(t,e){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(e),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==e)}}handleAdContainerRendered(t){var e;(e=this.adClient)==null||e.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var e;(e=this.adClient)==null||e.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}const Gi="@searchcraft/vue-sdk",Wi="0.12.0",ss="routerLink",Da="navManager",Zi="router",Yi="aria",Lt=Symbol(),Na={default:Lt},za=r=>(r==null?void 0:r.split(" "))||[],Qi=(r,t,e=[])=>{var s;return[...Array.from(((s=r.value)==null?void 0:s.classList)||[]),...e].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},Oe=(r,t,e=[],s=[],a,o)=>{t!==void 0&&t();const n=de.defineComponent((l,{attrs:u,slots:f,emit:m})=>{var $;const C=de.ref(),E=new Set(za(u.class)),P=de.getCurrentInstance(),H=(($=P==null?void 0:P.appContext)==null?void 0:$.provides[Da])?de.inject(Da):void 0,D=A=>{const{routerLink:B}=l;if(B!==Lt)if(H!==void 0){A.preventDefault();let Z={event:A};for(const oe in l){const Y=l[oe];l.hasOwnProperty(oe)&&oe.startsWith(Zi)&&Y!==Lt&&(Z[oe]=Y)}H.navigate(Z)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{l[a],za(u.class).forEach(Y=>{E.add(Y)});const A=l.onClick,B=Y=>{A!==void 0&&A(Y),Y.defaultPrevented||D(Y)};let Z={ref:C,class:Qi(C,E),onClick:B};for(const Y in l){const be=l[Y];(l.hasOwnProperty(Y)&&be!==Lt||Y.startsWith(Yi))&&(Z[Y]=be);const re="on"+Y.slice(0,1).toUpperCase()+Y.slice(1),Le=u[re];C.value&&u.hasOwnProperty(re)&&"addEventListener"in C.value&&C.value.addEventListener(Y,Le)}return ss in l&&l[ss]!==Lt&&(Z={...Z,href:l[ss]}),de.h(r,Z,f.default&&f.default())}});if(typeof n!="function"){let l=[],u={};u.ROUTER_LINK_VALUE=Na,e.forEach(f=>u[f]=Na),l=s,n.name=r,n.emits=l,n.props=u}return n},Ki=Oe("searchcraft-filter-panel",()=>{},["searchcraftId","items"]),Xi=Oe("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Ji=Oe("searchcraft-pagination",()=>{},["searchcraftId"]),ec=Oe("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),tc=Oe("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior"]),rc=Oe("searchcraft-results-info",()=>{},["template","searchcraftId"]),sc=Oe("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),ac=Oe("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),nc=Oe("searchcraft-summary-box",()=>{},["searchcraftId"]),oc=Oe("searchcraft-theme",()=>{}),ic=sc,cc=Ki,lc=Xi,uc=ec,hc=tc,dc=rc,fc=oc,pc=Ji,mc=ac,gc=nc;class bc extends qi{constructor(t,e=void 0){super(t,{sdkName:Gi,sdkVersion:Wi},e)}}da(),K.Searchcraft=bc,K.SearchcraftFilterPanel=cc,K.SearchcraftInputForm=lc,K.SearchcraftPagination=pc,K.SearchcraftPopoverButton=uc,K.SearchcraftPopoverForm=hc,K.SearchcraftResultsInfo=dc,K.SearchcraftSearchResults=ic,K.SearchcraftSearchResultsPerPage=mc,K.SearchcraftSummaryBox=gc,K.SearchcraftTheme=fc,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
81
81
  //# sourceMappingURL=index.umd.js.map