@searchcraft/vue-sdk 0.15.0 → 0.15.1

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,15 +1,15 @@
1
- (function(j,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Z):(j=typeof globalThis<"u"?globalThis:j||self,Z(j.SearchcraftVueSdk={},j.Vue))})(this,function(j,Z){"use strict";var ju=Object.defineProperty;var Gu=(j,Z,Rt)=>Z in j?ju(j,Z,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):j[Z]=Rt;var f=(j,Z,Rt)=>Gu(j,typeof Z!="symbol"?Z+"":Z,Rt);var Ks;const Rt="searchcraft-javascript-sdk",st={hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,state:!0,updatable:!0};var so=Object.defineProperty,ao=(s,e)=>{for(var t in e)so(s,t,{get:e[t],enumerable:!0})},no="http://www.w3.org/2000/svg",oo="http://www.w3.org/1999/xhtml",fa=(s=>(s.Undefined="undefined",s.Null="null",s.String="string",s.Number="number",s.SpecialNumber="number",s.Boolean="boolean",s.BigInt="bigint",s))(fa||{}),da=(s=>(s.Array="array",s.Date="date",s.Map="map",s.Object="object",s.RegularExpression="regexp",s.Set="set",s.Channel="channel",s.Symbol="symbol",s))(da||{}),Gr="type",Yr="value",Qr="serialized:",io=(s,e)=>{var t;const r=e.$cmpMeta$;Object.entries((t=r.$members$)!=null?t:{}).map(([n,[o]])=>{if(o&31||o&32){const c=s[n],u=co(Object.getPrototypeOf(s),n)||Object.getOwnPropertyDescriptor(s,n);u&&Object.defineProperty(s,n,{get(){return u.get.call(this)},set(i){u.set.call(this,i)},configurable:!0,enumerable:!0}),s[n]=e.$instanceValues$.has(n)?e.$instanceValues$.get(n):c}})};function co(s,e){for(;s;){const t=Object.getOwnPropertyDescriptor(s,e);if(t!=null&&t.get)return t;s=Object.getPrototypeOf(s)}}var Ke=s=>{if(s.__stencil__getHostRef)return s.__stencil__getHostRef()},lo=(s,e)=>{const t={$flags$:0,$hostElement$:s,$cmpMeta$:e,$instanceValues$:new Map,$serializerValues$:new Map};t.$onReadyPromise$=new Promise(a=>t.$onReadyResolve$=a),s["s-p"]=[],s["s-rc"]=[];const r=t;return s.__stencil__getHostRef=()=>r,e.$flags$&512&&st.state&&io(s,t),r},pa=(s,e)=>e in s,wr=(s,e)=>(0,console.error)(s,e),uo="r",ho="o",Xr="s",fo="t",po="c",$t="s-id",ma="c-id",ge=typeof window<"u"?window:{},G=ge.HTMLElement||class{},Q={$flags$:0,$resourcesUrl$:"",jmp:s=>s(),raf:s=>requestAnimationFrame(s),ael:(s,e,t,r)=>s.addEventListener(e,t,r),rel:(s,e,t,r)=>s.removeEventListener(e,t,r),ce:(s,e)=>new CustomEvent(s,e)},mo=st.shadowDom,go=s=>Promise.resolve(s),Kr=!1,ga=[],ba=[],bo=(s,e)=>t=>{s.push(t),Kr||(Kr=!0,Q.$flags$&4?Jr(Zr):Q.raf(Zr))},va=s=>{for(let e=0;e<s.length;e++)try{s[e](performance.now())}catch(t){wr(t)}s.length=0},Zr=()=>{va(ga),va(ba),(Kr=ga.length>0)&&Q.raf(Zr)},Jr=s=>go().then(s),vo=bo(ba),es=s=>(s=typeof s,s==="object"||s==="function"),yo=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),wo=class xt{static fromLocalValue(e){const t=e[Gr],r=Yr in e?e[Yr]:void 0;switch(t){case"string":return r;case"boolean":return r;case"bigint":return BigInt(r);case"undefined":return;case"null":return null;case"number":return r==="NaN"?NaN:r==="-0"?-0:r==="Infinity"?1/0:r==="-Infinity"?-1/0:r;case"array":return r.map(i=>xt.fromLocalValue(i));case"date":return new Date(r);case"map":const a=new Map;for(const[i,h]of r){const g=typeof i=="object"&&i!==null?xt.fromLocalValue(i):i,p=xt.fromLocalValue(h);a.set(g,p)}return a;case"object":const n={};for(const[i,h]of r)n[i]=xt.fromLocalValue(h);return n;case"regexp":const{pattern:o,flags:c}=r;return new RegExp(o,c);case"set":const u=new Set;for(const i of r)u.add(xt.fromLocalValue(i));return u;case"symbol":return Symbol(r);default:throw new Error(`Unsupported type: ${t}`)}}static fromLocalValueArray(e){return e.map(t=>xt.fromLocalValue(t))}static isLocalValueObject(e){if(typeof e!="object"||e===null||!e.hasOwnProperty(Gr))return!1;const t=e[Gr];return Object.values({...fa,...da}).includes(t)?t!=="null"&&t!=="undefined"?e.hasOwnProperty(Yr):!0:!1}},ko={};ao(ko,{err:()=>ya,map:()=>So,ok:()=>ts,unwrap:()=>xo,unwrapErr:()=>Ro});var ts=s=>({isOk:!0,isErr:!1,value:s}),ya=s=>({isOk:!1,isErr:!0,value:s});function So(s,e){if(s.isOk){const t=e(s.value);return t instanceof Promise?t.then(r=>ts(r)):ts(t)}if(s.isErr){const t=s.value;return ya(t)}throw"should never get here"}var xo=s=>{if(s.isOk)return s.value;throw s.value},Ro=s=>{if(s.isErr)return s.value;throw s.value};function Co(s){return typeof s!="string"||!s.startsWith(Qr)?s:wo.fromLocalValue(JSON.parse(atob(s.slice(Qr.length))))}var wa=s=>{const e=kr(s,"childNodes");s.tagName&&s.tagName.includes("-")&&s["s-cr"]&&s.tagName!=="SLOT-FB"&&ka(e,s.tagName).forEach(r=>{r.nodeType===1&&r.tagName==="SLOT-FB"&&(Eo(r,rs(r),!1).length?r.hidden=!0:r.hidden=!1)});let t=0;for(t=0;t<e.length;t++){const r=e[t];r.nodeType===1&&kr(r,"childNodes").length&&wa(r)}},To=s=>{const e=[];for(let t=0;t<s.length;t++){const r=s[t]["s-nr"]||void 0;r&&r.isConnected&&e.push(r)}return e};function ka(s,e,t){let r=0,a=[],n;for(;r<s.length;r++)n=s[r],n["s-sr"]&&(!e||n["s-hn"]===e)&&t===void 0&&a.push(n),a=[...a,...ka(n.childNodes,e,t)];return a}var Eo=(s,e,t=!0)=>{const r=[];(t&&s["s-sr"]||!s["s-sr"])&&r.push(s);let a=s;for(;a=a.nextSibling;)rs(a)===e&&(t||!a["s-sr"])&&r.push(a);return r},Sa=(s,e)=>s.nodeType===1?s.getAttribute("slot")===null&&e===""||s.getAttribute("slot")===e:s["s-sn"]===e?!0:e==="",Ao=(s,e,t,r)=>{if(s["s-ol"]&&s["s-ol"].isConnected)return;const a=document.createTextNode("");if(a["s-nr"]=s,!e["s-cr"]||!e["s-cr"].parentNode)return;const n=e["s-cr"].parentNode,o=kr(n,"appendChild");if(typeof r<"u"){a["s-oo"]=r;const c=kr(n,"childNodes"),u=[a];c.forEach(i=>{i["s-nr"]&&u.push(i)}),u.sort((i,h)=>!i["s-oo"]||i["s-oo"]<(h["s-oo"]||0)?-1:!h["s-oo"]||h["s-oo"]<i["s-oo"]?1:0),u.forEach(i=>o.call(n,i))}else o.call(n,a);s["s-ol"]=a,s["s-sh"]=e["s-hn"]},rs=s=>typeof s["s-sn"]=="string"?s["s-sn"]:s.nodeType===1&&s.getAttribute("slot")||void 0;function xa(s){if(s.assignedElements||s.assignedNodes||!s["s-sr"])return;const e=t=>(function(r){const a=[],n=this["s-sn"];r!=null&&r.flatten&&console.error(`
1
+ (function(j,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Z):(j=typeof globalThis<"u"?globalThis:j||self,Z(j.SearchcraftVueSdk={},j.Vue))})(this,function(j,Z){"use strict";var ju=Object.defineProperty;var Gu=(j,Z,Ct)=>Z in j?ju(j,Z,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):j[Z]=Ct;var f=(j,Z,Ct)=>Gu(j,typeof Z!="symbol"?Z+"":Z,Ct);var Ks;const Ct="searchcraft-javascript-sdk",st={hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,state:!0,updatable:!0};var so=Object.defineProperty,ao=(s,e)=>{for(var t in e)so(s,t,{get:e[t],enumerable:!0})},no="http://www.w3.org/2000/svg",oo="http://www.w3.org/1999/xhtml",fa=(s=>(s.Undefined="undefined",s.Null="null",s.String="string",s.Number="number",s.SpecialNumber="number",s.Boolean="boolean",s.BigInt="bigint",s))(fa||{}),da=(s=>(s.Array="array",s.Date="date",s.Map="map",s.Object="object",s.RegularExpression="regexp",s.Set="set",s.Channel="channel",s.Symbol="symbol",s))(da||{}),Gr="type",Yr="value",Qr="serialized:",io=(s,e)=>{var t;const r=e.$cmpMeta$;Object.entries((t=r.$members$)!=null?t:{}).map(([n,[o]])=>{if(o&31||o&32){const c=s[n],u=co(Object.getPrototypeOf(s),n)||Object.getOwnPropertyDescriptor(s,n);u&&Object.defineProperty(s,n,{get(){return u.get.call(this)},set(i){u.set.call(this,i)},configurable:!0,enumerable:!0}),s[n]=e.$instanceValues$.has(n)?e.$instanceValues$.get(n):c}})};function co(s,e){for(;s;){const t=Object.getOwnPropertyDescriptor(s,e);if(t!=null&&t.get)return t;s=Object.getPrototypeOf(s)}}var Ke=s=>{if(s.__stencil__getHostRef)return s.__stencil__getHostRef()},lo=(s,e)=>{const t={$flags$:0,$hostElement$:s,$cmpMeta$:e,$instanceValues$:new Map,$serializerValues$:new Map};t.$onReadyPromise$=new Promise(a=>t.$onReadyResolve$=a),s["s-p"]=[],s["s-rc"]=[];const r=t;return s.__stencil__getHostRef=()=>r,e.$flags$&512&&st.state&&io(s,t),r},pa=(s,e)=>e in s,wr=(s,e)=>(0,console.error)(s,e),uo="r",ho="o",Xr="s",fo="t",po="c",$t="s-id",ma="c-id",ge=typeof window<"u"?window:{},G=ge.HTMLElement||class{},Q={$flags$:0,$resourcesUrl$:"",jmp:s=>s(),raf:s=>requestAnimationFrame(s),ael:(s,e,t,r)=>s.addEventListener(e,t,r),rel:(s,e,t,r)=>s.removeEventListener(e,t,r),ce:(s,e)=>new CustomEvent(s,e)},mo=st.shadowDom,go=s=>Promise.resolve(s),Kr=!1,ga=[],ba=[],bo=(s,e)=>t=>{s.push(t),Kr||(Kr=!0,Q.$flags$&4?Jr(Zr):Q.raf(Zr))},va=s=>{for(let e=0;e<s.length;e++)try{s[e](performance.now())}catch(t){wr(t)}s.length=0},Zr=()=>{va(ga),va(ba),(Kr=ga.length>0)&&Q.raf(Zr)},Jr=s=>go().then(s),vo=bo(ba),es=s=>(s=typeof s,s==="object"||s==="function"),yo=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),wo=class xt{static fromLocalValue(e){const t=e[Gr],r=Yr in e?e[Yr]:void 0;switch(t){case"string":return r;case"boolean":return r;case"bigint":return BigInt(r);case"undefined":return;case"null":return null;case"number":return r==="NaN"?NaN:r==="-0"?-0:r==="Infinity"?1/0:r==="-Infinity"?-1/0:r;case"array":return r.map(i=>xt.fromLocalValue(i));case"date":return new Date(r);case"map":const a=new Map;for(const[i,h]of r){const g=typeof i=="object"&&i!==null?xt.fromLocalValue(i):i,p=xt.fromLocalValue(h);a.set(g,p)}return a;case"object":const n={};for(const[i,h]of r)n[i]=xt.fromLocalValue(h);return n;case"regexp":const{pattern:o,flags:c}=r;return new RegExp(o,c);case"set":const u=new Set;for(const i of r)u.add(xt.fromLocalValue(i));return u;case"symbol":return Symbol(r);default:throw new Error(`Unsupported type: ${t}`)}}static fromLocalValueArray(e){return e.map(t=>xt.fromLocalValue(t))}static isLocalValueObject(e){if(typeof e!="object"||e===null||!e.hasOwnProperty(Gr))return!1;const t=e[Gr];return Object.values({...fa,...da}).includes(t)?t!=="null"&&t!=="undefined"?e.hasOwnProperty(Yr):!0:!1}},So={};ao(So,{err:()=>ya,map:()=>ko,ok:()=>ts,unwrap:()=>xo,unwrapErr:()=>Co});var ts=s=>({isOk:!0,isErr:!1,value:s}),ya=s=>({isOk:!1,isErr:!0,value:s});function ko(s,e){if(s.isOk){const t=e(s.value);return t instanceof Promise?t.then(r=>ts(r)):ts(t)}if(s.isErr){const t=s.value;return ya(t)}throw"should never get here"}var xo=s=>{if(s.isOk)return s.value;throw s.value},Co=s=>{if(s.isErr)return s.value;throw s.value};function Ro(s){return typeof s!="string"||!s.startsWith(Qr)?s:wo.fromLocalValue(JSON.parse(atob(s.slice(Qr.length))))}var wa=s=>{const e=Sr(s,"childNodes");s.tagName&&s.tagName.includes("-")&&s["s-cr"]&&s.tagName!=="SLOT-FB"&&Sa(e,s.tagName).forEach(r=>{r.nodeType===1&&r.tagName==="SLOT-FB"&&(Eo(r,rs(r),!1).length?r.hidden=!0:r.hidden=!1)});let t=0;for(t=0;t<e.length;t++){const r=e[t];r.nodeType===1&&Sr(r,"childNodes").length&&wa(r)}},To=s=>{const e=[];for(let t=0;t<s.length;t++){const r=s[t]["s-nr"]||void 0;r&&r.isConnected&&e.push(r)}return e};function Sa(s,e,t){let r=0,a=[],n;for(;r<s.length;r++)n=s[r],n["s-sr"]&&(!e||n["s-hn"]===e)&&t===void 0&&a.push(n),a=[...a,...Sa(n.childNodes,e,t)];return a}var Eo=(s,e,t=!0)=>{const r=[];(t&&s["s-sr"]||!s["s-sr"])&&r.push(s);let a=s;for(;a=a.nextSibling;)rs(a)===e&&(t||!a["s-sr"])&&r.push(a);return r},ka=(s,e)=>s.nodeType===1?s.getAttribute("slot")===null&&e===""||s.getAttribute("slot")===e:s["s-sn"]===e?!0:e==="",Ao=(s,e,t,r)=>{if(s["s-ol"]&&s["s-ol"].isConnected)return;const a=document.createTextNode("");if(a["s-nr"]=s,!e["s-cr"]||!e["s-cr"].parentNode)return;const n=e["s-cr"].parentNode,o=Sr(n,"appendChild");if(typeof r<"u"){a["s-oo"]=r;const c=Sr(n,"childNodes"),u=[a];c.forEach(i=>{i["s-nr"]&&u.push(i)}),u.sort((i,h)=>!i["s-oo"]||i["s-oo"]<(h["s-oo"]||0)?-1:!h["s-oo"]||h["s-oo"]<i["s-oo"]?1:0),u.forEach(i=>o.call(n,i))}else o.call(n,a);s["s-ol"]=a,s["s-sh"]=e["s-hn"]},rs=s=>typeof s["s-sn"]=="string"?s["s-sn"]:s.nodeType===1&&s.getAttribute("slot")||void 0;function xa(s){if(s.assignedElements||s.assignedNodes||!s["s-sr"])return;const e=t=>(function(r){const a=[],n=this["s-sn"];r!=null&&r.flatten&&console.error(`
2
2
  Flattening is not supported for Stencil non-shadow slots.
3
3
  You can use \`.childNodes\` to nested slot fallback content.
4
4
  If you have a particular use case, please open an issue on the Stencil repo.
5
- `);const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:To(o.childNodes)).forEach(u=>{n===rs(u)&&a.push(u)}),t?a.filter(u=>u.nodeType===1):a}).bind(s);s.assignedElements=e(!0),s.assignedNodes=e(!1)}function kr(s,e){if("__"+e in s){const t=s["__"+e];return typeof t!="function"?t:t.bind(s)}else return typeof s[e]!="function"?s[e]:s[e].bind(s)}var Ct=(s,e="")=>()=>{},Sr=new WeakMap,$o=(s,e)=>"sc-"+s.$tagName$,d=(s,e,...t)=>{typeof s=="string"&&(s=s);let r=null,a=null,n=null,o=!1,c=!1;const u=[],i=g=>{for(let p=0;p<g.length;p++)r=g[p],Array.isArray(r)?i(r):r!=null&&typeof r!="boolean"&&((o=typeof s!="function"&&!es(r))&&(r=String(r)),o&&c?u[u.length-1].$text$+=r:u.push(o?Tt(null,r):r),c=o)};if(i(t),e){e.key&&(a=e.key),e.name&&(n=e.name);{const g=e.className||e.class;g&&(e.class=typeof g!="object"?g:Object.keys(g).filter(p=>g[p]).join(" "))}}if(typeof s=="function")return s(e===null?{}:e,u,Io);const h=Tt(s,null);return h.$attrs$=e,u.length>0&&(h.$children$=u),h.$key$=a,h.$name$=n,h},Tt=(s,e)=>{const t={$flags$:0,$tag$:s,$text$:e,$elm$:null,$children$:null};return t.$attrs$=null,t.$key$=null,t.$name$=null,t},Po={},_o=s=>s&&s.$tag$===Po,Io={forEach:(s,e)=>s.map(Ra).forEach(e),map:(s,e)=>s.map(Ra).map(e).map(Mo)},Ra=s=>({vattrs:s.$attrs$,vchildren:s.$children$,vkey:s.$key$,vname:s.$name$,vtag:s.$tag$,vtext:s.$text$}),Mo=s=>{if(typeof s.vtag=="function"){const t={...s.vattrs};return s.vkey&&(t.key=s.vkey),s.vname&&(t.name=s.vname),d(s.vtag,t,...s.vchildren||[])}const e=Tt(s.vtag,s.vtext);return e.$attrs$=s.vattrs,e.$children$=s.vchildren,e.$key$=s.vkey,e.$name$=s.vname,e},Lo=(s,e,t,r)=>{var a,n;const o=Ct("hydrateClient",e),c=s.shadowRoot,u=[],i=[],h=[],g=null,p=Tt(e,null);p.$elm$=s,ge.document&&(!Q.$orgLocNodes$||!Q.$orgLocNodes$.size)&&as(ge.document.body,Q.$orgLocNodes$=new Map),s[$t]=t,s.removeAttribute($t),r.$vnode$=ss(p,u,i,g,s,s,t,h);let y=0;const w=u.length;let S;for(y;y<w;y++){S=u[y];const z=S.$hostId$+"."+S.$nodeId$,V=Q.$orgLocNodes$.get(z),ne=S.$elm$;if(!c)ne["s-hn"]=e.toUpperCase(),S.$tag$==="slot"&&(ne["s-cr"]=s["s-cr"]);else if((a=S.$tag$)!=null&&a.toString().includes("-")&&S.$tag$!=="slot-fb"&&!S.$elm$.shadowRoot){const rt=Ke(S.$elm$);if(rt){const U=$o(rt.$cmpMeta$),ze=ge.document.querySelector(`style[sty-id="${U}"]`);ze&&s.shadowRoot.append(ze.cloneNode(!0))}}S.$tag$==="slot"&&(S.$name$=S.$elm$["s-sn"]||S.$elm$.name||null,S.$children$?(S.$flags$|=2,S.$elm$.childNodes.length||S.$children$.forEach(rt=>{S.$elm$.appendChild(rt.$elm$)})):S.$flags$|=1),V&&V.isConnected&&(V.parentElement.shadowRoot&&V["s-en"]===""&&V.parentNode.insertBefore(ne,V.nextSibling),V.parentNode.removeChild(V),c||(ne["s-oo"]=parseInt(S.$nodeId$))),V&&!V["s-id"]&&Q.$orgLocNodes$.delete(z)}const R=[],L=h.length;let E=0,k,x,F,C;for(E;E<L;E++)if(k=h[E],!(!k||!k.length))for(F=k.length,x=0,x;x<F;x++){if(C=k[x],R[C.hostId]||(R[C.hostId]=Q.$orgLocNodes$.get(C.hostId)),!R[C.hostId])continue;const z=R[C.hostId];z.shadowRoot&&C.node.parentElement!==z&&z.appendChild(C.node),(!z.shadowRoot||!c)&&(C.slot["s-cr"]||(C.slot["s-cr"]=z["s-cr"],!C.slot["s-cr"]&&z.shadowRoot?C.slot["s-cr"]=z:C.slot["s-cr"]=(z.__childNodes||z.childNodes)[0]),Ao(C.node,C.slot,!1,C.node["s-oo"]),(n=C.node.parentElement)!=null&&n.shadowRoot&&C.node.getAttribute&&C.node.getAttribute("slot")&&C.node.removeAttribute("slot"))}r.$hostElement$=s,o()},ss=(s,e,t,r,a,n,o,c=[])=>{let u,i,h,g;if(n.nodeType===1){if(u=n.getAttribute(ma),u&&(i=u.split("."),i[0]===o||i[0]==="0")){h=Ca({$flags$:0,$hostId$:i[0],$nodeId$:i[1],$depth$:i[2],$index$:i[3],$tag$:n.tagName.toLowerCase(),$elm$:n,$attrs$:{class:n.className||""}}),e.push(h),n.removeAttribute(ma),s.$children$||(s.$children$=[]);const y=h.$elm$.getAttribute("s-sn");typeof y=="string"&&(h.$tag$==="slot-fb"&&Ta(y,i[2],h,n,s,e,t,r,c),h.$elm$["s-sn"]=y,h.$elm$.removeAttribute("s-sn")),h.$index$!==void 0&&(s.$children$[h.$index$]=h),s=h}if(n.shadowRoot)for(g=n.shadowRoot.childNodes.length-1;g>=0;g--)ss(s,e,t,r,a,n.shadowRoot.childNodes[g],o,c);const p=n.__childNodes||n.childNodes;for(g=p.length-1;g>=0;g--)ss(s,e,t,r,a,p[g],o,c)}else if(n.nodeType===8){if(i=n.nodeValue.split("."),i[1]===o||i[1]==="0"){if(u=i[0],h=Ca({$hostId$:i[1],$nodeId$:i[2],$depth$:i[3],$index$:i[4]||"0",$elm$:n,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null}),u===fo)h.$elm$=Ea(n,3),h.$elm$&&h.$elm$.nodeType===3&&(h.$text$=h.$elm$.textContent,e.push(h),n.remove(),o===h.$hostId$&&(s.$children$||(s.$children$=[]),s.$children$[h.$index$]=h));else if(u===po)h.$elm$=Ea(n,8),h.$elm$&&h.$elm$.nodeType===8&&(e.push(h),n.remove());else if(h.$hostId$===o)if(u===Xr){const p=n["s-sn"]=i[5]||"";Ta(p,i[2],h,n,s,e,t,r,c)}else u===uo&&(a["s-cr"]=n,n["s-cn"]=!0)}}else if(s&&s.$tag$==="style"){const p=Tt(null,n.textContent);p.$elm$=n,p.$index$="0",s.$children$=[p]}else n.nodeType===3&&!n.wholeText.trim()&&!n["s-nr"]&&n.remove();return s},as=(s,e)=>{if(s.nodeType===1){const t=s[$t]||s.getAttribute($t);t&&e.set(t,s);let r=0;if(s.shadowRoot)for(;r<s.shadowRoot.childNodes.length;r++)as(s.shadowRoot.childNodes[r],e);const a=s.__childNodes||s.childNodes;for(r=0;r<a.length;r++)as(a[r],e)}else if(s.nodeType===8){const t=s.nodeValue.split(".");t[0]===ho&&(e.set(t[1]+"."+t[2],s),s.nodeValue="",s["s-en"]=t[3])}},Ca=s=>({...{$flags$:0,$hostId$:null,$nodeId$:null,$depth$:null,$index$:"0",$elm$:null,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},...s});function Ta(s,e,t,r,a,n,o,c,u){r["s-sr"]=!0,t.$name$=s||null,t.$tag$="slot";const i=a!=null&&a.$elm$?a.$elm$["s-id"]||a.$elm$.getAttribute("s-id"):"";{const h=t.$elm$,g=i&&i!==t.$hostId$&&a.$elm$.shadowRoot;Oo(u,e,s,r,g?i:t.$hostId$),xa(r),g&&a.$elm$.insertBefore(h,a.$elm$.children[0])}n.push(t),o.push(t),a.$children$||(a.$children$=[]),a.$children$[t.$index$]=t}var Oo=(s,e,t,r,a)=>{var n,o;let c=r.nextSibling;if(s[e]=s[e]||[],!(!c||(n=c.nodeValue)!=null&&n.startsWith(Xr+".")))do c&&((c.getAttribute&&c.getAttribute("slot")||c["s-sn"])===t||t===""&&!c["s-sn"]&&(!c.getAttribute||!c.getAttribute("slot"))&&(c.nodeType===8||c.nodeType===3))&&(c["s-sn"]=t,s[e].push({slot:r,node:c,hostId:a})),c=c==null?void 0:c.nextSibling;while(c&&!((o=c.nodeValue)!=null&&o.startsWith(Xr+".")))},Ea=(s,e)=>{let t=s;do t=t.nextSibling;while(t&&(t.nodeType!==e||!t.nodeValue));return t},ns=s=>{const e=yo(s);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ns("::slotted"),ns(":host"),ns(":host-context");var Aa=(s,e,t)=>typeof s=="string"&&s.startsWith(Qr)?(s=Co(s),s):s!=null&&!es(s)?e&4?s==="false"?!1:s===""||!!s:e&2?typeof s=="string"?parseFloat(s):typeof s=="number"?s:NaN:e&1?String(s):s:s,Fo=s=>s,Ze=(s,e,t)=>{const r=Fo(s);return{emit:a=>$a(r,e,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},$a=(s,e,t)=>{const r=Q.ce(e,t);return s.dispatchEvent(r),r},Pa=(s,e,t,r,a,n,o)=>{if(t===r)return;let c=pa(s,e),u=e.toLowerCase();if(e==="class"){const i=s.classList,h=_a(t);let g=_a(r);if((s["s-si"]||s["s-sc"])&&o){const p=s["s-sc"]||s["s-si"];g.push(p),h.forEach(y=>{y.startsWith(p)&&g.push(y)}),g=[...new Set(g)].filter(y=>y),i.add(...g)}else i.remove(...h.filter(p=>p&&!g.includes(p))),i.add(...g.filter(p=>p&&!h.includes(p)))}else if(e==="style"){for(const i in t)(!r||r[i]==null)&&(i.includes("-")?s.style.removeProperty(i):s.style[i]="");for(const i in r)(!t||r[i]!==t[i])&&(i.includes("-")?s.style.setProperty(i,r[i]):s.style[i]=r[i])}else if(e!=="key")if(e==="ref")r&&r(s);else if(!s.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):pa(ge,u)?e=u.slice(2):e=u[2]+e.slice(3),t||r){const i=e.endsWith(Ia);e=e.replace(No,""),t&&Q.rel(s,e,t,i),r&&Q.ael(s,e,r,i)}}else{const i=es(r);if((c||i&&r!==null)&&!a)try{if(s.tagName.includes("-"))s[e]!==r&&(s[e]=r);else{const h=r??"";e==="list"?c=!1:(t==null||s[e]!=h)&&(typeof s.__lookupSetter__(e)=="function"?s[e]=h:s.setAttribute(e,h))}}catch{}r==null||r===!1?(r!==!1||s.getAttribute(e)==="")&&s.removeAttribute(e):(!c||n&4||a)&&!i&&s.nodeType===1&&(r=r===!0?"":r,s.setAttribute(e,r))}},Do=/\s/,_a=s=>(typeof s=="object"&&s&&"baseVal"in s&&(s=s.baseVal),!s||typeof s!="string"?[]:s.split(Do)),Ia="Capture",No=new RegExp(Ia+"$"),os=(s,e,t,r)=>{const a=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,n=s&&s.$attrs$||{},o=e.$attrs$||{};for(const c of Ma(Object.keys(n)))c in o||Pa(a,c,n[c],void 0,t,e.$flags$,r);for(const c of Ma(Object.keys(o)))Pa(a,c,n[c],o[c],t,e.$flags$,r)};function Ma(s){return s.includes("ref")?[...s.filter(e=>e!=="ref"),"ref"]:s}var is,cs,ls=!1,xr=!1,us=!1,be=!1,Rr=(s,e,t)=>{var r;const a=e.$children$[t];let n=0,o,c,u;if(ls||(us=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)o=a.$elm$=ge.document.createTextNode(a.$text$);else if(a.$flags$&1)o=a.$elm$=ge.document.createTextNode(""),os(null,a,be);else{if(be||(be=a.$tag$==="svg"),!ge.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=a.$elm$=ge.document.createElementNS(be?no:oo,!ls&&st.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),be&&a.$tag$==="foreignObject"&&(be=!1),os(null,a,be),a.$children$)for(n=0;n<a.$children$.length;++n)c=Rr(s,a,n),c&&o.appendChild(c);a.$tag$==="svg"?be=!1:o.tagName==="foreignObject"&&(be=!0)}return o["s-hn"]=cs,a.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=is,o["s-sn"]=a.$name$||"",o["s-rf"]=(r=a.$attrs$)==null?void 0:r.ref,xa(o),u=s&&s.$children$&&s.$children$[t],u&&u.$tag$===a.$tag$&&s.$elm$&&Pt(s.$elm$,!1)),o},Pt=(s,e)=>{Q.$flags$|=1;const t=Array.from(s.__childNodes||s.childNodes);for(let r=t.length-1;r>=0;r--){const a=t[r];a["s-hn"]!==cs&&a["s-ol"]&&(Je(_t(a).parentNode,a,_t(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,us=!0),e&&Pt(a,e)}Q.$flags$&=-2},La=(s,e,t,r,a,n)=>{let o=s["s-cr"]&&s["s-cr"].parentNode||s,c;for(;a<=n;++a)r[a]&&(c=Rr(null,t,a),c&&(r[a].$elm$=c,Je(o,c,_t(e))))},Oa=(s,e,t)=>{for(let r=e;r<=t;++r){const a=s[r];if(a){const n=a.$elm$;Da(a),n&&(xr=!0,n["s-ol"]?n["s-ol"].remove():Pt(n,!0),n.remove())}}},zo=(s,e,t,r,a=!1)=>{let n=0,o=0,c=0,u=0,i=e.length-1,h=e[0],g=e[i],p=r.length-1,y=r[0],w=r[p],S,R;for(;n<=i&&o<=p;)if(h==null)h=e[++n];else if(g==null)g=e[--i];else if(y==null)y=r[++o];else if(w==null)w=r[--p];else if(Cr(h,y,a))Et(h,y,a),h=e[++n],y=r[++o];else if(Cr(g,w,a))Et(g,w,a),g=e[--i],w=r[--p];else if(Cr(h,w,a))(h.$tag$==="slot"||w.$tag$==="slot")&&Pt(h.$elm$.parentNode,!1),Et(h,w,a),Je(s,h.$elm$,g.$elm$.nextSibling),h=e[++n],w=r[--p];else if(Cr(g,y,a))(h.$tag$==="slot"||w.$tag$==="slot")&&Pt(g.$elm$.parentNode,!1),Et(g,y,a),Je(s,g.$elm$,h.$elm$),g=e[--i],y=r[++o];else{for(c=-1,u=n;u<=i;++u)if(e[u]&&e[u].$key$!==null&&e[u].$key$===y.$key$){c=u;break}c>=0?(R=e[c],R.$tag$!==y.$tag$?S=Rr(e&&e[o],t,c):(Et(R,y,a),e[c]=void 0,S=R.$elm$),y=r[++o]):(S=Rr(e&&e[o],t,o),y=r[++o]),S&&Je(_t(h.$elm$).parentNode,S,_t(h.$elm$))}n>i?La(s,r[p+1]==null?null:r[p+1].$elm$,t,r,o,p):o>p&&Oa(e,n,i)},Cr=(s,e,t=!1)=>s.$tag$===e.$tag$?s.$tag$==="slot"?s.$name$===e.$name$:t?(t&&!s.$key$&&e.$key$&&(s.$key$=e.$key$),!0):s.$key$===e.$key$:!1,_t=s=>s&&s["s-ol"]||s,Et=(s,e,t=!1)=>{const r=e.$elm$=s.$elm$,a=s.$children$,n=e.$children$,o=e.$tag$,c=e.$text$;let u;c===null?(be=o==="svg"?!0:o==="foreignObject"?!1:be,os(s,e,be,t),a!==null&&n!==null?zo(r,a,e,n,t):n!==null?(s.$text$!==null&&(r.textContent=""),La(r,null,e,n,0,n.length-1)):!t&&st.updatable&&a!==null?Oa(a,0,a.length-1):t&&st.updatable&&a!==null&&n===null&&(e.$children$=a),be&&o==="svg"&&(be=!1)):(u=r["s-cr"])?u.parentNode.textContent=c:s.$text$!==c&&(r.data=c)},Ue=[],Fa=s=>{let e,t,r;const a=s.__childNodes||s.childNodes;for(const n of a){if(n["s-sr"]&&(e=n["s-cr"])&&e.parentNode){t=e.parentNode.__childNodes||e.parentNode.childNodes;const o=n["s-sn"];for(r=t.length-1;r>=0;r--)if(e=t[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==n["s-hn"])if(Sa(e,o)){let c=Ue.find(u=>u.$nodeToRelocate$===e);xr=!0,e["s-sn"]=e["s-sn"]||o,c?(c.$nodeToRelocate$["s-sh"]=n["s-hn"],c.$slotRefNode$=n):(e["s-sh"]=n["s-hn"],Ue.push({$slotRefNode$:n,$nodeToRelocate$:e})),e["s-sr"]&&Ue.map(u=>{Sa(u.$nodeToRelocate$,e["s-sn"])&&(c=Ue.find(i=>i.$nodeToRelocate$===e),c&&!u.$slotRefNode$&&(u.$slotRefNode$=c.$slotRefNode$))})}else Ue.some(c=>c.$nodeToRelocate$===e)||Ue.push({$nodeToRelocate$:e})}n.nodeType===1&&Fa(n)}},Da=s=>{s.$attrs$&&s.$attrs$.ref&&s.$attrs$.ref(null),s.$children$&&s.$children$.map(Da)},Je=(s,e,t)=>s==null?void 0:s.insertBefore(e,t),Uo=(s,e,t=!1)=>{var r,a,n,o;const c=s.$hostElement$,u=s.$vnode$||Tt(null,null),h=_o(e)?e:d(null,null,e);if(cs=c.tagName,t&&h.$attrs$)for(const g of Object.keys(h.$attrs$))c.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(h.$attrs$[g]=c[g]);h.$tag$=null,h.$flags$|=4,s.$vnode$=h,h.$elm$=u.$elm$=c,ls=mo,is=c["s-cr"],xr=!1,Et(u,h,t);{if(Q.$flags$|=1,us){Fa(h.$elm$);for(const g of Ue){const p=g.$nodeToRelocate$;if(!p["s-ol"]&&ge.document){const y=ge.document.createTextNode("");y["s-nr"]=p,Je(p.parentNode,p["s-ol"]=y,p)}}for(const g of Ue){const p=g.$nodeToRelocate$,y=g.$slotRefNode$;if(y){const w=y.parentNode;let S=y.nextSibling;{let E=(r=p["s-ol"])==null?void 0:r.previousSibling;for(;E;){let k=(a=E["s-nr"])!=null?a:null;if(k&&k["s-sn"]===p["s-sn"]&&w===(k.__parentNode||k.parentNode)){for(k=k.nextSibling;k===p||k!=null&&k["s-sr"];)k=k==null?void 0:k.nextSibling;if(!k||!k["s-nr"]){S=k;break}}E=E.previousSibling}}const R=p.__parentNode||p.parentNode,L=p.__nextSibling||p.nextSibling;(!S&&w!==R||L!==S)&&p!==S&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),Je(w,p,S),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(n=p["s-ih"])!=null?n:!1)),p&&typeof y["s-rf"]=="function"&&y["s-rf"](y)}else p.nodeType===1&&(t&&(p["s-ih"]=(o=p.hidden)!=null?o:!1),p.hidden=!0)}}xr&&wa(h.$elm$),Q.$flags$&=-2,Ue.length=0}is=void 0},Na=(s,e)=>{if(e&&!s.$onRenderResolve$&&e["s-p"]){const t=e["s-p"].push(new Promise(r=>s.$onRenderResolve$=()=>{e["s-p"].splice(t-1,1),r()}))}},hs=(s,e)=>{if(s.$flags$|=16,s.$flags$&4){s.$flags$|=512;return}Na(s,s.$ancestorComponent$);const t=()=>Bo(s,e);if(e){queueMicrotask(()=>{t()});return}return vo(t)},Bo=(s,e)=>{const t=s.$hostElement$,r=Ct("scheduleUpdate",s.$cmpMeta$.$tagName$),a=t;if(!a)throw new Error(`Can't render component <${t.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return e?n=At(a,"componentWillLoad",void 0,t):n=At(a,"componentWillUpdate",void 0,t),n=za(n,()=>At(a,"componentWillRender",void 0,t)),r(),za(n,()=>qo(s,a,e))},za=(s,e)=>Ho(s)?s.then(e).catch(t=>{console.error(t),e()}):e(),Ho=s=>s instanceof Promise||s&&s.then&&typeof s.then=="function",qo=async(s,e,t)=>{var r;const a=s.$hostElement$,n=Ct("update",s.$cmpMeta$.$tagName$),o=a["s-rc"],c=Ct("render",s.$cmpMeta$.$tagName$);Wo(s,e,a,t),o&&(o.map(u=>u()),a["s-rc"]=void 0),c(),n();{const u=(r=a["s-p"])!=null?r:[],i=()=>Vo(s);u.length===0?i():(Promise.all(u).then(i),s.$flags$|=4,u.length=0)}},Wo=(s,e,t,r)=>{try{e=e.render(),s.$flags$&=-17,s.$flags$|=2,Uo(s,e,r)}catch(a){wr(a,s.$hostElement$)}return null},Vo=s=>{const e=s.$cmpMeta$.$tagName$,t=s.$hostElement$,r=Ct("postUpdate",e),a=t,n=s.$ancestorComponent$;At(a,"componentDidRender",void 0,t),s.$flags$&64?(At(a,"componentDidUpdate",void 0,t),r()):(s.$flags$|=64,Go(t),At(a,"componentDidLoad",void 0,t),r(),s.$onReadyResolve$(t),n||jo()),s.$onRenderResolve$&&(s.$onRenderResolve$(),s.$onRenderResolve$=void 0),s.$flags$&512&&Jr(()=>hs(s,!1)),s.$flags$&=-517},jo=s=>{var e;Jr(()=>$a(ge,"appload",{detail:{namespace:Rt}})),(e=Q.$orgLocNodes$)!=null&&e.size&&Q.$orgLocNodes$.clear()},At=(s,e,t,r)=>{if(s&&s[e])try{return s[e](t)}catch(a){wr(a,r)}},Go=s=>{var e;return s.classList.add((e=st.hydratedSelectorName)!=null?e:"hydrated")},Yo=(s,e)=>Ke(s).$instanceValues$.get(e),Ua=(s,e,t,r)=>{const a=Ke(s);if(!a)return;const n=s,o=a.$instanceValues$.get(e),c=a.$flags$,u=n;t=Aa(t,r.$members$[e][0]);const i=Number.isNaN(o)&&Number.isNaN(t);if(t!==o&&!i){a.$instanceValues$.set(e,t);{if(r.$watchers$&&c&128){const g=r.$watchers$[e];g&&g.map(p=>{try{u[p](t,o,e)}catch(y){wr(y,n)}})}if((c&18)===2){if(u.componentShouldUpdate&&u.componentShouldUpdate(t,o,e)===!1)return;hs(a,!1)}}}},Qo=(s,e,t)=>{var r,a;const n=s.prototype;{s.watchers&&!e.$watchers$&&(e.$watchers$=s.watchers),s.deserializers&&!e.$deserializers$&&(e.$deserializers$=s.deserializers),s.serializers&&!e.$serializers$&&(e.$serializers$=s.serializers);const o=Object.entries((r=e.$members$)!=null?r:{});o.map(([c,[u]])=>{if(u&31||u&32){const{get:i,set:h}=Object.getOwnPropertyDescriptor(n,c)||{};i&&(e.$members$[c][0]|=2048),h&&(e.$members$[c][0]|=4096),Object.defineProperty(n,c,{get(){return i?i.apply(this):Yo(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(n,c,{set(g){const p=Ke(this);if(p){if(h){typeof(u&32?this[c]:p.$hostElement$[c])>"u"&&p.$instanceValues$.get(c)&&(g=p.$instanceValues$.get(c)),h.apply(this,[Aa(g,u)]),g=u&32?this[c]:p.$hostElement$[c],Ua(this,c,g,e);return}{Ua(this,c,g,e);return}}}})}});{const c=new Map;n.attributeChangedCallback=function(u,i,h){Q.jmp(()=>{var g;const p=c.get(u),y=Ke(this);if(this.hasOwnProperty(p)&&st.lazyLoad,n.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==h)return;if(p==null){const R=y==null?void 0:y.$flags$;if(y&&R&&!(R&8)&&R&128&&h!==i){const E=this,k=(g=e.$watchers$)==null?void 0:g[u];k==null||k.forEach(x=>{E[x]!=null&&E[x].call(E,h,i,u)})}return}const w=o.find(([R])=>R===p);w&&w[1][0]&4&&(h=!(h===null||h==="false"));const S=Object.getOwnPropertyDescriptor(n,p);h!=this[p]&&(!S.get||S.set)&&(this[p]=h)})},s.observedAttributes=Array.from(new Set([...Object.keys((a=e.$watchers$)!=null?a:{}),...o.filter(([u,i])=>i[0]&31).map(([u,i])=>{const h=i[1]||u;return c.set(h,u),h})]))}}return s},Xo=async(s,e,t,r)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const o=s.localName;customElements.whenDefined(o).then(()=>e.$flags$|=128)}}const a=e.$ancestorComponent$,n=()=>hs(e,!0);a&&a["s-rc"]?a["s-rc"].push(n):n()},Ko=(s,e)=>{},Zo=s=>{if(!(Q.$flags$&1)){const e=Ke(s);if(!e)return;const t=e.$cmpMeta$,r=Ct("connectedCallback",t.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>Ko());else{e.$flags$|=1;let a;a=s.getAttribute($t),a&&Lo(s,t.$tagName$,a,e),a||t.$flags$&12&&Jo(s);{let n=s;for(;n=n.parentNode||n.host;)if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Na(e,e.$ancestorComponent$=n);break}}t.$members$&&Object.entries(t.$members$).map(([n,[o]])=>{if(o&31&&n in s&&s[n]!==Object.prototype[n]){const c=s[n];delete s[n],s[n]=c}}),Xo(s,e)}r()}},Jo=s=>{if(!ge.document)return;const e=s["s-cr"]=ge.document.createComment("");e["s-cn"]=!0,Je(s,e,s.firstChild)},ei=async s=>{Q.$flags$&1||Ke(s),Sr.has(s)&&Sr.delete(s),s.shadowRoot&&Sr.has(s.shadowRoot)&&Sr.delete(s.shadowRoot)},Y=(s,e)=>{const t={$flags$:e[0],$tagName$:e[1]};t.$members$=e[2],t.$watchers$=s.$watchers$,t.$deserializers$=s.$deserializers$,t.$serializers$=s.$serializers$;const r=s.prototype.connectedCallback,a=s.prototype.disconnectedCallback;return Object.assign(s.prototype,{__hasHostListenerAttached:!1,__registerHost(){lo(this,t)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!Ke(this))return;this.__hasHostListenerAttached=!0}Zo(this),r&&r.call(this)},disconnectedCallback(){ei(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),s.is=t.$tagName$,Qo(s,t)},ti=(s,e)=>e;function Yu(s){return s}function ri(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var fs={exports:{}};/*!
5
+ `);const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:To(o.childNodes)).forEach(u=>{n===rs(u)&&a.push(u)}),t?a.filter(u=>u.nodeType===1):a}).bind(s);s.assignedElements=e(!0),s.assignedNodes=e(!1)}function Sr(s,e){if("__"+e in s){const t=s["__"+e];return typeof t!="function"?t:t.bind(s)}else return typeof s[e]!="function"?s[e]:s[e].bind(s)}var Rt=(s,e="")=>()=>{},kr=new WeakMap,$o=(s,e)=>"sc-"+s.$tagName$,d=(s,e,...t)=>{typeof s=="string"&&(s=s);let r=null,a=null,n=null,o=!1,c=!1;const u=[],i=g=>{for(let p=0;p<g.length;p++)r=g[p],Array.isArray(r)?i(r):r!=null&&typeof r!="boolean"&&((o=typeof s!="function"&&!es(r))&&(r=String(r)),o&&c?u[u.length-1].$text$+=r:u.push(o?Tt(null,r):r),c=o)};if(i(t),e){e.key&&(a=e.key),e.name&&(n=e.name);{const g=e.className||e.class;g&&(e.class=typeof g!="object"?g:Object.keys(g).filter(p=>g[p]).join(" "))}}if(typeof s=="function")return s(e===null?{}:e,u,Io);const h=Tt(s,null);return h.$attrs$=e,u.length>0&&(h.$children$=u),h.$key$=a,h.$name$=n,h},Tt=(s,e)=>{const t={$flags$:0,$tag$:s,$text$:e,$elm$:null,$children$:null};return t.$attrs$=null,t.$key$=null,t.$name$=null,t},Po={},_o=s=>s&&s.$tag$===Po,Io={forEach:(s,e)=>s.map(Ca).forEach(e),map:(s,e)=>s.map(Ca).map(e).map(Mo)},Ca=s=>({vattrs:s.$attrs$,vchildren:s.$children$,vkey:s.$key$,vname:s.$name$,vtag:s.$tag$,vtext:s.$text$}),Mo=s=>{if(typeof s.vtag=="function"){const t={...s.vattrs};return s.vkey&&(t.key=s.vkey),s.vname&&(t.name=s.vname),d(s.vtag,t,...s.vchildren||[])}const e=Tt(s.vtag,s.vtext);return e.$attrs$=s.vattrs,e.$children$=s.vchildren,e.$key$=s.vkey,e.$name$=s.vname,e},Lo=(s,e,t,r)=>{var a,n;const o=Rt("hydrateClient",e),c=s.shadowRoot,u=[],i=[],h=[],g=null,p=Tt(e,null);p.$elm$=s,ge.document&&(!Q.$orgLocNodes$||!Q.$orgLocNodes$.size)&&as(ge.document.body,Q.$orgLocNodes$=new Map),s[$t]=t,s.removeAttribute($t),r.$vnode$=ss(p,u,i,g,s,s,t,h);let y=0;const w=u.length;let k;for(y;y<w;y++){k=u[y];const z=k.$hostId$+"."+k.$nodeId$,V=Q.$orgLocNodes$.get(z),ne=k.$elm$;if(!c)ne["s-hn"]=e.toUpperCase(),k.$tag$==="slot"&&(ne["s-cr"]=s["s-cr"]);else if((a=k.$tag$)!=null&&a.toString().includes("-")&&k.$tag$!=="slot-fb"&&!k.$elm$.shadowRoot){const rt=Ke(k.$elm$);if(rt){const U=$o(rt.$cmpMeta$),ze=ge.document.querySelector(`style[sty-id="${U}"]`);ze&&s.shadowRoot.append(ze.cloneNode(!0))}}k.$tag$==="slot"&&(k.$name$=k.$elm$["s-sn"]||k.$elm$.name||null,k.$children$?(k.$flags$|=2,k.$elm$.childNodes.length||k.$children$.forEach(rt=>{k.$elm$.appendChild(rt.$elm$)})):k.$flags$|=1),V&&V.isConnected&&(V.parentElement.shadowRoot&&V["s-en"]===""&&V.parentNode.insertBefore(ne,V.nextSibling),V.parentNode.removeChild(V),c||(ne["s-oo"]=parseInt(k.$nodeId$))),V&&!V["s-id"]&&Q.$orgLocNodes$.delete(z)}const C=[],L=h.length;let E=0,S,x,F,R;for(E;E<L;E++)if(S=h[E],!(!S||!S.length))for(F=S.length,x=0,x;x<F;x++){if(R=S[x],C[R.hostId]||(C[R.hostId]=Q.$orgLocNodes$.get(R.hostId)),!C[R.hostId])continue;const z=C[R.hostId];z.shadowRoot&&R.node.parentElement!==z&&z.appendChild(R.node),(!z.shadowRoot||!c)&&(R.slot["s-cr"]||(R.slot["s-cr"]=z["s-cr"],!R.slot["s-cr"]&&z.shadowRoot?R.slot["s-cr"]=z:R.slot["s-cr"]=(z.__childNodes||z.childNodes)[0]),Ao(R.node,R.slot,!1,R.node["s-oo"]),(n=R.node.parentElement)!=null&&n.shadowRoot&&R.node.getAttribute&&R.node.getAttribute("slot")&&R.node.removeAttribute("slot"))}r.$hostElement$=s,o()},ss=(s,e,t,r,a,n,o,c=[])=>{let u,i,h,g;if(n.nodeType===1){if(u=n.getAttribute(ma),u&&(i=u.split("."),i[0]===o||i[0]==="0")){h=Ra({$flags$:0,$hostId$:i[0],$nodeId$:i[1],$depth$:i[2],$index$:i[3],$tag$:n.tagName.toLowerCase(),$elm$:n,$attrs$:{class:n.className||""}}),e.push(h),n.removeAttribute(ma),s.$children$||(s.$children$=[]);const y=h.$elm$.getAttribute("s-sn");typeof y=="string"&&(h.$tag$==="slot-fb"&&Ta(y,i[2],h,n,s,e,t,r,c),h.$elm$["s-sn"]=y,h.$elm$.removeAttribute("s-sn")),h.$index$!==void 0&&(s.$children$[h.$index$]=h),s=h}if(n.shadowRoot)for(g=n.shadowRoot.childNodes.length-1;g>=0;g--)ss(s,e,t,r,a,n.shadowRoot.childNodes[g],o,c);const p=n.__childNodes||n.childNodes;for(g=p.length-1;g>=0;g--)ss(s,e,t,r,a,p[g],o,c)}else if(n.nodeType===8){if(i=n.nodeValue.split("."),i[1]===o||i[1]==="0"){if(u=i[0],h=Ra({$hostId$:i[1],$nodeId$:i[2],$depth$:i[3],$index$:i[4]||"0",$elm$:n,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null}),u===fo)h.$elm$=Ea(n,3),h.$elm$&&h.$elm$.nodeType===3&&(h.$text$=h.$elm$.textContent,e.push(h),n.remove(),o===h.$hostId$&&(s.$children$||(s.$children$=[]),s.$children$[h.$index$]=h));else if(u===po)h.$elm$=Ea(n,8),h.$elm$&&h.$elm$.nodeType===8&&(e.push(h),n.remove());else if(h.$hostId$===o)if(u===Xr){const p=n["s-sn"]=i[5]||"";Ta(p,i[2],h,n,s,e,t,r,c)}else u===uo&&(a["s-cr"]=n,n["s-cn"]=!0)}}else if(s&&s.$tag$==="style"){const p=Tt(null,n.textContent);p.$elm$=n,p.$index$="0",s.$children$=[p]}else n.nodeType===3&&!n.wholeText.trim()&&!n["s-nr"]&&n.remove();return s},as=(s,e)=>{if(s.nodeType===1){const t=s[$t]||s.getAttribute($t);t&&e.set(t,s);let r=0;if(s.shadowRoot)for(;r<s.shadowRoot.childNodes.length;r++)as(s.shadowRoot.childNodes[r],e);const a=s.__childNodes||s.childNodes;for(r=0;r<a.length;r++)as(a[r],e)}else if(s.nodeType===8){const t=s.nodeValue.split(".");t[0]===ho&&(e.set(t[1]+"."+t[2],s),s.nodeValue="",s["s-en"]=t[3])}},Ra=s=>({...{$flags$:0,$hostId$:null,$nodeId$:null,$depth$:null,$index$:"0",$elm$:null,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},...s});function Ta(s,e,t,r,a,n,o,c,u){r["s-sr"]=!0,t.$name$=s||null,t.$tag$="slot";const i=a!=null&&a.$elm$?a.$elm$["s-id"]||a.$elm$.getAttribute("s-id"):"";{const h=t.$elm$,g=i&&i!==t.$hostId$&&a.$elm$.shadowRoot;Oo(u,e,s,r,g?i:t.$hostId$),xa(r),g&&a.$elm$.insertBefore(h,a.$elm$.children[0])}n.push(t),o.push(t),a.$children$||(a.$children$=[]),a.$children$[t.$index$]=t}var Oo=(s,e,t,r,a)=>{var n,o;let c=r.nextSibling;if(s[e]=s[e]||[],!(!c||(n=c.nodeValue)!=null&&n.startsWith(Xr+".")))do c&&((c.getAttribute&&c.getAttribute("slot")||c["s-sn"])===t||t===""&&!c["s-sn"]&&(!c.getAttribute||!c.getAttribute("slot"))&&(c.nodeType===8||c.nodeType===3))&&(c["s-sn"]=t,s[e].push({slot:r,node:c,hostId:a})),c=c==null?void 0:c.nextSibling;while(c&&!((o=c.nodeValue)!=null&&o.startsWith(Xr+".")))},Ea=(s,e)=>{let t=s;do t=t.nextSibling;while(t&&(t.nodeType!==e||!t.nodeValue));return t},ns=s=>{const e=yo(s);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ns("::slotted"),ns(":host"),ns(":host-context");var Aa=(s,e,t)=>typeof s=="string"&&s.startsWith(Qr)?(s=Ro(s),s):s!=null&&!es(s)?e&4?s==="false"?!1:s===""||!!s:e&2?typeof s=="string"?parseFloat(s):typeof s=="number"?s:NaN:e&1?String(s):s:s,Fo=s=>s,Ze=(s,e,t)=>{const r=Fo(s);return{emit:a=>$a(r,e,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},$a=(s,e,t)=>{const r=Q.ce(e,t);return s.dispatchEvent(r),r},Pa=(s,e,t,r,a,n,o)=>{if(t===r)return;let c=pa(s,e),u=e.toLowerCase();if(e==="class"){const i=s.classList,h=_a(t);let g=_a(r);if((s["s-si"]||s["s-sc"])&&o){const p=s["s-sc"]||s["s-si"];g.push(p),h.forEach(y=>{y.startsWith(p)&&g.push(y)}),g=[...new Set(g)].filter(y=>y),i.add(...g)}else i.remove(...h.filter(p=>p&&!g.includes(p))),i.add(...g.filter(p=>p&&!h.includes(p)))}else if(e==="style"){for(const i in t)(!r||r[i]==null)&&(i.includes("-")?s.style.removeProperty(i):s.style[i]="");for(const i in r)(!t||r[i]!==t[i])&&(i.includes("-")?s.style.setProperty(i,r[i]):s.style[i]=r[i])}else if(e!=="key")if(e==="ref")r&&r(s);else if(!s.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):pa(ge,u)?e=u.slice(2):e=u[2]+e.slice(3),t||r){const i=e.endsWith(Ia);e=e.replace(No,""),t&&Q.rel(s,e,t,i),r&&Q.ael(s,e,r,i)}}else{const i=es(r);if((c||i&&r!==null)&&!a)try{if(s.tagName.includes("-"))s[e]!==r&&(s[e]=r);else{const h=r??"";e==="list"?c=!1:(t==null||s[e]!=h)&&(typeof s.__lookupSetter__(e)=="function"?s[e]=h:s.setAttribute(e,h))}}catch{}r==null||r===!1?(r!==!1||s.getAttribute(e)==="")&&s.removeAttribute(e):(!c||n&4||a)&&!i&&s.nodeType===1&&(r=r===!0?"":r,s.setAttribute(e,r))}},Do=/\s/,_a=s=>(typeof s=="object"&&s&&"baseVal"in s&&(s=s.baseVal),!s||typeof s!="string"?[]:s.split(Do)),Ia="Capture",No=new RegExp(Ia+"$"),os=(s,e,t,r)=>{const a=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,n=s&&s.$attrs$||{},o=e.$attrs$||{};for(const c of Ma(Object.keys(n)))c in o||Pa(a,c,n[c],void 0,t,e.$flags$,r);for(const c of Ma(Object.keys(o)))Pa(a,c,n[c],o[c],t,e.$flags$,r)};function Ma(s){return s.includes("ref")?[...s.filter(e=>e!=="ref"),"ref"]:s}var is,cs,ls=!1,xr=!1,us=!1,be=!1,Cr=(s,e,t)=>{var r;const a=e.$children$[t];let n=0,o,c,u;if(ls||(us=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)o=a.$elm$=ge.document.createTextNode(a.$text$);else if(a.$flags$&1)o=a.$elm$=ge.document.createTextNode(""),os(null,a,be);else{if(be||(be=a.$tag$==="svg"),!ge.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=a.$elm$=ge.document.createElementNS(be?no:oo,!ls&&st.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),be&&a.$tag$==="foreignObject"&&(be=!1),os(null,a,be),a.$children$)for(n=0;n<a.$children$.length;++n)c=Cr(s,a,n),c&&o.appendChild(c);a.$tag$==="svg"?be=!1:o.tagName==="foreignObject"&&(be=!0)}return o["s-hn"]=cs,a.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=is,o["s-sn"]=a.$name$||"",o["s-rf"]=(r=a.$attrs$)==null?void 0:r.ref,xa(o),u=s&&s.$children$&&s.$children$[t],u&&u.$tag$===a.$tag$&&s.$elm$&&Pt(s.$elm$,!1)),o},Pt=(s,e)=>{Q.$flags$|=1;const t=Array.from(s.__childNodes||s.childNodes);for(let r=t.length-1;r>=0;r--){const a=t[r];a["s-hn"]!==cs&&a["s-ol"]&&(Je(_t(a).parentNode,a,_t(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,us=!0),e&&Pt(a,e)}Q.$flags$&=-2},La=(s,e,t,r,a,n)=>{let o=s["s-cr"]&&s["s-cr"].parentNode||s,c;for(;a<=n;++a)r[a]&&(c=Cr(null,t,a),c&&(r[a].$elm$=c,Je(o,c,_t(e))))},Oa=(s,e,t)=>{for(let r=e;r<=t;++r){const a=s[r];if(a){const n=a.$elm$;Da(a),n&&(xr=!0,n["s-ol"]?n["s-ol"].remove():Pt(n,!0),n.remove())}}},zo=(s,e,t,r,a=!1)=>{let n=0,o=0,c=0,u=0,i=e.length-1,h=e[0],g=e[i],p=r.length-1,y=r[0],w=r[p],k,C;for(;n<=i&&o<=p;)if(h==null)h=e[++n];else if(g==null)g=e[--i];else if(y==null)y=r[++o];else if(w==null)w=r[--p];else if(Rr(h,y,a))Et(h,y,a),h=e[++n],y=r[++o];else if(Rr(g,w,a))Et(g,w,a),g=e[--i],w=r[--p];else if(Rr(h,w,a))(h.$tag$==="slot"||w.$tag$==="slot")&&Pt(h.$elm$.parentNode,!1),Et(h,w,a),Je(s,h.$elm$,g.$elm$.nextSibling),h=e[++n],w=r[--p];else if(Rr(g,y,a))(h.$tag$==="slot"||w.$tag$==="slot")&&Pt(g.$elm$.parentNode,!1),Et(g,y,a),Je(s,g.$elm$,h.$elm$),g=e[--i],y=r[++o];else{for(c=-1,u=n;u<=i;++u)if(e[u]&&e[u].$key$!==null&&e[u].$key$===y.$key$){c=u;break}c>=0?(C=e[c],C.$tag$!==y.$tag$?k=Cr(e&&e[o],t,c):(Et(C,y,a),e[c]=void 0,k=C.$elm$),y=r[++o]):(k=Cr(e&&e[o],t,o),y=r[++o]),k&&Je(_t(h.$elm$).parentNode,k,_t(h.$elm$))}n>i?La(s,r[p+1]==null?null:r[p+1].$elm$,t,r,o,p):o>p&&Oa(e,n,i)},Rr=(s,e,t=!1)=>s.$tag$===e.$tag$?s.$tag$==="slot"?s.$name$===e.$name$:t?(t&&!s.$key$&&e.$key$&&(s.$key$=e.$key$),!0):s.$key$===e.$key$:!1,_t=s=>s&&s["s-ol"]||s,Et=(s,e,t=!1)=>{const r=e.$elm$=s.$elm$,a=s.$children$,n=e.$children$,o=e.$tag$,c=e.$text$;let u;c===null?(be=o==="svg"?!0:o==="foreignObject"?!1:be,os(s,e,be,t),a!==null&&n!==null?zo(r,a,e,n,t):n!==null?(s.$text$!==null&&(r.textContent=""),La(r,null,e,n,0,n.length-1)):!t&&st.updatable&&a!==null?Oa(a,0,a.length-1):t&&st.updatable&&a!==null&&n===null&&(e.$children$=a),be&&o==="svg"&&(be=!1)):(u=r["s-cr"])?u.parentNode.textContent=c:s.$text$!==c&&(r.data=c)},Ue=[],Fa=s=>{let e,t,r;const a=s.__childNodes||s.childNodes;for(const n of a){if(n["s-sr"]&&(e=n["s-cr"])&&e.parentNode){t=e.parentNode.__childNodes||e.parentNode.childNodes;const o=n["s-sn"];for(r=t.length-1;r>=0;r--)if(e=t[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==n["s-hn"])if(ka(e,o)){let c=Ue.find(u=>u.$nodeToRelocate$===e);xr=!0,e["s-sn"]=e["s-sn"]||o,c?(c.$nodeToRelocate$["s-sh"]=n["s-hn"],c.$slotRefNode$=n):(e["s-sh"]=n["s-hn"],Ue.push({$slotRefNode$:n,$nodeToRelocate$:e})),e["s-sr"]&&Ue.map(u=>{ka(u.$nodeToRelocate$,e["s-sn"])&&(c=Ue.find(i=>i.$nodeToRelocate$===e),c&&!u.$slotRefNode$&&(u.$slotRefNode$=c.$slotRefNode$))})}else Ue.some(c=>c.$nodeToRelocate$===e)||Ue.push({$nodeToRelocate$:e})}n.nodeType===1&&Fa(n)}},Da=s=>{s.$attrs$&&s.$attrs$.ref&&s.$attrs$.ref(null),s.$children$&&s.$children$.map(Da)},Je=(s,e,t)=>s==null?void 0:s.insertBefore(e,t),Uo=(s,e,t=!1)=>{var r,a,n,o;const c=s.$hostElement$,u=s.$vnode$||Tt(null,null),h=_o(e)?e:d(null,null,e);if(cs=c.tagName,t&&h.$attrs$)for(const g of Object.keys(h.$attrs$))c.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(h.$attrs$[g]=c[g]);h.$tag$=null,h.$flags$|=4,s.$vnode$=h,h.$elm$=u.$elm$=c,ls=mo,is=c["s-cr"],xr=!1,Et(u,h,t);{if(Q.$flags$|=1,us){Fa(h.$elm$);for(const g of Ue){const p=g.$nodeToRelocate$;if(!p["s-ol"]&&ge.document){const y=ge.document.createTextNode("");y["s-nr"]=p,Je(p.parentNode,p["s-ol"]=y,p)}}for(const g of Ue){const p=g.$nodeToRelocate$,y=g.$slotRefNode$;if(y){const w=y.parentNode;let k=y.nextSibling;{let E=(r=p["s-ol"])==null?void 0:r.previousSibling;for(;E;){let S=(a=E["s-nr"])!=null?a:null;if(S&&S["s-sn"]===p["s-sn"]&&w===(S.__parentNode||S.parentNode)){for(S=S.nextSibling;S===p||S!=null&&S["s-sr"];)S=S==null?void 0:S.nextSibling;if(!S||!S["s-nr"]){k=S;break}}E=E.previousSibling}}const C=p.__parentNode||p.parentNode,L=p.__nextSibling||p.nextSibling;(!k&&w!==C||L!==k)&&p!==k&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),Je(w,p,k),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(n=p["s-ih"])!=null?n:!1)),p&&typeof y["s-rf"]=="function"&&y["s-rf"](y)}else p.nodeType===1&&(t&&(p["s-ih"]=(o=p.hidden)!=null?o:!1),p.hidden=!0)}}xr&&wa(h.$elm$),Q.$flags$&=-2,Ue.length=0}is=void 0},Na=(s,e)=>{if(e&&!s.$onRenderResolve$&&e["s-p"]){const t=e["s-p"].push(new Promise(r=>s.$onRenderResolve$=()=>{e["s-p"].splice(t-1,1),r()}))}},hs=(s,e)=>{if(s.$flags$|=16,s.$flags$&4){s.$flags$|=512;return}Na(s,s.$ancestorComponent$);const t=()=>Bo(s,e);if(e){queueMicrotask(()=>{t()});return}return vo(t)},Bo=(s,e)=>{const t=s.$hostElement$,r=Rt("scheduleUpdate",s.$cmpMeta$.$tagName$),a=t;if(!a)throw new Error(`Can't render component <${t.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let n;return e?n=At(a,"componentWillLoad",void 0,t):n=At(a,"componentWillUpdate",void 0,t),n=za(n,()=>At(a,"componentWillRender",void 0,t)),r(),za(n,()=>qo(s,a,e))},za=(s,e)=>Ho(s)?s.then(e).catch(t=>{console.error(t),e()}):e(),Ho=s=>s instanceof Promise||s&&s.then&&typeof s.then=="function",qo=async(s,e,t)=>{var r;const a=s.$hostElement$,n=Rt("update",s.$cmpMeta$.$tagName$),o=a["s-rc"],c=Rt("render",s.$cmpMeta$.$tagName$);Wo(s,e,a,t),o&&(o.map(u=>u()),a["s-rc"]=void 0),c(),n();{const u=(r=a["s-p"])!=null?r:[],i=()=>Vo(s);u.length===0?i():(Promise.all(u).then(i),s.$flags$|=4,u.length=0)}},Wo=(s,e,t,r)=>{try{e=e.render(),s.$flags$&=-17,s.$flags$|=2,Uo(s,e,r)}catch(a){wr(a,s.$hostElement$)}return null},Vo=s=>{const e=s.$cmpMeta$.$tagName$,t=s.$hostElement$,r=Rt("postUpdate",e),a=t,n=s.$ancestorComponent$;At(a,"componentDidRender",void 0,t),s.$flags$&64?(At(a,"componentDidUpdate",void 0,t),r()):(s.$flags$|=64,Go(t),At(a,"componentDidLoad",void 0,t),r(),s.$onReadyResolve$(t),n||jo()),s.$onRenderResolve$&&(s.$onRenderResolve$(),s.$onRenderResolve$=void 0),s.$flags$&512&&Jr(()=>hs(s,!1)),s.$flags$&=-517},jo=s=>{var e;Jr(()=>$a(ge,"appload",{detail:{namespace:Ct}})),(e=Q.$orgLocNodes$)!=null&&e.size&&Q.$orgLocNodes$.clear()},At=(s,e,t,r)=>{if(s&&s[e])try{return s[e](t)}catch(a){wr(a,r)}},Go=s=>{var e;return s.classList.add((e=st.hydratedSelectorName)!=null?e:"hydrated")},Yo=(s,e)=>Ke(s).$instanceValues$.get(e),Ua=(s,e,t,r)=>{const a=Ke(s);if(!a)return;const n=s,o=a.$instanceValues$.get(e),c=a.$flags$,u=n;t=Aa(t,r.$members$[e][0]);const i=Number.isNaN(o)&&Number.isNaN(t);if(t!==o&&!i){a.$instanceValues$.set(e,t);{if(r.$watchers$&&c&128){const g=r.$watchers$[e];g&&g.map(p=>{try{u[p](t,o,e)}catch(y){wr(y,n)}})}if((c&18)===2){if(u.componentShouldUpdate&&u.componentShouldUpdate(t,o,e)===!1)return;hs(a,!1)}}}},Qo=(s,e,t)=>{var r,a;const n=s.prototype;{s.watchers&&!e.$watchers$&&(e.$watchers$=s.watchers),s.deserializers&&!e.$deserializers$&&(e.$deserializers$=s.deserializers),s.serializers&&!e.$serializers$&&(e.$serializers$=s.serializers);const o=Object.entries((r=e.$members$)!=null?r:{});o.map(([c,[u]])=>{if(u&31||u&32){const{get:i,set:h}=Object.getOwnPropertyDescriptor(n,c)||{};i&&(e.$members$[c][0]|=2048),h&&(e.$members$[c][0]|=4096),Object.defineProperty(n,c,{get(){return i?i.apply(this):Yo(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(n,c,{set(g){const p=Ke(this);if(p){if(h){typeof(u&32?this[c]:p.$hostElement$[c])>"u"&&p.$instanceValues$.get(c)&&(g=p.$instanceValues$.get(c)),h.apply(this,[Aa(g,u)]),g=u&32?this[c]:p.$hostElement$[c],Ua(this,c,g,e);return}{Ua(this,c,g,e);return}}}})}});{const c=new Map;n.attributeChangedCallback=function(u,i,h){Q.jmp(()=>{var g;const p=c.get(u),y=Ke(this);if(this.hasOwnProperty(p)&&st.lazyLoad,n.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==h)return;if(p==null){const C=y==null?void 0:y.$flags$;if(y&&C&&!(C&8)&&C&128&&h!==i){const E=this,S=(g=e.$watchers$)==null?void 0:g[u];S==null||S.forEach(x=>{E[x]!=null&&E[x].call(E,h,i,u)})}return}const w=o.find(([C])=>C===p);w&&w[1][0]&4&&(h=!(h===null||h==="false"));const k=Object.getOwnPropertyDescriptor(n,p);h!=this[p]&&(!k.get||k.set)&&(this[p]=h)})},s.observedAttributes=Array.from(new Set([...Object.keys((a=e.$watchers$)!=null?a:{}),...o.filter(([u,i])=>i[0]&31).map(([u,i])=>{const h=i[1]||u;return c.set(h,u),h})]))}}return s},Xo=async(s,e,t,r)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const o=s.localName;customElements.whenDefined(o).then(()=>e.$flags$|=128)}}const a=e.$ancestorComponent$,n=()=>hs(e,!0);a&&a["s-rc"]?a["s-rc"].push(n):n()},Ko=(s,e)=>{},Zo=s=>{if(!(Q.$flags$&1)){const e=Ke(s);if(!e)return;const t=e.$cmpMeta$,r=Rt("connectedCallback",t.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>Ko());else{e.$flags$|=1;let a;a=s.getAttribute($t),a&&Lo(s,t.$tagName$,a,e),a||t.$flags$&12&&Jo(s);{let n=s;for(;n=n.parentNode||n.host;)if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Na(e,e.$ancestorComponent$=n);break}}t.$members$&&Object.entries(t.$members$).map(([n,[o]])=>{if(o&31&&n in s&&s[n]!==Object.prototype[n]){const c=s[n];delete s[n],s[n]=c}}),Xo(s,e)}r()}},Jo=s=>{if(!ge.document)return;const e=s["s-cr"]=ge.document.createComment("");e["s-cn"]=!0,Je(s,e,s.firstChild)},ei=async s=>{Q.$flags$&1||Ke(s),kr.has(s)&&kr.delete(s),s.shadowRoot&&kr.has(s.shadowRoot)&&kr.delete(s.shadowRoot)},Y=(s,e)=>{const t={$flags$:e[0],$tagName$:e[1]};t.$members$=e[2],t.$watchers$=s.$watchers$,t.$deserializers$=s.$deserializers$,t.$serializers$=s.$serializers$;const r=s.prototype.connectedCallback,a=s.prototype.disconnectedCallback;return Object.assign(s.prototype,{__hasHostListenerAttached:!1,__registerHost(){lo(this,t)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!Ke(this))return;this.__hasHostListenerAttached=!0}Zo(this),r&&r.call(this)},disconnectedCallback(){ei(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),s.is=t.$tagName$,Qo(s,t)},ti=(s,e)=>e;function Yu(s){return s}function ri(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var fs={exports:{}};/*!
6
6
  Copyright (c) 2018 Jed Watson.
7
7
  Licensed under the MIT License (MIT), see
8
8
  http://jedwatson.github.io/classnames
9
- */var Ba;function si(){return Ba||(Ba=1,function(s){(function(){var e={}.hasOwnProperty;function t(){for(var n="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(n=a(n,r(c)))}return n}function r(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var c in n)e.call(n,c)&&n[c]&&(o=a(o,c));return o}function a(n,o){return o?n?n+" "+o:n+o:n}s.exports?(t.default=t,s.exports=t):window.classNames=t})()}(fs)),fs.exports}var ai=si(),ve=ri(ai);const ds="searchcraft";class ni{constructor(){f(this,"coreInstances",{});f(this,"subscriptions",{})}addCoreInstance(e,t){const r=t||ds;this.coreInstances[r]=e;for(const a of this.subscriptions[r]||[])a(e)}useCoreInstance(e,t){const r=e||ds;return this.coreInstances[r]?(t(this.coreInstances[r]),()=>{}):(this.subscriptions[r]||(this.subscriptions[r]=[]),this.subscriptions[r].push(t),()=>{this.subscriptions[r]&&(this.subscriptions[r]=this.subscriptions[r].filter(a=>a!==t))})}}const re=new ni;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Ha,setPrototypeOf:qa,isFrozen:oi,getPrototypeOf:ii,getOwnPropertyDescriptor:ci}=Object;let{freeze:oe,seal:Te,create:ps}=Object,{apply:ms,construct:gs}=typeof Reflect<"u"&&Reflect;oe||(oe=function(e){return e}),Te||(Te=function(e){return e}),ms||(ms=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),gs||(gs=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const Tr=ce(Array.prototype.forEach),li=ce(Array.prototype.lastIndexOf),Wa=ce(Array.prototype.pop),It=ce(Array.prototype.push),ui=ce(Array.prototype.splice),Er=ce(String.prototype.toLowerCase),bs=ce(String.prototype.toString),vs=ce(String.prototype.match),Mt=ce(String.prototype.replace),hi=ce(String.prototype.indexOf),fi=ce(String.prototype.trim),$e=ce(Object.prototype.hasOwnProperty),ie=ce(RegExp.prototype.test),Lt=di(TypeError);function ce(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return ms(s,e,r)}}function di(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return gs(s,t)}}function I(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Er;qa&&qa(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(oi(e)||(e[r]=n),a=n)}s[a]=!0}return s}function pi(s){for(let e=0;e<s.length;e++)$e(s,e)||(s[e]=null);return s}function Fe(s){const e=ps(null);for(const[t,r]of Ha(s))$e(s,t)&&(Array.isArray(r)?e[t]=pi(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Fe(r):e[t]=r);return e}function Ot(s,e){for(;s!==null;){const r=ci(s,e);if(r){if(r.get)return ce(r.get);if(typeof r.value=="function")return ce(r.value)}s=ii(s)}function t(){return null}return t}const Va=oe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ys=oe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ws=oe(["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"]),mi=oe(["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"]),ks=oe(["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"]),gi=oe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ja=oe(["#text"]),Ga=oe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ss=oe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ya=oe(["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"]),Ar=oe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bi=Te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vi=Te(/<%[\w\W]*|[\w\W]*%>/gm),yi=Te(/\$\{[\w\W]*/gm),wi=Te(/^data-[\-\w.\u00B7-\uFFFF]+$/),ki=Te(/^aria-[\-\w]+$/),Qa=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Si=Te(/^(?:\w+script|data):/i),xi=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xa=Te(/^html$/i),Ri=Te(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ka=Object.freeze({__proto__:null,ARIA_ATTR:ki,ATTR_WHITESPACE:xi,CUSTOM_ELEMENT:Ri,DATA_ATTR:wi,DOCTYPE_NAME:Xa,ERB_EXPR:vi,IS_ALLOWED_URI:Qa,IS_SCRIPT_OR_DATA:Si,MUSTACHE_EXPR:bi,TMPLIT_EXPR:yi});const Ft={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ci=function(){return typeof window>"u"?null:window},Ti=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Za=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ja(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ci();const e=v=>Ja(v);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==Ft.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:u,NodeFilter:i,NamedNodeMap:h=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:y}=s,w=u.prototype,S=Ot(w,"cloneNode"),R=Ot(w,"remove"),L=Ot(w,"nextSibling"),E=Ot(w,"childNodes"),k=Ot(w,"parentNode");if(typeof o=="function"){const v=t.createElement("template");v.content&&v.content.ownerDocument&&(t=v.content.ownerDocument)}let x,F="";const{implementation:C,createNodeIterator:z,createDocumentFragment:V,getElementsByTagName:ne}=t,{importNode:rt}=r;let U=Za();e.isSupported=typeof Ha=="function"&&typeof k=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:lt,TMPLIT_EXPR:ut,DATA_ATTR:Zs,ARIA_ATTR:Js,IS_SCRIPT_OR_DATA:ea,ATTR_WHITESPACE:Xt,CUSTOM_ELEMENT:ta}=Ka;let{IS_ALLOWED_URI:Kt}=Ka,O=null;const Zt=I({},[...Va,...ys,...ws,...ks,...ja]);let D=null;const Jt=I({},[...Ga,...Ss,...Ya,...Ar]);let $=Object.seal(ps(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}})),Me=null,ht=null;const ye=Object.seal(ps(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let er=!0,ft=!0,tr=!1,rr=!0,we=!1,We=!0,pe=!1,dt=!1,pt=!1,ke=!1,Ve=!1,je=!1,sr=!0,ar=!1;const ra="user-content-";let mt=!0,Le=!1,Se={},X=null;const gt=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let nr=null;const or=I({},["audio","video","img","source","image","track"]);let bt=null;const ir=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",J="http://www.w3.org/1999/xhtml";let xe=J,vt=!1,yt=null;const sa=I({},[Ge,Ye,J],bs);let Qe=I({},["mi","mo","mn","ms","mtext"]),Xe=I({},["annotation-xml"]);const aa=I({},["title","style","font","a","script"]);let Oe=null;const na=["application/xhtml+xml","text/html"],oa="text/html";let _=null,Re=null;const ia=t.createElement("form"),cr=function(l){return l instanceof RegExp||l instanceof Function},wt=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Re&&Re===l)){if((!l||typeof l!="object")&&(l={}),l=Fe(l),Oe=na.indexOf(l.PARSER_MEDIA_TYPE)===-1?oa:l.PARSER_MEDIA_TYPE,_=Oe==="application/xhtml+xml"?bs:Er,O=$e(l,"ALLOWED_TAGS")?I({},l.ALLOWED_TAGS,_):Zt,D=$e(l,"ALLOWED_ATTR")?I({},l.ALLOWED_ATTR,_):Jt,yt=$e(l,"ALLOWED_NAMESPACES")?I({},l.ALLOWED_NAMESPACES,bs):sa,bt=$e(l,"ADD_URI_SAFE_ATTR")?I(Fe(ir),l.ADD_URI_SAFE_ATTR,_):ir,nr=$e(l,"ADD_DATA_URI_TAGS")?I(Fe(or),l.ADD_DATA_URI_TAGS,_):or,X=$e(l,"FORBID_CONTENTS")?I({},l.FORBID_CONTENTS,_):gt,Me=$e(l,"FORBID_TAGS")?I({},l.FORBID_TAGS,_):Fe({}),ht=$e(l,"FORBID_ATTR")?I({},l.FORBID_ATTR,_):Fe({}),Se=$e(l,"USE_PROFILES")?l.USE_PROFILES:!1,er=l.ALLOW_ARIA_ATTR!==!1,ft=l.ALLOW_DATA_ATTR!==!1,tr=l.ALLOW_UNKNOWN_PROTOCOLS||!1,rr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=l.SAFE_FOR_TEMPLATES||!1,We=l.SAFE_FOR_XML!==!1,pe=l.WHOLE_DOCUMENT||!1,ke=l.RETURN_DOM||!1,Ve=l.RETURN_DOM_FRAGMENT||!1,je=l.RETURN_TRUSTED_TYPE||!1,pt=l.FORCE_BODY||!1,sr=l.SANITIZE_DOM!==!1,ar=l.SANITIZE_NAMED_PROPS||!1,mt=l.KEEP_CONTENT!==!1,Le=l.IN_PLACE||!1,Kt=l.ALLOWED_URI_REGEXP||Qa,xe=l.NAMESPACE||J,Qe=l.MATHML_TEXT_INTEGRATION_POINTS||Qe,Xe=l.HTML_INTEGRATION_POINTS||Xe,$=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(ft=!1),Ve&&(ke=!0),Se&&(O=I({},ja),D=[],Se.html===!0&&(I(O,Va),I(D,Ga)),Se.svg===!0&&(I(O,ys),I(D,Ss),I(D,Ar)),Se.svgFilters===!0&&(I(O,ws),I(D,Ss),I(D,Ar)),Se.mathMl===!0&&(I(O,ks),I(D,Ya),I(D,Ar))),l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ye.tagCheck=l.ADD_TAGS:(O===Zt&&(O=Fe(O)),I(O,l.ADD_TAGS,_))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ye.attributeCheck=l.ADD_ATTR:(D===Jt&&(D=Fe(D)),I(D,l.ADD_ATTR,_))),l.ADD_URI_SAFE_ATTR&&I(bt,l.ADD_URI_SAFE_ATTR,_),l.FORBID_CONTENTS&&(X===gt&&(X=Fe(X)),I(X,l.FORBID_CONTENTS,_)),l.ADD_FORBID_CONTENTS&&(X===gt&&(X=Fe(X)),I(X,l.ADD_FORBID_CONTENTS,_)),mt&&(O["#text"]=!0),pe&&I(O,["html","head","body"]),O.table&&(I(O,["tbody"]),delete Me.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=l.TRUSTED_TYPES_POLICY,F=x.createHTML("")}else x===void 0&&(x=Ti(y,a)),x!==null&&typeof F=="string"&&(F=x.createHTML(""));oe&&oe(l),Re=l}},lr=I({},[...ys,...ws,...mi]),ur=I({},[...ks,...gi]),ca=function(l){let m=k(l);(!m||!m.tagName)&&(m={namespaceURI:xe,tagName:"template"});const b=Er(l.tagName),A=Er(m.tagName);return yt[l.namespaceURI]?l.namespaceURI===Ye?m.namespaceURI===J?b==="svg":m.namespaceURI===Ge?b==="svg"&&(A==="annotation-xml"||Qe[A]):!!lr[b]:l.namespaceURI===Ge?m.namespaceURI===J?b==="math":m.namespaceURI===Ye?b==="math"&&Xe[A]:!!ur[b]:l.namespaceURI===J?m.namespaceURI===Ye&&!Xe[A]||m.namespaceURI===Ge&&!Qe[A]?!1:!ur[b]&&(aa[b]||!lr[b]):!!(Oe==="application/xhtml+xml"&&yt[l.namespaceURI]):!1},K=function(l){It(e.removed,{element:l});try{k(l).removeChild(l)}catch{R(l)}},me=function(l,m){try{It(e.removed,{attribute:m.getAttributeNode(l),from:m})}catch{It(e.removed,{attribute:null,from:m})}if(m.removeAttribute(l),l==="is")if(ke||Ve)try{K(m)}catch{}else try{m.setAttribute(l,"")}catch{}},hr=function(l){let m=null,b=null;if(pt)l="<remove></remove>"+l;else{const P=vs(l,/^[\r\n\t ]+/);b=P&&P[0]}Oe==="application/xhtml+xml"&&xe===J&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const A=x?x.createHTML(l):l;if(xe===J)try{m=new p().parseFromString(A,Oe)}catch{}if(!m||!m.documentElement){m=C.createDocument(xe,"template",null);try{m.documentElement.innerHTML=vt?F:A}catch{}}const B=m.body||m.documentElement;return l&&b&&B.insertBefore(t.createTextNode(b),B.childNodes[0]||null),xe===J?ne.call(m,pe?"html":"body")[0]:pe?m.documentElement:B},fr=function(l){return z.call(l.ownerDocument||l,l,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},kt=function(l){return l instanceof g&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof h)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},dr=function(l){return typeof c=="function"&&l instanceof c};function ee(v,l,m){Tr(v,b=>{b.call(e,l,m,Re)})}const pr=function(l){let m=null;if(ee(U.beforeSanitizeElements,l,null),kt(l))return K(l),!0;const b=_(l.nodeName);if(ee(U.uponSanitizeElement,l,{tagName:b,allowedTags:O}),We&&l.hasChildNodes()&&!dr(l.firstElementChild)&&ie(/<[/\w!]/g,l.innerHTML)&&ie(/<[/\w!]/g,l.textContent)||l.nodeType===Ft.progressingInstruction||We&&l.nodeType===Ft.comment&&ie(/<[/\w]/g,l.data))return K(l),!0;if(!(ye.tagCheck instanceof Function&&ye.tagCheck(b))&&(!O[b]||Me[b])){if(!Me[b]&&gr(b)&&($.tagNameCheck instanceof RegExp&&ie($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b)))return!1;if(mt&&!X[b]){const A=k(l)||l.parentNode,B=E(l)||l.childNodes;if(B&&A){const P=B.length;for(let q=P-1;q>=0;--q){const te=S(B[q],!0);te.__removalCount=(l.__removalCount||0)+1,A.insertBefore(te,L(l))}}}return K(l),!0}return l instanceof u&&!ca(l)||(b==="noscript"||b==="noembed"||b==="noframes")&&ie(/<\/no(script|embed|frames)/i,l.innerHTML)?(K(l),!0):(we&&l.nodeType===Ft.text&&(m=l.textContent,Tr([ze,lt,ut],A=>{m=Mt(m,A," ")}),l.textContent!==m&&(It(e.removed,{element:l.cloneNode()}),l.textContent=m)),ee(U.afterSanitizeElements,l,null),!1)},mr=function(l,m,b){if(sr&&(m==="id"||m==="name")&&(b in t||b in ia))return!1;if(!(ft&&!ht[m]&&ie(Zs,m))){if(!(er&&ie(Js,m))){if(!(ye.attributeCheck instanceof Function&&ye.attributeCheck(m,l))){if(!D[m]||ht[m]){if(!(gr(l)&&($.tagNameCheck instanceof RegExp&&ie($.tagNameCheck,l)||$.tagNameCheck instanceof Function&&$.tagNameCheck(l))&&($.attributeNameCheck instanceof RegExp&&ie($.attributeNameCheck,m)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(m,l))||m==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&ie($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b))))return!1}else if(!bt[m]){if(!ie(Kt,Mt(b,Xt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&l!=="script"&&hi(b,"data:")===0&&nr[l])){if(!(tr&&!ie(ea,Mt(b,Xt,"")))){if(b)return!1}}}}}}}return!0},gr=function(l){return l!=="annotation-xml"&&vs(l,ta)},br=function(l){ee(U.beforeSanitizeAttributes,l,null);const{attributes:m}=l;if(!m||kt(l))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let A=m.length;for(;A--;){const B=m[A],{name:P,namespaceURI:q,value:te}=B,Ce=_(P),St=te;let N=P==="value"?St:fi(St);if(b.attrName=Ce,b.attrValue=N,b.keepAttr=!0,b.forceKeepAttr=void 0,ee(U.uponSanitizeAttribute,l,b),N=b.attrValue,ar&&(Ce==="id"||Ce==="name")&&(me(P,l),N=ra+N),We&&ie(/((--!?|])>)|<\/(style|title|textarea)/i,N)){me(P,l);continue}if(Ce==="attributename"&&vs(N,"href")){me(P,l);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){me(P,l);continue}if(!rr&&ie(/\/>/i,N)){me(P,l);continue}we&&Tr([ze,lt,ut],yr=>{N=Mt(N,yr," ")});const vr=_(l.nodeName);if(!mr(vr,Ce,N)){me(P,l);continue}if(x&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!q)switch(y.getAttributeType(vr,Ce)){case"TrustedHTML":{N=x.createHTML(N);break}case"TrustedScriptURL":{N=x.createScriptURL(N);break}}if(N!==St)try{q?l.setAttributeNS(q,P,N):l.setAttribute(P,N),kt(l)?K(l):Wa(e.removed)}catch{me(P,l)}}ee(U.afterSanitizeAttributes,l,null)},la=function v(l){let m=null;const b=fr(l);for(ee(U.beforeSanitizeShadowDOM,l,null);m=b.nextNode();)ee(U.uponSanitizeShadowNode,m,null),pr(m),br(m),m.content instanceof n&&v(m.content);ee(U.afterSanitizeShadowDOM,l,null)};return e.sanitize=function(v){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,A=null,B=null;if(vt=!v,vt&&(v="<!-->"),typeof v!="string"&&!dr(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw Lt("dirty is not a string, aborting")}else throw Lt("toString is not a function");if(!e.isSupported)return v;if(dt||wt(l),e.removed=[],typeof v=="string"&&(Le=!1),Le){if(v.nodeName){const te=_(v.nodeName);if(!O[te]||Me[te])throw Lt("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof c)m=hr("<!---->"),b=m.ownerDocument.importNode(v,!0),b.nodeType===Ft.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!ke&&!we&&!pe&&v.indexOf("<")===-1)return x&&je?x.createHTML(v):v;if(m=hr(v),!m)return ke?null:je?F:""}m&&pt&&K(m.firstChild);const P=fr(Le?v:m);for(;A=P.nextNode();)pr(A),br(A),A.content instanceof n&&la(A.content);if(Le)return v;if(ke){if(Ve)for(B=V.call(m.ownerDocument);m.firstChild;)B.appendChild(m.firstChild);else B=m;return(D.shadowroot||D.shadowrootmode)&&(B=rt.call(r,B,!0)),B}let q=pe?m.outerHTML:m.innerHTML;return pe&&O["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ie(Xa,m.ownerDocument.doctype.name)&&(q="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
10
- `+q),we&&Tr([ze,lt,ut],te=>{q=Mt(q,te," ")}),x&&je?x.createHTML(q):q},e.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(v),dt=!0},e.clearConfig=function(){Re=null,dt=!1},e.isValidAttribute=function(v,l,m){Re||wt({});const b=_(v),A=_(l);return mr(b,A,m)},e.addHook=function(v,l){typeof l=="function"&&It(U[v],l)},e.removeHook=function(v,l){if(l!==void 0){const m=li(U[v],l);return m===-1?void 0:ui(U[v],m,1)[0]}return Wa(U[v])},e.removeHooks=function(v){U[v]=[]},e.removeAllHooks=function(){U=Za()},e}var xs=Ja();const Dt=(s,...e)=>{let t=s[0];for(let r=0;r<e.length;r++)t+=xs.sanitize(e[r]?String(e[r]):"")+s[r+1];return t||""},Ei="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let at=(s=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(s|=0));for(;s--;)e+=Ei[t[s]&63];return e};const Ai=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"adSource","Custom");f(this,"adClientResponseItem");f(this,"renderPosition","interstitial");f(this,"searchTerm");f(this,"isSearchInProgress",!1);f(this,"searchResultCount",0);f(this,"core");f(this,"intersectionObserver");f(this,"storeUnsubscribe");f(this,"cleanupCore");f(this,"adContainerRenderedTimeout");f(this,"isComponentConnected",!1);f(this,"timeTaken");f(this,"adContainerId","");t!==!1&&this.__registerHost()}get hostElement(){return this}handleAdRendered(){var t,r,a;this.adContainerId=at(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var n;(n=this.core)==null||n.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(r=(t=this.core)==null?void 0:t.config)==null?void 0:r.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var t;(t=this.core)==null||t.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(t){const r=t.searchClientRequestProperties;r&&typeof r=="object"&&(this.searchTerm=r.searchTerm),this.searchResultCount=t.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(t){const r=t.store.getState();this.isComponentConnected=!0,this.core=r.core,this.isSearchInProgress=r.isSearchInProgress,this.searchResultCount=r.searchClientResponseItems.length,this.timeTaken=r.searchResponseTimeTaken;const a=r.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(r),this.storeUnsubscribe=t.store.subscribe(n=>{this.timeTaken!==n.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(n),this.timeTaken=n.searchResponseTimeTaken,this.isSearchInProgress=n.isSearchInProgress})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{r!=null&&r.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var t,r,a;(t=this.storeUnsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,n,o,c,u;const t=this.adClientResponseItem;if(!t.admAd)return;let r="<p>Ad Marketplace Ad Placeholder</p>";return(o=(n=(a=this.core)==null?void 0:a.config)==null?void 0:n.admAdConfig)!=null&&o.template&&(r=(u=(c=this.core)==null?void 0:c.config)==null?void 0:u.admAdConfig.template(t.admAd,{html:Dt})),d("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:r})}renderCustomAd(){var n,o,c;const t=(c=(o=(n=this.core)==null?void 0:n.config)==null?void 0:o.customAdConfig)==null?void 0:c.template,r=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return t&&(a=t({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Dt})),d("div",{class:"searchcraft-ad searchcraft-custom-ad",id:r,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var r,a;const t=((a=(r=this.core)==null?void 0:r.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return d("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:ve("searchcraft-ad",t),"data-searchcraft-ad-container-id":this.adContainerId})}render(){if(this.searchResultCount!==0)switch(this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[768,"searchcraft-ad",{searchcraftId:[1,"searchcraft-id"],adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function $r(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(e=>{switch(e){case"searchcraft-ad":customElements.get(e)||customElements.define(e,Ai);break}})}function Nt(s,e){if(s&&e)return e.fieldNames.map(t=>{let r=s[t.fieldName];if(r)switch(t.dataType){case"date":{r=$i(r,t.dateFormatLocale,t.dateFormatOptions);break}case"number":{r=Intl.NumberFormat(t.numberFormatLocale,t.numberFormatOptions).format(r*(t.numberScale||1));break}}return r}).filter(t=>!!t).join(e.delimiter||" ")}function en(s){return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function $i(s,e="en-US",t={day:"numeric",month:"long",year:"numeric"}){const r=new Date(s),n=new Date().getTime()-r.getTime(),o=30*24*60*60*1e3;if(n<o){const c=Math.trunc(n/1e3),u=Math.trunc(c/60),i=Math.trunc(u/60),h=Math.trunc(i/24),g=new Intl.RelativeTimeFormat(e,t);return h>=1?g.format(-h,"day"):i>=1?g.format(-i,"hour"):u>=1?g.format(-u,"minute"):g.format(0,"second")}return new Intl.DateTimeFormat(e,t).format(r)}function Rs(s,e,t=0){const r=new Date(s);switch(e){case"year":return new Date(r.getFullYear()+t,0,1,0,0,0,0).getTime();case"month":return new Date(r.getFullYear(),r.getMonth()+t,1,0,0,0,0).getTime();case"day":return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t,0,0,0,0).getTime();case"hour":return new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours()+t,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${e}`)}}function Pi(s,e,t){const r=new Date(e),a=new Date(t);switch(s){case"year":return Math.abs(a.getFullYear()-r.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(r.getFullYear()*12+r.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${s}`)}}const tn=s=>{if(s>=11&&s<=13)return`${s}th`;switch(s%10){case 1:return`${s}st`;case 2:return`${s}nd`;case 3:return`${s}rd`;default:return`${s}th`}};function _i(s,e){const t=new Intl.DateTimeFormat("en-US",{month:"short"});switch(s){case"year":return e.getFullYear().toString();case"month":return`${t.format(e)} ${e.getFullYear()}`;case"day":return`${t.format(e)} ${tn(e.getDate())}, ${e.getFullYear()}`;case"hour":{const r=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${t.format(e)} ${tn(e.getDate())}, ${r.format(e)}`}default:throw new Error(`Unsupported granularity: ${s}`)}}/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:rn,setPrototypeOf:sn,isFrozen:Ii,getPrototypeOf:Mi,getOwnPropertyDescriptor:Li}=Object;let{freeze:le,seal:Ee,create:Cs}=Object,{apply:Ts,construct:Es}=typeof Reflect<"u"&&Reflect;le||(le=function(e){return e}),Ee||(Ee=function(e){return e}),Ts||(Ts=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),Es||(Es=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const Pr=he(Array.prototype.forEach),Oi=he(Array.prototype.lastIndexOf),an=he(Array.prototype.pop),zt=he(Array.prototype.push),Fi=he(Array.prototype.splice),_r=he(String.prototype.toLowerCase),As=he(String.prototype.toString),$s=he(String.prototype.match),Ut=he(String.prototype.replace),Di=he(String.prototype.indexOf),Ni=he(String.prototype.trim),Pe=he(Object.prototype.hasOwnProperty),ue=he(RegExp.prototype.test),Bt=zi(TypeError);function he(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return Ts(s,e,r)}}function zi(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Es(s,t)}}function M(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_r;sn&&sn(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(Ii(e)||(e[r]=n),a=n)}s[a]=!0}return s}function Ui(s){for(let e=0;e<s.length;e++)Pe(s,e)||(s[e]=null);return s}function De(s){const e=Cs(null);for(const[t,r]of rn(s))Pe(s,t)&&(Array.isArray(r)?e[t]=Ui(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=De(r):e[t]=r);return e}function Ht(s,e){for(;s!==null;){const r=Li(s,e);if(r){if(r.get)return he(r.get);if(typeof r.value=="function")return he(r.value)}s=Mi(s)}function t(){return null}return t}const nn=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ps=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_s=le(["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"]),Bi=le(["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"]),Is=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Hi=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),on=le(["#text"]),cn=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ms=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ln=le(["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"]),Ir=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qi=Ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wi=Ee(/<%[\w\W]*|[\w\W]*%>/gm),Vi=Ee(/\$\{[\w\W]*/gm),ji=Ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gi=Ee(/^aria-[\-\w]+$/),un=Ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yi=Ee(/^(?:\w+script|data):/i),Qi=Ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hn=Ee(/^html$/i),Xi=Ee(/^[a-z][.\w]*(-[.\w]+)+$/i);var fn=Object.freeze({__proto__:null,ARIA_ATTR:Gi,ATTR_WHITESPACE:Qi,CUSTOM_ELEMENT:Xi,DATA_ATTR:ji,DOCTYPE_NAME:hn,ERB_EXPR:Wi,IS_ALLOWED_URI:un,IS_SCRIPT_OR_DATA:Yi,MUSTACHE_EXPR:qi,TMPLIT_EXPR:Vi});const qt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ki=function(){return typeof window>"u"?null:window},Zi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},dn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pn(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ki();const e=v=>pn(v);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==qt.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:u,NodeFilter:i,NamedNodeMap:h=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:y}=s,w=u.prototype,S=Ht(w,"cloneNode"),R=Ht(w,"remove"),L=Ht(w,"nextSibling"),E=Ht(w,"childNodes"),k=Ht(w,"parentNode");if(typeof o=="function"){const v=t.createElement("template");v.content&&v.content.ownerDocument&&(t=v.content.ownerDocument)}let x,F="";const{implementation:C,createNodeIterator:z,createDocumentFragment:V,getElementsByTagName:ne}=t,{importNode:rt}=r;let U=dn();e.isSupported=typeof rn=="function"&&typeof k=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:lt,TMPLIT_EXPR:ut,DATA_ATTR:Zs,ARIA_ATTR:Js,IS_SCRIPT_OR_DATA:ea,ATTR_WHITESPACE:Xt,CUSTOM_ELEMENT:ta}=fn;let{IS_ALLOWED_URI:Kt}=fn,O=null;const Zt=M({},[...nn,...Ps,..._s,...Is,...on]);let D=null;const Jt=M({},[...cn,...Ms,...ln,...Ir]);let $=Object.seal(Cs(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}})),Me=null,ht=null;const ye=Object.seal(Cs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let er=!0,ft=!0,tr=!1,rr=!0,we=!1,We=!0,pe=!1,dt=!1,pt=!1,ke=!1,Ve=!1,je=!1,sr=!0,ar=!1;const ra="user-content-";let mt=!0,Le=!1,Se={},X=null;const gt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let nr=null;const or=M({},["audio","video","img","source","image","track"]);let bt=null;const ir=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",J="http://www.w3.org/1999/xhtml";let xe=J,vt=!1,yt=null;const sa=M({},[Ge,Ye,J],As);let Qe=M({},["mi","mo","mn","ms","mtext"]),Xe=M({},["annotation-xml"]);const aa=M({},["title","style","font","a","script"]);let Oe=null;const na=["application/xhtml+xml","text/html"],oa="text/html";let _=null,Re=null;const ia=t.createElement("form"),cr=function(l){return l instanceof RegExp||l instanceof Function},wt=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Re&&Re===l)){if((!l||typeof l!="object")&&(l={}),l=De(l),Oe=na.indexOf(l.PARSER_MEDIA_TYPE)===-1?oa:l.PARSER_MEDIA_TYPE,_=Oe==="application/xhtml+xml"?As:_r,O=Pe(l,"ALLOWED_TAGS")?M({},l.ALLOWED_TAGS,_):Zt,D=Pe(l,"ALLOWED_ATTR")?M({},l.ALLOWED_ATTR,_):Jt,yt=Pe(l,"ALLOWED_NAMESPACES")?M({},l.ALLOWED_NAMESPACES,As):sa,bt=Pe(l,"ADD_URI_SAFE_ATTR")?M(De(ir),l.ADD_URI_SAFE_ATTR,_):ir,nr=Pe(l,"ADD_DATA_URI_TAGS")?M(De(or),l.ADD_DATA_URI_TAGS,_):or,X=Pe(l,"FORBID_CONTENTS")?M({},l.FORBID_CONTENTS,_):gt,Me=Pe(l,"FORBID_TAGS")?M({},l.FORBID_TAGS,_):De({}),ht=Pe(l,"FORBID_ATTR")?M({},l.FORBID_ATTR,_):De({}),Se=Pe(l,"USE_PROFILES")?l.USE_PROFILES:!1,er=l.ALLOW_ARIA_ATTR!==!1,ft=l.ALLOW_DATA_ATTR!==!1,tr=l.ALLOW_UNKNOWN_PROTOCOLS||!1,rr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=l.SAFE_FOR_TEMPLATES||!1,We=l.SAFE_FOR_XML!==!1,pe=l.WHOLE_DOCUMENT||!1,ke=l.RETURN_DOM||!1,Ve=l.RETURN_DOM_FRAGMENT||!1,je=l.RETURN_TRUSTED_TYPE||!1,pt=l.FORCE_BODY||!1,sr=l.SANITIZE_DOM!==!1,ar=l.SANITIZE_NAMED_PROPS||!1,mt=l.KEEP_CONTENT!==!1,Le=l.IN_PLACE||!1,Kt=l.ALLOWED_URI_REGEXP||un,xe=l.NAMESPACE||J,Qe=l.MATHML_TEXT_INTEGRATION_POINTS||Qe,Xe=l.HTML_INTEGRATION_POINTS||Xe,$=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(ft=!1),Ve&&(ke=!0),Se&&(O=M({},on),D=[],Se.html===!0&&(M(O,nn),M(D,cn)),Se.svg===!0&&(M(O,Ps),M(D,Ms),M(D,Ir)),Se.svgFilters===!0&&(M(O,_s),M(D,Ms),M(D,Ir)),Se.mathMl===!0&&(M(O,Is),M(D,ln),M(D,Ir))),l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ye.tagCheck=l.ADD_TAGS:(O===Zt&&(O=De(O)),M(O,l.ADD_TAGS,_))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ye.attributeCheck=l.ADD_ATTR:(D===Jt&&(D=De(D)),M(D,l.ADD_ATTR,_))),l.ADD_URI_SAFE_ATTR&&M(bt,l.ADD_URI_SAFE_ATTR,_),l.FORBID_CONTENTS&&(X===gt&&(X=De(X)),M(X,l.FORBID_CONTENTS,_)),l.ADD_FORBID_CONTENTS&&(X===gt&&(X=De(X)),M(X,l.ADD_FORBID_CONTENTS,_)),mt&&(O["#text"]=!0),pe&&M(O,["html","head","body"]),O.table&&(M(O,["tbody"]),delete Me.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=l.TRUSTED_TYPES_POLICY,F=x.createHTML("")}else x===void 0&&(x=Zi(y,a)),x!==null&&typeof F=="string"&&(F=x.createHTML(""));le&&le(l),Re=l}},lr=M({},[...Ps,..._s,...Bi]),ur=M({},[...Is,...Hi]),ca=function(l){let m=k(l);(!m||!m.tagName)&&(m={namespaceURI:xe,tagName:"template"});const b=_r(l.tagName),A=_r(m.tagName);return yt[l.namespaceURI]?l.namespaceURI===Ye?m.namespaceURI===J?b==="svg":m.namespaceURI===Ge?b==="svg"&&(A==="annotation-xml"||Qe[A]):!!lr[b]:l.namespaceURI===Ge?m.namespaceURI===J?b==="math":m.namespaceURI===Ye?b==="math"&&Xe[A]:!!ur[b]:l.namespaceURI===J?m.namespaceURI===Ye&&!Xe[A]||m.namespaceURI===Ge&&!Qe[A]?!1:!ur[b]&&(aa[b]||!lr[b]):!!(Oe==="application/xhtml+xml"&&yt[l.namespaceURI]):!1},K=function(l){zt(e.removed,{element:l});try{k(l).removeChild(l)}catch{R(l)}},me=function(l,m){try{zt(e.removed,{attribute:m.getAttributeNode(l),from:m})}catch{zt(e.removed,{attribute:null,from:m})}if(m.removeAttribute(l),l==="is")if(ke||Ve)try{K(m)}catch{}else try{m.setAttribute(l,"")}catch{}},hr=function(l){let m=null,b=null;if(pt)l="<remove></remove>"+l;else{const P=$s(l,/^[\r\n\t ]+/);b=P&&P[0]}Oe==="application/xhtml+xml"&&xe===J&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const A=x?x.createHTML(l):l;if(xe===J)try{m=new p().parseFromString(A,Oe)}catch{}if(!m||!m.documentElement){m=C.createDocument(xe,"template",null);try{m.documentElement.innerHTML=vt?F:A}catch{}}const B=m.body||m.documentElement;return l&&b&&B.insertBefore(t.createTextNode(b),B.childNodes[0]||null),xe===J?ne.call(m,pe?"html":"body")[0]:pe?m.documentElement:B},fr=function(l){return z.call(l.ownerDocument||l,l,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},kt=function(l){return l instanceof g&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof h)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},dr=function(l){return typeof c=="function"&&l instanceof c};function ee(v,l,m){Pr(v,b=>{b.call(e,l,m,Re)})}const pr=function(l){let m=null;if(ee(U.beforeSanitizeElements,l,null),kt(l))return K(l),!0;const b=_(l.nodeName);if(ee(U.uponSanitizeElement,l,{tagName:b,allowedTags:O}),We&&l.hasChildNodes()&&!dr(l.firstElementChild)&&ue(/<[/\w!]/g,l.innerHTML)&&ue(/<[/\w!]/g,l.textContent)||l.nodeType===qt.progressingInstruction||We&&l.nodeType===qt.comment&&ue(/<[/\w]/g,l.data))return K(l),!0;if(!(ye.tagCheck instanceof Function&&ye.tagCheck(b))&&(!O[b]||Me[b])){if(!Me[b]&&gr(b)&&($.tagNameCheck instanceof RegExp&&ue($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b)))return!1;if(mt&&!X[b]){const A=k(l)||l.parentNode,B=E(l)||l.childNodes;if(B&&A){const P=B.length;for(let q=P-1;q>=0;--q){const te=S(B[q],!0);te.__removalCount=(l.__removalCount||0)+1,A.insertBefore(te,L(l))}}}return K(l),!0}return l instanceof u&&!ca(l)||(b==="noscript"||b==="noembed"||b==="noframes")&&ue(/<\/no(script|embed|frames)/i,l.innerHTML)?(K(l),!0):(we&&l.nodeType===qt.text&&(m=l.textContent,Pr([ze,lt,ut],A=>{m=Ut(m,A," ")}),l.textContent!==m&&(zt(e.removed,{element:l.cloneNode()}),l.textContent=m)),ee(U.afterSanitizeElements,l,null),!1)},mr=function(l,m,b){if(sr&&(m==="id"||m==="name")&&(b in t||b in ia))return!1;if(!(ft&&!ht[m]&&ue(Zs,m))){if(!(er&&ue(Js,m))){if(!(ye.attributeCheck instanceof Function&&ye.attributeCheck(m,l))){if(!D[m]||ht[m]){if(!(gr(l)&&($.tagNameCheck instanceof RegExp&&ue($.tagNameCheck,l)||$.tagNameCheck instanceof Function&&$.tagNameCheck(l))&&($.attributeNameCheck instanceof RegExp&&ue($.attributeNameCheck,m)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(m,l))||m==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&ue($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b))))return!1}else if(!bt[m]){if(!ue(Kt,Ut(b,Xt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&l!=="script"&&Di(b,"data:")===0&&nr[l])){if(!(tr&&!ue(ea,Ut(b,Xt,"")))){if(b)return!1}}}}}}}return!0},gr=function(l){return l!=="annotation-xml"&&$s(l,ta)},br=function(l){ee(U.beforeSanitizeAttributes,l,null);const{attributes:m}=l;if(!m||kt(l))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let A=m.length;for(;A--;){const B=m[A],{name:P,namespaceURI:q,value:te}=B,Ce=_(P),St=te;let N=P==="value"?St:Ni(St);if(b.attrName=Ce,b.attrValue=N,b.keepAttr=!0,b.forceKeepAttr=void 0,ee(U.uponSanitizeAttribute,l,b),N=b.attrValue,ar&&(Ce==="id"||Ce==="name")&&(me(P,l),N=ra+N),We&&ue(/((--!?|])>)|<\/(style|title|textarea)/i,N)){me(P,l);continue}if(Ce==="attributename"&&$s(N,"href")){me(P,l);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){me(P,l);continue}if(!rr&&ue(/\/>/i,N)){me(P,l);continue}we&&Pr([ze,lt,ut],yr=>{N=Ut(N,yr," ")});const vr=_(l.nodeName);if(!mr(vr,Ce,N)){me(P,l);continue}if(x&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!q)switch(y.getAttributeType(vr,Ce)){case"TrustedHTML":{N=x.createHTML(N);break}case"TrustedScriptURL":{N=x.createScriptURL(N);break}}if(N!==St)try{q?l.setAttributeNS(q,P,N):l.setAttribute(P,N),kt(l)?K(l):an(e.removed)}catch{me(P,l)}}ee(U.afterSanitizeAttributes,l,null)},la=function v(l){let m=null;const b=fr(l);for(ee(U.beforeSanitizeShadowDOM,l,null);m=b.nextNode();)ee(U.uponSanitizeShadowNode,m,null),pr(m),br(m),m.content instanceof n&&v(m.content);ee(U.afterSanitizeShadowDOM,l,null)};return e.sanitize=function(v){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,A=null,B=null;if(vt=!v,vt&&(v="<!-->"),typeof v!="string"&&!dr(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw Bt("dirty is not a string, aborting")}else throw Bt("toString is not a function");if(!e.isSupported)return v;if(dt||wt(l),e.removed=[],typeof v=="string"&&(Le=!1),Le){if(v.nodeName){const te=_(v.nodeName);if(!O[te]||Me[te])throw Bt("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof c)m=hr("<!---->"),b=m.ownerDocument.importNode(v,!0),b.nodeType===qt.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!ke&&!we&&!pe&&v.indexOf("<")===-1)return x&&je?x.createHTML(v):v;if(m=hr(v),!m)return ke?null:je?F:""}m&&pt&&K(m.firstChild);const P=fr(Le?v:m);for(;A=P.nextNode();)pr(A),br(A),A.content instanceof n&&la(A.content);if(Le)return v;if(ke){if(Ve)for(B=V.call(m.ownerDocument);m.firstChild;)B.appendChild(m.firstChild);else B=m;return(D.shadowroot||D.shadowrootmode)&&(B=rt.call(r,B,!0)),B}let q=pe?m.outerHTML:m.innerHTML;return pe&&O["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ue(hn,m.ownerDocument.doctype.name)&&(q="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
11
- `+q),we&&Pr([ze,lt,ut],te=>{q=Ut(q,te," ")}),x&&je?x.createHTML(q):q},e.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(v),dt=!0},e.clearConfig=function(){Re=null,dt=!1},e.isValidAttribute=function(v,l,m){Re||wt({});const b=_(v),A=_(l);return mr(b,A,m)},e.addHook=function(v,l){typeof l=="function"&&zt(U[v],l)},e.removeHook=function(v,l){if(l!==void 0){const m=Oi(U[v],l);return m===-1?void 0:Fi(U[v],m,1)[0]}return an(U[v])},e.removeHooks=function(v){U[v]=[]},e.removeAllHooks=function(){U=dn()},e}pn();const Ji="0.15.0",ec=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"sdkVariant","js");f(this,"viewAllResultsHref");f(this,"viewAllResultsLabel");f(this,"searchResultsCount");f(this,"unsubscribe",()=>{});f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.searchResultsCount=t.store.getState().searchResultsCount,this.unsubscribe=t.store.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}get safeViewAllHref(){const t=this.viewAllResultsHref;if(t)try{const r=new URL(t,window.location.href);return r.protocol==="https:"||r.protocol==="http:"?t:void 0}catch{return}}render(){const t=typeof window<"u"?window.location.hostname:"",a=`https://searchcraft.io/?${new URLSearchParams({utm_source:t,utm_medium:this.sdkVariant??"js",utm_campaign:"powered-by",utm_content:"popover-footer",sc_sdk_version:Ji}).toString()}`,n=typeof this.searchResultsCount=="number"&&this.searchResultsCount>0,o=!!this.safeViewAllHref&&n;return d("footer",{key:"548704335f80a2b4bc7ebd4ea2d0a2eb73376fde",class:"searchcraft-popover-footer"},d("a",{key:"a10cbfd833ef0c6016932fede6ca3195eecdfaea",class:"searchcraft-popover-footer-link",href:a,target:"_blank",rel:"noreferrer"},d("span",{key:"6c6333a61ae282419e32721fc9760d3d237870df",class:"searchcraft-popover-footer-link-prefix"},"Powered by ")," Searchcraft"),d("div",{key:"c35f7d6c5b16510fa58301b8fad070e6cd14d72f",class:"searchcraft-popover-footer-results"},d("p",{key:"e1576404d2d23a7b53e761e617720cc4fb45ea8d",class:"searchcraft-popover-footer-results-info"},n?d("span",null,en(this.searchResultsCount)," Results",d("span",{class:"searchcraft-popover-footer-results-found"}," Found")):" "),o&&d("a",{key:"6f5585d1a75ccc44174a22603d13f3604078ca63",class:"searchcraft-popover-footer-view-all",href:this.safeViewAllHref},d("span",{key:"12d8202b01d4493700fafd61f81989458d7620c4",class:"searchcraft-popover-footer-view-all-label"},this.viewAllResultsLabel),d("span",{key:"3b26ffdc731827612e789fdb38c751062c1077ff",class:"searchcraft-popover-footer-view-all-shortcut","aria-hidden":"true"},d("kbd",{key:"6999416b99a6b4b5b24702597736846b9168b12d"},"⌘"),d("kbd",{key:"8a7f8ee088d037e96102dab463eb93a9d27d85ea"},"↵")))))}},[768,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],sdkVariant:[1,"sdk-variant"],viewAllResultsHref:[1,"view-all-results-href"],viewAllResultsLabel:[1,"view-all-results-label"],searchResultsCount:[32]}]);function mn(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(e=>{switch(e){case"searchcraft-popover-footer":customElements.get(e)||customElements.define(e,ec);break}})}const tc=$r,rc=Y(class extends G{constructor(t){super();f(this,"hierarchy","primary");f(this,"disabled",!1);f(this,"icon");f(this,"iconOnly",!1);f(this,"iconPosition","left");f(this,"label","Search");f(this,"type","button");f(this,"buttonClick");f(this,"handleButtonClick",()=>{this.buttonClick.emit()});t!==!1&&this.__registerHost(),this.buttonClick=Ze(this,"buttonClick")}render(){return d("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:ve("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:d(ti,null,this.iconPosition==="left"&&this.icon,d("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[768,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function Mr(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-button":customElements.get(e)||customElements.define(e,rc);break}})}const sc=Mr,ac=Y(class extends G{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return d("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},d("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[260,"searchcraft-error-message"]);function Lr(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(e=>{switch(e){case"searchcraft-error-message":customElements.get(e)||customElements.define(e,ac);break}})}const nc=Lr,gn=(s,e)=>{let t=s;for(const r of e)t=t==null?void 0:t.children[r];return t},Ls=(s,e)=>{const t={...s};for(const r in e)e.hasOwnProperty(r)&&(e[r]instanceof Object&&s[r]instanceof Object?t[r]=Ls(s[r],e[r]):t[r]=e[r]);return t};function oc(s){return s.filter((e,t,r)=>!r.some((a,n)=>n!==t&&a.includes(e)))}const bn=(s,e)=>{const t=structuredClone(s),r=(a,n)=>{var u;const o=structuredClone(a),c=gn(e,n);if(!c)return o;for(const i of Object.keys(a.children))c.children[i]?o.children[i]={...Ls(a.children[i],c.children[i]),count:((u=o.children[i])==null?void 0:u.count)||0}:o.children[i]&&(o.children[i]=r(o.children[i],[...n,i]));return o};return r(t,[])},Os=(s,e)=>{const t={path:"/",count:0,children:{}},r=[],a=n=>{if(n.path!=="/"&&r.push({path:n.path,count:n.count}),n.children)for(const o of n.children)a(o)};a(s);for(const{path:n,count:o}of r){const c=n.split("/").filter(Boolean);if(e&&e.length>0){let i=!1;for(const h of e)if(h.startsWith("/")){if(n===h||n.startsWith(`${h}/`)){i=!0;break}}else if(c.includes(h)){i=!0;break}if(i)continue}let u=t;for(const i of c){const h=u.path==="/"?`/${i}`:`${u.path}/${i}`;u.children[i]||(u.children[i]={path:h,count:o,children:{}}),u=u.children[i]}u.count=o}return t},ic=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"fieldName","");f(this,"exclude");f(this,"initialCollapseState","open");f(this,"viewMoreThreshold",8);f(this,"facetSelectionUpdated");f(this,"selectedPaths",{});f(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});f(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});f(this,"renderedFacetTree",{path:"/",count:0,children:{}});f(this,"isCollapsed",!1);f(this,"showAllFacets",!1);f(this,"lastTimeTaken");f(this,"lastSearchTerm");f(this,"lastSearchMode");f(this,"lastSortType");f(this,"lastRangeValues");f(this,"lastFacetValues");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"formatFacetName",t=>`${t.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);f(this,"handleViewMoreToggle",()=>{this.showAllFacets=!this.showAllFacets});t!==!1&&this.__registerHost(),this.facetSelectionUpdated=Ze(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(t=>this.selectedPaths[t])}handleIncomingSearchResponse(t,r){var u,i,h;const a=(u=t.searchResponseFacetPrime)==null?void 0:u.find(g=>this.fieldName===Object.keys(g)[0]),n=a==null?void 0:a[this.fieldName],o=Os({path:"/",count:0,children:n||[]},this.exclude);switch(r){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=o;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(t.supplementalFacetPrime){const g=(i=t.supplementalFacetPrime)==null?void 0:i.find(w=>this.fieldName===Object.keys(w)[0]),p=g==null?void 0:g[this.fieldName],y=Os({path:"/",count:0,children:p||[]},this.exclude);this.facetTreeCollectedFromSearchResponse=bn(y,o)}else this.facetTreeCollectedFromSearchResponse=o;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=bn(this.facetTreeCollectedFromSearchResponse,o);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const c={path:"/",count:0,children:[]};for(const g of Object.keys(this.selectedPaths).filter(p=>this.selectedPaths[p])){const p=g.startsWith("/")?g.substring(1).split("/"):g.split("/"),y=!!gn(this.facetTreeCollectedFromSearchResponse,p),w=p.at(-1);!y&&w&&((h=c.children)==null||h.push({children:[],count:0,path:g}))}this.facetTreeFromFacetPathsNotInSearchResponse=Os(c,this.exclude),this.renderedFacetTree=Ls(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(t){const r={...t},a=typeof r.searchClientRequestProperties=="string"&&r.searchTerm.trim()==="";if(r.searchTerm.trim()===""&&!a)this.handleIncomingSearchResponse(r,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==r.searchResponseTimeTaken&&r.searchClientRequestProperties){if(typeof r.searchClientRequestProperties=="object"){const n=r.searchClientRequestProperties;let o="UNKNOWN";this.lastSearchTerm!==n.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(n.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(n.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==n.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==n.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(n.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(n.facetPathsForIndexFields),this.lastSortType=n.order_by,this.lastSearchMode=n.mode,this.lastSearchTerm=n.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,o)}else if(typeof r.searchClientRequestProperties=="string"){let n="NEW_SEARCH_TERM";const o=JSON.parse(r.searchClientRequestProperties),u=(Array.isArray(o.query)?o.query:[o.query]).filter(h=>h.occur==="must"),i=JSON.stringify(u);this.lastFacetValues!==void 0&&this.lastFacetValues!==i?n="FACET_UPDATE":r.searchTerm.trim()===""&&this.lastSearchTerm===""?n="NEW_SEARCH_TERM":this.lastSearchTerm!==r.searchTerm&&(this.areAnyFacetPathsSelected?n="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":n="NEW_SEARCH_TERM"),this.lastFacetValues=i,this.lastSearchTerm=r.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,n)}}}onCoreAvailable(t){this.handleStateUpdate(t.store.getState()),this.unsubscribe=t.store.subscribe(r=>{this.handleStateUpdate(r)})}connectedCallback(){this.isCollapsed=this.initialCollapseState==="closed",this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleCheckboxChange(t){var o;if(!this.selectedPaths[t])this.selectedPaths={...this.selectedPaths,[t]:!0};else{const c=Object.keys(this.selectedPaths).filter(u=>!u.includes(t));this.selectedPaths=c.reduce((u,i)=>(u[i]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),n=oc(a);(o=this.facetSelectionUpdated)==null||o.emit({paths:n})}async handleCollapseToggle(){this.isCollapsed=!this.isCollapsed}async getIsCollapsed(){return this.isCollapsed}renderFacet(t,r){let a=!1;for(const c of Object.keys(this.selectedPaths))this.selectedPaths[c]&&c.startsWith(r.path)&&c.length>r.path.length&&(a=!0);const n=Object.keys(this.selectedPaths).includes(r.path),o=Object.keys(r.children).length>0&&(n||a)||t==="@@root";return d("div",{class:"searchcraft-facet-list-item"},t!=="@@root"&&d("label",{class:"searchcraft-facet-list-checkbox-label"},d("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},d("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[r.path],onChange:c=>{this.handleCheckboxChange(r.path)},type:"checkbox"}),a?d("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},d("svg",{viewBox:"0 0 14 3",fill:"none"},d("title",null,"Checkbox dash"),d("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):d("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),d("span",null,this.formatFacetName(t)," (",r.count,")")),o&&d("div",{class:"searchcraft-facet-list",style:{paddingLeft:t!=="@@root"?"24px":"0px",paddingTop:t!=="@@root"?"6px":"0px"}},Object.keys(r.children).map(c=>{if(r.children[c])return this.renderFacet(c,r.children[c])})))}render(){if(!this.fieldName||Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length===0)return;if(Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length>0)return d("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query.");const t=Object.keys(this.renderedFacetTree.children),r=this.viewMoreThreshold??8,a=r>0&&t.length>r,n=a&&!this.showAllFacets?t.slice(0,r):t;return d("div",{class:"searchcraft-facet-list-wrapper","data-facet-section-collapsed":this.isCollapsed?"":void 0,"data-facet-section-expanded":this.isCollapsed?void 0:""},!this.isCollapsed&&d("div",{class:"searchcraft-facet-list-content"},d("div",{class:"searchcraft-facet-list"},n.map(o=>{if(this.renderedFacetTree.children[o])return this.renderFacet(o,this.renderedFacetTree.children[o])})),a&&d("button",{class:"searchcraft-facet-list-view-more",onClick:this.handleViewMoreToggle,type:"button"},this.showAllFacets?"View less":"View more...")))}},[768,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],exclude:[16],initialCollapseState:[1,"initial-collapse-state"],viewMoreThreshold:[2,"view-more-threshold"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32],isCollapsed:[32],showAllFacets:[32],handleCollapseToggle:[64],getIsCollapsed:[64]}]);function vn(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(e=>{switch(e){case"searchcraft-facet-list":customElements.get(e)||customElements.define(e,ic);break}})}const cc=vn;function lc(s,e){let t=!1,r=null;const a=n=>{s(...n),t=!0,setTimeout(()=>{if(t=!1,r){const o=r;r=null,a(o)}},e)};return(...n)=>{t?r=n:a(n)}}const uc=Y(class extends G{constructor(t){super();f(this,"max",100);f(this,"min",0);f(this,"step",1);f(this,"dataType","number");f(this,"dateGranularity");f(this,"lowerBound",0);f(this,"upperBound",1);f(this,"endValue",0);f(this,"startValue",0);f(this,"lastFocusedHandle","max");f(this,"throttledEmitUpdate",()=>{});f(this,"rangeChanged");f(this,"emitUpdate",async()=>{var t,r;switch(this.dataType){case"number":(t=this.rangeChanged)==null||t.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",n=Rs(this.min,a,this.lowerBound+this.startValue),o=Rs(this.min,a,this.lowerBound+this.endValue+1);(r=this.rangeChanged)==null||r.emit({startValue:n,endValue:o});break}}});f(this,"handleStartValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,r.value=`${this.endValue}`)});f(this,"handleEndValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,r.value=`${this.startValue}`)});f(this,"getLabel",t=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const r=this.dateGranularity||"year",a=this.lowerBound+t,n=Rs(this.min,r,a);return _i(this.dateGranularity||"year",new Date(n))}}});t!==!1&&this.__registerHost(),this.rangeChanged=Ze(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=Pi(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=lc(this.emitUpdate,120)}render(){const t=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,r=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),n=this.getLabel(this.endValue);return d("div",{key:"2c72254f52151edd2e2fa89c092fc788db0b5562",class:"searchcraft-slider"},d("div",{key:"98c25badf2c9386d7173ea552e510dcc168e7fc7",class:"searchcraft-slider-range"},d("div",{key:"50774db2253e34b1bce68acc0a40b2706cab542d",class:"searchcraft-slider-active-range",style:{left:`${t}%`,width:`${r-t}%`}}),d("input",{key:"229afedc1318a63cbd75806805210cf4f5695e6e",class:ve("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleStartValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),d("input",{key:"6aa038b01daaba86f501ebbbec30fc6720b549b3",class:ve("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleEndValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),d("div",{key:"f70501538635c3b08ad1e6ac101d0b3192ef8e04",class:"searchcraft-slider-label"},d("span",{key:"ddd539b86774f8900771d77d5ef7eb3a67c98d59",class:"searchcraft-slider-start-label"},a),d("span",{key:"b754a9c8d284e0623032cee6b92f9df88873ec04",class:"searchcraft-slider-end-label"},n)))}},[768,"searchcraft-slider",{max:[2],min:[2],step:[2],dataType:[1,"data-type"],dateGranularity:[1,"date-granularity"],lowerBound:[32],upperBound:[32],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function yn(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(e=>{switch(e){case"searchcraft-slider":customElements.get(e)||customElements.define(e,uc);break}})}const hc=Y(class extends G{constructor(t){super();f(this,"label","Toggle");f(this,"subLabel");f(this,"searchcraftId");f(this,"toggleUpdated");f(this,"isActive",!1);f(this,"lastSearchTerm");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"handleToggle",async()=>{var t;this.isActive=!this.isActive,(t=this.toggleUpdated)==null||t.emit(this.isActive)});t!==!1&&this.__registerHost(),this.toggleUpdated=Ze(this,"toggleUpdated")}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){return d("div",{key:"ab1d5ee21c7aaa28af1c405edc986556858366e8",class:ve("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},d("div",{key:"44f86a16d796d448bdb2fb3af72d4d8e1484364b"},d("p",{key:"9fedb38795d6379cae56dc005ab8e4a944b4261b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&d("p",{key:"44f3d17175184032275fec89a4cfe7f8266b7014",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),d("button",{key:"15fc18906ff2fb21fe646a4e3a8a2ace4a37cae2",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},d("div",{key:"716d29c65a199f63f5fd294dc3e3ad2ea4d53aa3",class:"searchcraft-toggle-button-handle"})))}},[768,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function wn(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-toggle-button":customElements.get(e)||customElements.define(e,hc);break}})}const fc=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"items",[]);f(this,"responsiveBreakpoint",768);f(this,"responsiveBehavior","auto");f(this,"lastSearchTerm");f(this,"isFilterPanelVisible",!0);f(this,"core");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"resizeObserver");f(this,"manuallyToggled",!1);f(this,"toggleClickHandler");f(this,"handleWindowResize",()=>{this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t,this.setInitialDateRanges(),this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize(),this.unsubscribe=t.store.subscribe((r,a)=>{if(this.lastSearchTerm=r.searchTerm||"",a.isFilterPanelVisible!==r.isFilterPanelVisible){const o=window.innerWidth>=(this.responsiveBreakpoint||768);r.isFilterPanelVisible!==o&&(this.manuallyToggled=!0),this.updateToggleElementAttributes(r.isFilterPanelVisible)}this.isFilterPanelVisible=r.isFilterPanelVisible})}componentDidLoad(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.responsiveBehavior==="auto"&&typeof window<"u"&&this.setupResizeObserver(),this.setupToggleClickHandlers(),setTimeout(()=>{if(this.core){const t=this.core.store.getState().isFilterPanelVisible;this.updateToggleElementAttributes(t)}},0)}disconnectedCallback(){var t,r,a;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.resizeObserver)==null||a.disconnect(),typeof window<"u"&&window.removeEventListener("resize",this.handleWindowResize),this.cleanupToggleClickHandlers()}setupResizeObserver(){if(typeof ResizeObserver>"u"){window.addEventListener("resize",this.handleWindowResize);return}this.resizeObserver=new ResizeObserver(()=>{this.handleWindowResize()}),this.resizeObserver.observe(document.body)}updateVisibilityBasedOnWindowSize(){if(typeof window>"u"||this.manuallyToggled)return;const r=window.innerWidth>=(this.responsiveBreakpoint||768);this.core&&this.isFilterPanelVisible!==r&&this.core.store.getState().setFilterPanelVisibility(r)}setupToggleClickHandlers(){if(typeof document>"u")return;this.toggleClickHandler=r=>{if(!(window.innerWidth>=(this.responsiveBreakpoint||768))&&(r.preventDefault(),this.core)){const n=this.core.store.getState().isFilterPanelVisible;this.core.store.getState().setFilterPanelVisibility(!n)}},document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.addEventListener("click",this.toggleClickHandler)})}updateToggleElementAttributes(t){if(typeof document>"u")return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(a=>{t?(a.removeAttribute("data-filter-panel-collapsed"),a.setAttribute("data-filter-panel-expanded","")):(a.removeAttribute("data-filter-panel-expanded"),a.setAttribute("data-filter-panel-collapsed",""))})}cleanupToggleClickHandlers(){if(typeof document>"u"||!this.toggleClickHandler)return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.removeEventListener("click",this.toggleClickHandler)})}setInitialDateRanges(){var t,r;for(const a of this.items)if(a.type==="dateRange"){const n=a,o=n.options.minDate,c=n.options.maxDate||new Date;(r=(t=this.core)==null?void 0:t.store.getState())==null||r.addRangeValueForIndexField({fieldName:n.fieldName,value:`${n.fieldName}:[${o.toISOString()} TO ${c.toISOString()}]`})}}handleDateRangeChanged(t,r,a){var c,u,i,h;const n=new Date(r),o=new Date(a);(u=(c=this.core)==null?void 0:c.store.getState())==null||u.addRangeValueForIndexField({fieldName:t.fieldName,value:`${t.fieldName}:[${n.toISOString()} TO ${o.toISOString()}]`}),(h=(i=this.core)==null?void 0:i.store.getState())==null||h.search()}handleNumericRangeChanged(t,r,a){var n,o,c,u;(o=(n=this.core)==null?void 0:n.store.getState())==null||o.addRangeValueForIndexField({fieldName:t,value:`${t}:[${r} TO ${a}]`}),(u=(c=this.core)==null?void 0:c.store.getState())==null||u.search()}handleFacetSelectionUpdated(t,r){var a,n,o,c,u,i;r.length>0?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.addFacetPathsForIndexField({fieldName:t,value:`${t}: IN [${r.join(" ")}]`}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.removeFacetPathsForIndexField(t),(i=(u=this.core)==null?void 0:u.store.getState())==null||i.search()}handleExactMatchToggleUpdated(t){var r,a,n,o;(a=(r=this.core)==null?void 0:r.store.getState())==null||a.setSearchMode(t?"exact":"fuzzy"),(o=(n=this.core)==null?void 0:n.store.getState())==null||o.search()}handleMostRecentToggleUpdated(t,r){var a,n,o,c,u,i;r?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.setSortOrder({orderByField:t,sortType:"desc"}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.setSortOrder({orderByField:null,sortType:null}),(i=(u=this.core)==null?void 0:u.store.getState())==null||i.search()}render(){return this.isFilterPanelVisible?d("div",{class:"searchcraft-filter-panel"},this.items.map(t=>{switch(t.type){case"dateRange":{const r=t,a=r.options.maxDate||new Date;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-slider",{min:r.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:r.options.granularity,onRangeChanged:n=>{this.handleDateRangeChanged(r,n.detail.startValue,n.detail.endValue)}}))}case"numericRange":{const r=t;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-slider",{min:r.options.min,max:r.options.max,step:r.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(r.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const r=t;let a=null,n=null;const o=u=>{n&&(u?(n.removeAttribute("data-facet-section-expanded"),n.setAttribute("data-facet-section-collapsed",""),n.setAttribute("aria-expanded","false")):(n.removeAttribute("data-facet-section-collapsed"),n.setAttribute("data-facet-section-expanded",""),n.setAttribute("aria-expanded","true")))},c=async()=>{if(a&&"handleCollapseToggle"in a&&"getIsCollapsed"in a){await a.handleCollapseToggle();const u=await a.getIsCollapsed();o(u)}};return d("div",{class:"searchcraft-filter-panel-section"},d("p",{ref:u=>{n=u||null},"aria-expanded":r.options.initialCollapseState!=="closed",class:"searchcraft-filter-panel-label","data-toggle-facet-section":!0,"data-facet-section-expanded":r.options.initialCollapseState!=="closed"?"":void 0,"data-facet-section-collapsed":r.options.initialCollapseState==="closed"?"":void 0,onClick:()=>void c(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),c())},role:"button",tabIndex:0},t.label),d("searchcraft-facet-list",{ref:u=>{a=u||null},fieldName:r.fieldName,exclude:r.options.exclude,initialCollapseState:r.options.initialCollapseState,viewMoreThreshold:r.options.viewMoreThreshold,onFacetSelectionUpdated:u=>{this.handleFacetSelectionUpdated(r.fieldName,u.detail.paths)}}))}case"exactMatchToggle":{const r=t;return d("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const r=t;return d("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(r.fieldName,a.detail)}})}}})):null}},[768,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],responsiveBreakpoint:[2,"responsive-breakpoint"],responsiveBehavior:[1,"responsive-behavior"],lastSearchTerm:[32],isFilterPanelVisible:[32]}]);function dc(){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,fc);break;case"searchcraft-facet-list":customElements.get(e)||vn();break;case"searchcraft-slider":customElements.get(e)||yn();break;case"searchcraft-toggle-button":customElements.get(e)||wn();break}})}const pc=dc,mc=Y(class extends G{constructor(t){super();f(this,"inputLabelClassName","");f(this,"label","");t!==!1&&this.__registerHost()}render(){return d("label",{key:"1008f9beb320aaa94026604b283eb65a96023265",class:ve("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[768,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Fs(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-label":customElements.get(e)||customElements.define(e,mc);break}})}const gc=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"autoSearch",!0);f(this,"buttonPlacement","none");f(this,"buttonLabel");f(this,"inputLabel");f(this,"placeholderValue","Enter Search");f(this,"placeholderBehavior");f(this,"value");f(this,"inputFocus");f(this,"inputBlur");f(this,"inputInit");f(this,"inputValue","");f(this,"searchTerm","");f(this,"error",!1);f(this,"core");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"handleInput",t=>{var a;const r=t.target;this.inputValue=r.value,(a=this.core)==null||a.store.getState().setSearchTerm(r.value),this.autoSearch&&this.performSearch()});f(this,"performSearch",async()=>{var t;this.error=!1;try{await((t=this.core)==null?void 0:t.store.getState().search())}catch{this.error=!0}});f(this,"handleClearInput",()=>{var t;this.inputValue="",(t=this.core)==null||t.store.getState().resetSearchValues(),this.error=!1});f(this,"handleFormSubmit",async t=>{t.preventDefault(),await this.performSearch()});t!==!1&&this.__registerHost(),this.inputFocus=Ze(this,"inputFocus"),this.inputBlur=Ze(this,"inputBlur"),this.inputInit=Ze(this,"inputInit")}init(){var t;this.core&&(this.value!==void 0&&this.value.trim().length>0&&(this.inputValue=this.value,this.core.store.getState().setSearchTerm(this.value),this.autoSearch&&this.core.store.getState().search()),(t=this.inputInit)==null||t.emit())}onCoreChange(){this.init()}onValueChange(t){var r,a;t!==void 0&&t!==this.inputValue&&(this.inputValue=t,(r=this.core)==null||r.store.getState().setSearchTerm(t),this.autoSearch&&t.trim().length>0&&((a=this.core)==null||a.store.getState().search()))}onCoreAvailable(t){this.core=t,this.init(),this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,(this.value===void 0||r.searchTerm==="")&&(this.inputValue=r.searchTerm)})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=this.inputValue.length>0,r=ve("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),n={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return d("form",{key:"8ba91615394f95c0d5bd26a3006d3e8b454f047e",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},d("div",{key:"d9025a1c041e3132280b22e5a1b039df0196cea5",class:r,style:n},d("div",{key:"a8c3a80a0ccb718f974902fb1d163d5c3ee6194a",class:"searchcraft-input-form-button"},d("searchcraft-button",{key:"a12ff9a8cdb9a4ce3c3fd54b1c2ae084edd37069",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&d("div",{key:"866e7162c402524eaca864bb6e950a244245dc48",class:"searchcraft-input-form-label"},d("searchcraft-input-label",{key:"c57217cd5924c827df08e22a728067e3bfc63a26",label:this.inputLabel})),this.error&&d("div",{key:"4a54728bf366db50de39470cf31860a6307dafea",class:"searchcraft-input-form-error-message"},d("searchcraft-error-message",{key:"5fa5b5f5677350338d15c8e6614b0d9f584141b0"},"Something went wrong.")),d("div",{key:"67be766103a3bca11cff6f83a2a6dea7c6c6f106",class:"searchcraft-input-form-input-wrapper"},d("input",{key:"931609a4e8fc55d688077ec6cb04f2bb9b86b5fe",autoComplete:"off",class:ve("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var o;return(o=this.inputFocus)==null?void 0:o.emit()},onBlur:()=>{var o;return(o=this.inputBlur)==null?void 0:o.emit()},onInput:o=>{this.handleInput(o)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),d("div",{key:"7feb32348b7faec4104137a142ba8150149498a5",class:"searchcraft-input-form-input-icon"},d("svg",{key:"8b9abd236d4896b8dbd5c14e06019c116e3675be",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},d("title",{key:"4d3b6724f6532920f5531d2e15b28a06f0770688"},"Search icon"),d("path",{key:"65a46a1916c1f020c9bebffd42aa016b59177376",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),t&&d("button",{key:"65278eb0ab49415dce79c874adf90adcb5854db5",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},d("svg",{key:"0016263afe32250ace58cc4b98ff6106d7d9d4a0",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},d("title",{key:"9b40d806455ab9c19c0cddb4c76101debdb0266c"},"Clear icon"),d("path",{key:"2954ee1496d6736d6e780755034902c76adb81e9",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"],value:["onValueChange"]}}},[768,"searchcraft-input-form",{searchcraftId:[1,"searchcraft-id"],autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],value:[1],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"],value:["onValueChange"]}]);function kn(){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,gc);break;case"searchcraft-button":customElements.get(e)||Mr();break;case"searchcraft-error-message":customElements.get(e)||Lr();break;case"searchcraft-input-label":customElements.get(e)||Fs();break}})}const bc=kn,vc=Fs,yc=Y(class extends G{constructor(t){super();f(this,"label");t!==!1&&this.__registerHost()}render(){const t=this.label??"Loading";return d("div",{key:"d749250c5f56c703da7f1cba4a226a202ae269c0",class:"searchcraft-loading",role:"status","aria-live":"polite","aria-label":t},d("div",{key:"0f834793686bcf8dff56769ad65311c1f591e8dd",class:"searchcraft-loading-dots","aria-hidden":"true"},d("div",{key:"2174c333eecf0630ce984b2dece74675356259d9",class:"searchcraft-loading-dot-1"}),d("div",{key:"927fee69cd86dbd9ae57776c2a15fa6956707fac",class:"searchcraft-loading-dot-2"}),d("div",{key:"cfd37c9a9a12dfc9963aa53c3979fb59dc7a132c",class:"searchcraft-loading-dot-3"})),this.label?d("p",{class:"searchcraft-loading-label"},this.label):null)}},[768,"searchcraft-loading",{label:[1]}]);function Or(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-loading":customElements.get(e)||customElements.define(e,yc);break}})}const wc=Or,kc=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"scrollToTop",!0);f(this,"pageQueryParam","p");f(this,"usePageQueryParam",!0);f(this,"searchTerm");f(this,"searchResultsPerPage");f(this,"searchResultsPage");f(this,"searchResultsCount");f(this,"searchClientRequestProperties");f(this,"searchResultsPagesCount",1);f(this,"searchResultsRangeMin",1);f(this,"searchResultsRangeMax",1);f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});f(this,"cleanupCore");f(this,"_initialPageApplied",!1);f(this,"scrollAnimationId");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{if(this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage,!this._initialPageApplied){this._initialPageApplied=!0;const a=this.getPageFromUrl();a!==null&&a!==r.searchResultsPage&&r.setSearchResultsPage(a)}})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}smoothScrollToSearchResults(){if(!this.scrollToTop)return;const t=document.querySelector("searchcraft-search-results .searchcraft-search-results");if(!t)return;this.scrollAnimationId&&cancelAnimationFrame(this.scrollAnimationId);const n=t.getBoundingClientRect().top+window.scrollY-200,o=window.scrollY,c=n-o,u=1500;let i=null;const h=p=>p===1?1:1-2**(-10*p),g=p=>{i===null&&(i=p);const y=p-i,w=Math.min(y/u,1),S=h(w);window.scrollTo(0,o+c*S),w<1?this.scrollAnimationId=requestAnimationFrame(g):this.scrollAnimationId=void 0};this.scrollAnimationId=requestAnimationFrame(g)}getPageFromUrl(){if(!this.usePageQueryParam||typeof window>"u")return null;let t=window;try{window.top&&window.top!==window&&window.top.location.href&&(t=window.top)}catch{}const a=new URLSearchParams(t.location.search).get(this.pageQueryParam);if(a===null)return null;const n=Number.parseInt(a,10);return Number.isNaN(n)||n<1?null:n}updateUrlPage(t){if(!this.usePageQueryParam||typeof window>"u")return;let r=window;try{window.top&&window.top!==window&&window.top.location.href&&(r=window.top)}catch{}const a=new URL(r.location.href);t<=1?a.searchParams.delete(this.pageQueryParam):a.searchParams.set(this.pageQueryParam,String(t)),r.history.replaceState(r.history.state,"",a.toString())}handleGoToPage(t){this.setSearchResultsPage(t),this.updateUrlPage(t),this.scrollToTop&&this.smoothScrollToSearchResults()}renderOddPaginationItem(t){return d("li",null,d("button",{class:ve("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t))}renderEvenPaginationItem(t){if(!(this.searchResultsPagesCount<=t))return(this.searchResultsPagesCount<=5||t<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=t+1:this.searchResultsPage>=t-1)?d("li",null,d("button",{class:ve("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t)):d("li",null,d("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?d("li",null,d("button",{class:ve("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):d("li",null,d("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-pagination"},d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Previous page icon"),d("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),d("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Next page icon"),d("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[768,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],scrollToTop:[4,"scroll-to-top"],pageQueryParam:[1,"page-query-param"],usePageQueryParam:[4,"use-page-query-param"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function Sc(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-pagination":customElements.get(e)||customElements.define(e,kc);break;case"searchcraft-button":customElements.get(e)||Mr();break}})}const xc=Sc,Rc=Y(class extends G{constructor(t){super();f(this,"template");f(this,"type");f(this,"searchcraftId");f(this,"hotkey");f(this,"hotkeyModifier");f(this,"hotkeyModifierSymbol");f(this,"isPopoverVisible");f(this,"userAgent");f(this,"unsubscribe",()=>{});f(this,"cleanupCore");f(this,"core");f(this,"renderOptionSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Option key"),d("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),d("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));f(this,"renderCtrlSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Ctrl key"),d("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));f(this,"renderWindowsMetaSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Windows meta key"),d("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));f(this,"renderMacMetaSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Mac meta key"),d("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));t!==!1&&this.__registerHost()}onCoreAvailable(t){this.core=t;const r=t.store.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=t.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}setUserAgent(){const t=navigator.userAgent.toLowerCase();switch(!0){case t.includes("windows"):return"window";case t.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return d("div",{class:"searchcraft-popover-button-wrapper"},d("div",{class:"searchcraft-popover-button-input"},d("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},d("title",null,"Search icon"),d("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),d("span",null,"Search")),d("div",{class:"searchcraft-popover-button-keycaps"},d("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},d("span",null,this.hotkeyModifierSymbol)),d("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},d("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();case"magnifying-glass":return d("div",{class:"searchcraft-popover-button-input"},d("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1","aria-hidden":"true"},d("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})));default:return d("div",null,d("slot",null))}}render(){return d("button",{key:"760f4f8d8daddaaadc0367e21b9efe23c4ef7c7d","aria-label":this.type==="magnifying-glass"?"Search":void 0,class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:Dt}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[772,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function Cc(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(e=>{switch(e){case"searchcraft-popover-button":customElements.get(e)||customElements.define(e,Rc);break}})}const Tc=Cc,Ec=mn,Ac=Y(class extends G{constructor(t){super();f(this,"item");f(this,"popoverResultMappings");f(this,"documentPosition",0);f(this,"searchcraftId");f(this,"title");f(this,"subtitle");f(this,"href");f(this,"imageSource");f(this,"imageAlt");f(this,"core");f(this,"cleanupCore");f(this,"handleLinkClick",()=>{var t;if(this.core){const r=this.documentPosition,a=this.core.store.getState().searchTerm,n=this.core.store.getState().searchClientResponseItems.length||0;(t=this.core.measureClient)==null||t.sendMeasureEvent("document_clicked",{document_position:r,number_of_documents:n,search_term:a})}});t!==!1&&this.__registerHost()}mapValuesFromDocument(t){var r,a,n,o,c;this.title=Nt(t,(r=this.popoverResultMappings)==null?void 0:r.title),this.subtitle=Nt(t,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Nt(t,(n=this.popoverResultMappings)==null?void 0:n.href),this.imageSource=Nt(t,(o=this.popoverResultMappings)==null?void 0:o.imageSource),this.imageAlt=Nt(t,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}onCoreAvailable(t){this.core=t}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){return d("div",{key:"d1c9c310b8abc9d2370efb802eac1edf4189519d",class:"searchcraft-popover-list-item"},d("a",{key:"30eb1a5076c5b4b95ae43147eaee0bb72ce46179",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&d("div",{key:"d18ff55823dc2c61f3786f423936af8b009aeeda",class:"searchcraft-popover-list-item-image-wrapper"},d("img",{key:"56f4cc1d472f7da05e64fcf52c560a7ad0cdf7a6",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),d("div",{key:"78a0f0235d5e71d10076b70ccbaf4b58e0d6fea0",class:"searchcraft-popover-list-item-content"},this.title&&d("p",{key:"4489047af56e5aa295cb5f036e970dcad053d3b7",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&d("p",{key:"4d177c227a1dbf1233022d738403c8eb93ba328d",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[768,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],searchcraftId:[1,"searchcraft-id"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function Ds(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-item":customElements.get(e)||customElements.define(e,Ac);break}})}const $c=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"popoverResultMappings");f(this,"searchClientResponseItems");f(this,"adClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"config");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.config=t.config}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}renderWithADMAds(){var t,r;return d("div",{class:"searchcraft-popover-list-view"},(t=this.adClientResponseItems)==null?void 0:t.map(a=>d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+n})))}renderWithCustomAds(){var u,i,h,g,p,y,w,S;const t=[],r=((i=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((g=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:g.adInterstitialQuantity)||1,n=((y=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:y.adStartQuantity)||0,o=((S=(w=this.config)==null?void 0:w.customAdConfig)==null?void 0:S.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let R=0;R<n;R++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${R}-ad`,renderPosition:"top"}));c.forEach((R,L)=>{if(r&&L%r===0&&L+r<c.length&&L>=r)for(let E=0;E<a;E++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${R.id}-ad-${E}`,renderPosition:"interstitial"}));t.push(d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:R,key:R.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+L}))});for(let R=0;R<o;R++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${R}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-popover-list-view"},t)}renderWithNativoAds(){var i,h,g,p,y,w,S,R,L,E;const t=[],r=((h=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:h.adInterstialStartIndex)||0,a=((p=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((w=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:w.adInterstitialQuantity)||1,o=((R=(S=this.config)==null?void 0:S.nativoConfig)==null?void 0:R.adStartQuantity)||0,c=((E=(L=this.config)==null?void 0:L.nativoConfig)==null?void 0:E.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let k=0;k<o;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"top"}));u.forEach((k,x)=>{if(a&&(x+r)%a===0&&x+a<u.length&&x>=a)for(let F=0;F<n;F++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k.id}-ad-${F}`,renderPosition:"interstitial"}));t.push(d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:k,key:k.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+x}))});for(let k=0;k<c;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-popover-list-view"},t)}renderWithNoAds(){var t;return d("div",{class:"searchcraft-popover-list-view"},(t=this.searchClientResponseItems)==null?void 0:t.map((r,a)=>d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:r,key:r.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var t,r,a;return(t=this.config)!=null&&t.customAdConfig?this.renderWithCustomAds():(r=this.config)!=null&&r.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[768,"searchcraft-popover-list-view",{searchcraftId:[1,"searchcraft-id"],popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Sn(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-view":customElements.get(e)||customElements.define(e,$c);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-popover-list-item":customElements.get(e)||Ds();break}})}function Ns(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nt=Ns();function xn(s){nt=s}var Wt={exec:()=>null};function H(s,e=""){let t=typeof s=="string"?s:s.source;const r={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(fe.caret,"$1"),t=t.replace(a,o),r},getRegex:()=>new RegExp(t,e)};return r}var fe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Pc=/^(?:[ \t]*(?:\n|$))+/,_c=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ic=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zs=/(?:[*+-]|\d{1,9}[.)])/,Rn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cn=H(Rn).replace(/bull/g,zs).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(),Lc=H(Rn).replace(/bull/g,zs).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(),Us=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Oc=/^[^\n]+/,Bs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fc=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Dc=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zs).getRegex(),Fr="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",Hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nc=H("^ {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",Hs).replace("tag",Fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Tn=H(Us).replace("hr",Vt).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",Fr).getRegex(),zc=H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Tn).getRegex(),qs={blockquote:zc,code:_c,def:Fc,fences:Ic,heading:Mc,hr:Vt,html:Nc,lheading:Cn,list:Dc,newline:Pc,paragraph:Tn,table:Wt,text:Oc},En=H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vt).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",Fr).getRegex(),Uc={...qs,lheading:Lc,table:En,paragraph:H(Us).replace("hr",Vt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",En).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",Fr).getRegex()},Bc={...qs,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hs).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:Wt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Us).replace("hr",Vt).replace("heading",` *#{1,6} *[^
12
- ]`).replace("lheading",Cn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,An=/^( {2,}|\\)\n(?!\s*$)/,Wc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dr=/[\p{P}\p{S}]/u,Ws=/[\s\p{P}\p{S}]/u,$n=/[^\s\p{P}\p{S}]/u,Vc=H(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ws).getRegex(),Pn=/(?!~)[\p{P}\p{S}]/u,jc=/(?!~)[\s\p{P}\p{S}]/u,Gc=/(?:[^\s\p{P}\p{S}]|~)/u,Yc=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,_n=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qc=H(_n,"u").replace(/punct/g,Dr).getRegex(),Xc=H(_n,"u").replace(/punct/g,Pn).getRegex(),In="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Kc=H(In,"gu").replace(/notPunctSpace/g,$n).replace(/punctSpace/g,Ws).replace(/punct/g,Dr).getRegex(),Zc=H(In,"gu").replace(/notPunctSpace/g,Gc).replace(/punctSpace/g,jc).replace(/punct/g,Pn).getRegex(),Jc=H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$n).replace(/punctSpace/g,Ws).replace(/punct/g,Dr).getRegex(),el=H(/\\(punct)/,"gu").replace(/punct/g,Dr).getRegex(),tl=H(/^<(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(),rl=H(Hs).replace("(?:-->|$)","-->").getRegex(),sl=H("^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",rl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Nr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,al=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Nr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Mn=H(/^!?\[(label)\]\[(ref)\]/).replace("label",Nr).replace("ref",Bs).getRegex(),Ln=H(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bs).getRegex(),nl=H("reflink|nolink(?!\\()","g").replace("reflink",Mn).replace("nolink",Ln).getRegex(),Vs={_backpedal:Wt,anyPunctuation:el,autolink:tl,blockSkip:Yc,br:An,code:qc,del:Wt,emStrongLDelim:Qc,emStrongRDelimAst:Kc,emStrongRDelimUnd:Jc,escape:Hc,link:al,nolink:Ln,punctuation:Vc,reflink:Mn,reflinkSearch:nl,tag:sl,text:Wc,url:Wt},ol={...Vs,link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",Nr).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nr).getRegex()},js={...Vs,emStrongRDelimAst:Zc,emStrongLDelim:Xc,url:H(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},il={...js,br:H(An).replace("{2,}","*").getRegex(),text:H(js.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zr={normal:qs,gfm:Uc,pedantic:Bc},jt={normal:Vs,gfm:js,breaks:il,pedantic:ol},cl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},On=s=>cl[s];function Ne(s,e){if(e){if(fe.escapeTest.test(s))return s.replace(fe.escapeReplace,On)}else if(fe.escapeTestNoEncode.test(s))return s.replace(fe.escapeReplaceNoEncode,On);return s}function Fn(s){try{s=encodeURI(s).replace(fe.percentDecode,"%")}catch{return null}return s}function Dn(s,e){var n;const t=s.replace(fe.findPipe,(o,c,u)=>{let i=!1,h=c;for(;--h>=0&&u[h]==="\\";)i=!i;return i?"|":" |"}),r=t.split(fe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(fe.slashPipe,"|");return r}function Gt(s,e,t){const r=s.length;if(r===0)return"";let a=0;for(;a<r&&s.charAt(r-a-1)===e;)a++;return s.slice(0,r-a)}function ll(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===e[0])t++;else if(s[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function Nn(s,e,t,r,a){const n=e.href,o=e.title||null,c=s[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:o,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,u}function ul(s,e,t){const r=s.match(t.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.split(`
9
+ */var Ba;function si(){return Ba||(Ba=1,function(s){(function(){var e={}.hasOwnProperty;function t(){for(var n="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(n=a(n,r(c)))}return n}function r(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var c in n)e.call(n,c)&&n[c]&&(o=a(o,c));return o}function a(n,o){return o?n?n+" "+o:n+o:n}s.exports?(t.default=t,s.exports=t):window.classNames=t})()}(fs)),fs.exports}var ai=si(),ve=ri(ai);const ds="searchcraft";class ni{constructor(){f(this,"coreInstances",{});f(this,"subscriptions",{})}addCoreInstance(e,t){const r=t||ds;this.coreInstances[r]=e;for(const a of this.subscriptions[r]||[])a(e)}useCoreInstance(e,t){const r=e||ds;return this.coreInstances[r]?(t(this.coreInstances[r]),()=>{}):(this.subscriptions[r]||(this.subscriptions[r]=[]),this.subscriptions[r].push(t),()=>{this.subscriptions[r]&&(this.subscriptions[r]=this.subscriptions[r].filter(a=>a!==t))})}}const re=new ni;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Ha,setPrototypeOf:qa,isFrozen:oi,getPrototypeOf:ii,getOwnPropertyDescriptor:ci}=Object;let{freeze:oe,seal:Te,create:ps}=Object,{apply:ms,construct:gs}=typeof Reflect<"u"&&Reflect;oe||(oe=function(e){return e}),Te||(Te=function(e){return e}),ms||(ms=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),gs||(gs=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const Tr=ce(Array.prototype.forEach),li=ce(Array.prototype.lastIndexOf),Wa=ce(Array.prototype.pop),It=ce(Array.prototype.push),ui=ce(Array.prototype.splice),Er=ce(String.prototype.toLowerCase),bs=ce(String.prototype.toString),vs=ce(String.prototype.match),Mt=ce(String.prototype.replace),hi=ce(String.prototype.indexOf),fi=ce(String.prototype.trim),$e=ce(Object.prototype.hasOwnProperty),ie=ce(RegExp.prototype.test),Lt=di(TypeError);function ce(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return ms(s,e,r)}}function di(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return gs(s,t)}}function I(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Er;qa&&qa(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(oi(e)||(e[r]=n),a=n)}s[a]=!0}return s}function pi(s){for(let e=0;e<s.length;e++)$e(s,e)||(s[e]=null);return s}function Fe(s){const e=ps(null);for(const[t,r]of Ha(s))$e(s,t)&&(Array.isArray(r)?e[t]=pi(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Fe(r):e[t]=r);return e}function Ot(s,e){for(;s!==null;){const r=ci(s,e);if(r){if(r.get)return ce(r.get);if(typeof r.value=="function")return ce(r.value)}s=ii(s)}function t(){return null}return t}const Va=oe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ys=oe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ws=oe(["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"]),mi=oe(["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"]),Ss=oe(["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"]),gi=oe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ja=oe(["#text"]),Ga=oe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ks=oe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ya=oe(["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"]),Ar=oe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bi=Te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vi=Te(/<%[\w\W]*|[\w\W]*%>/gm),yi=Te(/\$\{[\w\W]*/gm),wi=Te(/^data-[\-\w.\u00B7-\uFFFF]+$/),Si=Te(/^aria-[\-\w]+$/),Qa=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ki=Te(/^(?:\w+script|data):/i),xi=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xa=Te(/^html$/i),Ci=Te(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ka=Object.freeze({__proto__:null,ARIA_ATTR:Si,ATTR_WHITESPACE:xi,CUSTOM_ELEMENT:Ci,DATA_ATTR:wi,DOCTYPE_NAME:Xa,ERB_EXPR:vi,IS_ALLOWED_URI:Qa,IS_SCRIPT_OR_DATA:ki,MUSTACHE_EXPR:bi,TMPLIT_EXPR:yi});const Ft={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ri=function(){return typeof window>"u"?null:window},Ti=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Za=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ja(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ri();const e=v=>Ja(v);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==Ft.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:u,NodeFilter:i,NamedNodeMap:h=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:y}=s,w=u.prototype,k=Ot(w,"cloneNode"),C=Ot(w,"remove"),L=Ot(w,"nextSibling"),E=Ot(w,"childNodes"),S=Ot(w,"parentNode");if(typeof o=="function"){const v=t.createElement("template");v.content&&v.content.ownerDocument&&(t=v.content.ownerDocument)}let x,F="";const{implementation:R,createNodeIterator:z,createDocumentFragment:V,getElementsByTagName:ne}=t,{importNode:rt}=r;let U=Za();e.isSupported=typeof Ha=="function"&&typeof S=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:lt,TMPLIT_EXPR:ut,DATA_ATTR:Zs,ARIA_ATTR:Js,IS_SCRIPT_OR_DATA:ea,ATTR_WHITESPACE:Xt,CUSTOM_ELEMENT:ta}=Ka;let{IS_ALLOWED_URI:Kt}=Ka,O=null;const Zt=I({},[...Va,...ys,...ws,...Ss,...ja]);let D=null;const Jt=I({},[...Ga,...ks,...Ya,...Ar]);let $=Object.seal(ps(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}})),Me=null,ht=null;const ye=Object.seal(ps(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let er=!0,ft=!0,tr=!1,rr=!0,we=!1,We=!0,pe=!1,dt=!1,pt=!1,Se=!1,Ve=!1,je=!1,sr=!0,ar=!1;const ra="user-content-";let mt=!0,Le=!1,ke={},X=null;const gt=I({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let nr=null;const or=I({},["audio","video","img","source","image","track"]);let bt=null;const ir=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",J="http://www.w3.org/1999/xhtml";let xe=J,vt=!1,yt=null;const sa=I({},[Ge,Ye,J],bs);let Qe=I({},["mi","mo","mn","ms","mtext"]),Xe=I({},["annotation-xml"]);const aa=I({},["title","style","font","a","script"]);let Oe=null;const na=["application/xhtml+xml","text/html"],oa="text/html";let _=null,Ce=null;const ia=t.createElement("form"),cr=function(l){return l instanceof RegExp||l instanceof Function},wt=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ce&&Ce===l)){if((!l||typeof l!="object")&&(l={}),l=Fe(l),Oe=na.indexOf(l.PARSER_MEDIA_TYPE)===-1?oa:l.PARSER_MEDIA_TYPE,_=Oe==="application/xhtml+xml"?bs:Er,O=$e(l,"ALLOWED_TAGS")?I({},l.ALLOWED_TAGS,_):Zt,D=$e(l,"ALLOWED_ATTR")?I({},l.ALLOWED_ATTR,_):Jt,yt=$e(l,"ALLOWED_NAMESPACES")?I({},l.ALLOWED_NAMESPACES,bs):sa,bt=$e(l,"ADD_URI_SAFE_ATTR")?I(Fe(ir),l.ADD_URI_SAFE_ATTR,_):ir,nr=$e(l,"ADD_DATA_URI_TAGS")?I(Fe(or),l.ADD_DATA_URI_TAGS,_):or,X=$e(l,"FORBID_CONTENTS")?I({},l.FORBID_CONTENTS,_):gt,Me=$e(l,"FORBID_TAGS")?I({},l.FORBID_TAGS,_):Fe({}),ht=$e(l,"FORBID_ATTR")?I({},l.FORBID_ATTR,_):Fe({}),ke=$e(l,"USE_PROFILES")?l.USE_PROFILES:!1,er=l.ALLOW_ARIA_ATTR!==!1,ft=l.ALLOW_DATA_ATTR!==!1,tr=l.ALLOW_UNKNOWN_PROTOCOLS||!1,rr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=l.SAFE_FOR_TEMPLATES||!1,We=l.SAFE_FOR_XML!==!1,pe=l.WHOLE_DOCUMENT||!1,Se=l.RETURN_DOM||!1,Ve=l.RETURN_DOM_FRAGMENT||!1,je=l.RETURN_TRUSTED_TYPE||!1,pt=l.FORCE_BODY||!1,sr=l.SANITIZE_DOM!==!1,ar=l.SANITIZE_NAMED_PROPS||!1,mt=l.KEEP_CONTENT!==!1,Le=l.IN_PLACE||!1,Kt=l.ALLOWED_URI_REGEXP||Qa,xe=l.NAMESPACE||J,Qe=l.MATHML_TEXT_INTEGRATION_POINTS||Qe,Xe=l.HTML_INTEGRATION_POINTS||Xe,$=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(ft=!1),Ve&&(Se=!0),ke&&(O=I({},ja),D=[],ke.html===!0&&(I(O,Va),I(D,Ga)),ke.svg===!0&&(I(O,ys),I(D,ks),I(D,Ar)),ke.svgFilters===!0&&(I(O,ws),I(D,ks),I(D,Ar)),ke.mathMl===!0&&(I(O,Ss),I(D,Ya),I(D,Ar))),l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ye.tagCheck=l.ADD_TAGS:(O===Zt&&(O=Fe(O)),I(O,l.ADD_TAGS,_))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ye.attributeCheck=l.ADD_ATTR:(D===Jt&&(D=Fe(D)),I(D,l.ADD_ATTR,_))),l.ADD_URI_SAFE_ATTR&&I(bt,l.ADD_URI_SAFE_ATTR,_),l.FORBID_CONTENTS&&(X===gt&&(X=Fe(X)),I(X,l.FORBID_CONTENTS,_)),l.ADD_FORBID_CONTENTS&&(X===gt&&(X=Fe(X)),I(X,l.ADD_FORBID_CONTENTS,_)),mt&&(O["#text"]=!0),pe&&I(O,["html","head","body"]),O.table&&(I(O,["tbody"]),delete Me.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=l.TRUSTED_TYPES_POLICY,F=x.createHTML("")}else x===void 0&&(x=Ti(y,a)),x!==null&&typeof F=="string"&&(F=x.createHTML(""));oe&&oe(l),Ce=l}},lr=I({},[...ys,...ws,...mi]),ur=I({},[...Ss,...gi]),ca=function(l){let m=S(l);(!m||!m.tagName)&&(m={namespaceURI:xe,tagName:"template"});const b=Er(l.tagName),A=Er(m.tagName);return yt[l.namespaceURI]?l.namespaceURI===Ye?m.namespaceURI===J?b==="svg":m.namespaceURI===Ge?b==="svg"&&(A==="annotation-xml"||Qe[A]):!!lr[b]:l.namespaceURI===Ge?m.namespaceURI===J?b==="math":m.namespaceURI===Ye?b==="math"&&Xe[A]:!!ur[b]:l.namespaceURI===J?m.namespaceURI===Ye&&!Xe[A]||m.namespaceURI===Ge&&!Qe[A]?!1:!ur[b]&&(aa[b]||!lr[b]):!!(Oe==="application/xhtml+xml"&&yt[l.namespaceURI]):!1},K=function(l){It(e.removed,{element:l});try{S(l).removeChild(l)}catch{C(l)}},me=function(l,m){try{It(e.removed,{attribute:m.getAttributeNode(l),from:m})}catch{It(e.removed,{attribute:null,from:m})}if(m.removeAttribute(l),l==="is")if(Se||Ve)try{K(m)}catch{}else try{m.setAttribute(l,"")}catch{}},hr=function(l){let m=null,b=null;if(pt)l="<remove></remove>"+l;else{const P=vs(l,/^[\r\n\t ]+/);b=P&&P[0]}Oe==="application/xhtml+xml"&&xe===J&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const A=x?x.createHTML(l):l;if(xe===J)try{m=new p().parseFromString(A,Oe)}catch{}if(!m||!m.documentElement){m=R.createDocument(xe,"template",null);try{m.documentElement.innerHTML=vt?F:A}catch{}}const B=m.body||m.documentElement;return l&&b&&B.insertBefore(t.createTextNode(b),B.childNodes[0]||null),xe===J?ne.call(m,pe?"html":"body")[0]:pe?m.documentElement:B},fr=function(l){return z.call(l.ownerDocument||l,l,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},St=function(l){return l instanceof g&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof h)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},dr=function(l){return typeof c=="function"&&l instanceof c};function ee(v,l,m){Tr(v,b=>{b.call(e,l,m,Ce)})}const pr=function(l){let m=null;if(ee(U.beforeSanitizeElements,l,null),St(l))return K(l),!0;const b=_(l.nodeName);if(ee(U.uponSanitizeElement,l,{tagName:b,allowedTags:O}),We&&l.hasChildNodes()&&!dr(l.firstElementChild)&&ie(/<[/\w!]/g,l.innerHTML)&&ie(/<[/\w!]/g,l.textContent)||l.nodeType===Ft.progressingInstruction||We&&l.nodeType===Ft.comment&&ie(/<[/\w]/g,l.data))return K(l),!0;if(!(ye.tagCheck instanceof Function&&ye.tagCheck(b))&&(!O[b]||Me[b])){if(!Me[b]&&gr(b)&&($.tagNameCheck instanceof RegExp&&ie($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b)))return!1;if(mt&&!X[b]){const A=S(l)||l.parentNode,B=E(l)||l.childNodes;if(B&&A){const P=B.length;for(let q=P-1;q>=0;--q){const te=k(B[q],!0);te.__removalCount=(l.__removalCount||0)+1,A.insertBefore(te,L(l))}}}return K(l),!0}return l instanceof u&&!ca(l)||(b==="noscript"||b==="noembed"||b==="noframes")&&ie(/<\/no(script|embed|frames)/i,l.innerHTML)?(K(l),!0):(we&&l.nodeType===Ft.text&&(m=l.textContent,Tr([ze,lt,ut],A=>{m=Mt(m,A," ")}),l.textContent!==m&&(It(e.removed,{element:l.cloneNode()}),l.textContent=m)),ee(U.afterSanitizeElements,l,null),!1)},mr=function(l,m,b){if(sr&&(m==="id"||m==="name")&&(b in t||b in ia))return!1;if(!(ft&&!ht[m]&&ie(Zs,m))){if(!(er&&ie(Js,m))){if(!(ye.attributeCheck instanceof Function&&ye.attributeCheck(m,l))){if(!D[m]||ht[m]){if(!(gr(l)&&($.tagNameCheck instanceof RegExp&&ie($.tagNameCheck,l)||$.tagNameCheck instanceof Function&&$.tagNameCheck(l))&&($.attributeNameCheck instanceof RegExp&&ie($.attributeNameCheck,m)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(m,l))||m==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&ie($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b))))return!1}else if(!bt[m]){if(!ie(Kt,Mt(b,Xt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&l!=="script"&&hi(b,"data:")===0&&nr[l])){if(!(tr&&!ie(ea,Mt(b,Xt,"")))){if(b)return!1}}}}}}}return!0},gr=function(l){return l!=="annotation-xml"&&vs(l,ta)},br=function(l){ee(U.beforeSanitizeAttributes,l,null);const{attributes:m}=l;if(!m||St(l))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let A=m.length;for(;A--;){const B=m[A],{name:P,namespaceURI:q,value:te}=B,Re=_(P),kt=te;let N=P==="value"?kt:fi(kt);if(b.attrName=Re,b.attrValue=N,b.keepAttr=!0,b.forceKeepAttr=void 0,ee(U.uponSanitizeAttribute,l,b),N=b.attrValue,ar&&(Re==="id"||Re==="name")&&(me(P,l),N=ra+N),We&&ie(/((--!?|])>)|<\/(style|title|textarea)/i,N)){me(P,l);continue}if(Re==="attributename"&&vs(N,"href")){me(P,l);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){me(P,l);continue}if(!rr&&ie(/\/>/i,N)){me(P,l);continue}we&&Tr([ze,lt,ut],yr=>{N=Mt(N,yr," ")});const vr=_(l.nodeName);if(!mr(vr,Re,N)){me(P,l);continue}if(x&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!q)switch(y.getAttributeType(vr,Re)){case"TrustedHTML":{N=x.createHTML(N);break}case"TrustedScriptURL":{N=x.createScriptURL(N);break}}if(N!==kt)try{q?l.setAttributeNS(q,P,N):l.setAttribute(P,N),St(l)?K(l):Wa(e.removed)}catch{me(P,l)}}ee(U.afterSanitizeAttributes,l,null)},la=function v(l){let m=null;const b=fr(l);for(ee(U.beforeSanitizeShadowDOM,l,null);m=b.nextNode();)ee(U.uponSanitizeShadowNode,m,null),pr(m),br(m),m.content instanceof n&&v(m.content);ee(U.afterSanitizeShadowDOM,l,null)};return e.sanitize=function(v){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,A=null,B=null;if(vt=!v,vt&&(v="<!-->"),typeof v!="string"&&!dr(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw Lt("dirty is not a string, aborting")}else throw Lt("toString is not a function");if(!e.isSupported)return v;if(dt||wt(l),e.removed=[],typeof v=="string"&&(Le=!1),Le){if(v.nodeName){const te=_(v.nodeName);if(!O[te]||Me[te])throw Lt("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof c)m=hr("<!---->"),b=m.ownerDocument.importNode(v,!0),b.nodeType===Ft.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!Se&&!we&&!pe&&v.indexOf("<")===-1)return x&&je?x.createHTML(v):v;if(m=hr(v),!m)return Se?null:je?F:""}m&&pt&&K(m.firstChild);const P=fr(Le?v:m);for(;A=P.nextNode();)pr(A),br(A),A.content instanceof n&&la(A.content);if(Le)return v;if(Se){if(Ve)for(B=V.call(m.ownerDocument);m.firstChild;)B.appendChild(m.firstChild);else B=m;return(D.shadowroot||D.shadowrootmode)&&(B=rt.call(r,B,!0)),B}let q=pe?m.outerHTML:m.innerHTML;return pe&&O["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ie(Xa,m.ownerDocument.doctype.name)&&(q="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
10
+ `+q),we&&Tr([ze,lt,ut],te=>{q=Mt(q,te," ")}),x&&je?x.createHTML(q):q},e.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(v),dt=!0},e.clearConfig=function(){Ce=null,dt=!1},e.isValidAttribute=function(v,l,m){Ce||wt({});const b=_(v),A=_(l);return mr(b,A,m)},e.addHook=function(v,l){typeof l=="function"&&It(U[v],l)},e.removeHook=function(v,l){if(l!==void 0){const m=li(U[v],l);return m===-1?void 0:ui(U[v],m,1)[0]}return Wa(U[v])},e.removeHooks=function(v){U[v]=[]},e.removeAllHooks=function(){U=Za()},e}var xs=Ja();const Dt=(s,...e)=>{let t=s[0];for(let r=0;r<e.length;r++)t+=xs.sanitize(e[r]?String(e[r]):"")+s[r+1];return t||""},Ei="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let at=(s=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(s|=0));for(;s--;)e+=Ei[t[s]&63];return e};const Ai=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"adSource","Custom");f(this,"adClientResponseItem");f(this,"renderPosition","interstitial");f(this,"searchTerm");f(this,"isSearchInProgress",!1);f(this,"searchResultCount",0);f(this,"core");f(this,"intersectionObserver");f(this,"storeUnsubscribe");f(this,"cleanupCore");f(this,"adContainerRenderedTimeout");f(this,"isComponentConnected",!1);f(this,"timeTaken");f(this,"adContainerId","");t!==!1&&this.__registerHost()}get hostElement(){return this}handleAdRendered(){var t,r,a;this.adContainerId=at(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var n;(n=this.core)==null||n.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(r=(t=this.core)==null?void 0:t.config)==null?void 0:r.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var t;(t=this.core)==null||t.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(t){const r=t.searchClientRequestProperties;r&&typeof r=="object"&&(this.searchTerm=r.searchTerm),this.searchResultCount=t.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(t){const r=t.store.getState();this.isComponentConnected=!0,this.core=r.core,this.isSearchInProgress=r.isSearchInProgress,this.searchResultCount=r.searchClientResponseItems.length,this.timeTaken=r.searchResponseTimeTaken;const a=r.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(r),this.storeUnsubscribe=t.store.subscribe(n=>{this.timeTaken!==n.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(n),this.timeTaken=n.searchResponseTimeTaken,this.isSearchInProgress=n.isSearchInProgress})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var t;(t=this.intersectionObserver)==null||t.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{r!=null&&r.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var t,r,a;(t=this.storeUnsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,n,o,c,u;const t=this.adClientResponseItem;if(!t.admAd)return;let r="<p>Ad Marketplace Ad Placeholder</p>";return(o=(n=(a=this.core)==null?void 0:a.config)==null?void 0:n.admAdConfig)!=null&&o.template&&(r=(u=(c=this.core)==null?void 0:c.config)==null?void 0:u.admAdConfig.template(t.admAd,{html:Dt})),d("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:r})}renderCustomAd(){var n,o,c;const t=(c=(o=(n=this.core)==null?void 0:n.config)==null?void 0:o.customAdConfig)==null?void 0:c.template,r=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return t&&(a=t({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Dt})),d("div",{class:"searchcraft-ad searchcraft-custom-ad",id:r,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var r,a;const t=((a=(r=this.core)==null?void 0:r.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return d("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:ve("searchcraft-ad",t),"data-searchcraft-ad-container-id":this.adContainerId})}render(){if(this.searchResultCount!==0)switch(this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[768,"searchcraft-ad",{searchcraftId:[1,"searchcraft-id"],adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function $r(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(e=>{switch(e){case"searchcraft-ad":customElements.get(e)||customElements.define(e,Ai);break}})}function Nt(s,e){if(s&&e)return e.fieldNames.map(t=>{let r=s[t.fieldName];if(r)switch(t.dataType){case"date":{r=$i(r,t.dateFormatLocale,t.dateFormatOptions);break}case"number":{r=Intl.NumberFormat(t.numberFormatLocale,t.numberFormatOptions).format(r*(t.numberScale||1));break}}return r}).filter(t=>!!t).join(e.delimiter||" ")}function en(s){return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function $i(s,e="en-US",t={day:"numeric",month:"long",year:"numeric"}){const r=new Date(s),n=new Date().getTime()-r.getTime(),o=30*24*60*60*1e3;if(n<o){const c=Math.trunc(n/1e3),u=Math.trunc(c/60),i=Math.trunc(u/60),h=Math.trunc(i/24),g=new Intl.RelativeTimeFormat(e,t);return h>=1?g.format(-h,"day"):i>=1?g.format(-i,"hour"):u>=1?g.format(-u,"minute"):g.format(0,"second")}return new Intl.DateTimeFormat(e,t).format(r)}function Cs(s,e,t=0){const r=new Date(s);switch(e){case"year":return new Date(r.getFullYear()+t,0,1,0,0,0,0).getTime();case"month":return new Date(r.getFullYear(),r.getMonth()+t,1,0,0,0,0).getTime();case"day":return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t,0,0,0,0).getTime();case"hour":return new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours()+t,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${e}`)}}function Pi(s,e,t){const r=new Date(e),a=new Date(t);switch(s){case"year":return Math.abs(a.getFullYear()-r.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(r.getFullYear()*12+r.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-r.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${s}`)}}const tn=s=>{if(s>=11&&s<=13)return`${s}th`;switch(s%10){case 1:return`${s}st`;case 2:return`${s}nd`;case 3:return`${s}rd`;default:return`${s}th`}};function _i(s,e){const t=new Intl.DateTimeFormat("en-US",{month:"short"});switch(s){case"year":return e.getFullYear().toString();case"month":return`${t.format(e)} ${e.getFullYear()}`;case"day":return`${t.format(e)} ${tn(e.getDate())}, ${e.getFullYear()}`;case"hour":{const r=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${t.format(e)} ${tn(e.getDate())}, ${r.format(e)}`}default:throw new Error(`Unsupported granularity: ${s}`)}}/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:rn,setPrototypeOf:sn,isFrozen:Ii,getPrototypeOf:Mi,getOwnPropertyDescriptor:Li}=Object;let{freeze:le,seal:Ee,create:Rs}=Object,{apply:Ts,construct:Es}=typeof Reflect<"u"&&Reflect;le||(le=function(e){return e}),Ee||(Ee=function(e){return e}),Ts||(Ts=function(e,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),n=2;n<r;n++)a[n-2]=arguments[n];return e.apply(t,a)}),Es||(Es=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return new e(...r)});const Pr=he(Array.prototype.forEach),Oi=he(Array.prototype.lastIndexOf),an=he(Array.prototype.pop),zt=he(Array.prototype.push),Fi=he(Array.prototype.splice),_r=he(String.prototype.toLowerCase),As=he(String.prototype.toString),$s=he(String.prototype.match),Ut=he(String.prototype.replace),Di=he(String.prototype.indexOf),Ni=he(String.prototype.trim),Pe=he(Object.prototype.hasOwnProperty),ue=he(RegExp.prototype.test),Bt=zi(TypeError);function he(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return Ts(s,e,r)}}function zi(s){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Es(s,t)}}function M(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_r;sn&&sn(s,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const n=t(a);n!==a&&(Ii(e)||(e[r]=n),a=n)}s[a]=!0}return s}function Ui(s){for(let e=0;e<s.length;e++)Pe(s,e)||(s[e]=null);return s}function De(s){const e=Rs(null);for(const[t,r]of rn(s))Pe(s,t)&&(Array.isArray(r)?e[t]=Ui(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=De(r):e[t]=r);return e}function Ht(s,e){for(;s!==null;){const r=Li(s,e);if(r){if(r.get)return he(r.get);if(typeof r.value=="function")return he(r.value)}s=Mi(s)}function t(){return null}return t}const nn=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ps=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_s=le(["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"]),Bi=le(["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"]),Is=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Hi=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),on=le(["#text"]),cn=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ms=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ln=le(["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"]),Ir=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qi=Ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wi=Ee(/<%[\w\W]*|[\w\W]*%>/gm),Vi=Ee(/\$\{[\w\W]*/gm),ji=Ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gi=Ee(/^aria-[\-\w]+$/),un=Ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yi=Ee(/^(?:\w+script|data):/i),Qi=Ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hn=Ee(/^html$/i),Xi=Ee(/^[a-z][.\w]*(-[.\w]+)+$/i);var fn=Object.freeze({__proto__:null,ARIA_ATTR:Gi,ATTR_WHITESPACE:Qi,CUSTOM_ELEMENT:Xi,DATA_ATTR:ji,DOCTYPE_NAME:hn,ERB_EXPR:Wi,IS_ALLOWED_URI:un,IS_SCRIPT_OR_DATA:Yi,MUSTACHE_EXPR:qi,TMPLIT_EXPR:Vi});const qt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ki=function(){return typeof window>"u"?null:window},Zi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(r=t.getAttribute(a));const n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},dn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pn(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ki();const e=v=>pn(v);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==qt.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const r=t,a=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:c,Element:u,NodeFilter:i,NamedNodeMap:h=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:y}=s,w=u.prototype,k=Ht(w,"cloneNode"),C=Ht(w,"remove"),L=Ht(w,"nextSibling"),E=Ht(w,"childNodes"),S=Ht(w,"parentNode");if(typeof o=="function"){const v=t.createElement("template");v.content&&v.content.ownerDocument&&(t=v.content.ownerDocument)}let x,F="";const{implementation:R,createNodeIterator:z,createDocumentFragment:V,getElementsByTagName:ne}=t,{importNode:rt}=r;let U=dn();e.isSupported=typeof rn=="function"&&typeof S=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ze,ERB_EXPR:lt,TMPLIT_EXPR:ut,DATA_ATTR:Zs,ARIA_ATTR:Js,IS_SCRIPT_OR_DATA:ea,ATTR_WHITESPACE:Xt,CUSTOM_ELEMENT:ta}=fn;let{IS_ALLOWED_URI:Kt}=fn,O=null;const Zt=M({},[...nn,...Ps,..._s,...Is,...on]);let D=null;const Jt=M({},[...cn,...Ms,...ln,...Ir]);let $=Object.seal(Rs(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}})),Me=null,ht=null;const ye=Object.seal(Rs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let er=!0,ft=!0,tr=!1,rr=!0,we=!1,We=!0,pe=!1,dt=!1,pt=!1,Se=!1,Ve=!1,je=!1,sr=!0,ar=!1;const ra="user-content-";let mt=!0,Le=!1,ke={},X=null;const gt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let nr=null;const or=M({},["audio","video","img","source","image","track"]);let bt=null;const ir=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",J="http://www.w3.org/1999/xhtml";let xe=J,vt=!1,yt=null;const sa=M({},[Ge,Ye,J],As);let Qe=M({},["mi","mo","mn","ms","mtext"]),Xe=M({},["annotation-xml"]);const aa=M({},["title","style","font","a","script"]);let Oe=null;const na=["application/xhtml+xml","text/html"],oa="text/html";let _=null,Ce=null;const ia=t.createElement("form"),cr=function(l){return l instanceof RegExp||l instanceof Function},wt=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ce&&Ce===l)){if((!l||typeof l!="object")&&(l={}),l=De(l),Oe=na.indexOf(l.PARSER_MEDIA_TYPE)===-1?oa:l.PARSER_MEDIA_TYPE,_=Oe==="application/xhtml+xml"?As:_r,O=Pe(l,"ALLOWED_TAGS")?M({},l.ALLOWED_TAGS,_):Zt,D=Pe(l,"ALLOWED_ATTR")?M({},l.ALLOWED_ATTR,_):Jt,yt=Pe(l,"ALLOWED_NAMESPACES")?M({},l.ALLOWED_NAMESPACES,As):sa,bt=Pe(l,"ADD_URI_SAFE_ATTR")?M(De(ir),l.ADD_URI_SAFE_ATTR,_):ir,nr=Pe(l,"ADD_DATA_URI_TAGS")?M(De(or),l.ADD_DATA_URI_TAGS,_):or,X=Pe(l,"FORBID_CONTENTS")?M({},l.FORBID_CONTENTS,_):gt,Me=Pe(l,"FORBID_TAGS")?M({},l.FORBID_TAGS,_):De({}),ht=Pe(l,"FORBID_ATTR")?M({},l.FORBID_ATTR,_):De({}),ke=Pe(l,"USE_PROFILES")?l.USE_PROFILES:!1,er=l.ALLOW_ARIA_ATTR!==!1,ft=l.ALLOW_DATA_ATTR!==!1,tr=l.ALLOW_UNKNOWN_PROTOCOLS||!1,rr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=l.SAFE_FOR_TEMPLATES||!1,We=l.SAFE_FOR_XML!==!1,pe=l.WHOLE_DOCUMENT||!1,Se=l.RETURN_DOM||!1,Ve=l.RETURN_DOM_FRAGMENT||!1,je=l.RETURN_TRUSTED_TYPE||!1,pt=l.FORCE_BODY||!1,sr=l.SANITIZE_DOM!==!1,ar=l.SANITIZE_NAMED_PROPS||!1,mt=l.KEEP_CONTENT!==!1,Le=l.IN_PLACE||!1,Kt=l.ALLOWED_URI_REGEXP||un,xe=l.NAMESPACE||J,Qe=l.MATHML_TEXT_INTEGRATION_POINTS||Qe,Xe=l.HTML_INTEGRATION_POINTS||Xe,$=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&cr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(ft=!1),Ve&&(Se=!0),ke&&(O=M({},on),D=[],ke.html===!0&&(M(O,nn),M(D,cn)),ke.svg===!0&&(M(O,Ps),M(D,Ms),M(D,Ir)),ke.svgFilters===!0&&(M(O,_s),M(D,Ms),M(D,Ir)),ke.mathMl===!0&&(M(O,Is),M(D,ln),M(D,Ir))),l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ye.tagCheck=l.ADD_TAGS:(O===Zt&&(O=De(O)),M(O,l.ADD_TAGS,_))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ye.attributeCheck=l.ADD_ATTR:(D===Jt&&(D=De(D)),M(D,l.ADD_ATTR,_))),l.ADD_URI_SAFE_ATTR&&M(bt,l.ADD_URI_SAFE_ATTR,_),l.FORBID_CONTENTS&&(X===gt&&(X=De(X)),M(X,l.FORBID_CONTENTS,_)),l.ADD_FORBID_CONTENTS&&(X===gt&&(X=De(X)),M(X,l.ADD_FORBID_CONTENTS,_)),mt&&(O["#text"]=!0),pe&&M(O,["html","head","body"]),O.table&&(M(O,["tbody"]),delete Me.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=l.TRUSTED_TYPES_POLICY,F=x.createHTML("")}else x===void 0&&(x=Zi(y,a)),x!==null&&typeof F=="string"&&(F=x.createHTML(""));le&&le(l),Ce=l}},lr=M({},[...Ps,..._s,...Bi]),ur=M({},[...Is,...Hi]),ca=function(l){let m=S(l);(!m||!m.tagName)&&(m={namespaceURI:xe,tagName:"template"});const b=_r(l.tagName),A=_r(m.tagName);return yt[l.namespaceURI]?l.namespaceURI===Ye?m.namespaceURI===J?b==="svg":m.namespaceURI===Ge?b==="svg"&&(A==="annotation-xml"||Qe[A]):!!lr[b]:l.namespaceURI===Ge?m.namespaceURI===J?b==="math":m.namespaceURI===Ye?b==="math"&&Xe[A]:!!ur[b]:l.namespaceURI===J?m.namespaceURI===Ye&&!Xe[A]||m.namespaceURI===Ge&&!Qe[A]?!1:!ur[b]&&(aa[b]||!lr[b]):!!(Oe==="application/xhtml+xml"&&yt[l.namespaceURI]):!1},K=function(l){zt(e.removed,{element:l});try{S(l).removeChild(l)}catch{C(l)}},me=function(l,m){try{zt(e.removed,{attribute:m.getAttributeNode(l),from:m})}catch{zt(e.removed,{attribute:null,from:m})}if(m.removeAttribute(l),l==="is")if(Se||Ve)try{K(m)}catch{}else try{m.setAttribute(l,"")}catch{}},hr=function(l){let m=null,b=null;if(pt)l="<remove></remove>"+l;else{const P=$s(l,/^[\r\n\t ]+/);b=P&&P[0]}Oe==="application/xhtml+xml"&&xe===J&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const A=x?x.createHTML(l):l;if(xe===J)try{m=new p().parseFromString(A,Oe)}catch{}if(!m||!m.documentElement){m=R.createDocument(xe,"template",null);try{m.documentElement.innerHTML=vt?F:A}catch{}}const B=m.body||m.documentElement;return l&&b&&B.insertBefore(t.createTextNode(b),B.childNodes[0]||null),xe===J?ne.call(m,pe?"html":"body")[0]:pe?m.documentElement:B},fr=function(l){return z.call(l.ownerDocument||l,l,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT|i.SHOW_PROCESSING_INSTRUCTION|i.SHOW_CDATA_SECTION,null)},St=function(l){return l instanceof g&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof h)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},dr=function(l){return typeof c=="function"&&l instanceof c};function ee(v,l,m){Pr(v,b=>{b.call(e,l,m,Ce)})}const pr=function(l){let m=null;if(ee(U.beforeSanitizeElements,l,null),St(l))return K(l),!0;const b=_(l.nodeName);if(ee(U.uponSanitizeElement,l,{tagName:b,allowedTags:O}),We&&l.hasChildNodes()&&!dr(l.firstElementChild)&&ue(/<[/\w!]/g,l.innerHTML)&&ue(/<[/\w!]/g,l.textContent)||l.nodeType===qt.progressingInstruction||We&&l.nodeType===qt.comment&&ue(/<[/\w]/g,l.data))return K(l),!0;if(!(ye.tagCheck instanceof Function&&ye.tagCheck(b))&&(!O[b]||Me[b])){if(!Me[b]&&gr(b)&&($.tagNameCheck instanceof RegExp&&ue($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b)))return!1;if(mt&&!X[b]){const A=S(l)||l.parentNode,B=E(l)||l.childNodes;if(B&&A){const P=B.length;for(let q=P-1;q>=0;--q){const te=k(B[q],!0);te.__removalCount=(l.__removalCount||0)+1,A.insertBefore(te,L(l))}}}return K(l),!0}return l instanceof u&&!ca(l)||(b==="noscript"||b==="noembed"||b==="noframes")&&ue(/<\/no(script|embed|frames)/i,l.innerHTML)?(K(l),!0):(we&&l.nodeType===qt.text&&(m=l.textContent,Pr([ze,lt,ut],A=>{m=Ut(m,A," ")}),l.textContent!==m&&(zt(e.removed,{element:l.cloneNode()}),l.textContent=m)),ee(U.afterSanitizeElements,l,null),!1)},mr=function(l,m,b){if(sr&&(m==="id"||m==="name")&&(b in t||b in ia))return!1;if(!(ft&&!ht[m]&&ue(Zs,m))){if(!(er&&ue(Js,m))){if(!(ye.attributeCheck instanceof Function&&ye.attributeCheck(m,l))){if(!D[m]||ht[m]){if(!(gr(l)&&($.tagNameCheck instanceof RegExp&&ue($.tagNameCheck,l)||$.tagNameCheck instanceof Function&&$.tagNameCheck(l))&&($.attributeNameCheck instanceof RegExp&&ue($.attributeNameCheck,m)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(m,l))||m==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&ue($.tagNameCheck,b)||$.tagNameCheck instanceof Function&&$.tagNameCheck(b))))return!1}else if(!bt[m]){if(!ue(Kt,Ut(b,Xt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&l!=="script"&&Di(b,"data:")===0&&nr[l])){if(!(tr&&!ue(ea,Ut(b,Xt,"")))){if(b)return!1}}}}}}}return!0},gr=function(l){return l!=="annotation-xml"&&$s(l,ta)},br=function(l){ee(U.beforeSanitizeAttributes,l,null);const{attributes:m}=l;if(!m||St(l))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let A=m.length;for(;A--;){const B=m[A],{name:P,namespaceURI:q,value:te}=B,Re=_(P),kt=te;let N=P==="value"?kt:Ni(kt);if(b.attrName=Re,b.attrValue=N,b.keepAttr=!0,b.forceKeepAttr=void 0,ee(U.uponSanitizeAttribute,l,b),N=b.attrValue,ar&&(Re==="id"||Re==="name")&&(me(P,l),N=ra+N),We&&ue(/((--!?|])>)|<\/(style|title|textarea)/i,N)){me(P,l);continue}if(Re==="attributename"&&$s(N,"href")){me(P,l);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){me(P,l);continue}if(!rr&&ue(/\/>/i,N)){me(P,l);continue}we&&Pr([ze,lt,ut],yr=>{N=Ut(N,yr," ")});const vr=_(l.nodeName);if(!mr(vr,Re,N)){me(P,l);continue}if(x&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!q)switch(y.getAttributeType(vr,Re)){case"TrustedHTML":{N=x.createHTML(N);break}case"TrustedScriptURL":{N=x.createScriptURL(N);break}}if(N!==kt)try{q?l.setAttributeNS(q,P,N):l.setAttribute(P,N),St(l)?K(l):an(e.removed)}catch{me(P,l)}}ee(U.afterSanitizeAttributes,l,null)},la=function v(l){let m=null;const b=fr(l);for(ee(U.beforeSanitizeShadowDOM,l,null);m=b.nextNode();)ee(U.uponSanitizeShadowNode,m,null),pr(m),br(m),m.content instanceof n&&v(m.content);ee(U.afterSanitizeShadowDOM,l,null)};return e.sanitize=function(v){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,A=null,B=null;if(vt=!v,vt&&(v="<!-->"),typeof v!="string"&&!dr(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw Bt("dirty is not a string, aborting")}else throw Bt("toString is not a function");if(!e.isSupported)return v;if(dt||wt(l),e.removed=[],typeof v=="string"&&(Le=!1),Le){if(v.nodeName){const te=_(v.nodeName);if(!O[te]||Me[te])throw Bt("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof c)m=hr("<!---->"),b=m.ownerDocument.importNode(v,!0),b.nodeType===qt.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!Se&&!we&&!pe&&v.indexOf("<")===-1)return x&&je?x.createHTML(v):v;if(m=hr(v),!m)return Se?null:je?F:""}m&&pt&&K(m.firstChild);const P=fr(Le?v:m);for(;A=P.nextNode();)pr(A),br(A),A.content instanceof n&&la(A.content);if(Le)return v;if(Se){if(Ve)for(B=V.call(m.ownerDocument);m.firstChild;)B.appendChild(m.firstChild);else B=m;return(D.shadowroot||D.shadowrootmode)&&(B=rt.call(r,B,!0)),B}let q=pe?m.outerHTML:m.innerHTML;return pe&&O["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ue(hn,m.ownerDocument.doctype.name)&&(q="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
11
+ `+q),we&&Pr([ze,lt,ut],te=>{q=Ut(q,te," ")}),x&&je?x.createHTML(q):q},e.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(v),dt=!0},e.clearConfig=function(){Ce=null,dt=!1},e.isValidAttribute=function(v,l,m){Ce||wt({});const b=_(v),A=_(l);return mr(b,A,m)},e.addHook=function(v,l){typeof l=="function"&&zt(U[v],l)},e.removeHook=function(v,l){if(l!==void 0){const m=Oi(U[v],l);return m===-1?void 0:Fi(U[v],m,1)[0]}return an(U[v])},e.removeHooks=function(v){U[v]=[]},e.removeAllHooks=function(){U=dn()},e}pn();const Ji="0.15.1",ec=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"sdkVariant","js");f(this,"viewAllResultsHref");f(this,"viewAllResultsLabel");f(this,"searchResultsCount");f(this,"unsubscribe",()=>{});f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.searchResultsCount=t.store.getState().searchResultsCount,this.unsubscribe=t.store.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}get safeViewAllHref(){const t=this.viewAllResultsHref;if(t)try{const r=new URL(t,window.location.href);return r.protocol==="https:"||r.protocol==="http:"?t:void 0}catch{return}}render(){const t=typeof window<"u"?window.location.hostname:"",a=`https://searchcraft.io/?${new URLSearchParams({utm_source:t,utm_medium:this.sdkVariant??"js",utm_campaign:"powered-by",utm_content:"popover-footer",sc_sdk_version:Ji}).toString()}`,n=typeof this.searchResultsCount=="number"&&this.searchResultsCount>0,o=!!this.safeViewAllHref&&n;return d("footer",{key:"548704335f80a2b4bc7ebd4ea2d0a2eb73376fde",class:"searchcraft-popover-footer"},d("a",{key:"a10cbfd833ef0c6016932fede6ca3195eecdfaea",class:"searchcraft-popover-footer-link",href:a,target:"_blank",rel:"noreferrer"},d("span",{key:"6c6333a61ae282419e32721fc9760d3d237870df",class:"searchcraft-popover-footer-link-prefix"},"Powered by ")," ","Searchcraft"),d("div",{key:"ac3af12966e7de74be888511493cc8b5411be6f5",class:"searchcraft-popover-footer-results"},d("p",{key:"4a8bbc33d91852efb12b11ed7a82d34a91718456",class:"searchcraft-popover-footer-results-info"},n?d("span",null,en(this.searchResultsCount)," Results",d("span",{class:"searchcraft-popover-footer-results-found"}," Found")):" "),o&&d("a",{key:"480adfb8b751ce450c6547a78750d29cbe542359",class:"searchcraft-popover-footer-view-all",href:this.safeViewAllHref},d("span",{key:"5cb8eb24a192fc3c22784e72414a5b8bf8070c8b",class:"searchcraft-popover-footer-view-all-label"},this.viewAllResultsLabel),d("span",{key:"cc6e55e19527e99eded57edb5b35eebc574fbec0",class:"searchcraft-popover-footer-view-all-shortcut","aria-hidden":"true"},d("kbd",{key:"8e55153e517ca311239d9029073d127b9638ba05"},"⌘"),d("kbd",{key:"71e773899f5abe1bcf8d94c3617732f2c213571a"},"↵")))))}},[768,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],sdkVariant:[1,"sdk-variant"],viewAllResultsHref:[1,"view-all-results-href"],viewAllResultsLabel:[1,"view-all-results-label"],searchResultsCount:[32]}]);function mn(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(e=>{switch(e){case"searchcraft-popover-footer":customElements.get(e)||customElements.define(e,ec);break}})}const tc=$r,rc=Y(class extends G{constructor(t){super();f(this,"hierarchy","primary");f(this,"disabled",!1);f(this,"icon");f(this,"iconOnly",!1);f(this,"iconPosition","left");f(this,"label","Search");f(this,"type","button");f(this,"buttonClick");f(this,"handleButtonClick",()=>{this.buttonClick.emit()});t!==!1&&this.__registerHost(),this.buttonClick=Ze(this,"buttonClick")}render(){return d("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:ve("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:d(ti,null,this.iconPosition==="left"&&this.icon,d("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[768,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function Mr(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-button":customElements.get(e)||customElements.define(e,rc);break}})}const sc=Mr,ac=Y(class extends G{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return d("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},d("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[260,"searchcraft-error-message"]);function Lr(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(e=>{switch(e){case"searchcraft-error-message":customElements.get(e)||customElements.define(e,ac);break}})}const nc=Lr,gn=(s,e)=>{let t=s;for(const r of e)t=t==null?void 0:t.children[r];return t},Ls=(s,e)=>{const t={...s};for(const r in e)e.hasOwnProperty(r)&&(e[r]instanceof Object&&s[r]instanceof Object?t[r]=Ls(s[r],e[r]):t[r]=e[r]);return t};function oc(s){return s.filter((e,t,r)=>!r.some((a,n)=>n!==t&&a.includes(e)))}const bn=(s,e)=>{const t=structuredClone(s),r=(a,n)=>{var u;const o=structuredClone(a),c=gn(e,n);if(!c)return o;for(const i of Object.keys(a.children))c.children[i]?o.children[i]={...Ls(a.children[i],c.children[i]),count:((u=o.children[i])==null?void 0:u.count)||0}:o.children[i]&&(o.children[i]=r(o.children[i],[...n,i]));return o};return r(t,[])},Os=(s,e)=>{const t={path:"/",count:0,children:{}},r=[],a=n=>{if(n.path!=="/"&&r.push({path:n.path,count:n.count}),n.children)for(const o of n.children)a(o)};a(s);for(const{path:n,count:o}of r){const c=n.split("/").filter(Boolean);if(e&&e.length>0){let i=!1;for(const h of e)if(h.startsWith("/")){if(n===h||n.startsWith(`${h}/`)){i=!0;break}}else if(c.includes(h)){i=!0;break}if(i)continue}let u=t;for(const i of c){const h=u.path==="/"?`/${i}`:`${u.path}/${i}`;u.children[i]||(u.children[i]={path:h,count:o,children:{}}),u=u.children[i]}u.count=o}return t},ic=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"fieldName","");f(this,"exclude");f(this,"initialCollapseState","open");f(this,"viewMoreThreshold",8);f(this,"facetSelectionUpdated");f(this,"selectedPaths",{});f(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});f(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});f(this,"renderedFacetTree",{path:"/",count:0,children:{}});f(this,"isCollapsed",!1);f(this,"showAllFacets",!1);f(this,"lastTimeTaken");f(this,"lastSearchTerm");f(this,"lastSearchMode");f(this,"lastSortType");f(this,"lastRangeValues");f(this,"lastFacetValues");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"formatFacetName",t=>`${t.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);f(this,"handleViewMoreToggle",()=>{this.showAllFacets=!this.showAllFacets});t!==!1&&this.__registerHost(),this.facetSelectionUpdated=Ze(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(t=>this.selectedPaths[t])}handleIncomingSearchResponse(t,r){var u,i,h;const a=(u=t.searchResponseFacetPrime)==null?void 0:u.find(g=>this.fieldName===Object.keys(g)[0]),n=a==null?void 0:a[this.fieldName],o=Os({path:"/",count:0,children:n||[]},this.exclude);switch(r){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=o;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(t.supplementalFacetPrime){const g=(i=t.supplementalFacetPrime)==null?void 0:i.find(w=>this.fieldName===Object.keys(w)[0]),p=g==null?void 0:g[this.fieldName],y=Os({path:"/",count:0,children:p||[]},this.exclude);this.facetTreeCollectedFromSearchResponse=bn(y,o)}else this.facetTreeCollectedFromSearchResponse=o;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=bn(this.facetTreeCollectedFromSearchResponse,o);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const c={path:"/",count:0,children:[]};for(const g of Object.keys(this.selectedPaths).filter(p=>this.selectedPaths[p])){const p=g.startsWith("/")?g.substring(1).split("/"):g.split("/"),y=!!gn(this.facetTreeCollectedFromSearchResponse,p),w=p.at(-1);!y&&w&&((h=c.children)==null||h.push({children:[],count:0,path:g}))}this.facetTreeFromFacetPathsNotInSearchResponse=Os(c,this.exclude),this.renderedFacetTree=Ls(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(t){const r={...t},a=typeof r.searchClientRequestProperties=="string"&&r.searchTerm.trim()==="";if(r.searchTerm.trim()===""&&!a)this.handleIncomingSearchResponse(r,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==r.searchResponseTimeTaken&&r.searchClientRequestProperties){if(typeof r.searchClientRequestProperties=="object"){const n=r.searchClientRequestProperties;let o="UNKNOWN";this.lastSearchTerm!==n.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(n.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(n.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==n.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==n.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(n.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(n.facetPathsForIndexFields),this.lastSortType=n.order_by,this.lastSearchMode=n.mode,this.lastSearchTerm=n.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,o)}else if(typeof r.searchClientRequestProperties=="string"){let n="NEW_SEARCH_TERM";const o=JSON.parse(r.searchClientRequestProperties),u=(Array.isArray(o.query)?o.query:[o.query]).filter(h=>h.occur==="must"),i=JSON.stringify(u);this.lastFacetValues!==void 0&&this.lastFacetValues!==i?n="FACET_UPDATE":r.searchTerm.trim()===""&&this.lastSearchTerm===""?n="NEW_SEARCH_TERM":this.lastSearchTerm!==r.searchTerm&&(this.areAnyFacetPathsSelected?n="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":n="NEW_SEARCH_TERM"),this.lastFacetValues=i,this.lastSearchTerm=r.searchTerm,this.lastTimeTaken=r.searchResponseTimeTaken,this.handleIncomingSearchResponse(r,n)}}}onCoreAvailable(t){this.handleStateUpdate(t.store.getState()),this.unsubscribe=t.store.subscribe(r=>{this.handleStateUpdate(r)})}connectedCallback(){this.isCollapsed=this.initialCollapseState==="closed",this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleCheckboxChange(t){var o;if(!this.selectedPaths[t])this.selectedPaths={...this.selectedPaths,[t]:!0};else{const c=Object.keys(this.selectedPaths).filter(u=>!u.includes(t));this.selectedPaths=c.reduce((u,i)=>(u[i]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),n=oc(a);(o=this.facetSelectionUpdated)==null||o.emit({paths:n})}async handleCollapseToggle(){this.isCollapsed=!this.isCollapsed}async getIsCollapsed(){return this.isCollapsed}renderFacet(t,r){let a=!1;for(const c of Object.keys(this.selectedPaths))this.selectedPaths[c]&&c.startsWith(r.path)&&c.length>r.path.length&&(a=!0);const n=Object.keys(this.selectedPaths).includes(r.path),o=Object.keys(r.children).length>0&&(n||a)||t==="@@root";return d("div",{class:"searchcraft-facet-list-item"},t!=="@@root"&&d("label",{class:"searchcraft-facet-list-checkbox-label"},d("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},d("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[r.path],onChange:c=>{this.handleCheckboxChange(r.path)},type:"checkbox"}),a?d("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},d("svg",{viewBox:"0 0 14 3",fill:"none"},d("title",null,"Checkbox dash"),d("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):d("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),d("span",null,this.formatFacetName(t)," (",r.count,")")),o&&d("div",{class:"searchcraft-facet-list",style:{paddingLeft:t!=="@@root"?"24px":"0px",paddingTop:t!=="@@root"?"6px":"0px"}},Object.keys(r.children).map(c=>{if(r.children[c])return this.renderFacet(c,r.children[c])})))}render(){if(!this.fieldName||Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length===0)return;if(Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length>0)return d("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query.");const t=Object.keys(this.renderedFacetTree.children),r=this.viewMoreThreshold??8,a=r>0&&t.length>r,n=a&&!this.showAllFacets?t.slice(0,r):t;return d("div",{class:"searchcraft-facet-list-wrapper","data-facet-section-collapsed":this.isCollapsed?"":void 0,"data-facet-section-expanded":this.isCollapsed?void 0:""},!this.isCollapsed&&d("div",{class:"searchcraft-facet-list-content"},d("div",{class:"searchcraft-facet-list"},n.map(o=>{if(this.renderedFacetTree.children[o])return this.renderFacet(o,this.renderedFacetTree.children[o])})),a&&d("button",{class:"searchcraft-facet-list-view-more",onClick:this.handleViewMoreToggle,type:"button"},this.showAllFacets?"View less":"View more...")))}},[768,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],exclude:[16],initialCollapseState:[1,"initial-collapse-state"],viewMoreThreshold:[2,"view-more-threshold"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32],isCollapsed:[32],showAllFacets:[32],handleCollapseToggle:[64],getIsCollapsed:[64]}]);function vn(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(e=>{switch(e){case"searchcraft-facet-list":customElements.get(e)||customElements.define(e,ic);break}})}const cc=vn;function lc(s,e){let t=!1,r=null;const a=n=>{s(...n),t=!0,setTimeout(()=>{if(t=!1,r){const o=r;r=null,a(o)}},e)};return(...n)=>{t?r=n:a(n)}}const uc=Y(class extends G{constructor(t){super();f(this,"max",100);f(this,"min",0);f(this,"step",1);f(this,"dataType","number");f(this,"dateGranularity");f(this,"lowerBound",0);f(this,"upperBound",1);f(this,"endValue",0);f(this,"startValue",0);f(this,"lastFocusedHandle","max");f(this,"throttledEmitUpdate",()=>{});f(this,"rangeChanged");f(this,"emitUpdate",async()=>{var t,r;switch(this.dataType){case"number":(t=this.rangeChanged)==null||t.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",n=Cs(this.min,a,this.lowerBound+this.startValue),o=Cs(this.min,a,this.lowerBound+this.endValue+1);(r=this.rangeChanged)==null||r.emit({startValue:n,endValue:o});break}}});f(this,"handleStartValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,r.value=`${this.endValue}`)});f(this,"handleEndValueChange",t=>{const r=t.target,a=Number.parseInt(r.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,r.value=`${this.startValue}`)});f(this,"getLabel",t=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const r=this.dateGranularity||"year",a=this.lowerBound+t,n=Cs(this.min,r,a);return _i(this.dateGranularity||"year",new Date(n))}}});t!==!1&&this.__registerHost(),this.rangeChanged=Ze(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=Pi(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=lc(this.emitUpdate,120)}render(){const t=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,r=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),n=this.getLabel(this.endValue);return d("div",{key:"2c72254f52151edd2e2fa89c092fc788db0b5562",class:"searchcraft-slider"},d("div",{key:"98c25badf2c9386d7173ea552e510dcc168e7fc7",class:"searchcraft-slider-range"},d("div",{key:"50774db2253e34b1bce68acc0a40b2706cab542d",class:"searchcraft-slider-active-range",style:{left:`${t}%`,width:`${r-t}%`}}),d("input",{key:"229afedc1318a63cbd75806805210cf4f5695e6e",class:ve("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleStartValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),d("input",{key:"6aa038b01daaba86f501ebbbec30fc6720b549b3",class:ve("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleEndValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),d("div",{key:"f70501538635c3b08ad1e6ac101d0b3192ef8e04",class:"searchcraft-slider-label"},d("span",{key:"ddd539b86774f8900771d77d5ef7eb3a67c98d59",class:"searchcraft-slider-start-label"},a),d("span",{key:"b754a9c8d284e0623032cee6b92f9df88873ec04",class:"searchcraft-slider-end-label"},n)))}},[768,"searchcraft-slider",{max:[2],min:[2],step:[2],dataType:[1,"data-type"],dateGranularity:[1,"date-granularity"],lowerBound:[32],upperBound:[32],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function yn(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(e=>{switch(e){case"searchcraft-slider":customElements.get(e)||customElements.define(e,uc);break}})}const hc=Y(class extends G{constructor(t){super();f(this,"label","Toggle");f(this,"subLabel");f(this,"searchcraftId");f(this,"toggleUpdated");f(this,"isActive",!1);f(this,"lastSearchTerm");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"handleToggle",async()=>{var t;this.isActive=!this.isActive,(t=this.toggleUpdated)==null||t.emit(this.isActive)});t!==!1&&this.__registerHost(),this.toggleUpdated=Ze(this,"toggleUpdated")}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){return d("div",{key:"ab1d5ee21c7aaa28af1c405edc986556858366e8",class:ve("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},d("div",{key:"44f86a16d796d448bdb2fb3af72d4d8e1484364b"},d("p",{key:"9fedb38795d6379cae56dc005ab8e4a944b4261b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&d("p",{key:"44f3d17175184032275fec89a4cfe7f8266b7014",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),d("button",{key:"15fc18906ff2fb21fe646a4e3a8a2ace4a37cae2",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},d("div",{key:"716d29c65a199f63f5fd294dc3e3ad2ea4d53aa3",class:"searchcraft-toggle-button-handle"})))}},[768,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function wn(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(e=>{switch(e){case"searchcraft-toggle-button":customElements.get(e)||customElements.define(e,hc);break}})}const fc=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"items",[]);f(this,"responsiveBreakpoint",768);f(this,"responsiveBehavior","auto");f(this,"lastSearchTerm");f(this,"isFilterPanelVisible",!0);f(this,"core");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"resizeObserver");f(this,"manuallyToggled",!1);f(this,"toggleClickHandler");f(this,"handleWindowResize",()=>{this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t,this.setInitialDateRanges(),this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize(),this.unsubscribe=t.store.subscribe((r,a)=>{if(this.lastSearchTerm=r.searchTerm||"",a.isFilterPanelVisible!==r.isFilterPanelVisible){const o=window.innerWidth>=(this.responsiveBreakpoint||768);r.isFilterPanelVisible!==o&&(this.manuallyToggled=!0),this.updateToggleElementAttributes(r.isFilterPanelVisible)}this.isFilterPanelVisible=r.isFilterPanelVisible})}componentDidLoad(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.responsiveBehavior==="auto"&&typeof window<"u"&&this.setupResizeObserver(),this.setupToggleClickHandlers(),setTimeout(()=>{if(this.core){const t=this.core.store.getState().isFilterPanelVisible;this.updateToggleElementAttributes(t)}},0)}disconnectedCallback(){var t,r,a;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),(a=this.resizeObserver)==null||a.disconnect(),typeof window<"u"&&window.removeEventListener("resize",this.handleWindowResize),this.cleanupToggleClickHandlers()}setupResizeObserver(){if(typeof ResizeObserver>"u"){window.addEventListener("resize",this.handleWindowResize);return}this.resizeObserver=new ResizeObserver(()=>{this.handleWindowResize()}),this.resizeObserver.observe(document.body)}updateVisibilityBasedOnWindowSize(){if(typeof window>"u"||this.manuallyToggled)return;const r=window.innerWidth>=(this.responsiveBreakpoint||768);this.core&&this.isFilterPanelVisible!==r&&this.core.store.getState().setFilterPanelVisibility(r)}setupToggleClickHandlers(){if(typeof document>"u")return;this.toggleClickHandler=r=>{if(!(window.innerWidth>=(this.responsiveBreakpoint||768))&&(r.preventDefault(),this.core)){const n=this.core.store.getState().isFilterPanelVisible;this.core.store.getState().setFilterPanelVisibility(!n)}},document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.addEventListener("click",this.toggleClickHandler)})}updateToggleElementAttributes(t){if(typeof document>"u")return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(a=>{t?(a.removeAttribute("data-filter-panel-collapsed"),a.setAttribute("data-filter-panel-expanded","")):(a.removeAttribute("data-filter-panel-expanded"),a.setAttribute("data-filter-panel-collapsed",""))})}cleanupToggleClickHandlers(){if(typeof document>"u"||!this.toggleClickHandler)return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(r=>{this.toggleClickHandler&&r.removeEventListener("click",this.toggleClickHandler)})}setInitialDateRanges(){var t,r;for(const a of this.items)if(a.type==="dateRange"){const n=a,o=n.options.minDate,c=n.options.maxDate||new Date;(r=(t=this.core)==null?void 0:t.store.getState())==null||r.addRangeValueForIndexField({fieldName:n.fieldName,value:`${n.fieldName}:[${o.toISOString()} TO ${c.toISOString()}]`})}}handleDateRangeChanged(t,r,a){var c,u,i,h;const n=new Date(r),o=new Date(a);(u=(c=this.core)==null?void 0:c.store.getState())==null||u.addRangeValueForIndexField({fieldName:t.fieldName,value:`${t.fieldName}:[${n.toISOString()} TO ${o.toISOString()}]`}),(h=(i=this.core)==null?void 0:i.store.getState())==null||h.search()}handleNumericRangeChanged(t,r,a){var n,o,c,u;(o=(n=this.core)==null?void 0:n.store.getState())==null||o.addRangeValueForIndexField({fieldName:t,value:`${t}:[${r} TO ${a}]`}),(u=(c=this.core)==null?void 0:c.store.getState())==null||u.search()}handleFacetSelectionUpdated(t,r){var a,n,o,c,u,i;r.length>0?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.addFacetPathsForIndexField({fieldName:t,value:`${t}: IN [${r.join(" ")}]`}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.removeFacetPathsForIndexField(t),(i=(u=this.core)==null?void 0:u.store.getState())==null||i.search()}handleExactMatchToggleUpdated(t){var r,a,n,o;(a=(r=this.core)==null?void 0:r.store.getState())==null||a.setSearchMode(t?"exact":"fuzzy"),(o=(n=this.core)==null?void 0:n.store.getState())==null||o.search()}handleMostRecentToggleUpdated(t,r){var a,n,o,c,u,i;r?(n=(a=this.core)==null?void 0:a.store.getState())==null||n.setSortOrder({orderByField:t,sortType:"desc"}):(c=(o=this.core)==null?void 0:o.store.getState())==null||c.setSortOrder({orderByField:null,sortType:null}),(i=(u=this.core)==null?void 0:u.store.getState())==null||i.search()}render(){return this.isFilterPanelVisible?d("div",{class:"searchcraft-filter-panel"},this.items.map(t=>{switch(t.type){case"dateRange":{const r=t,a=r.options.maxDate||new Date;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-slider",{min:r.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:r.options.granularity,onRangeChanged:n=>{this.handleDateRangeChanged(r,n.detail.startValue,n.detail.endValue)}}))}case"numericRange":{const r=t;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},t.label),d("searchcraft-slider",{min:r.options.min,max:r.options.max,step:r.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(r.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const r=t;let a=null,n=null;const o=u=>{n&&(u?(n.removeAttribute("data-facet-section-expanded"),n.setAttribute("data-facet-section-collapsed",""),n.setAttribute("aria-expanded","false")):(n.removeAttribute("data-facet-section-collapsed"),n.setAttribute("data-facet-section-expanded",""),n.setAttribute("aria-expanded","true")))},c=async()=>{if(a&&"handleCollapseToggle"in a&&"getIsCollapsed"in a){await a.handleCollapseToggle();const u=await a.getIsCollapsed();o(u)}};return d("div",{class:"searchcraft-filter-panel-section"},d("p",{ref:u=>{n=u||null},"aria-expanded":r.options.initialCollapseState!=="closed",class:"searchcraft-filter-panel-label","data-toggle-facet-section":!0,"data-facet-section-expanded":r.options.initialCollapseState!=="closed"?"":void 0,"data-facet-section-collapsed":r.options.initialCollapseState==="closed"?"":void 0,onClick:()=>void c(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),c())},role:"button",tabIndex:0},t.label),d("searchcraft-facet-list",{ref:u=>{a=u||null},fieldName:r.fieldName,exclude:r.options.exclude,initialCollapseState:r.options.initialCollapseState,viewMoreThreshold:r.options.viewMoreThreshold,onFacetSelectionUpdated:u=>{this.handleFacetSelectionUpdated(r.fieldName,u.detail.paths)}}))}case"exactMatchToggle":{const r=t;return d("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const r=t;return d("searchcraft-toggle-button",{label:r.label,subLabel:r.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(r.fieldName,a.detail)}})}}})):null}},[768,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],responsiveBreakpoint:[2,"responsive-breakpoint"],responsiveBehavior:[1,"responsive-behavior"],lastSearchTerm:[32],isFilterPanelVisible:[32]}]);function dc(){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,fc);break;case"searchcraft-facet-list":customElements.get(e)||vn();break;case"searchcraft-slider":customElements.get(e)||yn();break;case"searchcraft-toggle-button":customElements.get(e)||wn();break}})}const pc=dc,mc=Y(class extends G{constructor(t){super();f(this,"inputLabelClassName","");f(this,"label","");t!==!1&&this.__registerHost()}render(){return d("label",{key:"1008f9beb320aaa94026604b283eb65a96023265",class:ve("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[768,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Fs(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(e=>{switch(e){case"searchcraft-input-label":customElements.get(e)||customElements.define(e,mc);break}})}const gc=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"autoSearch",!0);f(this,"buttonPlacement","none");f(this,"buttonLabel");f(this,"inputLabel");f(this,"placeholderValue","Enter Search");f(this,"placeholderBehavior");f(this,"value");f(this,"inputFocus");f(this,"inputBlur");f(this,"inputInit");f(this,"inputValue","");f(this,"searchTerm","");f(this,"error",!1);f(this,"core");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"handleInput",t=>{var a;const r=t.target;this.inputValue=r.value,(a=this.core)==null||a.store.getState().setSearchTerm(r.value),this.autoSearch&&this.performSearch()});f(this,"performSearch",async()=>{var t;this.error=!1;try{await((t=this.core)==null?void 0:t.store.getState().search())}catch{this.error=!0}});f(this,"handleClearInput",()=>{var t;this.inputValue="",(t=this.core)==null||t.store.getState().resetSearchValues(),this.error=!1});f(this,"handleFormSubmit",async t=>{t.preventDefault(),await this.performSearch()});t!==!1&&this.__registerHost(),this.inputFocus=Ze(this,"inputFocus"),this.inputBlur=Ze(this,"inputBlur"),this.inputInit=Ze(this,"inputInit")}init(){var t;this.core&&(this.value!==void 0&&this.value.trim().length>0&&(this.inputValue=this.value,this.core.store.getState().setSearchTerm(this.value),this.autoSearch&&this.core.store.getState().search()),(t=this.inputInit)==null||t.emit())}onCoreChange(){this.init()}onValueChange(t){var r,a;t!==void 0&&t!==this.inputValue&&(this.inputValue=t,(r=this.core)==null||r.store.getState().setSearchTerm(t),this.autoSearch&&t.trim().length>0&&((a=this.core)==null||a.store.getState().search()))}onCoreAvailable(t){this.core=t,this.init(),this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,(this.value===void 0||r.searchTerm==="")&&(this.inputValue=r.searchTerm)})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=this.inputValue.length>0,r=ve("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),n={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return d("form",{key:"8ba91615394f95c0d5bd26a3006d3e8b454f047e",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},d("div",{key:"d9025a1c041e3132280b22e5a1b039df0196cea5",class:r,style:n},d("div",{key:"a8c3a80a0ccb718f974902fb1d163d5c3ee6194a",class:"searchcraft-input-form-button"},d("searchcraft-button",{key:"a12ff9a8cdb9a4ce3c3fd54b1c2ae084edd37069",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&d("div",{key:"866e7162c402524eaca864bb6e950a244245dc48",class:"searchcraft-input-form-label"},d("searchcraft-input-label",{key:"c57217cd5924c827df08e22a728067e3bfc63a26",label:this.inputLabel})),this.error&&d("div",{key:"4a54728bf366db50de39470cf31860a6307dafea",class:"searchcraft-input-form-error-message"},d("searchcraft-error-message",{key:"5fa5b5f5677350338d15c8e6614b0d9f584141b0"},"Something went wrong.")),d("div",{key:"67be766103a3bca11cff6f83a2a6dea7c6c6f106",class:"searchcraft-input-form-input-wrapper"},d("input",{key:"931609a4e8fc55d688077ec6cb04f2bb9b86b5fe",autoComplete:"off",class:ve("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var o;return(o=this.inputFocus)==null?void 0:o.emit()},onBlur:()=>{var o;return(o=this.inputBlur)==null?void 0:o.emit()},onInput:o=>{this.handleInput(o)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),d("div",{key:"7feb32348b7faec4104137a142ba8150149498a5",class:"searchcraft-input-form-input-icon"},d("svg",{key:"8b9abd236d4896b8dbd5c14e06019c116e3675be",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},d("title",{key:"4d3b6724f6532920f5531d2e15b28a06f0770688"},"Search icon"),d("path",{key:"65a46a1916c1f020c9bebffd42aa016b59177376",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),t&&d("button",{key:"65278eb0ab49415dce79c874adf90adcb5854db5",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},d("svg",{key:"0016263afe32250ace58cc4b98ff6106d7d9d4a0",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},d("title",{key:"9b40d806455ab9c19c0cddb4c76101debdb0266c"},"Clear icon"),d("path",{key:"2954ee1496d6736d6e780755034902c76adb81e9",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"],value:["onValueChange"]}}},[768,"searchcraft-input-form",{searchcraftId:[1,"searchcraft-id"],autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],value:[1],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"],value:["onValueChange"]}]);function Sn(){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,gc);break;case"searchcraft-button":customElements.get(e)||Mr();break;case"searchcraft-error-message":customElements.get(e)||Lr();break;case"searchcraft-input-label":customElements.get(e)||Fs();break}})}const bc=Sn,vc=Fs,yc=Y(class extends G{constructor(t){super();f(this,"label");t!==!1&&this.__registerHost()}render(){const t=this.label??"Loading";return d("div",{key:"d749250c5f56c703da7f1cba4a226a202ae269c0",class:"searchcraft-loading",role:"status","aria-live":"polite","aria-label":t},d("div",{key:"0f834793686bcf8dff56769ad65311c1f591e8dd",class:"searchcraft-loading-dots","aria-hidden":"true"},d("div",{key:"2174c333eecf0630ce984b2dece74675356259d9",class:"searchcraft-loading-dot-1"}),d("div",{key:"927fee69cd86dbd9ae57776c2a15fa6956707fac",class:"searchcraft-loading-dot-2"}),d("div",{key:"cfd37c9a9a12dfc9963aa53c3979fb59dc7a132c",class:"searchcraft-loading-dot-3"})),this.label?d("p",{class:"searchcraft-loading-label"},this.label):null)}},[768,"searchcraft-loading",{label:[1]}]);function Or(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-loading":customElements.get(e)||customElements.define(e,yc);break}})}const wc=Or,Sc=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"scrollToTop",!0);f(this,"pageQueryParam","p");f(this,"usePageQueryParam",!0);f(this,"searchTerm");f(this,"searchResultsPerPage");f(this,"searchResultsPage");f(this,"searchResultsCount");f(this,"searchClientRequestProperties");f(this,"searchResultsPagesCount",1);f(this,"searchResultsRangeMin",1);f(this,"searchResultsRangeMax",1);f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});f(this,"cleanupCore");f(this,"_initialPageApplied",!1);f(this,"scrollAnimationId");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{if(this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage,!this._initialPageApplied){this._initialPageApplied=!0;const a=this.getPageFromUrl();a!==null&&a!==r.searchResultsPage&&r.setSearchResultsPage(a)}})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}smoothScrollToSearchResults(){if(!this.scrollToTop)return;const t=document.querySelector("searchcraft-search-results .searchcraft-search-results");if(!t)return;this.scrollAnimationId&&cancelAnimationFrame(this.scrollAnimationId);const n=t.getBoundingClientRect().top+window.scrollY-200,o=window.scrollY,c=n-o,u=1500;let i=null;const h=p=>p===1?1:1-2**(-10*p),g=p=>{i===null&&(i=p);const y=p-i,w=Math.min(y/u,1),k=h(w);window.scrollTo(0,o+c*k),w<1?this.scrollAnimationId=requestAnimationFrame(g):this.scrollAnimationId=void 0};this.scrollAnimationId=requestAnimationFrame(g)}getPageFromUrl(){if(!this.usePageQueryParam||typeof window>"u")return null;let t=window;try{window.top&&window.top!==window&&window.top.location.href&&(t=window.top)}catch{}const a=new URLSearchParams(t.location.search).get(this.pageQueryParam);if(a===null)return null;const n=Number.parseInt(a,10);return Number.isNaN(n)||n<1?null:n}updateUrlPage(t){if(!this.usePageQueryParam||typeof window>"u")return;let r=window;try{window.top&&window.top!==window&&window.top.location.href&&(r=window.top)}catch{}const a=new URL(r.location.href);t<=1?a.searchParams.delete(this.pageQueryParam):a.searchParams.set(this.pageQueryParam,String(t)),r.history.replaceState(r.history.state,"",a.toString())}handleGoToPage(t){this.setSearchResultsPage(t),this.updateUrlPage(t),this.scrollToTop&&this.smoothScrollToSearchResults()}renderOddPaginationItem(t){return d("li",null,d("button",{class:ve("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t))}renderEvenPaginationItem(t){if(!(this.searchResultsPagesCount<=t))return(this.searchResultsPagesCount<=5||t<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=t+1:this.searchResultsPage>=t-1)?d("li",null,d("button",{class:ve("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===t}),onClick:()=>this.handleGoToPage(t),type:"button"},t)):d("li",null,d("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?d("li",null,d("button",{class:ve("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):d("li",null,d("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-pagination"},d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Previous page icon"),d("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),d("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Next page icon"),d("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[768,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],scrollToTop:[4,"scroll-to-top"],pageQueryParam:[1,"page-query-param"],usePageQueryParam:[4,"use-page-query-param"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function kc(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(e=>{switch(e){case"searchcraft-pagination":customElements.get(e)||customElements.define(e,Sc);break;case"searchcraft-button":customElements.get(e)||Mr();break}})}const xc=kc,Cc=Y(class extends G{constructor(t){super();f(this,"template");f(this,"type");f(this,"searchcraftId");f(this,"hotkey");f(this,"hotkeyModifier");f(this,"hotkeyModifierSymbol");f(this,"isPopoverVisible");f(this,"userAgent");f(this,"unsubscribe",()=>{});f(this,"cleanupCore");f(this,"core");f(this,"renderOptionSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Option key"),d("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),d("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));f(this,"renderCtrlSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Ctrl key"),d("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));f(this,"renderWindowsMetaSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Windows meta key"),d("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));f(this,"renderMacMetaSymbol",()=>d("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},d("title",null,"Mac meta key"),d("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));t!==!1&&this.__registerHost()}onCoreAvailable(t){this.core=t;const r=t.store.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=t.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}setUserAgent(){const t=navigator.userAgent.toLowerCase();switch(!0){case t.includes("windows"):return"window";case t.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return d("div",{class:"searchcraft-popover-button-wrapper"},d("div",{class:"searchcraft-popover-button-input"},d("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},d("title",null,"Search icon"),d("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),d("span",null,"Search")),d("div",{class:"searchcraft-popover-button-keycaps"},d("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},d("span",null,this.hotkeyModifierSymbol)),d("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},d("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();case"magnifying-glass":return d("div",{class:"searchcraft-popover-button-input"},d("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1","aria-hidden":"true"},d("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})));default:return d("div",null,d("slot",null))}}render(){return d("button",{key:"760f4f8d8daddaaadc0367e21b9efe23c4ef7c7d","aria-label":this.type==="magnifying-glass"?"Search":void 0,class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:Dt}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[772,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function Rc(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(e=>{switch(e){case"searchcraft-popover-button":customElements.get(e)||customElements.define(e,Cc);break}})}const Tc=Rc,Ec=mn,Ac=Y(class extends G{constructor(t){super();f(this,"item");f(this,"popoverResultMappings");f(this,"documentPosition",0);f(this,"searchcraftId");f(this,"title");f(this,"subtitle");f(this,"href");f(this,"imageSource");f(this,"imageAlt");f(this,"core");f(this,"cleanupCore");f(this,"handleLinkClick",()=>{var t;if(this.core){const r=this.documentPosition,a=this.core.store.getState().searchTerm,n=this.core.store.getState().searchClientResponseItems.length||0;(t=this.core.measureClient)==null||t.sendMeasureEvent("document_clicked",{document_position:r,number_of_documents:n,search_term:a})}});t!==!1&&this.__registerHost()}mapValuesFromDocument(t){var r,a,n,o,c;this.title=Nt(t,(r=this.popoverResultMappings)==null?void 0:r.title),this.subtitle=Nt(t,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Nt(t,(n=this.popoverResultMappings)==null?void 0:n.href),this.imageSource=Nt(t,(o=this.popoverResultMappings)==null?void 0:o.imageSource),this.imageAlt=Nt(t,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}onCoreAvailable(t){this.core=t}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){return d("div",{key:"d1c9c310b8abc9d2370efb802eac1edf4189519d",class:"searchcraft-popover-list-item"},d("a",{key:"30eb1a5076c5b4b95ae43147eaee0bb72ce46179",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&d("div",{key:"d18ff55823dc2c61f3786f423936af8b009aeeda",class:"searchcraft-popover-list-item-image-wrapper"},d("img",{key:"56f4cc1d472f7da05e64fcf52c560a7ad0cdf7a6",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),d("div",{key:"78a0f0235d5e71d10076b70ccbaf4b58e0d6fea0",class:"searchcraft-popover-list-item-content"},this.title&&d("p",{key:"4489047af56e5aa295cb5f036e970dcad053d3b7",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&d("p",{key:"4d177c227a1dbf1233022d738403c8eb93ba328d",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[768,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],searchcraftId:[1,"searchcraft-id"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function Ds(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(e=>{switch(e){case"searchcraft-popover-list-item":customElements.get(e)||customElements.define(e,Ac);break}})}const $c=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"popoverResultMappings");f(this,"searchClientResponseItems");f(this,"adClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"config");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.config=t.config}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}renderWithADMAds(){var t,r;return d("div",{class:"searchcraft-popover-list-view"},(t=this.adClientResponseItems)==null?void 0:t.map(a=>d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+n})))}renderWithCustomAds(){var u,i,h,g,p,y,w,k;const t=[],r=((i=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((g=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:g.adInterstitialQuantity)||1,n=((y=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:y.adStartQuantity)||0,o=((k=(w=this.config)==null?void 0:w.customAdConfig)==null?void 0:k.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let C=0;C<n;C++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${C}-ad`,renderPosition:"top"}));c.forEach((C,L)=>{if(r&&L%r===0&&L+r<c.length&&L>=r)for(let E=0;E<a;E++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${C.id}-ad-${E}`,renderPosition:"interstitial"}));t.push(d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:C,key:C.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+L}))});for(let C=0;C<o;C++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${C}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-popover-list-view"},t)}renderWithNativoAds(){var i,h,g,p,y,w,k,C,L,E;const t=[],r=((h=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:h.adInterstialStartIndex)||0,a=((p=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((w=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:w.adInterstitialQuantity)||1,o=((C=(k=this.config)==null?void 0:k.nativoConfig)==null?void 0:C.adStartQuantity)||0,c=((E=(L=this.config)==null?void 0:L.nativoConfig)==null?void 0:E.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let S=0;S<o;S++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"top"}));u.forEach((S,x)=>{if(a&&(x+r)%a===0&&x+a<u.length&&x>=a)for(let F=0;F<n;F++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S.id}-ad-${F}`,renderPosition:"interstitial"}));t.push(d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:S,key:S.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+x}))});for(let S=0;S<c;S++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-popover-list-view"},t)}renderWithNoAds(){var t;return d("div",{class:"searchcraft-popover-list-view"},(t=this.searchClientResponseItems)==null?void 0:t.map((r,a)=>d("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:r,key:r.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var t,r,a;return(t=this.config)!=null&&t.customAdConfig?this.renderWithCustomAds():(r=this.config)!=null&&r.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[768,"searchcraft-popover-list-view",{searchcraftId:[1,"searchcraft-id"],popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function kn(){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,$c);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-popover-list-item":customElements.get(e)||Ds();break}})}function Ns(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nt=Ns();function xn(s){nt=s}var Wt={exec:()=>null};function H(s,e=""){let t=typeof s=="string"?s:s.source;const r={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(fe.caret,"$1"),t=t.replace(a,o),r},getRegex:()=>new RegExp(t,e)};return r}var fe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Pc=/^(?:[ \t]*(?:\n|$))+/,_c=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ic=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zs=/(?:[*+-]|\d{1,9}[.)])/,Cn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rn=H(Cn).replace(/bull/g,zs).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(),Lc=H(Cn).replace(/bull/g,zs).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(),Us=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Oc=/^[^\n]+/,Bs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fc=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Dc=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zs).getRegex(),Fr="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",Hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nc=H("^ {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",Hs).replace("tag",Fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Tn=H(Us).replace("hr",Vt).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",Fr).getRegex(),zc=H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Tn).getRegex(),qs={blockquote:zc,code:_c,def:Fc,fences:Ic,heading:Mc,hr:Vt,html:Nc,lheading:Rn,list:Dc,newline:Pc,paragraph:Tn,table:Wt,text:Oc},En=H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vt).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",Fr).getRegex(),Uc={...qs,lheading:Lc,table:En,paragraph:H(Us).replace("hr",Vt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",En).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",Fr).getRegex()},Bc={...qs,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hs).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:Wt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Us).replace("hr",Vt).replace("heading",` *#{1,6} *[^
12
+ ]`).replace("lheading",Rn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,An=/^( {2,}|\\)\n(?!\s*$)/,Wc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dr=/[\p{P}\p{S}]/u,Ws=/[\s\p{P}\p{S}]/u,$n=/[^\s\p{P}\p{S}]/u,Vc=H(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ws).getRegex(),Pn=/(?!~)[\p{P}\p{S}]/u,jc=/(?!~)[\s\p{P}\p{S}]/u,Gc=/(?:[^\s\p{P}\p{S}]|~)/u,Yc=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,_n=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qc=H(_n,"u").replace(/punct/g,Dr).getRegex(),Xc=H(_n,"u").replace(/punct/g,Pn).getRegex(),In="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Kc=H(In,"gu").replace(/notPunctSpace/g,$n).replace(/punctSpace/g,Ws).replace(/punct/g,Dr).getRegex(),Zc=H(In,"gu").replace(/notPunctSpace/g,Gc).replace(/punctSpace/g,jc).replace(/punct/g,Pn).getRegex(),Jc=H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$n).replace(/punctSpace/g,Ws).replace(/punct/g,Dr).getRegex(),el=H(/\\(punct)/,"gu").replace(/punct/g,Dr).getRegex(),tl=H(/^<(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(),rl=H(Hs).replace("(?:-->|$)","-->").getRegex(),sl=H("^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",rl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Nr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,al=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Nr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Mn=H(/^!?\[(label)\]\[(ref)\]/).replace("label",Nr).replace("ref",Bs).getRegex(),Ln=H(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bs).getRegex(),nl=H("reflink|nolink(?!\\()","g").replace("reflink",Mn).replace("nolink",Ln).getRegex(),Vs={_backpedal:Wt,anyPunctuation:el,autolink:tl,blockSkip:Yc,br:An,code:qc,del:Wt,emStrongLDelim:Qc,emStrongRDelimAst:Kc,emStrongRDelimUnd:Jc,escape:Hc,link:al,nolink:Ln,punctuation:Vc,reflink:Mn,reflinkSearch:nl,tag:sl,text:Wc,url:Wt},ol={...Vs,link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",Nr).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nr).getRegex()},js={...Vs,emStrongRDelimAst:Zc,emStrongLDelim:Xc,url:H(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},il={...js,br:H(An).replace("{2,}","*").getRegex(),text:H(js.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zr={normal:qs,gfm:Uc,pedantic:Bc},jt={normal:Vs,gfm:js,breaks:il,pedantic:ol},cl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},On=s=>cl[s];function Ne(s,e){if(e){if(fe.escapeTest.test(s))return s.replace(fe.escapeReplace,On)}else if(fe.escapeTestNoEncode.test(s))return s.replace(fe.escapeReplaceNoEncode,On);return s}function Fn(s){try{s=encodeURI(s).replace(fe.percentDecode,"%")}catch{return null}return s}function Dn(s,e){var n;const t=s.replace(fe.findPipe,(o,c,u)=>{let i=!1,h=c;for(;--h>=0&&u[h]==="\\";)i=!i;return i?"|":" |"}),r=t.split(fe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(fe.slashPipe,"|");return r}function Gt(s,e,t){const r=s.length;if(r===0)return"";let a=0;for(;a<r&&s.charAt(r-a-1)===e;)a++;return s.slice(0,r-a)}function ll(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===e[0])t++;else if(s[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function Nn(s,e,t,r,a){const n=e.href,o=e.title||null,c=s[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:o,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,u}function ul(s,e,t){const r=s.match(t.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.split(`
13
13
  `).map(n=>{const o=n.match(t.other.beginningSpace);if(o===null)return n;const[c]=o;return c.length>=a.length?n.slice(a.length):n}).join(`
14
14
  `)}var Ur=class{constructor(s){f(this,"options");f(this,"rules");f(this,"lexer");this.options=s||nt}space(s){const e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){const e=this.rules.block.code.exec(s);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Gt(t,`
15
15
  `)}}}fences(s){const e=this.rules.block.fences.exec(s);if(e){const t=e[0],r=ul(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(s){const e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const r=Gt(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){const e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:Gt(e[0],`
@@ -21,17 +21,17 @@
21
21
  ${i}`:i,a=a?`${a}
22
22
  ${h}`:h;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,n,!0),this.lexer.state.top=g,t.length===0)break;const p=n.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const y=p,w=y.raw+`
23
23
  `+t.join(`
24
- `),S=this.blockquote(w);n[n.length-1]=S,r=r.substring(0,r.length-y.raw.length)+S.raw,a=a.substring(0,a.length-y.text.length)+S.text;break}else if((p==null?void 0:p.type)==="list"){const y=p,w=y.raw+`
24
+ `),k=this.blockquote(w);n[n.length-1]=k,r=r.substring(0,r.length-y.raw.length)+k.raw,a=a.substring(0,a.length-y.text.length)+k.text;break}else if((p==null?void 0:p.type)==="list"){const y=p,w=y.raw+`
25
25
  `+t.join(`
26
- `),S=this.list(w);n[n.length-1]=S,r=r.substring(0,r.length-p.raw.length)+S.raw,a=a.substring(0,a.length-y.raw.length)+S.raw,t=w.substring(n.at(-1).raw.length).split(`
26
+ `),k=this.list(w);n[n.length-1]=k,r=r.substring(0,r.length-p.raw.length)+k.raw,a=a.substring(0,a.length-y.raw.length)+k.raw,t=w.substring(n.at(-1).raw.length).split(`
27
27
  `);continue}}return{type:"blockquote",raw:r,tokens:n,text:a}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim();const r=t.length>1,a={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");const n=this.rules.other.listItemRegex(t);let o=!1;for(;s;){let u=!1,i="",h="";if(!(e=n.exec(s))||this.rules.block.hr.test(s))break;i=e[0],s=s.substring(i.length);let g=e[2].split(`
28
28
  `,1)[0].replace(this.rules.other.listReplaceTabs,L=>" ".repeat(3*L.length)),p=s.split(`
29
29
  `,1)[0],y=!g.trim(),w=0;if(this.options.pedantic?(w=2,h=g.trimStart()):y?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,h=g.slice(w),w+=e[1].length),y&&this.rules.other.blankLine.test(p)&&(i+=p+`
30
- `,s=s.substring(p.length+1),u=!0),!u){const L=this.rules.other.nextBulletRegex(w),E=this.rules.other.hrRegex(w),k=this.rules.other.fencesBeginRegex(w),x=this.rules.other.headingBeginRegex(w),F=this.rules.other.htmlBeginRegex(w);for(;s;){const C=s.split(`
31
- `,1)[0];let z;if(p=C,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),z=p):z=p.replace(this.rules.other.tabCharGlobal," "),k.test(p)||x.test(p)||F.test(p)||L.test(p)||E.test(p))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!p.trim())h+=`
32
- `+z.slice(w);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||x.test(g)||E.test(g))break;h+=`
33
- `+p}!y&&!p.trim()&&(y=!0),i+=C+`
34
- `,s=s.substring(C.length+1),g=z.slice(w)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let S=null,R;this.options.gfm&&(S=this.rules.other.listIsTask.exec(h),S&&(R=S[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:i,task:!!S,checked:R,loose:!1,text:h,tokens:[]}),a.raw+=i}const c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const i=a.items[u].tokens.filter(g=>g.type==="space"),h=i.length>0&&i.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=h}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(s){const e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){const e=this.rules.block.def.exec(s);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:a}}}table(s){var o;const e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=Dn(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `,s=s.substring(p.length+1),u=!0),!u){const L=this.rules.other.nextBulletRegex(w),E=this.rules.other.hrRegex(w),S=this.rules.other.fencesBeginRegex(w),x=this.rules.other.headingBeginRegex(w),F=this.rules.other.htmlBeginRegex(w);for(;s;){const R=s.split(`
31
+ `,1)[0];let z;if(p=R,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),z=p):z=p.replace(this.rules.other.tabCharGlobal," "),S.test(p)||x.test(p)||F.test(p)||L.test(p)||E.test(p))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!p.trim())h+=`
32
+ `+z.slice(w);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(g)||x.test(g)||E.test(g))break;h+=`
33
+ `+p}!y&&!p.trim()&&(y=!0),i+=R+`
34
+ `,s=s.substring(R.length+1),g=z.slice(w)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let k=null,C;this.options.gfm&&(k=this.rules.other.listIsTask.exec(h),k&&(C=k[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:i,task:!!k,checked:C,loose:!1,text:h,tokens:[]}),a.raw+=i}const c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const i=a.items[u].tokens.filter(g=>g.type==="space"),h=i.length>0&&i.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=h}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(s){const e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){const e=this.rules.block.def.exec(s);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:a}}}table(s){var o;const e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=Dn(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
35
35
  `):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===r.length){for(const c of r)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<t.length;c++)n.header.push({text:t[c],tokens:this.lexer.inline(t[c]),header:!0,align:n.align[c]});for(const c of a)n.rows.push(Dn(c,n.header.length).map((u,i)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:n.align[i]})));return n}}lheading(s){const e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){const e=this.rules.block.paragraph.exec(s);if(e){const t=e[1].charAt(e[1].length-1)===`
36
36
  `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){const e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){const e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){const e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){const e=this.rules.inline.link.exec(s);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const n=Gt(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{const n=ll(e[2],"()");if(n===-2)return;if(n>-1){const c=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let r=e[2],a="";if(this.options.pedantic){const n=this.rules.other.pedanticHrefTitle.exec(r);n&&(r=n[1],a=n[3])}else a=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),Nn(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){const r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[r.toLowerCase()];if(!a){const n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return Nn(t,a,t[0],this.lexer,this.rules)}}emStrong(s,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(s);if(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const n=[...r[0]].length-1;let o,c,u=n,i=0;const h=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*s.length+n);(r=h.exec(e))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(c=[...o].length,r[3]||r[4]){u+=c;continue}else if((r[5]||r[6])&&n%3&&!((n+c)%3)){i+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+i);const g=[...r[0]][0].length,p=s.slice(0,n+r.index+g+c);if(Math.min(n,c)%2){const w=p.slice(1,-1);return{type:"em",raw:p,text:w,tokens:this.lexer.inlineTokens(w)}}const y=p.slice(2,-2);return{type:"strong",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(s){const e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),a=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&a&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(s){const e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s){const e=this.rules.inline.del.exec(s);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){const e=this.rules.inline.autolink.exec(s);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(s){var t;let e;if(e=this.rules.inline.url.exec(s)){let r,a;if(e[2]==="@")r=e[0],a="mailto:"+r;else{let n;do n=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(n!==e[0]);r=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:r,href:a,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(s){const e=this.rules.inline.text.exec(s);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},et=class ua{constructor(e){f(this,"tokens");f(this,"options");f(this,"state");f(this,"tokenizer");f(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||nt,this.options.tokenizer=this.options.tokenizer||new Ur,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:fe,block:zr.normal,inline:jt.normal};this.options.pedantic?(t.block=zr.pedantic,t.inline=jt.pedantic):this.options.gfm&&(t.block=zr.gfm,this.options.breaks?t.inline=jt.breaks:t.inline=jt.gfm),this.tokenizer.rules=t}static get rules(){return{block:zr,inline:jt}}static lex(e,t){return new ua(t).lex(e)}static lexInline(e,t){return new ua(t).inlineTokens(e)}lex(e){e=e.replace(fe.carriageReturn,`
37
37
  `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var a,n,o;for(this.options.pedantic&&(e=e.replace(fe.tabCharGlobal," ").replace(fe.spaceLine,""));e;){let c;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(i=>(c=i.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);const i=t.at(-1);c.raw.length===1&&i!==void 0?i.raw+=`
@@ -43,7 +43,7 @@ ${h}`:h;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
43
43
  `+c.raw,i.text+=`
44
44
  `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(c),r=u.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);const i=t.at(-1);(i==null?void 0:i.type)==="text"?(i.raw+=`
45
45
  `+c.raw,i.text+=`
46
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(c);continue}if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var c,u,i;let r=e,a=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let n=!1,o="";for(;e;){n||(o=""),n=!1;let h;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);const p=t.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,r,o)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let g=e;if((i=this.options.extensions)!=null&&i.startInline){let p=1/0;const y=e.slice(1);let w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},y),typeof w=="number"&&w>=0&&(p=Math.min(p,w))}),p<1/0&&p>=0&&(g=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(g)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),n=!0;const p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},Br=class{constructor(s){f(this,"options");f(this,"parser");this.options=s||nt}space(s){return""}code({text:s,lang:e,escaped:t}){var n;const r=(n=(e||"").match(fe.notSpaceStart))==null?void 0:n[0],a=s.replace(fe.endingNewline,"")+`
46
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(c);continue}if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var c,u,i;let r=e,a=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let n=!1,o="";for(;e;){n||(o=""),n=!1;let h;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);const p=t.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,r,o)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let g=e;if((i=this.options.extensions)!=null&&i.startInline){let p=1/0;const y=e.slice(1);let w;this.options.extensions.startInline.forEach(k=>{w=k.call({lexer:this},y),typeof w=="number"&&w>=0&&(p=Math.min(p,w))}),p<1/0&&p>=0&&(g=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(g)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),n=!0;const p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},Br=class{constructor(s){f(this,"options");f(this,"parser");this.options=s||nt}space(s){return""}code({text:s,lang:e,escaped:t}){var n;const r=(n=(e||"").match(fe.notSpaceStart))==null?void 0:n[0],a=s.replace(fe.endingNewline,"")+`
47
47
  `;return r?'<pre><code class="language-'+Ne(r)+'">'+(t?a:Ne(a,!0))+`</code></pre>
48
48
  `:"<pre><code>"+(t?a:Ne(a,!0))+`</code></pre>
49
49
  `}blockquote({tokens:s}){return`<blockquote>
@@ -63,8 +63,8 @@ ${s}</tr>
63
63
  `}tablecell(s){const e=this.parser.parseInline(s.tokens),t=s.header?"th":"td";return(s.align?`<${t} align="${s.align}">`:`<${t}>`)+e+`</${t}>
64
64
  `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Ne(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){const r=this.parser.parseInline(t),a=Fn(s);if(a===null)return r;s=a;let n='<a href="'+s+'"';return e&&(n+=' title="'+Ne(e)+'"'),n+=">"+r+"</a>",n}image({href:s,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));const a=Fn(s);if(a===null)return Ne(t);s=a;let n=`<img src="${s}" alt="${t}"`;return e&&(n+=` title="${Ne(e)}"`),n+=">",n}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Ne(s.text)}},Gs=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},tt=class ha{constructor(e){f(this,"options");f(this,"renderer");f(this,"textRenderer");this.options=e||nt,this.options.renderer=this.options.renderer||new Br,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gs}static parse(e,t){return new ha(t).parse(e)}static parseInline(e,t){return new ha(t).parseInline(e)}parse(e,t=!0){var a,n;let r="";for(let o=0;o<e.length;o++){const c=e[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[c.type]){const i=c,h=this.options.extensions.renderers[i.type].call({parser:this},i);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){r+=h||"";continue}}const u=c;switch(u.type){case"space":{r+=this.renderer.space(u);continue}case"hr":{r+=this.renderer.hr(u);continue}case"heading":{r+=this.renderer.heading(u);continue}case"code":{r+=this.renderer.code(u);continue}case"table":{r+=this.renderer.table(u);continue}case"blockquote":{r+=this.renderer.blockquote(u);continue}case"list":{r+=this.renderer.list(u);continue}case"html":{r+=this.renderer.html(u);continue}case"paragraph":{r+=this.renderer.paragraph(u);continue}case"text":{let i=u,h=this.renderer.text(i);for(;o+1<e.length&&e[o+1].type==="text";)i=e[++o],h+=`
65
65
  `+this.renderer.text(i);t?r+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):r+=h;continue}default:{const i='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}parseInline(e,t=this.renderer){var a,n;let r="";for(let o=0;o<e.length;o++){const c=e[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[c.type]){const i=this.options.extensions.renderers[c.type].call({parser:this},c);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=i||"";continue}}const u=c;switch(u.type){case"escape":{r+=t.text(u);break}case"html":{r+=t.html(u);break}case"link":{r+=t.link(u);break}case"image":{r+=t.image(u);break}case"strong":{r+=t.strong(u);break}case"em":{r+=t.em(u);break}case"codespan":{r+=t.codespan(u);break}case"br":{r+=t.br(u);break}case"del":{r+=t.del(u);break}case"text":{r+=t.text(u);break}default:{const i='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}},Hr=(Ks=class{constructor(s){f(this,"options");f(this,"block");this.options=s||nt}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?et.lex:et.lexInline}provideParser(){return this.block?tt.parse:tt.parseInline}},f(Ks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ks),hl=class{constructor(...s){f(this,"defaults",Ns());f(this,"options",this.setOptions);f(this,"parse",this.parseMarkdown(!0));f(this,"parseInline",this.parseMarkdown(!1));f(this,"Parser",tt);f(this,"Renderer",Br);f(this,"TextRenderer",Gs);f(this,"Lexer",et);f(this,"Tokenizer",Ur);f(this,"Hooks",Hr);this.use(...s)}walkTokens(s,e){var r,a;let t=[];for(const n of s)switch(t=t.concat(e.call(this,n)),n.type){case"table":{const o=n;for(const c of o.header)t=t.concat(this.walkTokens(c.tokens,e));for(const c of o.rows)for(const u of c)t=t.concat(this.walkTokens(u.tokens,e));break}case"list":{const o=n;t=t.concat(this.walkTokens(o.items,e));break}default:{const o=n;(a=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(c=>{const u=o[c].flat(1/0);t=t.concat(this.walkTokens(u,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...s){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const n=e.renderers[a.name];n?e.renderers[a.name]=function(...o){let c=a.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const n=e[a.level];n?n.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),t.renderer){const a=this.defaults.renderer||new Br(this.defaults);for(const n in t.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const o=n,c=t.renderer[o],u=a[o];a[o]=(...i)=>{let h=c.apply(a,i);return h===!1&&(h=u.apply(a,i)),h||""}}r.renderer=a}if(t.tokenizer){const a=this.defaults.tokenizer||new Ur(this.defaults);for(const n in t.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const o=n,c=t.tokenizer[o],u=a[o];a[o]=(...i)=>{let h=c.apply(a,i);return h===!1&&(h=u.apply(a,i)),h}}r.tokenizer=a}if(t.hooks){const a=this.defaults.hooks||new Hr;for(const n in t.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const o=n,c=t.hooks[o],u=a[o];Hr.passThroughHooks.has(n)?a[o]=i=>{if(this.defaults.async)return Promise.resolve(c.call(a,i)).then(g=>u.call(a,g));const h=c.call(a,i);return u.call(a,h)}:a[o]=(...i)=>{let h=c.apply(a,i);return h===!1&&(h=u.apply(a,i)),h}}r.hooks=a}if(t.walkTokens){const a=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(o){let c=[];return c.push(n.call(this,o)),a&&(c=c.concat(a.call(this,o))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return et.lex(s,e??this.defaults)}parser(s,e){return tt.parse(s,e??this.defaults)}parseMarkdown(s){return(t,r)=>{const a={...r},n={...this.defaults,...a},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=s);const c=n.hooks?n.hooks.provideLexer():s?et.lex:et.lexInline,u=n.hooks?n.hooks.provideParser():s?tt.parse:tt.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(i=>c(i,n)).then(i=>n.hooks?n.hooks.processAllTokens(i):i).then(i=>n.walkTokens?Promise.all(this.walkTokens(i,n.walkTokens)).then(()=>i):i).then(i=>u(i,n)).then(i=>n.hooks?n.hooks.postprocess(i):i).catch(o);try{n.hooks&&(t=n.hooks.preprocess(t));let i=c(t,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let h=u(i,n);return n.hooks&&(h=n.hooks.postprocess(h)),h}catch(i){return o(i)}}}onError(s,e){return t=>{if(t.message+=`
66
- Please report this to https://github.com/markedjs/marked.`,s){const r="<p>An error occurred:</p><pre>"+Ne(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},ot=new hl;function W(s,e){return ot.parse(s,e)}W.options=W.setOptions=function(s){return ot.setOptions(s),W.defaults=ot.defaults,xn(W.defaults),W},W.getDefaults=Ns,W.defaults=nt,W.use=function(...s){return ot.use(...s),W.defaults=ot.defaults,xn(W.defaults),W},W.walkTokens=function(s,e){return ot.walkTokens(s,e)},W.parseInline=ot.parseInline,W.Parser=tt,W.parser=tt.parse,W.Renderer=Br,W.TextRenderer=Gs,W.Lexer=et,W.lexer=et.lex,W.Tokenizer=Ur,W.Hooks=Hr,W.parse=W;const fl=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"summary","");f(this,"summaryErrorMessage","");f(this,"isLoading",!1);f(this,"isSummaryNotEnabled",!1);f(this,"unsubscribe");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.unsubscribe=t.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){this.isLoading=t.isSummaryLoading,this.isSummaryNotEnabled=t.isSummaryNotEnabled,this.summaryErrorMessage=t.summaryErrorMessage,this.summary=this.sanitizeMarkdown(t.summary)}sanitizeMarkdown(t){return xs.sanitize(W.parse(t))}renderContent(){return this.isLoading?d("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?d("div",{class:"searchcraft-results-summary-content"},this.summaryErrorMessage||"AI summaries are not enabled"):d("div",{class:"searchcraft-results-summary-content",innerHTML:this.summary,"aria-live":"polite"})}render(){return d("div",{key:"4fabef16a76b57d737aa47fcf106c7375d19a5bc",class:"searchcraft-results-summary"},this.renderContent())}},[768,"searchcraft-results-summary",{searchcraftId:[1,"searchcraft-id"],summary:[32],summaryErrorMessage:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function zn(){if(typeof customElements>"u")return;["searchcraft-results-summary","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-results-summary":customElements.get(e)||customElements.define(e,fl);break;case"searchcraft-loading":customElements.get(e)||Or();break}})}const dl=Y(class extends G{constructor(t){super();f(this,"type","inline");f(this,"popoverResultMappings");f(this,"hotkey","k");f(this,"hotkeyModifier","meta");f(this,"searchcraftId");f(this,"placeholderValue","Enter Search");f(this,"placeholderBehavior");f(this,"viewAllResultsBaseUrl");f(this,"viewAllResultsLabel");f(this,"showSummaryBox",!1);f(this,"sdkVariant","js");f(this,"isPopoverVisibleInState",!1);f(this,"searchClientResponseItems",[]);f(this,"adClientResponseItems",[]);f(this,"searchTerm");f(this,"isFocused",!1);f(this,"breakpointSm",576);f(this,"breakpointMd",768);f(this,"breakpointLg",992);f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"modalElement");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"core");f(this,"handleDocumentClick",t=>{this.hostElement.contains(t.target)||(this.isFocused=!1)});f(this,"handleDocumentKeyDown",t=>{var r;if(t.key===this.hotkey&&this.handleHotkeyPressed(t),!!this.hostElement.contains(document.activeElement))switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.focusOnNextListItem(t.key);break;case"Escape":(r=this.core)==null||r.store.getState().setPopoverVisibility(!1);break;case"Enter":(t.metaKey||t.ctrlKey)&&this.viewAllResultsHref&&this.hasResultsToShow&&(t.preventDefault(),this.navigateToViewAllResults());break;default:return}});f(this,"handleInputInit",()=>{const t=this.hostElement.querySelector(".searchcraft-input-form-input");t==null||t.focus()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t;const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=t.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=t.store.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage}),t.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(t){this.isPopoverVisibleInState=t,document.body.style.overflow=t?"hidden":"auto"}handleInputFocus(){var t;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((t=this.core)==null||t.store.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),this.modalElement.setAttribute("searchcraft-id",this.searchcraftId),this.placeholderValue&&this.modalElement.setAttribute("placeholder-value",this.placeholderValue),this.placeholderBehavior&&this.modalElement.setAttribute("placeholder-behavior",this.placeholderBehavior),this.viewAllResultsBaseUrl&&this.modalElement.setAttribute("view-all-results-base-url",this.viewAllResultsBaseUrl),this.viewAllResultsLabel&&this.modalElement.setAttribute("view-all-results-label",this.viewAllResultsLabel),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(t){var r;(r=this.core)==null||r.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(t){var r;if(t.ctrlKey&&this.hotkeyModifier==="ctrl"||t.altKey&&this.hotkeyModifier==="alt"||t.metaKey&&this.hotkeyModifier==="meta")if(t.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(r=this.core)==null||r.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(t){var n,o;const r=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=r.indexOf(document.activeElement);if(t==="ArrowDown")(n=r[(a+1)%r.length])==null||n.focus();else if(t==="ArrowUp")if(a>=1)(o=r[a-1])==null||o.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var t,r;return this.searchTerm&&((r=(t=this.searchTerm)==null?void 0:t.trim())==null?void 0:r.length)>0&&this.searchClientResponseItems.length>0}get viewAllResultsHref(){var a;const t=this.viewAllResultsBaseUrl;if(!t)return;const r=(a=this.searchTerm)==null?void 0:a.trim();return r?`${t}${encodeURIComponent(r).replace(/%20/g,"+")}`:t}get resolvedViewAllResultsLabel(){return this.viewAllResultsLabel??"View All"}navigateToViewAllResults(){const t=this.viewAllResultsHref;!t||!this.hasResultsToShow||typeof window<"u"&&(window.location.href=t)}renderInlinePopover(){const t=this.hasResultsToShow&&this.isFocused;return d("div",{class:ve("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":t})},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),t&&d("div",{class:"searchcraft-popover-form-inline-wrapper"},this.showSummaryBox&&d("searchcraft-results-summary",{searchcraftId:this.searchcraftId}),d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId,sdkVariant:this.sdkVariant,viewAllResultsHref:this.viewAllResultsHref,viewAllResultsLabel:this.resolvedViewAllResultsLabel})))}renderModalPopover(){if(this.isPopoverVisibleInState)return d("div",{class:ve("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},d("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),d("div",{class:"searchcraft-popover-form-modal-wrapper"},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),d("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.showSummaryBox&&this.hasResultsToShow&&d("searchcraft-results-summary",{searchcraftId:this.searchcraftId}),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId,sdkVariant:this.sdkVariant,viewAllResultsHref:this.viewAllResultsHref,viewAllResultsLabel:this.resolvedViewAllResultsLabel})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return d("div",{class:ve("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),d("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.showSummaryBox&&this.hasResultsToShow&&d("searchcraft-results-summary",{searchcraftId:this.searchcraftId}),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId,sdkVariant:this.sdkVariant,viewAllResultsHref:this.viewAllResultsHref,viewAllResultsLabel:this.resolvedViewAllResultsLabel}))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[768,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],viewAllResultsBaseUrl:[1,"view-all-results-base-url"],viewAllResultsLabel:[1,"view-all-results-label"],showSummaryBox:[4,"show-summary-box"],sdkVariant:[1,"sdk-variant"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function Un(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-loading","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view","searchcraft-results-summary"].forEach(e=>{switch(e){case"searchcraft-popover-form":customElements.get(e)||customElements.define(e,dl);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-button":customElements.get(e)||Mr();break;case"searchcraft-error-message":customElements.get(e)||Lr();break;case"searchcraft-input-form":customElements.get(e)||kn();break;case"searchcraft-input-label":customElements.get(e)||Fs();break;case"searchcraft-loading":customElements.get(e)||Or();break;case"searchcraft-popover-footer":customElements.get(e)||mn();break;case"searchcraft-popover-form":customElements.get(e)||Un();break;case"searchcraft-popover-list-item":customElements.get(e)||Ds();break;case"searchcraft-popover-list-view":customElements.get(e)||Sn();break;case"searchcraft-results-summary":customElements.get(e)||zn();break}})}const pl=Un,ml=Ds,gl=Sn,bl=Y(class extends G{constructor(t){super();f(this,"template");f(this,"searchcraftId");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchClientRequestProperties");f(this,"count",0);f(this,"range",[0,0]);f(this,"responseTime","0");f(this,"unsubscribe",()=>{});f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";return!this.searchTerm&&!t||this.searchResultsCount===0?null:d("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:Dt}):`${en(this.count)} results found in ${this.responseTime}ms`)}},[768,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],count:[32],range:[32],responseTime:[32]}]);function vl(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(e=>{switch(e){case"searchcraft-results-info":customElements.get(e)||customElements.define(e,bl);break}})}const yl=vl,wl=zn,kl=Y(class extends G{constructor(t){super();f(this,"item");f(this,"index");f(this,"documentPosition",0);f(this,"template");f(this,"searchcraftId");f(this,"templateHtml");f(this,"core");f(this,"cleanupCore");f(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 n=this.documentPosition,o=this.core.store.getState().searchTerm,c=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:n,number_of_documents:c,search_term:o})});f(this,"handleKeyDown",()=>{});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t}connectedCallback(){var t;if(this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(t=this.template)==null?void 0:t.call(this,this.item.document,this.index,{html:Dt,source_index:this.item.source_index})}catch(r){console.error("Invalid search result template:",r)}}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){if(this.item)return typeof this.template>"u"?d("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([t,r])=>d("p",{key:t},d("strong",null,t),": ",r))):d("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[768,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function Bn(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-result":customElements.get(e)||customElements.define(e,kl);break}})}const Sl=Bn,xl=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"initialQuery");f(this,"template");f(this,"adClientResponseItems",[]);f(this,"config");f(this,"isSearchInProgress",!0);f(this,"searchClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchTerm","");f(this,"unsubscribe");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){var a;const r=t.store.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(a=r.core)==null?void 0:a.config,this.unsubscribe=t.store.subscribe(n=>this.handleStateChange(n))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){var r;this.adClientResponseItems=[...t.adClientResponseItems],this.config=(r=t.core)==null?void 0:r.config,this.isSearchInProgress=t.isSearchInProgress,this.searchClientResponseItems=[...t.searchClientResponseItems],this.searchResultsPage=t.searchResultsPage,this.searchResultsPerPage=t.searchResultsPerPage,this.searchTerm=t.searchTerm}renderEmptyState(){return d("div",{class:"searchcraft-search-results-empty-state"},d("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return d("div",{class:"searchcraft-search-results"},d("div",{class:"searchcraft-search-results-error-message"},d("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var r;const t=this.searchClientResponseItems||[];return d("div",{class:"searchcraft-search-results"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),t.map((a,n)=>d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:a,template:this.template})))}renderWithCustomAds(){var u,i,h,g,p,y,w,S;const t=[],r=((i=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((g=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:g.adInterstitialQuantity)||1,n=((y=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:y.adStartQuantity)||0,o=((S=(w=this.config)==null?void 0:w.customAdConfig)==null?void 0:S.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let R=0;R<n;R++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${R}-ad`,renderPosition:"top"}));c.forEach((R,L)=>{if(r&&L%r===0&&L+r<c.length&&L>=r)for(let E=0;E<a;E++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${R.id}-ad-${E}`,renderPosition:"interstitial"}));t.push(d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:R.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+L,index:L,item:R,template:this.template}))});for(let R=0;R<o;R++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${R}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-search-results"},t)}renderWithNativoAds(){var i,h,g,p,y,w,S,R,L,E;const t=[],r=((h=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:h.adInterstialStartIndex)||0,a=((p=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((w=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:w.adInterstitialQuantity)||1,o=((R=(S=this.config)==null?void 0:S.nativoConfig)==null?void 0:R.adStartQuantity)||0,c=((E=(L=this.config)==null?void 0:L.nativoConfig)==null?void 0:E.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let k=0;k<o;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"top"}));u.forEach((k,x)=>{if(a&&(x+r)%a===0&&x+a<u.length&&x>=a)for(let F=0;F<n;F++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k.id}-ad-${F}`,renderPosition:"interstitial"}));t.push(d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:k.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+x,index:x,item:k,template:this.template}))});for(let k=0;k<c;k++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${k}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-search-results"},t)}renderWithNoAds(){const t=this.searchClientResponseItems||[];return d("div",{class:"searchcraft-search-results"},t.map((r,a)=>d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:r.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:r,template:this.template})))}render(){var r,a,n;const t=this.searchClientResponseItems||[];return t.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&t.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(r=this.config)!=null&&r.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(n=this.config)!=null&&n.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[772,"searchcraft-search-results",{searchcraftId:[1,"searchcraft-id"],initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Rl(){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,xl);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-error-message":customElements.get(e)||Lr();break;case"searchcraft-search-result":customElements.get(e)||Bn();break}})}const Cl=Rl,Tl=Y(class extends G{constructor(t){super();f(this,"caption");f(this,"disabled",!1);f(this,"inputId");f(this,"label");f(this,"labelId");f(this,"name");f(this,"options",[]);f(this,"selectChange");f(this,"searchResultsPerPage");f(this,"setSearchResultsPage",()=>{});f(this,"setSearchResultsPerPage",()=>{});f(this,"handleSelectChange",t=>{this.selectChange.emit(t.target.value)});t!==!1&&this.__registerHost(),this.selectChange=Ze(this,"selectChange")}handleGoToPage(t){this.setSearchResultsPage(t)}render(){return d("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&d("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),d("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},d("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:t,value:r,selected:a})=>d("option",{key:r,value:r,selected:a},t))),d("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),d("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&d("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[768,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Hn(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-select":customElements.get(e)||customElements.define(e,Tl);break}})}const El=Y(class extends G{constructor(t){super();f(this,"increment",20);f(this,"searchcraftId");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount");f(this,"searchClientRequestProperties");f(this,"initialSearchResultsPerPage");f(this,"setSearchResultsPerPage",()=>{});f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=t.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-search-results-per-page"},d("div",{class:"searchcraft-search-results-per-page-select"},d("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),d("div",{class:"searchcraft-search-results-per-page-select-input"},d("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,a)=>{const n=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${n}`,value:n}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[768,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchClientRequestProperties:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Al(){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,El);break;case"searchcraft-select":customElements.get(e)||Hn();break}})}const $l=Al,Pl=Hn,_l=yn,Il=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"summary","");f(this,"summaryErrorMessage","");f(this,"isLoading",!1);f(this,"isSummaryNotEnabled",!1);f(this,"unsubscribe");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.unsubscribe=t.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){this.isLoading=t.isSummaryLoading,this.isSummaryNotEnabled=t.isSummaryNotEnabled,this.summaryErrorMessage=t.summaryErrorMessage,this.summary=this.sanitizeMarkdown(t.summary)}sanitizeMarkdown(t){return xs.sanitize(W.parse(t))}renderContent(){return this.isLoading?d("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?d("div",{class:"searchcraft-summary-box-content"},this.summaryErrorMessage||"AI summaries are not enabled"):d("div",{class:"searchcraft-summary-box-content",innerHTML:this.summary})}render(){return d("div",{key:"a33091962cfbbcf0399e9e15e8346590511090e1",class:"searchcraft-summary-box"},this.renderContent())}},[768,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],summaryErrorMessage:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function Ml(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-summary-box":customElements.get(e)||customElements.define(e,Il);break;case"searchcraft-loading":customElements.get(e)||Or();break}})}const Ll=Ml;var Ol=`\uFEFF[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:8px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);gap:8px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:flex}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:flex}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-facet-list-wrapper{display:flex;flex-direction:column;width:100%;min-height:0}.searchcraft-facet-list-content{display:flex;flex-direction:column;gap:8px;min-height:0;flex-shrink:0}.searchcraft-facet-list-view-more{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:none;color:var(--sc-content-brand);cursor:pointer;padding:8px 0;text-align:left;text-decoration:underline}.searchcraft-facet-list-view-more:hover{color:var(--sc-surface-brand-primary-hover)}.searchcraft-facet-list-view-more:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}[data-toggle-facet-section]{cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;position:relative}[data-toggle-facet-section]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-facet-section][data-facet-section-collapsed]::after{transform:rotate(90deg)}[data-toggle-facet-section][data-facet-section-expanded]::after{transform:rotate(-90deg)}@media(max-width: 767px){[data-toggle-filter-panel]{cursor:pointer;display:flex !important;align-items:center;justify-content:space-between;width:100%}[data-toggle-filter-panel]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-filter-panel][data-filter-panel-collapsed]::after{transform:rotate(90deg)}[data-toggle-filter-panel][data-filter-panel-expanded]::after{transform:rotate(-90deg)}}@media(min-width: 768px){[data-toggle-filter-panel]{cursor:default}[data-toggle-filter-panel]::after{display:none}}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input.searchcraft-placeholder-hide-on-focus:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-button-magnifying-glass-icon-size: 20px;--sc-popover-button-magnifying-glass-icon-color: var(--sc-content-neutral-secondary);--sc-popover-button-magnifying-glass-icon-color-hover: var(--sc-content-brand);--sc-popover-button-magnifying-glass-padding: 12px}@media(min-width: 576px){:root{--sc-popover-button-magnifying-glass-padding: 16px}}.searchcraft-popover-button-magnifying-glass{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);cursor:pointer;display:flex;align-items:center;justify-content:center}.searchcraft-popover-button-magnifying-glass .searchcraft-popover-button-input{display:flex;align-items:center;justify-content:center;padding:var(--sc-popover-button-magnifying-glass-padding)}.searchcraft-popover-button-magnifying-glass .searchcraft-popover-button-input-search-icon{color:var(--sc-popover-button-magnifying-glass-icon-color);display:block;fill:none;stroke:currentcolor;stroke-width:1.5;width:var(--sc-popover-button-magnifying-glass-icon-size);height:var(--sc-popover-button-magnifying-glass-icon-size);transition:color .2s ease}.searchcraft-popover-button-magnifying-glass:hover .searchcraft-popover-button-input-search-icon{color:var(--sc-popover-button-magnifying-glass-icon-color-hover)}: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 searchcraft-results-summary,.searchcraft-popover-form searchcraft-summary-box{margin-bottom:16px}.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);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-modal-popover-list-view searchcraft-results-summary,.searchcraft-popover-form-modal-popover-list-view searchcraft-summary-box,.searchcraft-popover-form-fullscreen-popover-list-view searchcraft-results-summary,.searchcraft-popover-form-fullscreen-popover-list-view searchcraft-summary-box{padding:20px 0;margin-bottom:0;border-bottom:1px solid var(--sc-border-neutral-subtle)}.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-inline-wrapper searchcraft-results-summary,.searchcraft-popover-form-inline-wrapper searchcraft-summary-box{padding:16px 12px;margin-bottom:0;border-bottom:1px solid var(--sc-border-neutral-subtle)}.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;align-items:center;background-color:var(--sc-surface-neutral-secondary);display:flex;gap:.5rem;justify-content:space-between;line-height:1;padding:1.25rem 1.5rem}@media(min-width: 576px){.searchcraft-popover-footer{padding:1.25rem 2rem}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-results-found{display:none}@media(min-width: 576px){.searchcraft-popover-footer-results-found{display:inline}}.searchcraft-popover-footer-link{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-weight:var(--sc-font-bold);text-decoration:none;white-space:nowrap}.searchcraft-popover-footer-link-prefix{display:none;font-weight:var(--sc-font-normal)}@media(min-width: 576px){.searchcraft-popover-footer-link-prefix{display:inline}}.searchcraft-popover-footer-results{align-items:center;display:flex;gap:.5rem}.searchcraft-popover-footer-view-all{align-items:center;border-radius:999px;border:.0625rem solid var(--sc-border-neutral-strong);color:var(--sc-content-neutral-primary);display:inline-flex;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-bold);gap:.375rem;line-height:1;padding:.375rem .625rem;text-decoration:none}.searchcraft-popover-footer-view-all-shortcut{display:none}@media(min-width: 576px){.searchcraft-popover-footer-view-all-shortcut{display:inline-flex;gap:.125rem}.searchcraft-popover-footer-view-all-shortcut kbd{align-items:center;border-radius:.25rem;border:1px solid var(--sc-content-neutral-primary);display:flex;font-family:Helvetica,Arial,sans-serif;font-size:.75rem;font-style:normal;font-weight:400;height:1.5rem;justify-content:center;line-height:1rem;width:1.5rem}}: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-results-summary{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-results-summary h1,.searchcraft-results-summary h2,.searchcraft-results-summary h3,.searchcraft-results-summary h4,.searchcraft-results-summary h5{padding-top:10px;padding-bottom:10px}.searchcraft-results-summary p{padding-bottom:10px}.searchcraft-results-summary img{max-width:200px}.searchcraft-results-summary ol,.searchcraft-results-summary ul{padding-left:1em;padding-bottom:10px}.searchcraft-results-summary a{color:var(--sc-content-brand)}.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{display:flex;flex-direction:column;align-items:center;gap:12px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}.searchcraft-loading-dots{display:flex;gap:8px;align-items:center;height:40px}.searchcraft-loading-dots>div{width:10px;height:10px;border-radius:50%;background-color:var(--sc-surface-brand-primary);animation:searchcraft-jump .6s ease-in-out infinite}.searchcraft-loading-dots .searchcraft-loading-dot-2{animation-delay:.15s}.searchcraft-loading-dots .searchcraft-loading-dot-3{animation-delay:.3s}.searchcraft-loading-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);letter-spacing:2px;color:#828282;margin:0}@keyframes searchcraft-jump{0%{transform:translateY(0);animation-timing-function:cubic-bezier(0.33, 1, 0.68, 1)}50%{transform:translateY(-20px);animation-timing-function:cubic-bezier(0.32, 0, 0.67, 0)}100%{transform:translateY(0)}}/*# sourceMappingURL=hologram.css.map */
67
- `;const Fl=Y(class extends G{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return d("style",{key:"ef26626cdfa4fa98d516802d71443c49a9c6ecf9"},Ol)}},[256,"searchcraft-theme"]);function Dl(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(e=>{switch(e){case"searchcraft-theme":customElements.get(e)||customElements.define(e,Fl);break}})}const Nl=Dl,zl=wn,qn=()=>{tc(),sc(),nc(),cc(),pc(),bc(),vc(),wc(),xc(),Tc(),Ec(),pl(),ml(),gl(),yl(),wl(),Sl(),$l(),Cl(),Pl(),_l(),Ll(),Nl(),zl()};globalThis.__scDefineCustomElements__=qn;var se;(function(s){s[s.DEBUG=0]="DEBUG",s[s.INFO=1]="INFO",s[s.WARN=2]="WARN",s[s.ERROR=3]="ERROR",s[s.NONE=4]="NONE"})(se||(se={}));class Ul{constructor(e){f(this,"logLevel");f(this,"logFormatter");this.logLevel=e.logLevel||se.INFO,this.logFormatter=e.logFormatter||this.defaultFormatter}defaultFormatter(e,t){return`[${se[e]}] ${new Date().toISOString()}: ${t}`}debug(e){this.logLevel<=se.DEBUG&&console.log(this.logFormatter(se.DEBUG,e))}info(e){this.logLevel<=se.INFO&&console.info(this.logFormatter(se.INFO,e))}warn(e){this.logLevel<=se.WARN&&console.warn(this.logFormatter(se.WARN,e))}error(e){this.logLevel<=se.ERROR&&console.error(this.logFormatter(se.ERROR,e))}log(e,t){switch(e){case se.DEBUG:this.debug(t);break;case se.INFO:this.info(t);break;case se.WARN:this.warn(t);break;case se.ERROR:this.error(t);break}}}const qr=new Ul({logLevel:se.NONE});function Be(s,e,t,r){return new(t||(t=Promise))(function(a,n){function o(i){try{u(r.next(i))}catch(h){n(h)}}function c(i){try{u(r.throw(i))}catch(h){n(h)}}function u(i){var h;i.done?a(i.value):(h=i.value,h instanceof t?h:new t(function(g){g(h)})).then(o,c)}u((r=r.apply(s,[])).next())})}function He(s,e){var t,r,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(u){return function(i){return function(h){if(t)throw new TypeError("Generator is already executing.");for(;n&&(n=0,h[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&h[0]?r.return:h[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,h[1])).done)return a;switch(r=0,a&&(h=[2&h[0],a.value]),h[0]){case 0:case 1:a=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]<a[3])){o.label=h[1];break}if(h[0]===6&&o.label<a[1]){o.label=a[1],a=h;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(h);break}a[2]&&o.ops.pop(),o.trys.pop();continue}h=e.call(s,o)}catch(g){h=[6,g],r=0}finally{t=a=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([u,i])}}}typeof SuppressedError=="function"&&SuppressedError;var qe={exclude:[]},Wn={},Bl={timeout:"true"},_e=function(s,e){typeof window<"u"&&(Wn[s]=e)},Hl=function(){return Object.fromEntries(Object.entries(Wn).filter(function(s){var e,t=s[0];return!(!((e=qe==null?void 0:qe.exclude)===null||e===void 0)&&e.includes(t))}).map(function(s){return[s[0],(0,s[1])()]}))};function Wr(s){return s^=s>>>16,s=Math.imul(s,2246822507),s^=s>>>13,s=Math.imul(s,3266489909),(s^=s>>>16)>>>0}var ae=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Ae(s,e){return s<<e|s>>>32-e}function Ys(s,e){var t;if(e===void 0&&(e=0),e=e?0|e:0,typeof s=="string"&&(t=s,s=new TextEncoder().encode(t).buffer),!(s instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var r=new Uint32Array([e,e,e,e]);(function(n,o){for(var c=n.byteLength/16|0,u=new Uint32Array(n,0,4*c),i=0;i<c;i++){var h=u.subarray(4*i,4*(i+1));h[0]=Math.imul(h[0],ae[0]),h[0]=Ae(h[0],15),h[0]=Math.imul(h[0],ae[1]),o[0]=o[0]^h[0],o[0]=Ae(o[0],19),o[0]=o[0]+o[1],o[0]=Math.imul(o[0],5)+1444728091,h[1]=Math.imul(h[1],ae[1]),h[1]=Ae(h[1],16),h[1]=Math.imul(h[1],ae[2]),o[1]=o[1]^h[1],o[1]=Ae(o[1],17),o[1]=o[1]+o[2],o[1]=Math.imul(o[1],5)+197830471,h[2]=Math.imul(h[2],ae[2]),h[2]=Ae(h[2],17),h[2]=Math.imul(h[2],ae[3]),o[2]=o[2]^h[2],o[2]=Ae(o[2],15),o[2]=o[2]+o[3],o[2]=Math.imul(o[2],5)+2530024501,h[3]=Math.imul(h[3],ae[3]),h[3]=Ae(h[3],18),h[3]=Math.imul(h[3],ae[0]),o[3]=o[3]^h[3],o[3]=Ae(o[3],13),o[3]=o[3]+o[0],o[3]=Math.imul(o[3],5)+850148119}})(s,r),function(n,o){var c=n.byteLength/16|0,u=n.byteLength%16,i=new Uint32Array(4),h=new Uint8Array(n,16*c,u);switch(u){case 15:i[3]=i[3]^h[14]<<16;case 14:i[3]=i[3]^h[13]<<8;case 13:i[3]=i[3]^h[12]<<0,i[3]=Math.imul(i[3],ae[3]),i[3]=Ae(i[3],18),i[3]=Math.imul(i[3],ae[0]),o[3]=o[3]^i[3];case 12:i[2]=i[2]^h[11]<<24;case 11:i[2]=i[2]^h[10]<<16;case 10:i[2]=i[2]^h[9]<<8;case 9:i[2]=i[2]^h[8]<<0,i[2]=Math.imul(i[2],ae[2]),i[2]=Ae(i[2],17),i[2]=Math.imul(i[2],ae[3]),o[2]=o[2]^i[2];case 8:i[1]=i[1]^h[7]<<24;case 7:i[1]=i[1]^h[6]<<16;case 6:i[1]=i[1]^h[5]<<8;case 5:i[1]=i[1]^h[4]<<0,i[1]=Math.imul(i[1],ae[1]),i[1]=Ae(i[1],16),i[1]=Math.imul(i[1],ae[2]),o[1]=o[1]^i[1];case 4:i[0]=i[0]^h[3]<<24;case 3:i[0]=i[0]^h[2]<<16;case 2:i[0]=i[0]^h[1]<<8;case 1:i[0]=i[0]^h[0]<<0,i[0]=Math.imul(i[0],ae[0]),i[0]=Ae(i[0],15),i[0]=Math.imul(i[0],ae[1]),o[0]=o[0]^i[0]}}(s,r),function(n,o){o[0]=o[0]^n.byteLength,o[1]=o[1]^n.byteLength,o[2]=o[2]^n.byteLength,o[3]=o[3]^n.byteLength,o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0,o[0]=Wr(o[0]),o[1]=Wr(o[1]),o[2]=Wr(o[2]),o[3]=Wr(o[3]),o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0}(s,r);var a=new Uint8Array(r.buffer);return Array.from(a).map(function(n){return n.toString(16).padStart(2,"0")}).join("")}function ql(s,e){return new Promise(function(t){setTimeout(function(){return t(e)},s)})}function Wl(s,e,t){return Promise.all(s.map(function(r){return Promise.race([r,ql(e,t)])}))}function Vl(){return Be(this,void 0,void 0,function(){var s,e,t,r,a;return He(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),s=Hl(),e=Object.keys(s),[4,Wl(Object.values(s),(qe==null?void 0:qe.timeout)||1e3,Bl)];case 1:return t=n.sent(),r=t.filter(function(o){return o!==void 0}),a={},r.forEach(function(o,c){a[e[c]]=o}),[2,Vn(a,qe.exclude||[])];case 2:throw n.sent();case 3:return[2]}})})}function Vn(s,e){var t={},r=function(n){if(s.hasOwnProperty(n)){var o=s[n];if(typeof o!="object"||Array.isArray(o))e.includes(n)||(t[n]=o);else{var c=Vn(o,e.map(function(u){return u.startsWith(n+".")?u.slice(n.length+1):u}));Object.keys(c).length>0&&(t[n]=c)}}};for(var a in s)r(a);return t}function jl(s){return Be(this,void 0,void 0,function(){var e,t;return He(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Vl()];case 1:return e=r.sent(),t=Ys(JSON.stringify(e)),[2,t.toString()];case 2:throw r.sent();case 3:return[2]}})})}function Gl(s){for(var e=0,t=0;t<s.length;++t)e+=Math.abs(s[t]);return e}function jn(s,e,t){for(var r=[],a=0;a<s[0].data.length;a++){for(var n=[],o=0;o<s.length;o++)n.push(s[o].data[a]);r.push(Yl(n))}var c=new Uint8ClampedArray(r);return new ImageData(c,e,t)}function Yl(s){if(s.length===0)return 0;for(var e={},t=0,r=s;t<r.length;t++)e[n=r[t]]=(e[n]||0)+1;var a=s[0];for(var n in e)e[n]>e[a]&&(a=parseInt(n,10));return a}function Yt(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var s=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},t=0,r=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];t<r.length;t++){var a=r[t],n=s.match(a);if(n&&n.groups)return{name:e[n.groups.name]||n.groups.name,version:n.groups.version}}return{name:"unknown",version:"unknown"}}_e("audio",function(){return Be(this,void 0,void 0,function(){return He(this,function(s){return[2,new Promise(function(e,t){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=r.createBufferSource(),n=r.createOscillator();n.frequency.value=1e3;var o,c=r.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,n.connect(c),c.connect(r.destination),n.start(),r.oncomplete=function(u){o=u.renderedBuffer.getChannelData(0),e({sampleHash:Gl(o),oscillator:n.type,maxChannels:r.destination.maxChannelCount,channelCountMode:a.channelCountMode})},r.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),t(u)}})]})})});var Ql=Yt().name!=="SamsungBrowser"?1:3,Gn=280,Yn=20;Yt().name!="Firefox"&&_e("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(s){var e=Array.from({length:Ql},function(){return function(){var t=document.createElement("canvas"),r=t.getContext("2d");if(!r)return new ImageData(1,1);t.width=Gn,t.height=Yn;var a=r.createLinearGradient(0,0,t.width,t.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),r.fillStyle=a,r.fillRect(0,0,t.width,t.height);var n="Random Text WMwmil10Oo";r.font="23.123px Arial",r.fillStyle="black",r.fillText(n,-5,15),r.fillStyle="rgba(0, 0, 255, 0.5)",r.fillText(n,-3.3,17.7),r.beginPath(),r.moveTo(0,0),r.lineTo(2*t.width/7,t.height),r.strokeStyle="white",r.lineWidth=2,r.stroke();var o=r.getImageData(0,0,t.width,t.height);return o}()});s({commonImageDataHash:Ys(jn(e,Gn,Yn).data.toString()).toString()})})});var Qs,Xl=["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"],Kl=["monospace","sans-serif","serif"];function Qn(s,e){if(!s)throw new Error("Canvas context not supported");return s.font="72px ".concat(e),s.measureText("WwMmLli0Oo").width}function Zl(){var s,e=document.createElement("canvas"),t=(s=e.getContext("webgl"))!==null&&s!==void 0?s:e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var r=(t.getParameter(t.VENDOR)||"").toString(),a=(t.getParameter(t.RENDERER)||"").toString(),n={vendor:r,renderer:a,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!r.length){var o=t.getExtension("WEBGL_debug_renderer_info");if(o){var c=(t.getParameter(o.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(t.getParameter(o.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(n.vendorUnmasked=c),u&&(n.rendererUnmasked=u)}}return n}catch{}return"undefined"}function Jl(){var s=new Float32Array(1),e=new Uint8Array(s.buffer);return s[0]=1/0,s[0]=s[0]-s[0],e[3]}function eu(s,e){var t={};return e.forEach(function(r){var a=function(n){if(n.length===0)return null;var o={};n.forEach(function(i){var h=String(i);o[h]=(o[h]||0)+1});var c=n[0],u=1;return Object.keys(o).forEach(function(i){o[i]>u&&(c=i,u=o[i])}),c}(s.map(function(n){return r in n?n[r]:void 0}).filter(function(n){return n!==void 0}));a&&(t[r]=a)}),t}function tu(){var s=[],e={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(e).forEach(function(t){e[t].forEach(function(r){matchMedia("(".concat(t,": ").concat(r,")")).matches&&s.push("".concat(t,": ").concat(r))})}),s}function ru(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var s=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(s(e))return e}catch{return 0}return 0}Yt().name!="Firefox"&&_e("fonts",function(){var s=this;return new Promise(function(e,t){try{(function(r){var a;Be(this,void 0,void 0,function(){var n,o,c;return He(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(i=50,new Promise(function(g){return setTimeout(g,i,h)}))];case 1:return u.sent(),[3,0];case 2:if((n=document.createElement("iframe")).setAttribute("frameBorder","0"),(o=n.style).setProperty("position","fixed"),o.setProperty("display","block","important"),o.setProperty("visibility","visible"),o.setProperty("border","0"),o.setProperty("opacity","0"),n.src="about:blank",document.body.appendChild(n),!(c=n.contentDocument||((a=n.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return r({iframe:c}),setTimeout(function(){document.body.removeChild(n)},0),[2]}var i,h})})})(function(r){var a=r.iframe;return Be(s,void 0,void 0,function(){var n,o,c,u;return He(this,function(i){return n=a.createElement("canvas"),o=n.getContext("2d"),c=Kl.map(function(h){return Qn(o,h)}),u={},Xl.forEach(function(h){var g=Qn(o,h);c.includes(g)||(u[h]=g)}),e(u),[2]})})})}catch{t({error:"unsupported"})}})}),_e("hardware",function(){return new Promise(function(s,e){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,r=window.performance&&window.performance.memory?window.performance.memory:0;s({videocard:Zl(),architecture:Jl(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:r.jsHeapSizeLimit||0})})}),_e("locales",function(){return new Promise(function(s){s({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),_e("permissions",function(){return Be(this,void 0,void 0,function(){var s;return He(this,function(e){return Qs=(qe==null?void 0:qe.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],s=Array.from({length:(qe==null?void 0:qe.retries)||3},function(){return function(){return Be(this,void 0,void 0,function(){var t,r,a,n,o;return He(this,function(c){switch(c.label){case 0:t={},r=0,a=Qs,c.label=1;case 1:if(!(r<a.length))return[3,6];n=a[r],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:n})];case 3:return o=c.sent(),t[n]=o.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return r++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(s).then(function(t){return eu(t,Qs)})]})})}),_e("plugins",function(){var s=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var t=navigator.plugins[e];s.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(r){r({plugins:s})})}),_e("screen",function(){return new Promise(function(s){s({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:tu()})})}),_e("system",function(){return new Promise(function(s){var e=Yt();s({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:ru()})})});var de,su=Yt().name!=="SamsungBrowser"?1:3,T=null;_e("webgl",function(){return Be(this,void 0,void 0,function(){var s;return He(this,function(e){typeof document<"u"&&((de=document.createElement("canvas")).width=200,de.height=100,T=de.getContext("webgl"));try{if(!T)throw new Error("WebGL not supported");return s=Array.from({length:su},function(){return function(){try{if(!T)throw new Error("WebGL not supported");var t=`
66
+ Please report this to https://github.com/markedjs/marked.`,s){const r="<p>An error occurred:</p><pre>"+Ne(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},ot=new hl;function W(s,e){return ot.parse(s,e)}W.options=W.setOptions=function(s){return ot.setOptions(s),W.defaults=ot.defaults,xn(W.defaults),W},W.getDefaults=Ns,W.defaults=nt,W.use=function(...s){return ot.use(...s),W.defaults=ot.defaults,xn(W.defaults),W},W.walkTokens=function(s,e){return ot.walkTokens(s,e)},W.parseInline=ot.parseInline,W.Parser=tt,W.parser=tt.parse,W.Renderer=Br,W.TextRenderer=Gs,W.Lexer=et,W.lexer=et.lex,W.Tokenizer=Ur,W.Hooks=Hr,W.parse=W;const fl=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"summary","");f(this,"summaryErrorMessage","");f(this,"isLoading",!1);f(this,"isSummaryNotEnabled",!1);f(this,"unsubscribe");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.handleStateChange(t.store.getState()),this.unsubscribe=t.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){this.isLoading=t.isSummaryLoading,this.isSummaryNotEnabled=t.isSummaryNotEnabled,this.summaryErrorMessage=t.summaryErrorMessage,this.summary=this.sanitizeMarkdown(t.summary)}sanitizeMarkdown(t){return xs.sanitize(W.parse(t))}renderContent(){return this.isLoading?d("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?d("div",{class:"searchcraft-results-summary-content"},this.summaryErrorMessage||"AI summaries are not enabled"):d("div",{class:"searchcraft-results-summary-content",innerHTML:this.summary,"aria-live":"polite"})}render(){return d("div",{key:"aca6fe712c108fd3cb886be7dacfb763d2df8a92",class:"searchcraft-results-summary"},this.renderContent())}},[768,"searchcraft-results-summary",{searchcraftId:[1,"searchcraft-id"],summary:[32],summaryErrorMessage:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function zn(){if(typeof customElements>"u")return;["searchcraft-results-summary","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-results-summary":customElements.get(e)||customElements.define(e,fl);break;case"searchcraft-loading":customElements.get(e)||Or();break}})}const dl=Y(class extends G{constructor(t){super();f(this,"type","inline");f(this,"popoverResultMappings");f(this,"hotkey","k");f(this,"hotkeyModifier","meta");f(this,"searchcraftId");f(this,"placeholderValue","Enter Search");f(this,"placeholderBehavior");f(this,"viewAllResultsBaseUrl");f(this,"viewAllResultsLabel");f(this,"showSummaryBox",!1);f(this,"sdkVariant","js");f(this,"isPopoverVisibleInState",!1);f(this,"searchClientResponseItems",[]);f(this,"adClientResponseItems",[]);f(this,"searchTerm");f(this,"isFocused",!1);f(this,"breakpointSm",576);f(this,"breakpointMd",768);f(this,"breakpointLg",992);f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"modalElement");f(this,"unsubscribe");f(this,"cleanupCore");f(this,"core");f(this,"handleDocumentClick",t=>{this.hostElement.contains(t.target)||(this.isFocused=!1)});f(this,"handleDocumentKeyDown",t=>{var r;if(t.key===this.hotkey&&this.handleHotkeyPressed(t),!!this.hostElement.contains(document.activeElement))switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.focusOnNextListItem(t.key);break;case"Escape":(r=this.core)==null||r.store.getState().setPopoverVisibility(!1);break;case"Enter":(t.metaKey||t.ctrlKey)&&this.viewAllResultsHref&&this.hasResultsToShow&&(t.preventDefault(),this.navigateToViewAllResults());break;default:return}});f(this,"handleInputInit",()=>{const t=this.hostElement.querySelector(".searchcraft-input-form-input");t==null||t.focus()});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t;const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=t.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=t.store.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage}),t.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(t){this.isPopoverVisibleInState=t,document.body.style.overflow=t?"hidden":"auto"}handleInputFocus(){var t;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((t=this.core)==null||t.store.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),this.modalElement.setAttribute("searchcraft-id",this.searchcraftId),this.placeholderValue&&this.modalElement.setAttribute("placeholder-value",this.placeholderValue),this.placeholderBehavior&&this.modalElement.setAttribute("placeholder-behavior",this.placeholderBehavior),this.viewAllResultsBaseUrl&&this.modalElement.setAttribute("view-all-results-base-url",this.viewAllResultsBaseUrl),this.viewAllResultsLabel&&this.modalElement.setAttribute("view-all-results-label",this.viewAllResultsLabel),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(t){var r;(r=this.core)==null||r.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(t){var r;if(t.ctrlKey&&this.hotkeyModifier==="ctrl"||t.altKey&&this.hotkeyModifier==="alt"||t.metaKey&&this.hotkeyModifier==="meta")if(t.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(r=this.core)==null||r.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var t;(t=this.core)==null||t.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(t){var n,o;const r=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=r.indexOf(document.activeElement);if(t==="ArrowDown")(n=r[(a+1)%r.length])==null||n.focus();else if(t==="ArrowUp")if(a>=1)(o=r[a-1])==null||o.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var t,r;return this.searchTerm&&((r=(t=this.searchTerm)==null?void 0:t.trim())==null?void 0:r.length)>0&&this.searchClientResponseItems.length>0}get viewAllResultsHref(){var a;const t=this.viewAllResultsBaseUrl;if(!t)return;const r=(a=this.searchTerm)==null?void 0:a.trim();return r?`${t}${encodeURIComponent(r).replace(/%20/g,"+")}`:t}get resolvedViewAllResultsLabel(){return this.viewAllResultsLabel??"View All"}navigateToViewAllResults(){const t=this.viewAllResultsHref;!t||!this.hasResultsToShow||typeof window<"u"&&(window.location.href=t)}renderInlinePopover(){const t=this.hasResultsToShow&&this.isFocused;return d("div",{class:ve("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":t})},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),t&&d("div",{class:"searchcraft-popover-form-inline-wrapper"},d("div",{class:"searchcraft-popover-form-inline-scroll-area"},this.showSummaryBox&&d("searchcraft-results-summary",{searchcraftId:this.searchcraftId}),d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId,sdkVariant:this.sdkVariant,viewAllResultsHref:this.viewAllResultsHref,viewAllResultsLabel:this.resolvedViewAllResultsLabel})))}renderModalPopover(){if(this.isPopoverVisibleInState)return d("div",{class:ve("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},d("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),d("div",{class:"searchcraft-popover-form-modal-wrapper"},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),d("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.showSummaryBox&&this.hasResultsToShow&&d("searchcraft-results-summary",{searchcraftId:this.searchcraftId}),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId,sdkVariant:this.sdkVariant,viewAllResultsHref:this.viewAllResultsHref,viewAllResultsLabel:this.resolvedViewAllResultsLabel})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return d("div",{class:ve("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},d("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),d("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),d("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.showSummaryBox&&this.hasResultsToShow&&d("searchcraft-results-summary",{searchcraftId:this.searchcraftId}),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),d("searchcraft-popover-footer",{searchcraftId:this.searchcraftId,sdkVariant:this.sdkVariant,viewAllResultsHref:this.viewAllResultsHref,viewAllResultsLabel:this.resolvedViewAllResultsLabel}))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[768,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],viewAllResultsBaseUrl:[1,"view-all-results-base-url"],viewAllResultsLabel:[1,"view-all-results-label"],showSummaryBox:[4,"show-summary-box"],sdkVariant:[1,"sdk-variant"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function Un(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-loading","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view","searchcraft-results-summary"].forEach(e=>{switch(e){case"searchcraft-popover-form":customElements.get(e)||customElements.define(e,dl);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-button":customElements.get(e)||Mr();break;case"searchcraft-error-message":customElements.get(e)||Lr();break;case"searchcraft-input-form":customElements.get(e)||Sn();break;case"searchcraft-input-label":customElements.get(e)||Fs();break;case"searchcraft-loading":customElements.get(e)||Or();break;case"searchcraft-popover-footer":customElements.get(e)||mn();break;case"searchcraft-popover-form":customElements.get(e)||Un();break;case"searchcraft-popover-list-item":customElements.get(e)||Ds();break;case"searchcraft-popover-list-view":customElements.get(e)||kn();break;case"searchcraft-results-summary":customElements.get(e)||zn();break}})}const pl=Un,ml=Ds,gl=kn,bl=Y(class extends G{constructor(t){super();f(this,"template");f(this,"searchcraftId");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchClientRequestProperties");f(this,"count",0);f(this,"range",[0,0]);f(this,"responseTime","0");f(this,"unsubscribe",()=>{});f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";return!this.searchTerm&&!t||this.searchResultsCount===0?null:d("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:Dt}):`${en(this.count)} results found in ${this.responseTime}ms`)}},[768,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],count:[32],range:[32],responseTime:[32]}]);function vl(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(e=>{switch(e){case"searchcraft-results-info":customElements.get(e)||customElements.define(e,bl);break}})}const yl=vl,wl=zn,Sl=Y(class extends G{constructor(t){super();f(this,"item");f(this,"index");f(this,"documentPosition",0);f(this,"template");f(this,"searchcraftId");f(this,"templateHtml");f(this,"core");f(this,"cleanupCore");f(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 n=this.documentPosition,o=this.core.store.getState().searchTerm,c=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:n,number_of_documents:c,search_term:o})});f(this,"handleKeyDown",()=>{});t!==!1&&this.__registerHost()}get hostElement(){return this}onCoreAvailable(t){this.core=t}connectedCallback(){var t;if(this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(t=this.template)==null?void 0:t.call(this,this.item.document,this.index,{html:Dt,source_index:this.item.source_index})}catch(r){console.error("Invalid search result template:",r)}}disconnectedCallback(){var t;(t=this.cleanupCore)==null||t.call(this)}render(){if(this.item)return typeof this.template>"u"?d("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([t,r])=>d("p",{key:t},d("strong",null,t),": ",r))):d("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[768,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function Bn(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(e=>{switch(e){case"searchcraft-search-result":customElements.get(e)||customElements.define(e,Sl);break}})}const kl=Bn,xl=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"initialQuery");f(this,"template");f(this,"adClientResponseItems",[]);f(this,"config");f(this,"isSearchInProgress",!0);f(this,"searchClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchTerm","");f(this,"unsubscribe");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){var a;const r=t.store.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(a=r.core)==null?void 0:a.config,this.unsubscribe=t.store.subscribe(n=>this.handleStateChange(n))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){var r;this.adClientResponseItems=[...t.adClientResponseItems],this.config=(r=t.core)==null?void 0:r.config,this.isSearchInProgress=t.isSearchInProgress,this.searchClientResponseItems=[...t.searchClientResponseItems],this.searchResultsPage=t.searchResultsPage,this.searchResultsPerPage=t.searchResultsPerPage,this.searchTerm=t.searchTerm}renderEmptyState(){return d("div",{class:"searchcraft-search-results-empty-state"},d("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return d("div",{class:"searchcraft-search-results"},d("div",{class:"searchcraft-search-results-error-message"},d("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var r;const t=this.searchClientResponseItems||[];return d("div",{class:"searchcraft-search-results"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),t.map((a,n)=>d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:a,template:this.template})))}renderWithCustomAds(){var u,i,h,g,p,y,w,k;const t=[],r=((i=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:i.adInterstitialInterval)||0,a=((g=(h=this.config)==null?void 0:h.customAdConfig)==null?void 0:g.adInterstitialQuantity)||1,n=((y=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:y.adStartQuantity)||0,o=((k=(w=this.config)==null?void 0:w.customAdConfig)==null?void 0:k.adEndQuantity)||0,c=this.searchClientResponseItems||[];for(let C=0;C<n;C++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${C}-ad`,renderPosition:"top"}));c.forEach((C,L)=>{if(r&&L%r===0&&L+r<c.length&&L>=r)for(let E=0;E<a;E++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${C.id}-ad-${E}`,renderPosition:"interstitial"}));t.push(d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:C.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+L,index:L,item:C,template:this.template}))});for(let C=0;C<o;C++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${C}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-search-results"},t)}renderWithNativoAds(){var i,h,g,p,y,w,k,C,L,E;const t=[],r=((h=(i=this.config)==null?void 0:i.nativoConfig)==null?void 0:h.adInterstialStartIndex)||0,a=((p=(g=this.config)==null?void 0:g.nativoConfig)==null?void 0:p.adInterstitialInterval)||0,n=((w=(y=this.config)==null?void 0:y.nativoConfig)==null?void 0:w.adInterstitialQuantity)||1,o=((C=(k=this.config)==null?void 0:k.nativoConfig)==null?void 0:C.adStartQuantity)||0,c=((E=(L=this.config)==null?void 0:L.nativoConfig)==null?void 0:E.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let S=0;S<o;S++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"top"}));u.forEach((S,x)=>{if(a&&(x+r)%a===0&&x+a<u.length&&x>=a)for(let F=0;F<n;F++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S.id}-ad-${F}`,renderPosition:"interstitial"}));t.push(d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:S.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+x,index:x,item:S,template:this.template}))});for(let S=0;S<c;S++)t.push(d("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${S}-ad`,renderPosition:"bottom"}));return d("div",{class:"searchcraft-search-results"},t)}renderWithNoAds(){const t=this.searchClientResponseItems||[];return d("div",{class:"searchcraft-search-results"},t.map((r,a)=>d("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:r.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:r,template:this.template})))}render(){var r,a,n;const t=this.searchClientResponseItems||[];return t.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&t.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(r=this.config)!=null&&r.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(n=this.config)!=null&&n.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[772,"searchcraft-search-results",{searchcraftId:[1,"searchcraft-id"],initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Cl(){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,xl);break;case"searchcraft-ad":customElements.get(e)||$r();break;case"searchcraft-error-message":customElements.get(e)||Lr();break;case"searchcraft-search-result":customElements.get(e)||Bn();break}})}const Rl=Cl,Tl=Y(class extends G{constructor(t){super();f(this,"caption");f(this,"disabled",!1);f(this,"inputId");f(this,"label");f(this,"labelId");f(this,"name");f(this,"options",[]);f(this,"selectChange");f(this,"searchResultsPerPage");f(this,"setSearchResultsPage",()=>{});f(this,"setSearchResultsPerPage",()=>{});f(this,"handleSelectChange",t=>{this.selectChange.emit(t.target.value)});t!==!1&&this.__registerHost(),this.selectChange=Ze(this,"selectChange")}handleGoToPage(t){this.setSearchResultsPage(t)}render(){return d("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&d("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),d("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},d("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:t,value:r,selected:a})=>d("option",{key:r,value:r,selected:a},t))),d("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),d("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&d("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[768,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Hn(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(e=>{switch(e){case"searchcraft-select":customElements.get(e)||customElements.define(e,Tl);break}})}const El=Y(class extends G{constructor(t){super();f(this,"increment",20);f(this,"searchcraftId");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount");f(this,"searchClientRequestProperties");f(this,"initialSearchResultsPerPage");f(this,"setSearchResultsPerPage",()=>{});f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){this.unsubscribe=t.store.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchClientRequestProperties=r.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=t.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}render(){const t=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!t||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-search-results-per-page"},d("div",{class:"searchcraft-search-results-per-page-select"},d("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),d("div",{class:"searchcraft-search-results-per-page-select-input"},d("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,a)=>{const n=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${n}`,value:n}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[768,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchClientRequestProperties:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Al(){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,El);break;case"searchcraft-select":customElements.get(e)||Hn();break}})}const $l=Al,Pl=Hn,_l=yn,Il=Y(class extends G{constructor(t){super();f(this,"searchcraftId");f(this,"summary","");f(this,"summaryErrorMessage","");f(this,"isLoading",!1);f(this,"isSummaryNotEnabled",!1);f(this,"unsubscribe");f(this,"cleanupCore");t!==!1&&this.__registerHost()}onCoreAvailable(t){t.store.setState({hasSummaryBox:!0}),this.unsubscribe=t.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=re.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var t,r;(t=this.unsubscribe)==null||t.call(this),(r=this.cleanupCore)==null||r.call(this)}handleStateChange(t){this.isLoading=t.isSummaryLoading,this.isSummaryNotEnabled=t.isSummaryNotEnabled,this.summaryErrorMessage=t.summaryErrorMessage,this.summary=this.sanitizeMarkdown(t.summary)}sanitizeMarkdown(t){return xs.sanitize(W.parse(t))}renderContent(){return this.isLoading?d("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?d("div",{class:"searchcraft-summary-box-content"},this.summaryErrorMessage||"AI summaries are not enabled"):d("div",{class:"searchcraft-summary-box-content",innerHTML:this.summary})}render(){return d("div",{key:"a33091962cfbbcf0399e9e15e8346590511090e1",class:"searchcraft-summary-box"},this.renderContent())}},[768,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],summaryErrorMessage:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function Ml(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(e=>{switch(e){case"searchcraft-summary-box":customElements.get(e)||customElements.define(e,Il);break;case"searchcraft-loading":customElements.get(e)||Or();break}})}const Ll=Ml;var Ol=`\uFEFF[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:8px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);gap:8px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:flex}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:flex}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-facet-list-wrapper{display:flex;flex-direction:column;width:100%;min-height:0}.searchcraft-facet-list-content{display:flex;flex-direction:column;gap:8px;min-height:0;flex-shrink:0}.searchcraft-facet-list-view-more{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:none;color:var(--sc-content-brand);cursor:pointer;padding:8px 0;text-align:left;text-decoration:underline}.searchcraft-facet-list-view-more:hover{color:var(--sc-surface-brand-primary-hover)}.searchcraft-facet-list-view-more:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}[data-toggle-facet-section]{cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;position:relative}[data-toggle-facet-section]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-facet-section][data-facet-section-collapsed]::after{transform:rotate(90deg)}[data-toggle-facet-section][data-facet-section-expanded]::after{transform:rotate(-90deg)}@media(max-width: 767px){[data-toggle-filter-panel]{cursor:pointer;display:flex !important;align-items:center;justify-content:space-between;width:100%}[data-toggle-filter-panel]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-filter-panel][data-filter-panel-collapsed]::after{transform:rotate(90deg)}[data-toggle-filter-panel][data-filter-panel-expanded]::after{transform:rotate(-90deg)}}@media(min-width: 768px){[data-toggle-filter-panel]{cursor:default}[data-toggle-filter-panel]::after{display:none}}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input.searchcraft-placeholder-hide-on-focus:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-button-magnifying-glass-icon-size: 20px;--sc-popover-button-magnifying-glass-icon-color: var(--sc-content-neutral-secondary);--sc-popover-button-magnifying-glass-icon-color-hover: var(--sc-content-brand);--sc-popover-button-magnifying-glass-padding: 12px}@media(min-width: 576px){:root{--sc-popover-button-magnifying-glass-padding: 16px}}.searchcraft-popover-button-magnifying-glass{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);cursor:pointer;display:flex;align-items:center;justify-content:center}.searchcraft-popover-button-magnifying-glass .searchcraft-popover-button-input{display:flex;align-items:center;justify-content:center;padding:var(--sc-popover-button-magnifying-glass-padding)}.searchcraft-popover-button-magnifying-glass .searchcraft-popover-button-input-search-icon{color:var(--sc-popover-button-magnifying-glass-icon-color);display:block;fill:none;stroke:currentcolor;stroke-width:1.5;width:var(--sc-popover-button-magnifying-glass-icon-size);height:var(--sc-popover-button-magnifying-glass-icon-size);transition:color .2s ease}.searchcraft-popover-button-magnifying-glass:hover .searchcraft-popover-button-input-search-icon{color:var(--sc-popover-button-magnifying-glass-icon-color-hover)}: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 searchcraft-results-summary,.searchcraft-popover-form searchcraft-summary-box{margin-bottom:16px}.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);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-modal-popover-list-view searchcraft-results-summary,.searchcraft-popover-form-modal-popover-list-view searchcraft-summary-box,.searchcraft-popover-form-fullscreen-popover-list-view searchcraft-results-summary,.searchcraft-popover-form-fullscreen-popover-list-view searchcraft-summary-box{padding:20px 0;margin-bottom:0;border-bottom:1px solid var(--sc-border-neutral-subtle)}.searchcraft-popover-form-modal-popover-list-view searchcraft-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view searchcraft-popover-list-view{overflow:visible;height:auto}.searchcraft-popover-form-inline{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{background-color:var(--sc-surface-neutral-primary);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-inline-wrapper searchcraft-results-summary,.searchcraft-popover-form-inline-wrapper searchcraft-summary-box{padding:16px 12px;margin-bottom:0;border-bottom:1px solid var(--sc-border-neutral-subtle)}.searchcraft-popover-form-inline-scroll-area{flex:1;min-height:0;overflow:auto;padding:0 12px}.searchcraft-popover-form-inline-scroll-area searchcraft-popover-list-view{overflow:visible;height:auto;padding:0}.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;font-size:1rem;align-items:center;background-color:var(--sc-surface-neutral-secondary);display:flex;gap:.5rem;justify-content:space-between;line-height:1;padding:1.25rem 1.5rem}@media(min-width: 576px){.searchcraft-popover-footer{padding:1.25rem 2rem}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-results-found{display:none}@media(min-width: 576px){.searchcraft-popover-footer-results-found{display:inline}}.searchcraft-popover-footer-link{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-weight:var(--sc-font-bold);text-decoration:none;white-space:nowrap}.searchcraft-popover-footer-link-prefix{display:none;font-weight:var(--sc-font-normal)}@media(min-width: 576px){.searchcraft-popover-footer-link-prefix{display:inline}}.searchcraft-popover-footer-results{align-items:center;display:flex;gap:.5rem}.searchcraft-popover-footer-view-all{align-items:center;border-radius:999px;border:.0625rem solid var(--sc-border-neutral-strong);color:var(--sc-content-neutral-primary);display:inline-flex;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-bold);gap:.375rem;line-height:1;padding:.375rem .625rem;text-decoration:none}.searchcraft-popover-footer-view-all-shortcut{display:none}@media(min-width: 576px){.searchcraft-popover-footer-view-all-shortcut{display:inline-flex;gap:.125rem}.searchcraft-popover-footer-view-all-shortcut kbd{align-items:center;border-radius:.25rem;border:1px solid var(--sc-content-neutral-primary);display:flex;font-family:Helvetica,Arial,sans-serif;font-size:.75rem;font-style:normal;font-weight:400;height:1.5rem;justify-content:center;line-height:1rem;width:1.5rem}}: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 0;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-results-summary{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-results-summary h1,.searchcraft-results-summary h2,.searchcraft-results-summary h3,.searchcraft-results-summary h4,.searchcraft-results-summary h5{padding-top:10px;padding-bottom:10px}.searchcraft-results-summary p{padding-bottom:10px}.searchcraft-results-summary img{max-width:200px}.searchcraft-results-summary ol,.searchcraft-results-summary ul{padding-left:1em;padding-bottom:10px}.searchcraft-results-summary a{color:var(--sc-content-brand)}.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{display:flex;flex-direction:column;align-items:center;gap:12px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}.searchcraft-loading-dots{display:flex;gap:8px;align-items:center;height:40px}.searchcraft-loading-dots>div{width:10px;height:10px;border-radius:50%;background-color:var(--sc-surface-brand-primary);animation:searchcraft-jump .6s ease-in-out infinite}.searchcraft-loading-dots .searchcraft-loading-dot-2{animation-delay:.15s}.searchcraft-loading-dots .searchcraft-loading-dot-3{animation-delay:.3s}.searchcraft-loading-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);letter-spacing:2px;color:#828282;margin:0}@keyframes searchcraft-jump{0%{transform:translateY(0);animation-timing-function:cubic-bezier(0.33, 1, 0.68, 1)}50%{transform:translateY(-20px);animation-timing-function:cubic-bezier(0.32, 0, 0.67, 0)}100%{transform:translateY(0)}}/*# sourceMappingURL=hologram.css.map */
67
+ `;const Fl=Y(class extends G{constructor(e){super(),e!==!1&&this.__registerHost()}render(){return d("style",{key:"ef26626cdfa4fa98d516802d71443c49a9c6ecf9"},Ol)}},[256,"searchcraft-theme"]);function Dl(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(e=>{switch(e){case"searchcraft-theme":customElements.get(e)||customElements.define(e,Fl);break}})}const Nl=Dl,zl=wn,qn=()=>{tc(),sc(),nc(),cc(),pc(),bc(),vc(),wc(),xc(),Tc(),Ec(),pl(),ml(),gl(),yl(),wl(),kl(),$l(),Rl(),Pl(),_l(),Ll(),Nl(),zl()};globalThis.__scDefineCustomElements__=qn;var se;(function(s){s[s.DEBUG=0]="DEBUG",s[s.INFO=1]="INFO",s[s.WARN=2]="WARN",s[s.ERROR=3]="ERROR",s[s.NONE=4]="NONE"})(se||(se={}));class Ul{constructor(e){f(this,"logLevel");f(this,"logFormatter");this.logLevel=e.logLevel||se.INFO,this.logFormatter=e.logFormatter||this.defaultFormatter}defaultFormatter(e,t){return`[${se[e]}] ${new Date().toISOString()}: ${t}`}debug(e){this.logLevel<=se.DEBUG&&console.log(this.logFormatter(se.DEBUG,e))}info(e){this.logLevel<=se.INFO&&console.info(this.logFormatter(se.INFO,e))}warn(e){this.logLevel<=se.WARN&&console.warn(this.logFormatter(se.WARN,e))}error(e){this.logLevel<=se.ERROR&&console.error(this.logFormatter(se.ERROR,e))}log(e,t){switch(e){case se.DEBUG:this.debug(t);break;case se.INFO:this.info(t);break;case se.WARN:this.warn(t);break;case se.ERROR:this.error(t);break}}}const qr=new Ul({logLevel:se.NONE});function Be(s,e,t,r){return new(t||(t=Promise))(function(a,n){function o(i){try{u(r.next(i))}catch(h){n(h)}}function c(i){try{u(r.throw(i))}catch(h){n(h)}}function u(i){var h;i.done?a(i.value):(h=i.value,h instanceof t?h:new t(function(g){g(h)})).then(o,c)}u((r=r.apply(s,[])).next())})}function He(s,e){var t,r,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function c(u){return function(i){return function(h){if(t)throw new TypeError("Generator is already executing.");for(;n&&(n=0,h[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&h[0]?r.return:h[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,h[1])).done)return a;switch(r=0,a&&(h=[2&h[0],a.value]),h[0]){case 0:case 1:a=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]<a[3])){o.label=h[1];break}if(h[0]===6&&o.label<a[1]){o.label=a[1],a=h;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(h);break}a[2]&&o.ops.pop(),o.trys.pop();continue}h=e.call(s,o)}catch(g){h=[6,g],r=0}finally{t=a=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([u,i])}}}typeof SuppressedError=="function"&&SuppressedError;var qe={exclude:[]},Wn={},Bl={timeout:"true"},_e=function(s,e){typeof window<"u"&&(Wn[s]=e)},Hl=function(){return Object.fromEntries(Object.entries(Wn).filter(function(s){var e,t=s[0];return!(!((e=qe==null?void 0:qe.exclude)===null||e===void 0)&&e.includes(t))}).map(function(s){return[s[0],(0,s[1])()]}))};function Wr(s){return s^=s>>>16,s=Math.imul(s,2246822507),s^=s>>>13,s=Math.imul(s,3266489909),(s^=s>>>16)>>>0}var ae=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Ae(s,e){return s<<e|s>>>32-e}function Ys(s,e){var t;if(e===void 0&&(e=0),e=e?0|e:0,typeof s=="string"&&(t=s,s=new TextEncoder().encode(t).buffer),!(s instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var r=new Uint32Array([e,e,e,e]);(function(n,o){for(var c=n.byteLength/16|0,u=new Uint32Array(n,0,4*c),i=0;i<c;i++){var h=u.subarray(4*i,4*(i+1));h[0]=Math.imul(h[0],ae[0]),h[0]=Ae(h[0],15),h[0]=Math.imul(h[0],ae[1]),o[0]=o[0]^h[0],o[0]=Ae(o[0],19),o[0]=o[0]+o[1],o[0]=Math.imul(o[0],5)+1444728091,h[1]=Math.imul(h[1],ae[1]),h[1]=Ae(h[1],16),h[1]=Math.imul(h[1],ae[2]),o[1]=o[1]^h[1],o[1]=Ae(o[1],17),o[1]=o[1]+o[2],o[1]=Math.imul(o[1],5)+197830471,h[2]=Math.imul(h[2],ae[2]),h[2]=Ae(h[2],17),h[2]=Math.imul(h[2],ae[3]),o[2]=o[2]^h[2],o[2]=Ae(o[2],15),o[2]=o[2]+o[3],o[2]=Math.imul(o[2],5)+2530024501,h[3]=Math.imul(h[3],ae[3]),h[3]=Ae(h[3],18),h[3]=Math.imul(h[3],ae[0]),o[3]=o[3]^h[3],o[3]=Ae(o[3],13),o[3]=o[3]+o[0],o[3]=Math.imul(o[3],5)+850148119}})(s,r),function(n,o){var c=n.byteLength/16|0,u=n.byteLength%16,i=new Uint32Array(4),h=new Uint8Array(n,16*c,u);switch(u){case 15:i[3]=i[3]^h[14]<<16;case 14:i[3]=i[3]^h[13]<<8;case 13:i[3]=i[3]^h[12]<<0,i[3]=Math.imul(i[3],ae[3]),i[3]=Ae(i[3],18),i[3]=Math.imul(i[3],ae[0]),o[3]=o[3]^i[3];case 12:i[2]=i[2]^h[11]<<24;case 11:i[2]=i[2]^h[10]<<16;case 10:i[2]=i[2]^h[9]<<8;case 9:i[2]=i[2]^h[8]<<0,i[2]=Math.imul(i[2],ae[2]),i[2]=Ae(i[2],17),i[2]=Math.imul(i[2],ae[3]),o[2]=o[2]^i[2];case 8:i[1]=i[1]^h[7]<<24;case 7:i[1]=i[1]^h[6]<<16;case 6:i[1]=i[1]^h[5]<<8;case 5:i[1]=i[1]^h[4]<<0,i[1]=Math.imul(i[1],ae[1]),i[1]=Ae(i[1],16),i[1]=Math.imul(i[1],ae[2]),o[1]=o[1]^i[1];case 4:i[0]=i[0]^h[3]<<24;case 3:i[0]=i[0]^h[2]<<16;case 2:i[0]=i[0]^h[1]<<8;case 1:i[0]=i[0]^h[0]<<0,i[0]=Math.imul(i[0],ae[0]),i[0]=Ae(i[0],15),i[0]=Math.imul(i[0],ae[1]),o[0]=o[0]^i[0]}}(s,r),function(n,o){o[0]=o[0]^n.byteLength,o[1]=o[1]^n.byteLength,o[2]=o[2]^n.byteLength,o[3]=o[3]^n.byteLength,o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0,o[0]=Wr(o[0]),o[1]=Wr(o[1]),o[2]=Wr(o[2]),o[3]=Wr(o[3]),o[0]=o[0]+o[1]|0,o[0]=o[0]+o[2]|0,o[0]=o[0]+o[3]|0,o[1]=o[1]+o[0]|0,o[2]=o[2]+o[0]|0,o[3]=o[3]+o[0]|0}(s,r);var a=new Uint8Array(r.buffer);return Array.from(a).map(function(n){return n.toString(16).padStart(2,"0")}).join("")}function ql(s,e){return new Promise(function(t){setTimeout(function(){return t(e)},s)})}function Wl(s,e,t){return Promise.all(s.map(function(r){return Promise.race([r,ql(e,t)])}))}function Vl(){return Be(this,void 0,void 0,function(){var s,e,t,r,a;return He(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),s=Hl(),e=Object.keys(s),[4,Wl(Object.values(s),(qe==null?void 0:qe.timeout)||1e3,Bl)];case 1:return t=n.sent(),r=t.filter(function(o){return o!==void 0}),a={},r.forEach(function(o,c){a[e[c]]=o}),[2,Vn(a,qe.exclude||[])];case 2:throw n.sent();case 3:return[2]}})})}function Vn(s,e){var t={},r=function(n){if(s.hasOwnProperty(n)){var o=s[n];if(typeof o!="object"||Array.isArray(o))e.includes(n)||(t[n]=o);else{var c=Vn(o,e.map(function(u){return u.startsWith(n+".")?u.slice(n.length+1):u}));Object.keys(c).length>0&&(t[n]=c)}}};for(var a in s)r(a);return t}function jl(s){return Be(this,void 0,void 0,function(){var e,t;return He(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Vl()];case 1:return e=r.sent(),t=Ys(JSON.stringify(e)),[2,t.toString()];case 2:throw r.sent();case 3:return[2]}})})}function Gl(s){for(var e=0,t=0;t<s.length;++t)e+=Math.abs(s[t]);return e}function jn(s,e,t){for(var r=[],a=0;a<s[0].data.length;a++){for(var n=[],o=0;o<s.length;o++)n.push(s[o].data[a]);r.push(Yl(n))}var c=new Uint8ClampedArray(r);return new ImageData(c,e,t)}function Yl(s){if(s.length===0)return 0;for(var e={},t=0,r=s;t<r.length;t++)e[n=r[t]]=(e[n]||0)+1;var a=s[0];for(var n in e)e[n]>e[a]&&(a=parseInt(n,10));return a}function Yt(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var s=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},t=0,r=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];t<r.length;t++){var a=r[t],n=s.match(a);if(n&&n.groups)return{name:e[n.groups.name]||n.groups.name,version:n.groups.version}}return{name:"unknown",version:"unknown"}}_e("audio",function(){return Be(this,void 0,void 0,function(){return He(this,function(s){return[2,new Promise(function(e,t){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=r.createBufferSource(),n=r.createOscillator();n.frequency.value=1e3;var o,c=r.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,n.connect(c),c.connect(r.destination),n.start(),r.oncomplete=function(u){o=u.renderedBuffer.getChannelData(0),e({sampleHash:Gl(o),oscillator:n.type,maxChannels:r.destination.maxChannelCount,channelCountMode:a.channelCountMode})},r.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),t(u)}})]})})});var Ql=Yt().name!=="SamsungBrowser"?1:3,Gn=280,Yn=20;Yt().name!="Firefox"&&_e("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(s){var e=Array.from({length:Ql},function(){return function(){var t=document.createElement("canvas"),r=t.getContext("2d");if(!r)return new ImageData(1,1);t.width=Gn,t.height=Yn;var a=r.createLinearGradient(0,0,t.width,t.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),r.fillStyle=a,r.fillRect(0,0,t.width,t.height);var n="Random Text WMwmil10Oo";r.font="23.123px Arial",r.fillStyle="black",r.fillText(n,-5,15),r.fillStyle="rgba(0, 0, 255, 0.5)",r.fillText(n,-3.3,17.7),r.beginPath(),r.moveTo(0,0),r.lineTo(2*t.width/7,t.height),r.strokeStyle="white",r.lineWidth=2,r.stroke();var o=r.getImageData(0,0,t.width,t.height);return o}()});s({commonImageDataHash:Ys(jn(e,Gn,Yn).data.toString()).toString()})})});var Qs,Xl=["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"],Kl=["monospace","sans-serif","serif"];function Qn(s,e){if(!s)throw new Error("Canvas context not supported");return s.font="72px ".concat(e),s.measureText("WwMmLli0Oo").width}function Zl(){var s,e=document.createElement("canvas"),t=(s=e.getContext("webgl"))!==null&&s!==void 0?s:e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{var r=(t.getParameter(t.VENDOR)||"").toString(),a=(t.getParameter(t.RENDERER)||"").toString(),n={vendor:r,renderer:a,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!r.length){var o=t.getExtension("WEBGL_debug_renderer_info");if(o){var c=(t.getParameter(o.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(t.getParameter(o.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(n.vendorUnmasked=c),u&&(n.rendererUnmasked=u)}}return n}catch{}return"undefined"}function Jl(){var s=new Float32Array(1),e=new Uint8Array(s.buffer);return s[0]=1/0,s[0]=s[0]-s[0],e[3]}function eu(s,e){var t={};return e.forEach(function(r){var a=function(n){if(n.length===0)return null;var o={};n.forEach(function(i){var h=String(i);o[h]=(o[h]||0)+1});var c=n[0],u=1;return Object.keys(o).forEach(function(i){o[i]>u&&(c=i,u=o[i])}),c}(s.map(function(n){return r in n?n[r]:void 0}).filter(function(n){return n!==void 0}));a&&(t[r]=a)}),t}function tu(){var s=[],e={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(e).forEach(function(t){e[t].forEach(function(r){matchMedia("(".concat(t,": ").concat(r,")")).matches&&s.push("".concat(t,": ").concat(r))})}),s}function ru(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var s=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(s(e))return e}catch{return 0}return 0}Yt().name!="Firefox"&&_e("fonts",function(){var s=this;return new Promise(function(e,t){try{(function(r){var a;Be(this,void 0,void 0,function(){var n,o,c;return He(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(i=50,new Promise(function(g){return setTimeout(g,i,h)}))];case 1:return u.sent(),[3,0];case 2:if((n=document.createElement("iframe")).setAttribute("frameBorder","0"),(o=n.style).setProperty("position","fixed"),o.setProperty("display","block","important"),o.setProperty("visibility","visible"),o.setProperty("border","0"),o.setProperty("opacity","0"),n.src="about:blank",document.body.appendChild(n),!(c=n.contentDocument||((a=n.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return r({iframe:c}),setTimeout(function(){document.body.removeChild(n)},0),[2]}var i,h})})})(function(r){var a=r.iframe;return Be(s,void 0,void 0,function(){var n,o,c,u;return He(this,function(i){return n=a.createElement("canvas"),o=n.getContext("2d"),c=Kl.map(function(h){return Qn(o,h)}),u={},Xl.forEach(function(h){var g=Qn(o,h);c.includes(g)||(u[h]=g)}),e(u),[2]})})})}catch{t({error:"unsupported"})}})}),_e("hardware",function(){return new Promise(function(s,e){var t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,r=window.performance&&window.performance.memory?window.performance.memory:0;s({videocard:Zl(),architecture:Jl(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:r.jsHeapSizeLimit||0})})}),_e("locales",function(){return new Promise(function(s){s({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),_e("permissions",function(){return Be(this,void 0,void 0,function(){var s;return He(this,function(e){return Qs=(qe==null?void 0:qe.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],s=Array.from({length:(qe==null?void 0:qe.retries)||3},function(){return function(){return Be(this,void 0,void 0,function(){var t,r,a,n,o;return He(this,function(c){switch(c.label){case 0:t={},r=0,a=Qs,c.label=1;case 1:if(!(r<a.length))return[3,6];n=a[r],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:n})];case 3:return o=c.sent(),t[n]=o.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return r++,[3,1];case 6:return[2,t]}})})}()}),[2,Promise.all(s).then(function(t){return eu(t,Qs)})]})})}),_e("plugins",function(){var s=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var t=navigator.plugins[e];s.push([t.name,t.filename,t.description].join("|"))}return new Promise(function(r){r({plugins:s})})}),_e("screen",function(){return new Promise(function(s){s({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:tu()})})}),_e("system",function(){return new Promise(function(s){var e=Yt();s({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:ru()})})});var de,su=Yt().name!=="SamsungBrowser"?1:3,T=null;_e("webgl",function(){return Be(this,void 0,void 0,function(){var s;return He(this,function(e){typeof document<"u"&&((de=document.createElement("canvas")).width=200,de.height=100,T=de.getContext("webgl"));try{if(!T)throw new Error("WebGL not supported");return s=Array.from({length:su},function(){return function(){try{if(!T)throw new Error("WebGL not supported");var t=`
68
68
  attribute vec2 position;
69
69
  void main() {
70
70
  gl_Position = vec4(position, 0.0, 1.0);
@@ -74,10 +74,10 @@ Please report this to https://github.com/markedjs/marked.`,s){const r="<p>An err
74
74
  void main() {
75
75
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
76
76
  }
77
- `,a=T.createShader(T.VERTEX_SHADER),n=T.createShader(T.FRAGMENT_SHADER);if(!a||!n)throw new Error("Failed to create shaders");if(T.shaderSource(a,t),T.shaderSource(n,r),T.compileShader(a),!T.getShaderParameter(a,T.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+T.getShaderInfoLog(a));if(T.compileShader(n),!T.getShaderParameter(n,T.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+T.getShaderInfoLog(n));var o=T.createProgram();if(!o)throw new Error("Failed to create shader program");if(T.attachShader(o,a),T.attachShader(o,n),T.linkProgram(o),!T.getProgramParameter(o,T.LINK_STATUS))throw new Error("Shader program linking failed: "+T.getProgramInfoLog(o));T.useProgram(o);for(var c=137,u=new Float32Array(4*c),i=2*Math.PI/c,h=0;h<c;h++){var g=h*i;u[4*h]=0,u[4*h+1]=0,u[4*h+2]=Math.cos(g)*(de.width/2),u[4*h+3]=Math.sin(g)*(de.height/2)}var p=T.createBuffer();T.bindBuffer(T.ARRAY_BUFFER,p),T.bufferData(T.ARRAY_BUFFER,u,T.STATIC_DRAW);var y=T.getAttribLocation(o,"position");T.enableVertexAttribArray(y),T.vertexAttribPointer(y,2,T.FLOAT,!1,0,0),T.viewport(0,0,de.width,de.height),T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT),T.drawArrays(T.LINES,0,2*c);var w=new Uint8ClampedArray(de.width*de.height*4);return T.readPixels(0,0,de.width,de.height,T.RGBA,T.UNSIGNED_BYTE,w),new ImageData(w,de.width,de.height)}catch{return new ImageData(1,1)}finally{T&&(T.bindBuffer(T.ARRAY_BUFFER,null),T.useProgram(null),T.viewport(0,0,T.drawingBufferWidth,T.drawingBufferHeight),T.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Ys(jn(s,de.width,de.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var it=function(s,e,t,r){for(var a=(t-e)/r,n=0,o=0;o<r;o++)n+=s(e+(o+.5)*a);return n*a};_e("math",function(){return Be(void 0,void 0,void 0,function(){return He(this,function(s){return[2,{acos:Math.acos(.5),asin:it(Math.asin,-1,1,97),atan:it(Math.atan,-1,1,97),cos:it(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:it(Math.sin,-Math.PI,Math.PI,97),sinh:it(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:it(Math.tan,0,2*Math.PI,97),tanh:it(Math.tanh,-9/7,7/9,97)}]})})});class Xs{constructor(e){f(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 au extends Xs{async getAds(e){const t=this.config.admAdConfig;if(!(t!=null&&t.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:t.sub,qt:e.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${t.textAdQuantity||0}`,"results-pa":`${t.productAdQuantity||0}`}).toString()}`,o=await(await fetch(a,{method:"GET"})).json(),c=o.product_ads.map(h=>({id:at(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:h})),u=o.text_ads.map(h=>({id:at(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:h}));return c.concat(u)}async onAdContainerViewed(e){var r;const t=e.adClientResponseItem;(r=t.admAd)!=null&&r.impression_url&&fetch(t.admAd.impression_url)}}class nu extends Xs{async getAds(e){return[]}}const ou=1e3;class iu extends Xs{constructor(t){super(t);f(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var a;if((((a=r.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(ou)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const cu=600;class lu{constructor(e,t,r,a){f(this,"measureRequestTimeout");f(this,"measureRequestsBatched",[]);f(this,"config");f(this,"sdkInfo");f(this,"userId");f(this,"userType");f(this,"sessionId");f(this,"sendMeasureEvent",async(e,t={},r={})=>{const a={event_name:e,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...t},user:{...this.measureRequestUser,...r}};if(e==="document_clicked"){const n=JSON.stringify(a),o=`${this.baseMeasureUrl}/event`;try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){console.error("Error sending MeasureRequest:",c)}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(()=>{const n=JSON.stringify({items:this.measureRequestsBatched}),o=`${this.baseMeasureUrl}/batch`;(async()=>{try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});this.measureRequestsBatched=[],c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",c)}})().catch(c=>{console.error("Unhandled error in MeasureRequest batch:",c)})},cu)});this.config=e,this.sdkInfo=t,this.userId=r,this.userType=a,this.sessionId=at(),this.sendMeasureEvent("sdk_initialized").catch(n=>{console.error("Error sending sdk_initialized event:",n)})}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const uu=s=>s.endsWith("/")?s.slice(0,-1):s,ct=s=>{let e="";if(e=s.trim(),e=e.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(e.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return e},hu=500;class fu{constructor(e,t,r){f(this,"config");f(this,"userId");f(this,"parent");f(this,"searchCompletedEventTimeout");f(this,"abortController");f(this,"supplementalAbortController");f(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.")});f(this,"getSearchResponseItems",async(e,t=!1)=>{var o,c,u,i,h,g,p;let r,a="",n;return t?((o=this.supplementalAbortController)==null||o.abort("A newer search request has replaced this one."),n=new AbortController,this.supplementalAbortController=n):((c=this.abortController)==null||c.abort("A newer search request has replaced this one."),n=new AbortController,this.abortController=n),typeof e=="string"?a=ct(e):(e.searchTerm=ct(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}}),(i=this.parent.adClient)==null||i.onQuerySubmitted(typeof e=="string"?{searchTerm:a,mode:"exact"}:e),typeof e=="string"?r=await this.handleGetSearchResponseItemsWithString(a,n):r=await this.handleGetSearchResponseItemsWithObject(e,n),t||((h=this.parent.measureClient)==null||h.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:r.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var y;(y=this.parent.measureClient)==null||y.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:r.data.count})},hu),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((g=r.data.hits)==null?void 0:g.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(p=this.parent.adClient)==null||p.onQueryFetched(typeof e=="string"?{searchTerm:a,mode:"exact"}:e,r)),r});f(this,"handleGetSearchResponseItemsWithString",async(e,t)=>{var n;let r;try{r=JSON.parse(e),r={limit:this.config.searchResultsPerPage,...r}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||at(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});f(this,"handleGetSearchResponseItemsWithObject",async(e,t)=>{var n;const r={query:this.formatParamsForRequest(e),offset:e.offset||0,limit:e.limit||this.config.searchResultsPerPage||20,...e.order_by&&{order_by:e.order_by},...e.sort&&{sort:e.sort}};this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||at(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=e,this.config=t,this.userId=r}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(e){const t=[];let r="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(o=>{var u;const c=(u=e.facetPathsForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(o=>{var u;const c=(u=e.rangeValueForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))});const a=e.searchTerm,n=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":r,...n}),t}}const Xn=s=>{let e;const t=new Set,r=(i,h)=>{const g=typeof i=="function"?i(e):i;if(!Object.is(g,e)){const p=e;e=h??(typeof g!="object"||g===null)?g:Object.assign({},e,g),t.forEach(y=>y(e,p))}},a=()=>e,c={setState:r,getState:a,getInitialState:()=>u,subscribe:i=>(t.add(i),()=>t.delete(i))},u=e=s(r,a,c);return c},du=s=>s?Xn(s):Xn,pu=1e3,Kn="Your read key does not have permission to generate AI summaries.",Zn="AI summaries are not enabled for this account. Please contact Searchcraft to enable them.";class mu{constructor(e,t){f(this,"set");f(this,"get");f(this,"abortController");f(this,"timeout");f(this,"hasWarnedAboutDeprecatedCortexURL",!1);this.get=e,this.set=t}streamSummaryData(e){var a;const t=async()=>{var g,p,y,w,S,R,L,E;const n=this.get(),o=(g=n.core)==null?void 0:g.config;if(!o){console.error("Could not stream summary data, no config found.");return}const c=o.cortexURL;this.warnIfUsingDeprecatedCortexURL(c);const u=(p=n.core)==null?void 0:p.config.indexName;if(!n.hasSummaryBox||!u)return;let i;try{i=this.buildSearchClientRequest(e,o.searchResultsPerPage)}catch(k){k instanceof Error&&console.error(k.message),this.set({isSummaryLoading:!1});return}(y=this.abortController)==null||y.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,isSummaryNotEnabled:!1,summary:"",summaryErrorMessage:""});const h=`${o.endpointURL}/index/${u}/search/summary`;try{const k=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((w=n.core)==null?void 0:w.config.readKey)||"","X-Sc-User-Id":((S=n.core)==null?void 0:S.userId)||"","X-Sc-Session-Id":((L=(R=n.core)==null?void 0:R.measureClient)==null?void 0:L.sessionId)||"","X-Sc-User-Type":((E=n.core)==null?void 0:E.userType)||"anonymous"},body:JSON.stringify(i),signal:this.abortController.signal});if(!k)throw new Error("Invalid fetch response");if(!k.ok){if(k.status===401){console.warn(Kn),this.setSummaryUnavailable(Kn);return}if(k.status===403){console.warn(Zn),this.setSummaryUnavailable(Zn);return}throw new Error(`HTTP ${k.status}`)}if(!k.body)throw new Error("Invalid fetch response");const x=k.body.getReader(),F=new TextDecoder;let C="";for(;;){const{done:z,value:V}=await x.read();if(C+=F.decode(V||new Uint8Array,{stream:!z}),C=this.processSseBuffer(C),z)break}C.trim()&&this.handleSseFrame(C)}catch(k){if(k instanceof Error&&k.name==="AbortError")return;k instanceof Error&&console.error(k.message),this.set({isSummaryLoading:!1})}},r=((a=this.get().core)==null?void 0:a.config.summaryDebounceDelay)||pu;clearTimeout(this.timeout),this.timeout=setTimeout(()=>t(),r)}setSummaryUnavailable(e){this.set({isSummaryLoading:!1,isSummaryNotEnabled:!0,summary:"",summaryErrorMessage:e})}warnIfUsingDeprecatedCortexURL(e){!e||this.hasWarnedAboutDeprecatedCortexURL||(this.hasWarnedAboutDeprecatedCortexURL=!0,console.warn("The Searchcraft config field `cortexURL` is deprecated and ignored. Summary requests now use `endpointURL` and `indexName`."))}buildSearchClientRequest(e,t){if(typeof e=="string"){let r;try{r=JSON.parse(e)}catch{throw new Error("Invalid summary request payload.")}return{limit:t,...r}}return{query:this.formatParamsForRequest(e),offset:e.offset||0,limit:e.limit||t||20,...e.order_by&&{order_by:e.order_by},...e.sort&&{sort:e.sort}}}formatParamsForRequest(e){const t=[];let r="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(o=>{var u;const c=(u=e.facetPathsForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(o=>{var u;const c=(u=e.rangeValueForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))});const a=ct(e.searchTerm),n=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":r,...n}),t}processSseBuffer(e){const t=e.replace(/\r\n/g,`
77
+ `,a=T.createShader(T.VERTEX_SHADER),n=T.createShader(T.FRAGMENT_SHADER);if(!a||!n)throw new Error("Failed to create shaders");if(T.shaderSource(a,t),T.shaderSource(n,r),T.compileShader(a),!T.getShaderParameter(a,T.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+T.getShaderInfoLog(a));if(T.compileShader(n),!T.getShaderParameter(n,T.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+T.getShaderInfoLog(n));var o=T.createProgram();if(!o)throw new Error("Failed to create shader program");if(T.attachShader(o,a),T.attachShader(o,n),T.linkProgram(o),!T.getProgramParameter(o,T.LINK_STATUS))throw new Error("Shader program linking failed: "+T.getProgramInfoLog(o));T.useProgram(o);for(var c=137,u=new Float32Array(4*c),i=2*Math.PI/c,h=0;h<c;h++){var g=h*i;u[4*h]=0,u[4*h+1]=0,u[4*h+2]=Math.cos(g)*(de.width/2),u[4*h+3]=Math.sin(g)*(de.height/2)}var p=T.createBuffer();T.bindBuffer(T.ARRAY_BUFFER,p),T.bufferData(T.ARRAY_BUFFER,u,T.STATIC_DRAW);var y=T.getAttribLocation(o,"position");T.enableVertexAttribArray(y),T.vertexAttribPointer(y,2,T.FLOAT,!1,0,0),T.viewport(0,0,de.width,de.height),T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT),T.drawArrays(T.LINES,0,2*c);var w=new Uint8ClampedArray(de.width*de.height*4);return T.readPixels(0,0,de.width,de.height,T.RGBA,T.UNSIGNED_BYTE,w),new ImageData(w,de.width,de.height)}catch{return new ImageData(1,1)}finally{T&&(T.bindBuffer(T.ARRAY_BUFFER,null),T.useProgram(null),T.viewport(0,0,T.drawingBufferWidth,T.drawingBufferHeight),T.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Ys(jn(s,de.width,de.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var it=function(s,e,t,r){for(var a=(t-e)/r,n=0,o=0;o<r;o++)n+=s(e+(o+.5)*a);return n*a};_e("math",function(){return Be(void 0,void 0,void 0,function(){return He(this,function(s){return[2,{acos:Math.acos(.5),asin:it(Math.asin,-1,1,97),atan:it(Math.atan,-1,1,97),cos:it(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:it(Math.sin,-Math.PI,Math.PI,97),sinh:it(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:it(Math.tan,0,2*Math.PI,97),tanh:it(Math.tanh,-9/7,7/9,97)}]})})});class Xs{constructor(e){f(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 au extends Xs{async getAds(e){const t=this.config.admAdConfig;if(!(t!=null&&t.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:t.sub,qt:e.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${t.textAdQuantity||0}`,"results-pa":`${t.productAdQuantity||0}`}).toString()}`,o=await(await fetch(a,{method:"GET"})).json(),c=o.product_ads.map(h=>({id:at(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:h})),u=o.text_ads.map(h=>({id:at(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:h}));return c.concat(u)}async onAdContainerViewed(e){var r;const t=e.adClientResponseItem;(r=t.admAd)!=null&&r.impression_url&&fetch(t.admAd.impression_url)}}class nu extends Xs{async getAds(e){return[]}}const ou=1e3;class iu extends Xs{constructor(t){super(t);f(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var a;if((((a=r.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(ou)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const cu=600;class lu{constructor(e,t,r,a){f(this,"measureRequestTimeout");f(this,"measureRequestsBatched",[]);f(this,"config");f(this,"sdkInfo");f(this,"userId");f(this,"userType");f(this,"sessionId");f(this,"sendMeasureEvent",async(e,t={},r={})=>{const a={event_name:e,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...t},user:{...this.measureRequestUser,...r}};if(e==="document_clicked"){const n=JSON.stringify(a),o=`${this.baseMeasureUrl}/event`;try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){console.error("Error sending MeasureRequest:",c)}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(()=>{const n=JSON.stringify({items:this.measureRequestsBatched}),o=`${this.baseMeasureUrl}/batch`;(async()=>{try{const c=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId,"X-Sc-User-Type":this.userType},body:n,keepalive:!0});this.measureRequestsBatched=[],c.ok||console.error(`Error sending MeasureRequest: ${c.status} ${c.statusText}`)}catch(c){this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",c)}})().catch(c=>{console.error("Unhandled error in MeasureRequest batch:",c)})},cu)});this.config=e,this.sdkInfo=t,this.userId=r,this.userType=a,this.sessionId=at(),this.sendMeasureEvent("sdk_initialized").catch(n=>{console.error("Error sending sdk_initialized event:",n)})}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const uu=s=>s.endsWith("/")?s.slice(0,-1):s,ct=s=>{let e="";if(e=s.trim(),e=e.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(e.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return e},hu=500;class fu{constructor(e,t,r){f(this,"config");f(this,"userId");f(this,"parent");f(this,"searchCompletedEventTimeout");f(this,"abortController");f(this,"supplementalAbortController");f(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.")});f(this,"getSearchResponseItems",async(e,t=!1)=>{var o,c,u,i,h,g,p;let r,a="",n;return t?((o=this.supplementalAbortController)==null||o.abort("A newer search request has replaced this one."),n=new AbortController,this.supplementalAbortController=n):((c=this.abortController)==null||c.abort("A newer search request has replaced this one."),n=new AbortController,this.abortController=n),typeof e=="string"?a=ct(e):(e.searchTerm=ct(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}}),(i=this.parent.adClient)==null||i.onQuerySubmitted(typeof e=="string"?{searchTerm:a,mode:"exact"}:e),typeof e=="string"?r=await this.handleGetSearchResponseItemsWithString(a,n):r=await this.handleGetSearchResponseItemsWithObject(e,n),t||((h=this.parent.measureClient)==null||h.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:r.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var y;(y=this.parent.measureClient)==null||y.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:r.data.count})},hu),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((g=r.data.hits)==null?void 0:g.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(p=this.parent.adClient)==null||p.onQueryFetched(typeof e=="string"?{searchTerm:a,mode:"exact"}:e,r)),r});f(this,"handleGetSearchResponseItemsWithString",async(e,t)=>{var n;let r;try{r=JSON.parse(e),r={limit:this.config.searchResultsPerPage,...r}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||at(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});f(this,"handleGetSearchResponseItemsWithObject",async(e,t)=>{var n;const r={query:this.formatParamsForRequest(e),offset:e.offset||0,limit:e.limit||this.config.searchResultsPerPage||20,...e.order_by&&{order_by:e.order_by},...e.sort&&{sort:e.sort}};this.parent.store.setState({searchClientRequest:r});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((n=this.parent.measureClient)==null?void 0:n.sessionId)||at(),"X-Sc-User-Type":this.parent.userType},body:JSON.stringify(r),signal:t.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=e,this.config=t,this.userId=r}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(e){const t=[];let r="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(o=>{var u;const c=(u=e.facetPathsForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(o=>{var u;const c=(u=e.rangeValueForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))});const a=e.searchTerm,n=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":r,...n}),t}}const Xn=s=>{let e;const t=new Set,r=(i,h)=>{const g=typeof i=="function"?i(e):i;if(!Object.is(g,e)){const p=e;e=h??(typeof g!="object"||g===null)?g:Object.assign({},e,g),t.forEach(y=>y(e,p))}},a=()=>e,c={setState:r,getState:a,getInitialState:()=>u,subscribe:i=>(t.add(i),()=>t.delete(i))},u=e=s(r,a,c);return c},du=s=>s?Xn(s):Xn,pu=1e3,Kn="Your read key does not have permission to generate AI summaries.",Zn="AI summaries are not enabled for this account. Please contact Searchcraft to enable them.";class mu{constructor(e,t){f(this,"set");f(this,"get");f(this,"abortController");f(this,"timeout");f(this,"hasWarnedAboutDeprecatedCortexURL",!1);this.get=e,this.set=t}streamSummaryData(e){var a;const t=async()=>{var g,p,y,w,k,C,L,E;const n=this.get(),o=(g=n.core)==null?void 0:g.config;if(!o){console.error("Could not stream summary data, no config found.");return}const c=o.cortexURL;this.warnIfUsingDeprecatedCortexURL(c);const u=(p=n.core)==null?void 0:p.config.indexName;if(!n.hasSummaryBox||!u)return;let i;try{i=this.buildSearchClientRequest(e,o.searchResultsPerPage)}catch(S){S instanceof Error&&console.error(S.message),this.set({isSummaryLoading:!1});return}(y=this.abortController)==null||y.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,isSummaryNotEnabled:!1,summary:"",summaryErrorMessage:""});const h=`${o.endpointURL}/index/${u}/search/summary`;try{const S=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((w=n.core)==null?void 0:w.config.readKey)||"","X-Sc-User-Id":((k=n.core)==null?void 0:k.userId)||"","X-Sc-Session-Id":((L=(C=n.core)==null?void 0:C.measureClient)==null?void 0:L.sessionId)||"","X-Sc-User-Type":((E=n.core)==null?void 0:E.userType)||"anonymous"},body:JSON.stringify(i),signal:this.abortController.signal});if(!S)throw new Error("Invalid fetch response");if(!S.ok){if(S.status===401){console.warn(Kn),this.setSummaryUnavailable(Kn);return}if(S.status===403){console.warn(Zn),this.setSummaryUnavailable(Zn);return}throw new Error(`HTTP ${S.status}`)}if(!S.body)throw new Error("Invalid fetch response");const x=S.body.getReader(),F=new TextDecoder;let R="";for(;;){const{done:z,value:V}=await x.read();if(R+=F.decode(V||new Uint8Array,{stream:!z}),R=this.processSseBuffer(R),z)break}R.trim()&&this.handleSseFrame(R)}catch(S){if(S instanceof Error&&S.name==="AbortError")return;S instanceof Error&&console.error(S.message),this.set({isSummaryLoading:!1})}},r=((a=this.get().core)==null?void 0:a.config.summaryDebounceDelay)||pu;clearTimeout(this.timeout),this.timeout=setTimeout(()=>t(),r)}setSummaryUnavailable(e){this.set({isSummaryLoading:!1,isSummaryNotEnabled:!0,summary:"",summaryErrorMessage:e})}warnIfUsingDeprecatedCortexURL(e){!e||this.hasWarnedAboutDeprecatedCortexURL||(this.hasWarnedAboutDeprecatedCortexURL=!0,console.warn("The Searchcraft config field `cortexURL` is deprecated and ignored. Summary requests now use `endpointURL` and `indexName`."))}buildSearchClientRequest(e,t){if(typeof e=="string"){let r;try{r=JSON.parse(e)}catch{throw new Error("Invalid summary request payload.")}return{limit:t,...r}}return{query:this.formatParamsForRequest(e),offset:e.offset||0,limit:e.limit||t||20,...e.order_by&&{order_by:e.order_by},...e.sort&&{sort:e.sort}}}formatParamsForRequest(e){const t=[];let r="should";e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(o=>{var u;const c=(u=e.facetPathsForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(o=>{var u;const c=(u=e.rangeValueForIndexFields)==null?void 0:u[o];c&&(r="must",t.push({occur:"must",exact:{ctx:ct(c.value)}}))});const a=ct(e.searchTerm),n=e.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return t.push({occur:e.mode==="exact"?"must":r,...n}),t}processSseBuffer(e){const t=e.replace(/\r\n/g,`
78
78
  `).split(`
79
79
 
80
80
  `),r=t.pop()??"";return t.forEach(a=>this.handleSseFrame(a)),r}handleSseFrame(e){const t=this.parseSseFrame(e);if(!(t!=null&&t.event))return;if(t.event==="metadata"||t.event==="done"){this.set({isSummaryLoading:!1});return}let r;if(t.data)try{r=JSON.parse(t.data)}catch{throw new Error(`Invalid summary SSE payload for "${t.event}" event.`)}if(t.event==="delta"){const a=r&&typeof r.content=="string"?r.content:"";if(!a)return;this.set(n=>({isSummaryLoading:!1,summary:`${n.summary}${a}`}));return}if(t.event==="error")throw new Error(r&&typeof r.message=="string"?r.message:"Summary stream error")}parseSseFrame(e){const t={},r=[];return e.split(`
81
81
  `).forEach(a=>{if(!a||a.startsWith(":"))return;const n=a.indexOf(":"),o=n>=0?a.slice(0,n):a,c=n>=0?a.slice(n+1).trimStart():"";o==="event"&&(t.event=c),o==="data"&&r.push(c)}),r.length>0&&(t.data=r.join(`
82
- `)),t.event||t.data?t:void 0}}const Jn={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isFilterPanelVisible:!0,isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],cachedSearchResponseFacetPrime:void 0,cachedSupplementalFacetPrime:void 0,cachedSearchResponseTimeTaken:void 0,cachedSearchResultsCount:void 0,cachedSearchClientRequestProperties:void 0,searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,summary:"",summaryErrorMessage:"",hasSummaryBox:!1,summaryClient:void 0,isSummaryLoading:!1,isSummaryNotEnabled:!1},Vr={},gu=(s,e={})=>{const t=s||ds;if(Vr[t])return Vr[t].setState(e),Vr[t];const r=du((a,n)=>{const o={addFacetPathsForIndexField:u=>{a(i=>({facetPathsForIndexFields:{...i.facetPathsForIndexFields,[u.fieldName]:u},searchResultsPage:1}))},addRangeValueForIndexField:u=>a(i=>({rangeValueForIndexFields:{...i.rangeValueForIndexFields,[u.fieldName]:u}})),removeFacetPathsForIndexField:u=>{console.log("[FACET] removeFacetPathsForIndexField",{fieldName:u,currentPage:n().searchResultsPage,stackTrace:new Error().stack}),a(i=>{const h=i.facetPathsForIndexFields;return delete h[u],{facetPathsForIndexFields:{...h},searchResultsPage:1}})},removeRangeValueForIndexField:u=>a(i=>{const h=i.rangeValueForIndexFields;return delete h[u],{rangeValueForIndexFields:{...h}}}),resetSearchValues:()=>{var i,h;const u=n();(h=(i=u.core)==null?void 0:i.searchClient)==null||h.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems]})},search:async u=>{var S,R,L,E;const i=n();if(!i.core)throw new Error("Searchcraft instance is not initialized.");const h=typeof i.cachedSearchClientRequestProperties=="string"&&i.searchTerm.trim()==="",g=Object.keys(i.facetPathsForIndexFields).length>0||Object.keys(i.rangeValueForIndexFields).length>0,p=i.searchResultsPage!==1,y=i.searchMode!=="fuzzy";if(!i.searchTerm.trim()){if(h&&(g||p||y)){let k;try{k=JSON.parse(i.cachedSearchClientRequestProperties)}catch{console.error("Invalid cached initial query payload."),a({isSearchInProgress:!1});return}a({isSearchInProgress:!0});const F=[...Array.isArray(k.query)?k.query.filter(z=>!z.occur):[k.query]];i.facetPathsForIndexFields&&Object.keys(i.facetPathsForIndexFields).forEach(z=>{var ne;const V=(ne=i.facetPathsForIndexFields)==null?void 0:ne[z];V&&F.push({occur:"must",exact:{ctx:V.value}})}),i.rangeValueForIndexFields&&Object.keys(i.rangeValueForIndexFields).forEach(z=>{var ne;const V=(ne=i.rangeValueForIndexFields)==null?void 0:ne[z];V&&F.push({occur:"must",exact:{ctx:V.value}})});const C={...k,query:F,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};u!=null&&u.skipSummary||(S=i.summaryClient)==null||S.streamSummaryData(JSON.stringify(C)),i.core.getResponseItems({requestProperties:JSON.stringify(C),shouldCacheResultsForEmptyState:!1});return}(L=(R=i.core)==null?void 0:R.searchClient)==null||L.abortRequests(),a({searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const w={searchTerm:i.searchTerm,mode:i.searchMode,sort:i.sortType,order_by:i.orderByField,facetPathsForIndexFields:i.facetPathsForIndexFields,rangeValueForIndexFields:i.rangeValueForIndexFields,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};u!=null&&u.skipSummary||(E=i.summaryClient)==null||E.streamSummaryData(w),i.core.getResponseItems({requestProperties:w,shouldCacheResultsForEmptyState:!1})},setFilterPanelVisibility:u=>a({isFilterPanelVisible:u}),setPopoverVisibility:u=>a({isPopoverVisible:u}),setSearchMode:u=>a({searchMode:u}),setSortOrder:({orderByField:u,sortType:i})=>a({sortType:i,orderByField:u}),setSearchTerm:u=>{var h;const i=n();u.length===0&&((h=i.core)==null||h.handleInputCleared()),a({searchTerm:u,searchResultsPage:1,...u.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties}})},setSearchResultsCount:u=>a({searchResultsCount:u}),setSearchResultsPage:async u=>{a({searchResultsPage:u}),await o.search({skipSummary:!0})},setSearchResultsPerPage:async u=>{a({searchResultsPerPage:u}),await o.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(u,i)=>{const{hotkey:h,hotkeyModifier:g}=Jn;a({hotkey:u||h,hotkeyModifier:i||g})}};return{...Jn,...e,...o,summaryClient:new mu(n,a)}});return Vr[t]=r,r};class bu{constructor(e,t,r){f(this,"store");f(this,"config");f(this,"measureClient");f(this,"searchClient");f(this,"adClient");f(this,"userId");f(this,"userType");f(this,"requestTimeout");f(this,"subscriptionEvents",{});f(this,"getResponseItems",e=>{const t=async()=>{(async()=>{var o,c;if(!this.searchClient){console.error("Search client was not initialized.");return}let r;try{r=await this.searchClient.getSearchResponseItems(e.requestProperties,!1)}catch(u){qr.info(`Search request error: ${u}`);return}if(!r){qr.info("Search request error: Search response was undefined");return}const a=(r.data.hits||[]).filter(u=>!!u.doc).map(u=>({id:at(),document:u.doc||{id:-1},source_index:u.source_index,type:"SearchDocument"}));let n;if(typeof e.requestProperties=="object"){if(e.requestProperties.facetPathsForIndexFields&&Object.keys(e.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:u,...i}=e.requestProperties;try{n=await((o=this==null?void 0:this.searchClient)==null?void 0:o.getSearchResponseItems(i,!0))}catch(h){qr.info(`Search request error: ${h}`);return}}}else if(typeof e.requestProperties=="string"){const u=JSON.parse(e.requestProperties),i=Array.isArray(u.query)?u.query:[u.query];if(i.length>1){const h=i.filter(p=>p.occur!=="must"),g={...u,query:h.length>0?h:i.slice(0,1)};try{n=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(JSON.stringify(g),!0))}catch(p){qr.info(`Search request error: ${p}`);return}}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:r.data.time_taken,searchResultsCount:r.data.count,searchResponseFacetPrime:r.data.facets,supplementalFacetPrime:n==null?void 0:n.data.facets,searchClientRequestProperties:e.requestProperties,...e.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a,cachedSearchResponseFacetPrime:r.data.facets,cachedSupplementalFacetPrime:n==null?void 0:n.data.facets,cachedSearchResponseTimeTaken:r.data.time_taken,cachedSearchResultsCount:r.data.count,cachedSearchClientRequestProperties:e.requestProperties}})})(),(async()=>{if(this.adClient&&typeof e.requestProperties!="string"){const r=await this.adClient.getAds(e.requestProperties);this.store.setState({adClientResponseItems:r,...e.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:r}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(t,this.config.searchDebounceDelay):t()});if(!e.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!e.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!e.indexName&&!e.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(e.indexName&&e.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...e,endpointURL:uu(e.endpointURL)},this.userId="",this.userType="anonymous",typeof window<"u"&&typeof customElements<"u"&&t.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=gu(r,{core:this,searchResultsPerPage:e.searchResultsPerPage||20}),re.addCoreInstance(this,r),(async a=>{typeof window<"u"&&await this.initClients(a,t),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(e,t){let r=this.config.measureUserIdentifier;r?(this.userType="authenticated",await Promise.resolve()):(r=await jl(),this.userType="anonymous"),this.measureClient=new lu(e,t,r,this.userType),this.searchClient=new fu(this,e,r),e.customAdConfig?this.adClient=new nu(e):e.nativoConfig?this.adClient=new iu(e):e.admAdConfig&&(this.adClient=new au(e)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(e,t){var r;(r=this.subscriptionEvents[e])==null||r.forEach(a=>{a(t)})}subscribe(e,t){return this.subscriptionEvents[e]||(this.subscriptionEvents[e]=[]),this.subscriptionEvents[e].push(t),()=>{this.subscriptionEvents[e]=this.subscriptionEvents[e].filter(r=>r!==t)}}handleAdContainerRendered(e){var t;(t=this.adClient)==null||t.onAdContainerRendered(e),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleAdContainerViewed(e){var t;(t=this.adClient)==null||t.onAdContainerViewed(e),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleInputCleared(){var e;this.emitEvent("input_cleared",{name:"input_cleared"}),(e=this.adClient)==null||e.onInputCleared()}}const vu="@searchcraft/vue-sdk",yu="0.15.0",jr="routerLink",eo="navManager",wu="router",ku="aria",Qt=Symbol(),to={default:Qt},ro=s=>(s==null?void 0:s.split(" "))||[],Su=(s,e,t=[])=>{var r;return[...Array.from(((r=s.value)==null?void 0:r.classList)||[]),...t].filter((a,n,o)=>!e.has(a)&&o.indexOf(a)===n)},Ie=(s,e,t=[],r=[],a,n)=>{e!==void 0&&e();const o=Z.defineComponent((c,{attrs:u,slots:i,emit:h})=>{var L;const g=Z.ref(),p=new Set(ro(u.class));Z.onMounted(()=>{r.forEach(E=>{g.value.addEventListener(E,k=>{h(E,k)})})});const y=Z.getCurrentInstance(),S=((L=y==null?void 0:y.appContext)==null?void 0:L.provides[eo])?Z.inject(eo):void 0,R=E=>{const{routerLink:k}=c;if(k!==Qt)if(S!==void 0){E.preventDefault();let x={event:E};for(const F in c){const C=c[F];c.hasOwnProperty(F)&&F.startsWith(wu)&&C!==Qt&&(x[F]=C)}S.navigate(x)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],ro(u.class).forEach(C=>{p.add(C)});const E=c.onClick,k=C=>{E!==void 0&&E(C),C.defaultPrevented||R(C)};let x={ref:g,class:Su(g,p),onClick:k};for(const C in c){const z=c[C];(c.hasOwnProperty(C)&&z!==Qt||C.startsWith(ku))&&(x[C]=z);const V="on"+C.slice(0,1).toUpperCase()+C.slice(1),ne=u[V];g.value&&u.hasOwnProperty(V)&&"addEventListener"in g.value&&g.value.addEventListener(C,ne)}return jr in c&&c[jr]!==Qt&&(x={...x,href:c[jr]}),Z.h(s,x,i.default&&i.default())}});if(typeof o!="function"){let c=[],u={};u[jr]=to,t.forEach(i=>u[i]=to),c=r,o.name=s,o.emits=c,o.props=u}return o},xu=Ie("searchcraft-filter-panel",()=>{},["searchcraftId","items","responsiveBreakpoint","responsiveBehavior"]),Ru=Ie("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","value","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Cu=Ie("searchcraft-pagination",()=>{},["searchcraftId","scrollToTop","pageQueryParam","usePageQueryParam"]),Tu=Ie("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),Eu=Ie("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior","viewAllResultsBaseUrl","viewAllResultsLabel","showSummaryBox","sdkVariant"]),Au=Ie("searchcraft-results-info",()=>{},["template","searchcraftId"]),$u=Ie("searchcraft-results-summary",()=>{},["searchcraftId"]),Pu=Ie("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),_u=Ie("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),Iu=Ie("searchcraft-summary-box",()=>{},["searchcraftId"]),Mu=Ie("searchcraft-theme",()=>{}),Lu=Pu,Ou=xu,Fu=Ru,Du=Tu,Nu=Z.defineComponent({name:"SearchcraftPopoverForm",inheritAttrs:!1,setup(s,{attrs:e,slots:t}){return()=>Z.h(Eu,{...e,sdkVariant:"vue"},t)}}),zu=Au,Uu=$u,Bu=Mu,Hu=Cu,qu=_u,Wu=Iu;class Vu extends bu{constructor(e,t=void 0){super(e,{sdkName:vu,sdkVersion:yu},t)}}qn(),j.Searchcraft=Vu,j.SearchcraftFilterPanel=Ou,j.SearchcraftInputForm=Fu,j.SearchcraftPagination=Hu,j.SearchcraftPopoverButton=Du,j.SearchcraftPopoverForm=Nu,j.SearchcraftResultsInfo=zu,j.SearchcraftResultsSummary=Uu,j.SearchcraftSearchResults=Lu,j.SearchcraftSearchResultsPerPage=qu,j.SearchcraftSummaryBox=Wu,j.SearchcraftTheme=Bu,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
82
+ `)),t.event||t.data?t:void 0}}const Jn={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isFilterPanelVisible:!0,isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],cachedSearchResponseFacetPrime:void 0,cachedSupplementalFacetPrime:void 0,cachedSearchResponseTimeTaken:void 0,cachedSearchResultsCount:void 0,cachedSearchClientRequestProperties:void 0,searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,summary:"",summaryErrorMessage:"",hasSummaryBox:!1,summaryClient:void 0,isSummaryLoading:!1,isSummaryNotEnabled:!1},Vr={},gu=(s,e={})=>{const t=s||ds;if(Vr[t])return Vr[t].setState(e),Vr[t];const r=du((a,n)=>{const o={addFacetPathsForIndexField:u=>{a(i=>({facetPathsForIndexFields:{...i.facetPathsForIndexFields,[u.fieldName]:u},searchResultsPage:1}))},addRangeValueForIndexField:u=>a(i=>({rangeValueForIndexFields:{...i.rangeValueForIndexFields,[u.fieldName]:u}})),removeFacetPathsForIndexField:u=>{console.log("[FACET] removeFacetPathsForIndexField",{fieldName:u,currentPage:n().searchResultsPage,stackTrace:new Error().stack}),a(i=>{const h=i.facetPathsForIndexFields;return delete h[u],{facetPathsForIndexFields:{...h},searchResultsPage:1}})},removeRangeValueForIndexField:u=>a(i=>{const h=i.rangeValueForIndexFields;return delete h[u],{rangeValueForIndexFields:{...h}}}),resetSearchValues:()=>{var i,h;const u=n();(h=(i=u.core)==null?void 0:i.searchClient)==null||h.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems]})},search:async u=>{var k,C,L,E;const i=n();if(!i.core)throw new Error("Searchcraft instance is not initialized.");const h=typeof i.cachedSearchClientRequestProperties=="string"&&i.searchTerm.trim()==="",g=Object.keys(i.facetPathsForIndexFields).length>0||Object.keys(i.rangeValueForIndexFields).length>0,p=i.searchResultsPage!==1,y=i.searchMode!=="fuzzy";if(!i.searchTerm.trim()){if(h&&(g||p||y)){let S;try{S=JSON.parse(i.cachedSearchClientRequestProperties)}catch{console.error("Invalid cached initial query payload."),a({isSearchInProgress:!1});return}a({isSearchInProgress:!0});const F=[...Array.isArray(S.query)?S.query.filter(z=>!z.occur):[S.query]];i.facetPathsForIndexFields&&Object.keys(i.facetPathsForIndexFields).forEach(z=>{var ne;const V=(ne=i.facetPathsForIndexFields)==null?void 0:ne[z];V&&F.push({occur:"must",exact:{ctx:V.value}})}),i.rangeValueForIndexFields&&Object.keys(i.rangeValueForIndexFields).forEach(z=>{var ne;const V=(ne=i.rangeValueForIndexFields)==null?void 0:ne[z];V&&F.push({occur:"must",exact:{ctx:V.value}})});const R={...S,query:F,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};u!=null&&u.skipSummary||(k=i.summaryClient)==null||k.streamSummaryData(JSON.stringify(R)),i.core.getResponseItems({requestProperties:JSON.stringify(R),shouldCacheResultsForEmptyState:!1});return}(L=(C=i.core)==null?void 0:C.searchClient)==null||L.abortRequests(),a({searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const w={searchTerm:i.searchTerm,mode:i.searchMode,sort:i.sortType,order_by:i.orderByField,facetPathsForIndexFields:i.facetPathsForIndexFields,rangeValueForIndexFields:i.rangeValueForIndexFields,offset:i.searchResultsPerPage?i.searchResultsPerPage*(i.searchResultsPage-1):0,limit:i.searchResultsPerPage};u!=null&&u.skipSummary||(E=i.summaryClient)==null||E.streamSummaryData(w),i.core.getResponseItems({requestProperties:w,shouldCacheResultsForEmptyState:!1})},setFilterPanelVisibility:u=>a({isFilterPanelVisible:u}),setPopoverVisibility:u=>a({isPopoverVisible:u}),setSearchMode:u=>a({searchMode:u}),setSortOrder:({orderByField:u,sortType:i})=>a({sortType:i,orderByField:u}),setSearchTerm:u=>{var h;const i=n();u.length===0&&((h=i.core)==null||h.handleInputCleared()),a({searchTerm:u,searchResultsPage:1,...u.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...i.cachedSearchClientResponseItems],adClientResponseItems:[...i.cachedAdClientResponseItems],searchResponseFacetPrime:i.cachedSearchResponseFacetPrime,supplementalFacetPrime:i.cachedSupplementalFacetPrime,searchResponseTimeTaken:i.cachedSearchResponseTimeTaken,searchResultsCount:i.cachedSearchResultsCount||0,searchClientRequestProperties:i.cachedSearchClientRequestProperties}})},setSearchResultsCount:u=>a({searchResultsCount:u}),setSearchResultsPage:async u=>{a({searchResultsPage:u}),await o.search({skipSummary:!0})},setSearchResultsPerPage:async u=>{a({searchResultsPerPage:u}),await o.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(u,i)=>{const{hotkey:h,hotkeyModifier:g}=Jn;a({hotkey:u||h,hotkeyModifier:i||g})}};return{...Jn,...e,...o,summaryClient:new mu(n,a)}});return Vr[t]=r,r};class bu{constructor(e,t,r){f(this,"store");f(this,"config");f(this,"measureClient");f(this,"searchClient");f(this,"adClient");f(this,"userId");f(this,"userType");f(this,"requestTimeout");f(this,"subscriptionEvents",{});f(this,"getResponseItems",e=>{const t=async()=>{(async()=>{var o,c;if(!this.searchClient){console.error("Search client was not initialized.");return}let r;try{r=await this.searchClient.getSearchResponseItems(e.requestProperties,!1)}catch(u){qr.info(`Search request error: ${u}`);return}if(!r){qr.info("Search request error: Search response was undefined");return}const a=(r.data.hits||[]).filter(u=>!!u.doc).map(u=>({id:at(),document:u.doc||{id:-1},source_index:u.source_index,type:"SearchDocument"}));let n;if(typeof e.requestProperties=="object"){if(e.requestProperties.facetPathsForIndexFields&&Object.keys(e.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:u,...i}=e.requestProperties;try{n=await((o=this==null?void 0:this.searchClient)==null?void 0:o.getSearchResponseItems(i,!0))}catch(h){qr.info(`Search request error: ${h}`);return}}}else if(typeof e.requestProperties=="string"){const u=JSON.parse(e.requestProperties),i=Array.isArray(u.query)?u.query:[u.query];if(i.length>1){const h=i.filter(p=>p.occur!=="must"),g={...u,query:h.length>0?h:i.slice(0,1)};try{n=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(JSON.stringify(g),!0))}catch(p){qr.info(`Search request error: ${p}`);return}}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:r.data.time_taken,searchResultsCount:r.data.count,searchResponseFacetPrime:r.data.facets,supplementalFacetPrime:n==null?void 0:n.data.facets,searchClientRequestProperties:e.requestProperties,...e.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a,cachedSearchResponseFacetPrime:r.data.facets,cachedSupplementalFacetPrime:n==null?void 0:n.data.facets,cachedSearchResponseTimeTaken:r.data.time_taken,cachedSearchResultsCount:r.data.count,cachedSearchClientRequestProperties:e.requestProperties}})})(),(async()=>{if(this.adClient&&typeof e.requestProperties!="string"){const r=await this.adClient.getAds(e.requestProperties);this.store.setState({adClientResponseItems:r,...e.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:r}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(t,this.config.searchDebounceDelay):t()});if(!e.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!e.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!e.indexName&&!e.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(e.indexName&&e.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...e,endpointURL:uu(e.endpointURL)},this.userId="",this.userType="anonymous",typeof window<"u"&&typeof customElements<"u"&&t.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=gu(r,{core:this,searchResultsPerPage:e.searchResultsPerPage||20}),re.addCoreInstance(this,r),(async a=>{typeof window<"u"&&await this.initClients(a,t),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(e,t){let r=this.config.measureUserIdentifier;r?(this.userType="authenticated",await Promise.resolve()):(r=await jl(),this.userType="anonymous"),this.measureClient=new lu(e,t,r,this.userType),this.searchClient=new fu(this,e,r),e.customAdConfig?this.adClient=new nu(e):e.nativoConfig?this.adClient=new iu(e):e.admAdConfig&&(this.adClient=new au(e)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(e,t){var r;(r=this.subscriptionEvents[e])==null||r.forEach(a=>{a(t)})}subscribe(e,t){return this.subscriptionEvents[e]||(this.subscriptionEvents[e]=[]),this.subscriptionEvents[e].push(t),()=>{this.subscriptionEvents[e]=this.subscriptionEvents[e].filter(r=>r!==t)}}handleAdContainerRendered(e){var t;(t=this.adClient)==null||t.onAdContainerRendered(e),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleAdContainerViewed(e){var t;(t=this.adClient)==null||t.onAdContainerViewed(e),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:e.adContainerId,searchTerm:e.searchTerm}})}handleInputCleared(){var e;this.emitEvent("input_cleared",{name:"input_cleared"}),(e=this.adClient)==null||e.onInputCleared()}}const vu="@searchcraft/vue-sdk",yu="0.15.1",jr="routerLink",eo="navManager",wu="router",Su="aria",Qt=Symbol(),to={default:Qt},ro=s=>(s==null?void 0:s.split(" "))||[],ku=(s,e,t=[])=>{var r;return[...Array.from(((r=s.value)==null?void 0:r.classList)||[]),...t].filter((a,n,o)=>!e.has(a)&&o.indexOf(a)===n)},Ie=(s,e,t=[],r=[],a,n)=>{e!==void 0&&e();const o=Z.defineComponent((c,{attrs:u,slots:i,emit:h})=>{var L;const g=Z.ref(),p=new Set(ro(u.class));Z.onMounted(()=>{r.forEach(E=>{g.value.addEventListener(E,S=>{h(E,S)})})});const y=Z.getCurrentInstance(),k=((L=y==null?void 0:y.appContext)==null?void 0:L.provides[eo])?Z.inject(eo):void 0,C=E=>{const{routerLink:S}=c;if(S!==Qt)if(k!==void 0){E.preventDefault();let x={event:E};for(const F in c){const R=c[F];c.hasOwnProperty(F)&&F.startsWith(wu)&&R!==Qt&&(x[F]=R)}k.navigate(x)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],ro(u.class).forEach(R=>{p.add(R)});const E=c.onClick,S=R=>{E!==void 0&&E(R),R.defaultPrevented||C(R)};let x={ref:g,class:ku(g,p),onClick:S};for(const R in c){const z=c[R];(c.hasOwnProperty(R)&&z!==Qt||R.startsWith(Su))&&(x[R]=z);const V="on"+R.slice(0,1).toUpperCase()+R.slice(1),ne=u[V];g.value&&u.hasOwnProperty(V)&&"addEventListener"in g.value&&g.value.addEventListener(R,ne)}return jr in c&&c[jr]!==Qt&&(x={...x,href:c[jr]}),Z.h(s,x,i.default&&i.default())}});if(typeof o!="function"){let c=[],u={};u[jr]=to,t.forEach(i=>u[i]=to),c=r,o.name=s,o.emits=c,o.props=u}return o},xu=Ie("searchcraft-filter-panel",()=>{},["searchcraftId","items","responsiveBreakpoint","responsiveBehavior"]),Cu=Ie("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","value","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Ru=Ie("searchcraft-pagination",()=>{},["searchcraftId","scrollToTop","pageQueryParam","usePageQueryParam"]),Tu=Ie("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),Eu=Ie("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior","viewAllResultsBaseUrl","viewAllResultsLabel","showSummaryBox","sdkVariant"]),Au=Ie("searchcraft-results-info",()=>{},["template","searchcraftId"]),$u=Ie("searchcraft-results-summary",()=>{},["searchcraftId"]),Pu=Ie("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),_u=Ie("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),Iu=Ie("searchcraft-summary-box",()=>{},["searchcraftId"]),Mu=Ie("searchcraft-theme",()=>{}),Lu=Pu,Ou=xu,Fu=Cu,Du=Tu,Nu=Z.defineComponent({name:"SearchcraftPopoverForm",inheritAttrs:!1,setup(s,{attrs:e,slots:t}){return()=>Z.h(Eu,{...e,sdkVariant:"vue"},t)}}),zu=Au,Uu=$u,Bu=Mu,Hu=Ru,qu=_u,Wu=Iu;class Vu extends bu{constructor(e,t=void 0){super(e,{sdkName:vu,sdkVersion:yu},t)}}qn(),j.Searchcraft=Vu,j.SearchcraftFilterPanel=Ou,j.SearchcraftInputForm=Fu,j.SearchcraftPagination=Hu,j.SearchcraftPopoverButton=Du,j.SearchcraftPopoverForm=Nu,j.SearchcraftResultsInfo=zu,j.SearchcraftResultsSummary=Uu,j.SearchcraftSearchResults=Lu,j.SearchcraftSearchResultsPerPage=qu,j.SearchcraftSummaryBox=Wu,j.SearchcraftTheme=Bu,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
83
83
  //# sourceMappingURL=index.umd.js.map