@sentientui/snippet 0.32.2 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";var SentientSnippet=(()=>{var Nt=Object.defineProperty,jo=Object.defineProperties,Go=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,Uo=Object.getOwnPropertyNames,cr=Object.getOwnPropertySymbols;var fr=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable;var dr=(e,t,n)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U=(e,t)=>{for(var n in t||(t={}))fr.call(t,n)&&dr(e,n,t[n]);if(cr)for(var n of cr(t))zo.call(t,n)&&dr(e,n,t[n]);return e},Ke=(e,t)=>jo(e,Fo(t));var pr=(e,t)=>()=>(e&&(t=e(e=0)),t);var gr=(e,t)=>{for(var n in t)Nt(e,n,{get:t[n],enumerable:!0})},Wo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Uo(t))!fr.call(e,o)&&o!==n&&Nt(e,o,{get:()=>t[o],enumerable:!(r=Go(t,o))||r.enumerable});return e};var Vo=e=>Wo(Nt({},"__esModule",{value:!0}),e);var ei,ti,ni,Sr,ri,oi,br,F,qe,kn=pr(()=>{"use strict";ei=Object.defineProperty,ti=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,ri=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,br=(e,t,n)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))ri.call(t,n)&&br(e,n,t[n]);if(Sr)for(var n of Sr(t))oi.call(t,n)&&br(e,n,t[n]);return e},qe=(e,t)=>ti(e,ni(t))});var Tr={};gr(Tr,{LOCAL_ENGINE_AVAILABLE:()=>li,createLocalEngine:()=>ui});function ui(e){throw new Error("[sentient] createLocalEngine is not available in production builds. The local engine only exists under the `development` export condition.")}var li,Lr=pr(()=>{"use strict";li=!1});var As={};gr(As,{applyPersonaAttributes:()=>en,applyRegistrySlots:()=>rn,applySlotArms:()=>nn,applySlotAttributes:()=>tn,consentWatcher:()=>Xe,parseSnippetConfig:()=>Jt,planReorder:()=>sn,reapply:()=>It,run:()=>Mo,version:()=>_t});function ze(e){return e?`_${e.slice(0,12)}`:""}var We="_snt_uid";function gt(e){return`${We}${ze(e)}`}var bn="__sntForgetGen",Ho=()=>{try{return window[bn]}catch(e){return}};function Dt(e){var t,n;try{let r=window,o=(t=r[bn])!=null?t:r[bn]={};o[e]=((n=o[e])!=null?n:0)+1}catch(r){}}function fe(e){var t,n;return(n=(t=Ho())==null?void 0:t[e])!=null?n:0}var rt="_snt_snap:",qo=["low","medium","high"];function ot(e){try{let t=localStorage.getItem(rt+e);if(!t)return null;let n=JSON.parse(t);if(!n||typeof n!="object"||n.v!==1||typeof n.persona!="string"||typeof n.band!="string"||!qo.includes(n.band)||typeof n.slots!="object"||n.slots===null||Array.isArray(n.slots)||!(n.layoutOrder===null||Array.isArray(n.layoutOrder))||typeof n.savedAt!="number"||!(Date.now()-n.savedAt<2592e6)||!(n.slotConfig===void 0||typeof n.slotConfig=="object"&&n.slotConfig!==null&&!Array.isArray(n.slotConfig)))return null;let r=n.vocabulary;return r!==void 0&&(typeof r!="object"||r===null||!Array.isArray(r.entries)||!Array.isArray(r.images))&&delete n.vocabulary,n}catch(t){return null}}function He(e,t){try{localStorage.setItem(rt+e,JSON.stringify(t))}catch(n){}}function je(e){if(typeof AbortController!="function")return{clear:()=>{}};let t=new AbortController,n=setTimeout(()=>t.abort(),e);return{signal:t.signal,clear:()=>clearTimeout(n)}}function En(e,t){return new Promise(n=>{let r=setTimeout(()=>n(!1),t),o=()=>{clearTimeout(r),n(!0)};e.then(o,o)})}function Ve(e){return Math.min(6e4,1e3*2**Math.min(e,6))}function Mt(e){if(e.ok===!0)return"delivered";let{status:t}=e;return typeof t!="number"?"retry":t>=200&&t<300?"delivered":t>=400&&t<500&&t!==429?"dropped":"retry"}function mr(e,t){try{let n=localStorage.getItem(e);if(!n)return[];let r=JSON.parse(n);return Array.isArray(r)?(localStorage.removeItem(e),r.slice(-t)):[]}catch(n){return[]}}function wn(e,t,n){try{let r=(()=>{try{let s=localStorage.getItem(n);if(!s)return[];let a=JSON.parse(s);return Array.isArray(a)?a:[]}catch(s){return[]}})(),o=new Map;for(let s of r)o.set(s.id,s);for(let s of e)o.set(s.id,s);localStorage.setItem(n,JSON.stringify([...o.values()].slice(-t)))}catch(r){}}function hr(e,t){try{let n=localStorage.getItem(t);if(!n)return;let r=JSON.parse(n);if(!Array.isArray(r))return;let o=new Set(e),s=r.filter(a=>!o.has(a.id));if(s.length===r.length)return;s.length===0?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(s))}catch(n){}}var Jo=500,Yo=56*1024;function Bt(e){return`_snt_retry_${e.slice(0,12)}`}var Xo={push:()=>{},flush:()=>{},destroy:()=>{}};function yr(e){var t,n,r;if(typeof window=="undefined")return Xo;let o=(t=e.flushIntervalMs)!=null?t:5e3,s=(n=e.maxBatchSize)!=null?n:20,a=(r=e.maxRetrySize)!=null?r:100,u=e.ingestUrl,i=e.apiKey,c=Bt(i),l=!1,p=fe(i),h=(...O)=>{!l&&fe(i)===p&&wn(...O)},b=[],w=new Set,S=[],K=O=>{for(let B of O)L.delete(B),!w.has(B)&&(w.add(B),S.push(B));for(;S.length>Jo;){let B=S.shift();B&&w.delete(B)}hr(O,c)},L=new Set,D=()=>{for(;b.length>a;){let O=b.shift();O&&L.delete(O.id)}},_=O=>{w.has(O.id)||L.has(O.id)||(L.add(O.id),b.push(O),D())},A=O=>{for(let B of O)w.has(B.id)||(L.add(B.id),b.push(B));D()},x=mr(c,a);for(let O of x)_(O);let P=0,m=0,v=(O,B=!0)=>{if(O.length===0)return;let ne=JSON.stringify(O),ue=O.map(Me=>Me.id),Q,we=je(15e3);try{Q=fetch(u,{method:"POST",keepalive:!0,signal:we.signal,body:ne,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`}})}catch(Me){h(O,a,c),A(O),m++,P=Date.now()+Ve(m);return}Promise.resolve(Q).then(we.clear,we.clear);let ee=Me=>{if(Mt(Me)!=="retry"){if(!Me.ok&&B){let Be=O.filter(Le=>Le.eventType!=="pageview");if(Be.length>0&&Be.length<O.length){K(O.filter(Le=>Le.eventType==="pageview").map(Le=>Le.id)),v(Be,!1);return}}K(ue),m=0,P=0;return}h(O,a,c),A(O),m++,P=Date.now()+Ve(m)};Q&&typeof Q.then=="function"?Q.then(ee).catch(()=>{h(O,a,c),A(O),m++,P=Date.now()+Ve(m)}):ee(Q)},d=typeof TextEncoder!="undefined"?new TextEncoder:null,g=O=>d?d.encode(O).length:O.length,I=O=>{let B=[],ne=2;for(let ue of O){let Q=g(JSON.stringify(ue))+1;if(B.length>0&&ne+Q>Yo||B.length>=s)break;B.push(ue),ne+=Q}return B},M=()=>{try{if(Date.now()<P)return;for(;b.length>0&&!(Date.now()<P);){let O=b.filter(ne=>!w.has(ne.id));if(b.length=0,O.length===0)break;let B=I(O);if(B.length===0)break;B.length<O.length&&b.push(...O.slice(B.length)),v(B)}}catch(O){}},q=!0,J=null;J=setInterval(()=>{q&&M()},o);let Y=()=>{document.visibilityState==="hidden"&&M()},xe=()=>{M()};return document.addEventListener("visibilitychange",Y),window.addEventListener("pagehide",xe),{push(O){_(O),b.length>=s&&M()},flush:M,destroy(O){O!=null&&O.forget&&(l=!0),q=!1,J!==null&&(clearInterval(J),J=null),document.removeEventListener("visibilitychange",Y),window.removeEventListener("pagehide",xe),M()}}}var Zo=200;function $t(e){return`_snt_goal_retry_${e.slice(0,12)}`}var Qo={send:()=>{},flush:()=>{},destroy:()=>{}};function vr(e){var t,n,r;if(typeof window=="undefined")return Qo;let o=(t=e.flushIntervalMs)!=null?t:5e3,s=(n=e.maxRetrySize)!=null?n:100,a=(r=e.maxPerFlush)!=null?r:5,u=$t(e.apiKey),i=!1,c=fe(e.apiKey),l=(...g)=>{!i&&fe(e.apiKey)===c&&wn(...g)},p=[],h=new Set,b=new Set,w=[],S=0,K=0,L=!1,D=g=>{for(h.delete(g.id),b.has(g.id)||(b.add(g.id),w.push(g.id));w.length>Zo;){let I=w.shift();I&&b.delete(I)}hr([g.id],u)},_=g=>{l([g],s,u),!b.has(g.id)&&!h.has(g.id)&&(h.add(g.id),p.push(g)),Date.now()>=S&&(K++,S=Date.now()+Ve(K))},A=g=>{let I,M=je(15e3);try{I=fetch(e.url,{method:"POST",keepalive:!0,signal:M.signal,body:g.body,headers:e.headers})}catch(J){_(g);return}let q=J=>{var Y;let xe=Mt(J);if(xe==="retry"){_(g);return}xe==="dropped"&&((Y=e.onDrop)==null||Y.call(e,g,J.status)),D(g),K=0,S=0};Promise.resolve(I).then(M.clear,M.clear),I&&typeof I.then=="function"?I.then(q).catch(()=>_(g)):q(I)},x=()=>{try{if(L||Date.now()<S)return;let g=0;for(;p.length>0&&g<a&&!(Date.now()<S);){let I=p.shift();h.delete(I.id),!b.has(I.id)&&(g++,A(I))}}catch(g){}},P=mr(u,s);for(let g of P)h.has(g.id)||(h.add(g.id),p.push(g));P.length>0&&wn(P,s,u);let m=setInterval(x,o),v=()=>{document.visibilityState==="hidden"&&x()},d=()=>x();return document.addEventListener("visibilitychange",v),window.addEventListener("pagehide",d),{send(g){if(L){b.has(g.id)||l([g],s,u);return}if(!(b.has(g.id)||h.has(g.id))){if(Date.now()<S){l([g],s,u),h.add(g.id),p.push(g);return}A(g)}},flush:x,destroy(g){g!=null&&g.forget&&(i=!0),clearInterval(m),document.removeEventListener("visibilitychange",v),window.removeEventListener("pagehide",d),x(),L=!0}}}function it(e){if(typeof window=="undefined"||!e)return!1;Dt(e);let t=!1,n=gt(e);try{if(new RegExp(`(?:^|; )${n}=`).test(document.cookie)){let a=location.protocol==="https:"?"; Secure":"";document.cookie=`${n}=; max-age=0; SameSite=lax; path=/${a}`,t=!0}}catch(a){}let r=ze(e),o=[n,"_snt_graph_edges",rt+e,Bt(e),$t(e),`_snt_graph_nodes${r}`],s=[`_snt_asgn${r}_`];for(let a of["localStorage","sessionStorage"])try{let u=window[a];for(let i of o)u.getItem(i)!==null&&(u.removeItem(i),t=!0);for(let i=u.length-1;i>=0;i--){let c=u.key(i);c&&s.some(l=>c.startsWith(l))&&(u.removeItem(c),t=!0)}}catch(u){}try{(new RegExp(`(?:^|; )${We}=[^;]`).test(document.cookie)||localStorage.getItem(We)!==null||sessionStorage.getItem(We)!==null)&&localStorage.setItem(`${We}_tomb${r}`,"1")}catch(a){}return t}kn();function Kt(e){return Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("|")}function wr(e){if(e.length===0)return null;let t={};for(let n of e.split("|")){let r=n.indexOf("=");if(r<=0||r!==n.lastIndexOf("=")||r===n.length-1)return null;let o=n.slice(0,r);if(o in t)return null;t[o]=n.slice(r+1)}return t}function _n(e){var t,n,r;if(e.arms)return typeof e.baseline=="string"?e.baseline:(t=e.arms[0])!=null?t:"";if(e.baseline!==void 0&&typeof e.baseline=="object")return Kt(e.baseline);if(typeof e.baseline=="string")return e.baseline;let o={};for(let[s,a]of Object.entries((n=e.dims)!=null?n:{}))o[s]=(r=a[0])!=null?r:"";return Kt(o)}function Er(e,t){var n,r;return e.dims!=null?(r=(n=wr(t))!=null?n:wr(_n(e)))!=null?r:{}:t}function Je(e){return e>=.3?e<.7?"medium":"high":"low"}var ii=["GPTBot","ChatGPT-User","OAI-SearchBot","ClaudeBot","Claude-User","Claude-SearchBot","PerplexityBot","Perplexity-User","Google-Extended","Applebot-Extended","Meta-ExternalAgent","Bytespider","CCBot","Amazonbot","cohere-ai","Diffbot"];function kr(e){return si(e)!==null}function si(e){var t;if(!e)return null;let n=e.toLowerCase();return(t=ii.find(r=>n.includes(r.toLowerCase())))!=null?t:null}function _r(e){let t=e.toLowerCase();return/ipad|tablet|playbook|kindle|silk/.test(t)?"tablet":/mobi|iphone|ipod|android.*mobile|phone/.test(t)?"mobile":"desktop"}function Ar(e,t){if(!e)return"direct";try{let n=new URL(e);if(t)try{if(new URL(t).host===n.host)return"direct"}catch(o){}let r=n.hostname.toLowerCase();return/(^|\.)(google|bing|duckduckgo|yahoo)\./.test(r)?"search":/(^|\.)(twitter\.com|x\.com|facebook\.com|linkedin\.com|reddit\.com|t\.co)$/.test(r)?"social":"referral"}catch(n){return"direct"}}function xr(e){if(!e)return null;try{return new URL(e).hostname}catch(t){return null}}var ai=["gclid","gbraid","wbraid","fbclid","ttclid","msclkid","twclid","li_fat_id"];function Cr(e){let t={},n={};try{let r=typeof e=="string"||e instanceof URLSearchParams?new URLSearchParams(e):Object.entries(e).flatMap(([o,s])=>{let a=Array.isArray(s)?s[0]:s;return a===void 0?[]:[[o,a]]});for(let[o,s]of r)o.startsWith("utm_")?o in t||(t[o]=s):ai.includes(o)&&(o in n||(n[o]=s))}catch(r){}return{utmParams:t,clickIds:n}}function Or(e){let t=e.getHours();return t<6?"night":t<12?"morning":t<18?"afternoon":"evening"}function An(e){return F(F(F({id:e.id},e.arms?{arms:[...e.arms]}:{}),e.dims?{dims:Object.fromEntries(Object.entries(e.dims).map(([t,n])=>[t,[...n]]))}:{}),e.baseline!==void 0?{baseline:e.baseline}:{})}function xn(e){let t=An(e);return Er(t,_n(t))}function Ir(e){return typeof e=="string"?e:Kt(e)}kn();var Pn;function zt(e){Pn=typeof e=="string"&&e!==""?e:void 0}function Mr(e=document){if(Pn)return Pn;try{let t=e.querySelector("script[nonce]");return(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"))||void 0}catch(t){return}}function Ge(e,t=document){let n=Mr(t);return n&&e.setAttribute("nonce",n),e}function Br(){try{if(typeof crypto!="undefined"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch(e){}try{if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"){let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t="";for(let n=0;n<16;n++)t+=e[n].toString(16).padStart(2,"0"),(n===3||n===5||n===7||n===9)&&(t+="-");return t}}catch(e){}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Pr="_snt_uid",ci=365,st="_snt_uid";function di(){return Br()}function Cn(e){try{let t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}catch(t){return null}}function Dn(){try{return location.protocol==="https:"?"; Secure":""}catch(e){return""}}function fi(e,t,n){try{document.cookie=`${e}=${encodeURIComponent(t)}; max-age=${n}; SameSite=lax; path=/${Dn()}`}catch(r){}}function jt(e){try{return localStorage.getItem(e)}catch(t){return null}}function Rr(e,t){try{return localStorage.setItem(e,t),!0}catch(n){return!1}}function On(e){try{return sessionStorage.getItem(e)}catch(t){return null}}function pi(e,t){try{return sessionStorage.setItem(e,t),!0}catch(n){return!1}}function gi(e){try{sessionStorage.removeItem(e)}catch(t){}}function mi(e){try{return document.cookie=`${e}_probe=1; max-age=1; SameSite=lax; path=/${Dn()}`,document.cookie.indexOf(`${e}_probe=1`)!==-1}catch(t){return!1}}function hi(e){try{localStorage.removeItem(e)}catch(t){}}function yi(e){try{document.cookie=`${e}=; max-age=0; SameSite=lax; path=/${Dn()}`}catch(t){}}var vi={getSessionId:()=>null,isEphemeral:()=>!1,destroy:()=>{}};function $r(e){var t,n,r,o,s,a,u;if(typeof window=="undefined")return vi;let i=ze(e==null?void 0:e.apiKey),c=(t=e==null?void 0:e.cookieName)!=null?t:gt(e==null?void 0:e.apiKey),l=`${st}${i}`,p=`${st}_tomb${i}`,h=((n=e==null?void 0:e.cookieTTLDays)!=null?n:ci)*24*60*60,b=A=>A&&A.length>0?A:null,w=()=>{var A,x;return i&&!(e!=null&&e.cookieName)&&jt(p)===null?(x=(A=b(Cn(Pr)))!=null?A:b(jt(st)))!=null?x:b(On(st)):null},S=(u=(a=(s=(o=(r=b(Cn(c)))!=null?r:b(jt(l)))!=null?o:b(On(l)))!=null?s:w())!=null?a:b(e==null?void 0:e.ssrSessionId))!=null?u:di();fi(c,S,h);let K=Rr(l,S),L=mi(c),D=K?!1:pi(l,S),_=!K&&!L&&!D;return{getSessionId:()=>S,isEphemeral:()=>_,destroy:()=>{S=null,yi(c),hi(l),gi(l),i&&!(e!=null&&e.cookieName)&&(Cn(Pr)!==null||jt(st)!==null||On(st)!==null)&&Rr(p,"1")}}}var Si=1800*1e3;function Gt(e,t){return`${encodeURIComponent(e)}:${encodeURIComponent(t)}`}function bi(e=Si,t){let n=new Map,r=`_snt_asgn${ze(t)}_`,o=(i,c)=>`${r}${encodeURIComponent(i)}:${encodeURIComponent(c)}`,s=i=>{let c=i.slice(r.length),l=c.indexOf(":");if(l<0)return null;try{return{componentId:decodeURIComponent(c.slice(0,l)),segment:decodeURIComponent(c.slice(l+1))}}catch(p){return null}},a=()=>{try{let i=[];for(let c=0;c<localStorage.length;c++){let l=localStorage.key(c);l!=null&&l.startsWith(r)&&i.push(l)}return i}catch(i){return[]}},u=i=>i.assignedAt+(i.ttlMs&&i.ttlMs>0?i.ttlMs:e)<Date.now();return typeof window!="undefined"&&(()=>{for(let i of a())try{let c=localStorage.getItem(i);if(!c)continue;let l=JSON.parse(c);if(u(l)){localStorage.removeItem(i);continue}let p=s(i);if(!p)continue;n.set(Gt(p.componentId,p.segment),l)}catch(c){}})(),{get(i,c){let l=n.get(Gt(i,c));return l?u(l)?(n.delete(Gt(i,c)),null):l:null},set(i,c,l){let p=Gt(i,c);n.set(p,l);try{localStorage.setItem(o(i,c),JSON.stringify(l))}catch(h){}},clear(){n.clear();for(let i of a())try{localStorage.removeItem(i)}catch(c){}}}}var Rn="[sentient] No API key configured \u2014 nothing is being learned. Set NEXT_PUBLIC_SENTIENT_API_KEY or pass localMode: true for local development.",Kr="[sentient] Local mode \u2014 decisions are simulated on-device and nothing is sent over the network. Add an API key to learn from real traffic.",Nr=!1,Ft=!1;function wi(){var e;try{return(e=new URLSearchParams(window.location.search).get("sentient_persona"))!=null?e:void 0}catch(t){return}}function Ei(e){var t;let n=$r({ssrSessionId:e.ssrSessionId,apiKey:e.apiKey}),r=(t=n.getSessionId())!=null?t:"local",o=wi(),s=Promise.resolve().then(()=>(Lr(),Tr)).then(l=>{let p=l;return p.LOCAL_ENGINE_AVAILABLE?(Nr||(Nr=!0,console.info(Kr)),p):(Ft||(Ft=!0,console.error(Rn)),null)}).catch(()=>(Ft||(Ft=!0,console.error(Rn)),null)),a=null,u={low:.15,medium:.5,high:.85},i=(()=>{var l;if(e.initialPersona)return F({},e.initialPersona);let p=ot(e.apiKey||"local");return p?{persona:p.persona,confidence:(l=u[p.band])!=null?l:.15}:null})();function c(l){let p=document.documentElement;p.dataset.sentientPersona===void 0&&(p.dataset.sentientPersona=l.persona,p.dataset.sentientConfidence=Je(l.confidence))}return{isLocal:!0,async decide(l){var p,h,b;let w=await s;if(!w)return null;let S=w.createLocalEngine({sessionId:r,forcedPersona:o}).decide(l);return a=qe(F({},S),{layoutOrder:(h=(p=S.layoutOrder)!=null?p:a==null?void 0:a.layoutOrder)!=null?h:null,slots:F(F({},(b=a==null?void 0:a.slots)!=null?b:{}),S.slots)}),He(e.apiKey||"local",{v:1,persona:a.persona,band:Je(a.confidence),slots:a.slots,layoutOrder:a.layoutOrder,savedAt:Date.now()}),c(S),S},getSlotResult(l){var p,h,b;return(b=(h=a==null?void 0:a.slots[l])!=null?h:(p=e.initialSlots)==null?void 0:p[l])!=null?b:null},getSlotConfig(l){var p,h;return(h=(p=e.initialSlotConfig)==null?void 0:p[l])!=null?h:null},getSitePalette(){var l;return(l=e.initialPalette)!=null?l:null},reportSlots(){},getPersona(){let l=a!=null?a:i;return l?{persona:l.persona,confidence:l.confidence,band:Je(l.confidence)}:null},async assign(l,p){var h;let b=await s;return!b||!p||p.length===0?p!=null&&p[0]?{variantId:p[0],assignmentTtlMs:0}:null:{variantId:(h=b.createLocalEngine({sessionId:r,forcedPersona:o}).decide({components:[{id:l,variantIds:p}]}).assignments[l])!=null?h:p[0],assignmentTtlMs:0}},track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,fetchWeights:()=>Promise.resolve([]),getGraph:()=>({pageNodes:[],capturedAt:0}),flush:()=>{},dispose:()=>{},destroy:()=>n.destroy()}}var Wt=/^(\*|\/[^\s?#*]*(\/\*)?)$/;function In(e){let t=e.split(/[?#]/)[0]||"/";return t.length>1?t.replace(/\/+$/,"")||"/":t}function Mn(e,t){if(e===void 0||!Wt.test(e))return!1;if(e==="*")return!0;let n=In(t);if(e.endsWith("/*")){let r=In(e.slice(0,-2));return n.startsWith(r==="/"?"/":`${r}/`)&&n!==r}return n===In(e)}function ht(e){if(e==null||typeof e!="object"||Array.isArray(e))return!1;let t=e;return t.type==="form"?!0:Array.isArray(t.children)?t.children.some(ht):!1}var Dr="sentient-reveal",at="sentient-revealed",jr=240,Tn=!1;function ki(e){if(Tn||e.getElementById(Dr)){Tn=!0;return}let t=Ge(e.createElement("style"),e);t.id=Dr,t.textContent=`@media (prefers-reduced-motion: no-preference){@keyframes ${at}{from{opacity:.55;transform:translateY(2px)}to{opacity:1;transform:none}}.${at}{animation:${at} ${jr}ms cubic-bezier(.2,.6,.2,1) both}}`,e.head.appendChild(t),Tn=!0}function Bn(e,t={}){var n;let r=(n=t.doc)!=null?n:typeof document!="undefined"?document:void 0;if(!r||!(e instanceof Element)||(t.arm!==void 0&&e.setAttribute("data-sentient-arm",t.arm),t.persona!==void 0&&e.setAttribute("data-sentient-persona",t.persona),t.previous!==void 0&&t.previous===e.textContent))return!1;ki(r),e.classList.remove(at),e.offsetWidth,e.classList.add(at);let o=()=>{e.classList.remove(at),e.removeEventListener("animationend",o)};return e.addEventListener("animationend",o),!0}function $n(e,t,n,r){let o=[];{let s=!1,a=[],u=()=>{if(s)return;let i=Date.now();for(a.push(i);a.length>0&&i-a[0]>500;)a.shift();a.length>=3&&(s=!0,e("rage_click"))};t.addEventListener("click",u),o.push(()=>t.removeEventListener("click",u))}{let s=!1,a=u=>{if(s||!(u.target instanceof Node)||!t.contains(u.target)&&t!==u.target)return;s=!0;let i=typeof window!="undefined"?window.getSelection():null,c=i?i.toString().length:0;e("text_copy",{selectionLength:c})};document.addEventListener("copy",a),o.push(()=>document.removeEventListener("copy",a))}{let s=!1,a=!1,u=null,i=()=>{u!==null&&(clearTimeout(u),u=null)},c=()=>{s||!a||(i(),u=setTimeout(()=>{!s&&a&&(s=!0,e("scroll_hesitation"))},3e3))},l=()=>{i(),c()},p=b=>{for(let w of b)a=w.intersectionRatio>.3,a?c():i()},h=new IntersectionObserver(p,{threshold:[.3]});h.observe(t),window.addEventListener("scroll",l,{passive:!0}),o.push(()=>{h.disconnect(),window.removeEventListener("scroll",l),i()})}if((r==null?void 0:r.tabLoss)!==!1){let s=!1,a=n!=null?n:Date.now(),u=()=>{if(s||document.visibilityState!=="hidden")return;let i=Date.now()-a;i<15e3&&(s=!0,e("tab_loss",{timeOnPage:i}))};document.addEventListener("visibilitychange",u),o.push(()=>document.removeEventListener("visibilitychange",u))}return()=>{for(let s of o)s()}}function _i(){var e;return typeof process=="undefined"||((e=process.env)==null?void 0:e.NODE_ENV)!=="production"}var Gr="https://api.sentient-ui.com/v1/events",pe=new Map,Fr=null;function Ai(e){return"value"in e||"currency"in e||"externalId"in e||"metadata"in e||"weight"in e||"stepIndex"in e}var xi=3;function Ln(){return Br()}function Ut(){var e;if(typeof window!="undefined")return((e=window.location)==null?void 0:e.pathname)||void 0}function Ci(){let e=new WeakMap,t=new Map,n=!1,r=(u,i,c)=>{let l=u.get(i);return c===null?l?!0:(u.set(i,new Set),!1):l?l.has(c)?!0:(l.add(c),!1):(u.set(i,new Set([c])),!1)},o=typeof window!="undefined"&&"event"in window,s=()=>{if(!o)return;let u=window.event;return typeof Event=="function"&&u instanceof Event?u:void 0},a=()=>{if(o){Promise.resolve().then(()=>{n=!1,t.clear()});return}let u=!1,i=()=>{u||(u=!0,n=!1,t.clear())};if(setTimeout(i,0),typeof MessageChannel=="function"){let c=new MessageChannel;c.port1.onmessage=()=>{c.port1.close(),c.port2.close(),i()},c.port2.postMessage(0)}};return{firedBefore(u,i){let c=s();if(c){let p=e.get(c);return p||(p=new Map,e.set(c,p)),r(p,u,i)}let l=r(t,u,i);return!l&&!n&&(n=!0,a()),l}}}var Ur=new Set;function Oi(e,t,n){let r=typeof window=="undefined"?null:window.history;if(!r)return()=>{};let o=!1,s,a=()=>{if(o)return;let c=Ut();!c||c===s||(s=c,e.track({projectId:t,componentId:"__page__",eventType:"pageview",payload:{}}),n(`${t}:${c}`))},u=[];for(let c of["pushState","replaceState"]){let l=r[c],p=function(...h){let b=l.apply(this,h);return a(),b};r[c]=p,u.push([c,l,p])}window.addEventListener("popstate",a);let i=Ut();return i&&Ur.has(`${t}:${i}`)?s=i:a(),()=>{if(!o){o=!0,window.removeEventListener("popstate",a);for(let[c,l,p]of u)r[c]===p&&(r[c]=l)}}}var mt={track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,assign:()=>Promise.resolve(null),decide:()=>Promise.resolve(null),getSlotResult:()=>null,getSlotConfig:()=>null,getSitePalette:()=>null,reportSlots:()=>{},getPersona:()=>null,fetchWeights:()=>Promise.resolve([]),getGraph:()=>({pageNodes:[],capturedAt:0}),flush:()=>{},dispose:()=>{},destroy:()=>{}};function Ii(){try{return Cr(window.location.search)}catch(e){return{utmParams:{},clickIds:{}}}}function zr(e){return e.replace(/\/events\/?$/,"")}function Ye(){return typeof navigator!="undefined"&&navigator.globalPrivacyControl===!0?!0:[typeof navigator!="undefined"?navigator.doNotTrack:void 0,typeof window!="undefined"?window.doNotTrack:void 0,typeof navigator!="undefined"?navigator.msDoNotTrack:void 0].some(e=>e==="1"||e==="yes")}function Kn(e){var t;if(typeof window=="undefined")return;let n=e!=null?e:Fr;if(!n){console.warn("[sentient] grantConsent() called before init()");return}let r=pe.get(n);if(!r){console.warn("[sentient] grantConsent() called before init()");return}let{config:o,upgrade:s,reinit:a}=r;if(!s){r.upgradeBlockedReason&&console.warn(r.upgradeBlockedReason);return}if(o.respectDoNotTrack!==!1&&Ye())return;let u=(a!=null?a:yt)(qe(F({},o),{consent:!0}));s(u);let i=(t=pe.get(n))==null?void 0:t.dispose;pe.set(n,{config:qe(F({},o),{consent:!0}),upgrade:null,dispose:i})}function Ti(e,t){var n;let r=e.preConsentBehavior==="statistical_winner",o=zr((n=e.ingestUrl)!=null?n:Gr),s={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},a=new Map,u=new Map,i={track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,fetchWeights:()=>Promise.resolve([]),assign(m,v,d){if(!r)return Promise.resolve(null);let g=a.get(m);return g?Promise.resolve(g):Nn(u,m,async()=>{try{let I=new URLSearchParams({componentId:m});for(let Y of v!=null?v:[])I.append("variantIds[]",Y);let M=je(5e3),q;try{let Y=await fetch(`${o}/winner?${I.toString()}`,{headers:s,signal:M.signal});if(!Y.ok)return v!=null&&v[0]?{variantId:v[0],assignmentTtlMs:0}:null;q=await Y.json()}finally{M.clear()}let J={variantId:q.variantId,assignmentTtlMs:0};return a.set(m,J),J}catch(I){return v!=null&&v[0]?{variantId:v[0],assignmentTtlMs:0}:null}})},decide:()=>Promise.resolve(null),getSlotResult:()=>null,getSlotConfig:()=>null,getSitePalette:()=>null,reportSlots:()=>{},getPersona:()=>null,getGraph:()=>({pageNodes:[],capturedAt:0}),flush:()=>{},dispose:()=>{},destroy:()=>{}},c=!1,l=new Set,p=[],h=[],b=[],w=()=>{for(let[,,m]of b.splice(0))m(null);S.length=0},S=[],K=!1,L=()=>{if(c)return;K=!0;let m=pe.get(e.apiKey);(m==null?void 0:m.upgrade)===P&&pe.set(e.apiKey,{config:e,upgrade:null,upgradeBlockedReason:"[sentient] grantConsent(): client released before consent; call init() again"})},D=[],_=()=>{setTimeout(()=>{var m;try{(m=D.shift())==null||m(i)}catch(v){}D.length&&_()})},A=m=>{c?D.length?D.push(m):m(i):!t&&!K&&S.length<100?S.push(m):K&&e.debug&&console.warn("[sentient] goal dropped: client released")},x={get gated(){return!c&&!t},get released(){return K&&!c},takeHeld:()=>S.splice(0),track:m=>i.track(m),goal:((m,v,d,g)=>A(I=>I.goal(m,v,d,g))),componentGoal:(m,v,d)=>i.componentGoal(m,v,d),identify:m=>i.identify(m),getAssignment:(m,v)=>i.getAssignment(m,v),assign:(m,v,d,g)=>i.assign(m,v,d,g),decide:m=>c?i.decide(m):K||t?Promise.resolve(null):new Promise(v=>b.push([m,Ie(),v])),getSlotResult:m=>i.getSlotResult(m),isSlotDecided:m=>{var v,d;return(d=(v=i.isSlotDecided)==null?void 0:v.call(i,m))!=null?d:!0},getSlotConfig:m=>i.getSlotConfig(m),getSitePalette:()=>i.getSitePalette(),getStyleVocabulary:()=>{var m,v;return(v=(m=i.getStyleVocabulary)==null?void 0:m.call(i))!=null?v:null},reportSlots:(m,v,d,g)=>i.reportSlots(m,v,d,g),reportSkeleton:(m,v)=>{var d;return(d=i.reportSkeleton)==null?void 0:d.call(i,m,v)},reportDrift:(m,v,d,g)=>{var I;return(I=i.reportDrift)==null?void 0:I.call(i,m,v,d,g)},requestSlots:(m,v,d)=>{var g;return c?(g=i.requestSlots)==null?void 0:g.call(i,m,v,d):p.push([m,v,d])},decideSlots:m=>{var v;return c?(v=i.decideSlots)==null?void 0:v.call(i,m):h.push(...m)},cancelSlots:m=>{var v;if(c)return(v=i.cancelSlots)==null?void 0:v.call(i,m);let d=new Set(m);for(let g of p)g[0]=g[0].filter(I=>!d.has(I));h=h.filter(g=>!d.has(g.id))},onSlotsChanged:m=>(l.add(m),()=>{l.delete(m)}),getPersona:()=>i.getPersona(),fetchWeights:()=>i.fetchWeights(),getGraph:()=>i.getGraph(),flush:()=>i.flush(),dispose:()=>(L(),w(),i.dispose()),destroy:()=>(L(),w(),c?i.destroy():it(e.apiKey))};function P(m){var v,d,g;i=m,c=!0,S.length&&(D.push(...S.splice(0)),_());let I=Ie();for(let[M,q,J]of b.splice(0))q!==I?J(null):m.decide(M).then(J,()=>J(null));(v=m.onSlotsChanged)==null||v.call(m,()=>l.forEach(M=>M()));for(let[M,q,J]of p.splice(0))M.length>0&&((d=m.requestSlots)==null||d.call(m,M,q,J));h.length>0&&((g=m.decideSlots)==null||g.call(m,h.splice(0)))}return{proxy:x,setInner:P}}function Ie(){return typeof location=="undefined"?"":location.pathname+(/^#!?\//.test(location.hash)?location.hash:"")}function Nn(e,t,n){let r=e.get(t);if(r)return r;let o=(async()=>{try{return await n()}finally{e.delete(t)}})();return e.set(t,o),o}function yt(e){var t,n,r,o,s,a,u,i,c,l;if(typeof window=="undefined")return mt;e.nonce&&zt(e.nonce),Fr=e.apiKey||"local";let p=pe.get(e.apiKey||"local");if(p!=null&&p.dispose)try{p.dispose()}catch(f){}let h=e.respectDoNotTrack!==!1&&Ye(),b=e.consent===!1||h,w=typeof e.apiKey=="string"&&e.apiKey.startsWith("pk_");if(e.localMode===!0||!w&&e.localMode!==!1)return pe.set(e.apiKey||"local",{config:e,upgrade:null,upgradeBlockedReason:"[sentient] grantConsent(): this client is keyless/local \u2014 there is no hosted client to upgrade to. Configure a pk_ API key to enable tracking."}),b?mt:Ei(e);if(b){if(!e.apiKey||!e.apiKey.startsWith("pk_"))return e.preConsentBehavior==="statistical_winner"&&console.warn("[sentient] init() called with an invalid apiKey \u2014 expected a pk_ public key. SDK disabled."),pe.set(e.apiKey||"local",{config:e,upgrade:null,upgradeBlockedReason:"[sentient] grantConsent(): the client was initialized with an invalid apiKey (expected a pk_ public key) \u2014 consent cannot enable tracking."}),mt;let{proxy:f,setInner:y}=Ti(e,h);return pe.set(e.apiKey,{config:e,upgrade:h?null:y}),f}if(!e.apiKey||!e.apiKey.startsWith("pk_"))return console.warn("[sentient] init() called with an invalid apiKey \u2014 expected a pk_ public key. SDK disabled."),mt;if(e.ingestUrl==="")return console.warn("[sentient] init() called with an empty ingestUrl. SDK disabled."),mt;let S=(t=e.ingestUrl)!=null?t:Gr,K=Date.now(),L=$r({ssrSessionId:e.ssrSessionId,apiKey:e.apiKey}),D=bi(void 0,e.apiKey),_=!1,A=fe(e.apiKey),x=()=>!_&&fe(e.apiKey)===A,P=qe(F({},D),{set:(...f)=>{x()&&D.set(...f)}}),m=yr({ingestUrl:S,apiKey:e.apiKey}),v=zr(S),d={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},g=new Set,I=vr({url:`${v}/goals`,apiKey:e.apiKey,headers:d,onDrop:(f,y)=>{if(!e.debug){if(g.has(y))return;g.add(y)}console.warn(`[sentient] goal dropped (HTTP ${y}) \u2014 this will not be retried. `+(y===400?"The session was not found: call init() and let the session upsert complete before firing goals.":y===401||y===403?"Check the API key and that this origin is on the project allowlist.":"See the response status for the cause."),f)}}),M=_r((n=navigator.userAgent)!=null?n:""),q=window.location.origin,J=Ar((r=document.referrer)!=null?r:"",q),Y=(o=e.sessionSegment)!=null?o:`${M}:${J}`,xe=new Map,O=new Map,B=new Map,ne=new Set,ue=new Map,Q=null,we=null,ee=null,Me=new Set,Be=new Set,Le=new Map,gn=new Map,er=new Set,tr=new Set,nr=new Set,mn=null,Tt=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/,rr=new Set,Lt=new Set,Pt=new Set,dt=new Map,hn=null,Rt=new Set,ft=new Map,yn=null,Bo=2,or=new Map,Ee=!1,ir=(f,y,N)=>{var z;let j=new Set,E=1;for(let C of f){y.delete(C);let T=((z=or.get(C))!=null?z:0)+1;or.set(C,T),T<=Bo&&(j.add(C),T>E&&(E=T))}j.size>0&&setTimeout(()=>{Ee||N(j)},Ve(E))},vn=f=>{for(let y of f)B.has(y.id)||B.set(y.id,xn(y))};if(e.initialSlots)for(let[f,y]of Object.entries(e.initialSlots))B.set(f,y),ne.add(f);if(e.initialSlotConfig)for(let[f,y]of Object.entries(e.initialSlotConfig))ue.set(f,y);e.initialPalette&&(Q=e.initialPalette),e.initialVocabulary&&(we=e.initialVocabulary);let Ce=ot(e.apiKey);if(Ce){for(let[f,y]of Object.entries(Ce.slots))B.has(f)||B.set(f,y);for(let[f,y]of Object.entries((s=Ce.slotConfig)!=null?s:{}))ue.has(f)||ue.set(f,y);!Q&&Ce.palette&&(Q=Ce.palette),!we&&Ce.vocabulary&&(we=Ce.vocabulary)}let sr={low:.15,medium:.5,high:.85};if(e.initialPersona)ee=F({},e.initialPersona);else{let f=document.documentElement.dataset;f.sentientPersona?ee={persona:f.sentientPersona,confidence:(u=sr[(a=f.sentientConfidence)!=null?a:"low"])!=null?u:.15}:Ce&&(ee={persona:Ce.persona,confidence:(i=sr[Ce.band])!=null?i:.15})}if(e.initialAssignments)for(let[f,y]of Object.entries(e.initialAssignments))P.set(f,Y,{variantId:y,assignedAt:Date.now(),segment:Y,confidence:1});let $e=Promise.resolve(),ar=L.getSessionId();if(ar){let f=xr((c=document.referrer)!=null?c:""),{utmParams:y,clickIds:N}=Ii(),z=F(F(F(F({sessionId:ar,deviceClass:M,trafficSource:J,referrerDomain:f,utmParams:y,clickIds:N,timeOfDay:Or(new Date),dayOfWeek:["sun","mon","tue","wed","thu","fri","sat"][new Date().getDay()],ephemeral:L.isEphemeral(),automation:typeof navigator!="undefined"&&navigator.webdriver===!0||kr((l=navigator.userAgent)!=null?l:"")},e.userId?{userId:e.userId}:{}),e.persona?{persona:e.persona}:{}),e.country?{country:e.country}:{}),e.sdk?{sdk:e.sdk.name,sdkVersion:e.sdk.version}:{}),j=async()=>{for(let E=0;;E++){if(Ee||!x())return;let C=je(5e3);try{let T=await fetch(`${v}/sessions`,{method:"POST",keepalive:!0,body:JSON.stringify(z),headers:d,signal:C.signal});if(T.status===402){console.warn("[SentientUI] Session limit exceeded for this project. The bandit will stop learning until the limit resets. Upgrade at sentient-ui.com/pricing");return}if(T.ok||Mt(T)==="dropped")return}catch(T){}finally{C.clear()}if(E>=xi){console.warn("[SentientUI] Could not register the session after retries. Conversions in this visit may not be recorded.");return}await new Promise(T=>setTimeout(T,Ve(E+1)))}};try{$e=j()}catch(E){}}e.debug&&(console.log("[sentient] initialized",{context:e.context}),window.__sentient={client:null,queue:m});let $o=Ci(),pt=null,Sn=!1,se={goal(f,y={},N=1,z=0){var j,E,C,T,V,G,te;let re=L.getSessionId();if(!re||Ee||!x())return;let W=Ai(y)?y:{metadata:y},ge=[f,(j=W.externalId)!=null?j:"",(E=W.stepIndex)!=null?E:z,(C=W.weight)!=null?C:N].join("\0"),ke=W.value!==void 0?`${W.value}\0${(T=W.currency)!=null?T:""}`:null;if($o.firedBefore(ge,ke)){e.debug&&console.log(`[sentient] goal("${f}") already recorded for this action \u2014 not sent twice`);return}let de=Ln(),ae={sessionId:re,name:f,metadata:(V=W.metadata)!=null?V:{},weight:(G=W.weight)!=null?G:N,stepIndex:(te=W.stepIndex)!=null?te:z,goalId:de,value:W.value,currency:W.currency,externalId:W.externalId};e.debug&&console.log("[sentient] goal",ae);let $={id:de,body:JSON.stringify(ae)};$e.then(()=>I.send($))},componentGoal(f,y,N){var z,j,E;let C=L.getSessionId();if(!C||Ee||!x())return;let T=P.get(f,Y),V=T?null:(z=B.get(f))!=null?z:null;if(!T&&V===null){e.debug&&console.warn(`[sentient] componentGoal("${f}"): no assignment or slot decision yet \u2014 render its <Adaptive>/adaptive hook or call assign()/decide() before recording a goal.`);return}if(!T&&!ne.has(f)){e.debug&&console.warn(`[sentient] componentGoal("${f}"): slot not decided this session \u2014 not attributed`);return}let G=T?T.variantId:Ir(V),te={id:Ln(),sessionId:C,projectId:e.apiKey,componentId:f,variantId:G,eventType:"goal_achieved",goalType:y,payload:F({reward:(j=N==null?void 0:N.reward)!=null?j:1,goalValue:N==null?void 0:N.value,currency:N==null?void 0:N.currency},(E=N==null?void 0:N.metadata)!=null?E:{}),timestamp:Date.now(),timeInSession:Date.now()-K,path:Ut()};e.debug&&console.log("[sentient] componentGoal",te),$e.then(()=>{!Ee&&x()&&m.push(te)})},identify(f){let y=L.getSessionId();!y||Ee||!x()||$e.then(()=>{fetch(`${v}/sessions`,{method:"POST",keepalive:!0,body:JSON.stringify({sessionId:y,userId:f,ephemeral:L.isEphemeral()}),headers:d}).catch(()=>{})})},track(f){let y=L.getSessionId();if(!y||Ee||!x()||f.eventType==="variant_assigned"&&B.get(f.componentId)!==void 0&&!ne.has(f.componentId)&&!P.get(f.componentId,Y))return;let N=qe(F({path:Ut()},f),{id:Ln(),sessionId:y,timestamp:Date.now(),timeInSession:Date.now()-K});e.debug&&console.log("[sentient] track",N),$e.then(()=>m.push(N))},getAssignment(f,y){return P.get(f,y)},async assign(f,y,N,z){let j=L.getSessionId();if(!j)return null;let E=P.get(f,Y);if(E&&(y!=null&&y.length||E.content!==void 0)){let C=E.ttlMs&&E.ttlMs>0?Math.max(0,E.assignedAt+E.ttlMs-Date.now()):0;return{variantId:E.variantId,assignmentTtlMs:C,content:E.content}}return Nn(xe,f,async()=>{if(!await En($e,2500)||Ee||!x())return null;let C=je(3e4);try{let T={sessionId:j,componentId:f,variantIds:y};z!==void 0?T.agentDataByVariant=z:N!==void 0&&(T.agentData=N);let V=await fetch(`${v}/assign`,{method:"POST",body:JSON.stringify(T),headers:d,signal:C.signal});if(!V.ok)return null;let G=await V.json();return P.set(f,Y,F({variantId:G.variantId,assignedAt:Date.now(),segment:Y,confidence:1,content:G.content},G.assignmentTtlMs&&G.assignmentTtlMs>0?{ttlMs:G.assignmentTtlMs}:{})),G}catch(T){return null}finally{C.clear()}})},async decide(f){var y,N;let z=L.getSessionId();if(!z)return null;let j=(y=f.slots)!=null?y:[],E={sessionId:z};f.sections&&f.sections.length>0&&(E.sections=f.sections.map(T=>({id:T}))),E.components=(N=f.components)!=null?N:[],j.length>0&&(E.slots=j.map(An)),f.slotsFrom==="registry"&&(E.slotsFrom="registry",f.registrySlotIds&&(E.registrySlotIds=f.registrySlotIds),f.bootstrap===!1&&(E.bootstrap=!1),f.render&&Object.keys(f.render).length>0&&(E.render=f.render)),f.v&&(E.v=f.v),typeof f.pp=="number"&&(E.pp=f.pp),e.persona&&(E.persona=e.persona);let C=JSON.stringify(E);return Nn(O,C,async()=>{var T,V,G,te,re,W,ge,ke;if(!await En($e,2500)||Ee||!x())return vn(j),null;let de=je(3e4);try{let ae=await fetch(`${v}/decide`,{method:"POST",body:C,headers:d,signal:de.signal});if(!ae.ok)return vn(j),null;let $=await ae.json(),me={};for(let X of j){let Oe=(T=$.slots)==null?void 0:T[X.id];if(Oe!==void 0){me[X.id]=Oe,B.set(X.id,Oe),ne.add(X.id);continue}let lr=B.get(X.id);if(lr!==void 0)me[X.id]=lr;else{let ur=xn(X);me[X.id]=ur,B.set(X.id,ur)}}if($.slots)for(let[X,Oe]of Object.entries($.slots))X in me||(me[X]=Oe,B.set(X,Oe),ne.add(X));let Ko=ee!=null&&ee.persona!=="unknown";$.persona&&!($.persona==="unknown"&&Ko)?ee={persona:$.persona,confidence:(V=$.confidence)!=null?V:0}:ee||(ee={persona:"unknown",confidence:0});for(let[X,Oe]of Object.entries((G=$.assignments)!=null?G:{}))P.set(X,Y,{variantId:Oe,assignedAt:Date.now(),segment:Y,confidence:1});if($.slotConfig)for(let[X,Oe]of Object.entries($.slotConfig))ue.set(X,Oe);$.palette&&(Q=$.palette),$.vocabulary&&(we=$.vocabulary);for(let X of(te=f.registrySlotIds)!=null?te:[])(re=$.slotConfig)!=null&&re[X]||(ue.delete(X),B.delete(X),ne.delete(X));return x()&&He(e.apiKey,F(F(F({v:1,persona:ee.persona,band:Je(ee.confidence),slots:Object.fromEntries(B),layoutOrder:(W=$.layoutOrder)!=null?W:null,savedAt:Date.now()},ue.size>0?{slotConfig:Object.fromEntries(ue)}:{}),Q?{palette:Q}:{}),we?{vocabulary:we}:{})),F(F(F(F(F({layoutOrder:(ge=$.layoutOrder)!=null?ge:null,assignments:(ke=$.assignments)!=null?ke:{},slots:me,persona:ee.persona,confidence:ee.confidence},$.slotConfig?{slotConfig:$.slotConfig}:{}),$.goals?{goals:$.goals}:{}),$.sectionMap?{sectionMap:$.sectionMap}:{}),$.palette?{palette:$.palette}:{}),$.vocabulary?{vocabulary:$.vocabulary}:{})}catch(ae){return vn(j),null}finally{de.clear()}})},getSlotResult(f){var y;return(y=B.get(f))!=null?y:null},isSlotDecided(f){return ne.has(f)},getSlotConfig(f){var y;return(y=ue.get(f))!=null?y:null},reportSlots(f,y,N,z){var j;let E={};for(let[C,T]of Object.entries(z!=null?z:{}))for(let V of T){let G=`${C}|${V.key}`;!Tt.test(C)||nr.has(G)||(nr.add(G),((j=E[C])!=null?j:E[C]=[]).push(V))}Object.keys(E).length>0&&fetch(`${v}/slots/observed`,{method:"POST",headers:d,body:JSON.stringify({slotIds:Object.keys(E),authoredArms:E})}).catch(()=>{});for(let C of f)if(!(typeof C!="string"||C.length===0)){if(!Tt.test(C)){_i()&&!rr.has(C)&&(rr.add(C),console.warn(`[sentient] reportSlots: slot id ${JSON.stringify(C)} will not register \u2014 ids must start with a letter or digit and contain only letters, digits, '_' or '-' (max 128 chars): /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/.`));continue}if(!Me.has(C)){Me.add(C),Be.add(C);let T=y==null?void 0:y[C];if(typeof T=="string"){let G=T.replace(/\s+/g," ").trim().slice(0,400);G!==""&&Le.set(C,G)}let V=N==null?void 0:N[C];V!==void 0&&gn.set(C,V)}}Be.size===0||mn!=null||(mn=setTimeout(()=>{mn=null;let C=[...Be];Be.clear();for(let T=0;T<C.length;T+=20){let V=C.slice(T,T+20),G={},te={};for(let re of V){let W=Le.get(re);W!==void 0&&(G[re]=W,Le.delete(re));let ge=gn.get(re);ge!==void 0&&(te[re]=ge,gn.delete(re))}fetch(`${v}/slots/observed`,{method:"POST",headers:d,body:JSON.stringify(F(qe(F(F({slotIds:V},Object.keys(G).length>0?{baselineTexts:G}:{}),Object.keys(te).length>0?{baselineSkeletons:te}:{}),{pagePaths:Object.fromEntries(V.map(re=>[re,location.pathname]))}),Object.keys(G).length>0&&L.getSessionId()?{sessionId:L.getSessionId()}:{}))}).catch(()=>{})}},1e3))},reportSkeleton(f,y){!Tt.test(f)||er.has(f)||(er.add(f),fetch(`${v}/slots/observed`,{method:"POST",headers:d,body:JSON.stringify({slotIds:[f],baselineSkeletons:{[f]:y}})}).catch(()=>{}))},reportDrift(f,y,N,z){let j=`${f}|${y}`,E=L.getSessionId();!E||tr.has(j)||(tr.add(j),fetch(`${v}/slots/drift`,{method:"POST",headers:d,body:JSON.stringify({sessionId:E,reports:[{slotId:f,expectedFp:y,observedFp:N,reason:z}]})}).catch(()=>{}))},requestSlots(f,y,N){var z,j;for(let E of f)Pt.has(E)||(Pt.add(E),Tt.test(E)?dt.set(E,{text:y==null?void 0:y[E],render:(z=N==null?void 0:N.render)==null?void 0:z[E],skeleton:(j=N==null?void 0:N.skeletons)==null?void 0:j[E]}):se.reportSlots([E]));dt.size===0||hn!=null||(hn=setTimeout(()=>{hn=null;let E=[...dt];dt.clear();for(let C=0;C<E.length;C+=50){let T=E.slice(C,C+50),V={};for(let[G,te]of T)te.render&&(V[G]=te.render);se.decide({slotsFrom:"registry",registrySlotIds:T.map(([G])=>G),bootstrap:!1,render:V}).then(G=>{var te,re;if(G){let W={},ge={},ke=[];for(let[de,ae]of T){let $=(te=G.slotConfig)==null?void 0:te[de];if($){$.needsSkeleton&&ae.skeleton&&((re=se.reportSkeleton)==null||re.call(se,de,ae.skeleton));continue}ke.push(de),ae.text&&(W[de]=ae.text),ae.skeleton&&(ge[de]=ae.skeleton)}ke.length>0&&se.reportSlots(ke,W,ge)}else ir(T.map(([W])=>W),Pt,W=>{var ge;let ke={},de={},ae={};for(let[$,me]of T)W.has($)&&(me.text&&(ke[$]=me.text),me.render&&(de[$]=me.render),me.skeleton&&(ae[$]=me.skeleton));(ge=se.requestSlots)==null||ge.call(se,[...W],ke,{render:de,skeletons:ae})});Lt.forEach(W=>W())})}},0))},decideSlots(f){for(let y of f)Rt.has(y.id)||(Rt.add(y.id),ft.set(y.id,y));ft.size===0||yn!=null||(yn=setTimeout(()=>{yn=null;let y=[...ft.values()];ft.clear();for(let N=0;N<y.length;N+=30){let z=y.slice(N,N+30);se.decide({slots:z}).then(j=>{j||ir(z.map(E=>E.id),Rt,E=>{var C;return(C=se.decideSlots)==null?void 0:C.call(se,z.filter(T=>E.has(T.id)))}),Lt.forEach(E=>E())})}},0))},cancelSlots(f){for(let y of f)dt.delete(y)&&Pt.delete(y),ft.delete(y)&&Rt.delete(y)},onSlotsChanged(f){return Lt.add(f),()=>{Lt.delete(f)}},getStyleVocabulary(){return we},getSitePalette(){return Q},getPersona(){return ee?{persona:ee.persona,confidence:ee.confidence,band:Je(ee.confidence)}:null},async fetchWeights(){var f;let y=je(5e3);try{let N=await fetch(`${v}/weights`,{headers:d,signal:y.signal});return N.ok?(f=(await N.json()).components)!=null?f:[]:[]}catch(N){return[]}finally{y.clear()}},getGraph(){return{pageNodes:[],capturedAt:0}},flush(){m.flush(),I.flush()},dispose(){var f;pt==null||pt(),Sn=!0,Ee=!0,m.destroy(),I.destroy(),((f=pe.get(e.apiKey))==null?void 0:f.dispose)===se.dispose&&pe.delete(e.apiKey),e.debug&&console.log("[sentient] disposed")},destroy(){var f;pt==null||pt(),Sn=!0,Ee=!0,_=!0,Dt(e.apiKey),m.destroy({forget:!0}),I.destroy({forget:!0}),L.destroy(),P.clear(),((f=pe.get(e.apiKey))==null?void 0:f.dispose)===se.dispose&&pe.delete(e.apiKey);try{localStorage.removeItem(rt+e.apiKey),localStorage.removeItem(Bt(e.apiKey)),localStorage.removeItem($t(e.apiKey)),localStorage.removeItem(`_snt_graph_nodes${ze(e.apiKey)}`),localStorage.removeItem("_snt_graph_edges")}catch(y){}e.debug&&console.log("[sentient] destroyed")}};if(pe.set(e.apiKey,{config:e,upgrade:null,dispose:se.dispose}),pt=Oi(se,e.apiKey,f=>{$e.then(()=>{Sn||Ur.add(f)})}),e.debug){let f=window;f.__sentient&&(f.__sentient.client=se)}return se}var jn=/(^|\/)snippet(\.global)?(\.min)?\.js(\?|$)/,Li=(()=>{var e,t;try{return(t=(e=document.currentScript)==null?void 0:e.src)!=null?t:""}catch(n){return""}})(),Pi=/@\d+\.\d+\.\d+[^/]*\//;function Gn(e){var t;try{let n=Li||((t=Array.from(document.getElementsByTagName("script")).find(r=>jn.test(r.src)))==null?void 0:t.src);for(let r of n?[n]:[]){let o=jn.test(r)?r.replace(jn,`$1${e}$4`):r.replace(/[^/?#]*([?#].*)?$/,e),s=(e==="consent.global.js"?"sha384-+7/RqBOFLU5bMaQ6bcBAWzG589skmxN8tedG9hkoQQ6HaQkRRBJfoRVD94e/fJcM":e==="editor.global.js"?"sha384-TckbrdbT10XeIIknnJGyNuvRCArZtV5v2YteLh4WT5zWo3JQjOq40eLvQzasjQdl":e==="preview.global.js"?"sha384-vdxAPgchJj9TyoCfgD43y1powSvyp9HFnq+1YircrnoQ8LsCBH/RCei+cQHMjZ+r":"sha384-CU+t8gO/N2Dn7Y2o/b8yCMluhAX4D4sHp6d44eYOOC7780TATanFSAECAjSxzInC")||"";return Pi.test(o)&&s.indexOf("sha384-")===0?{src:o,integrity:s}:{src:o}}}catch(n){}return null}var Vt=new Map;function lt(e,t,n){let r=window[t];if(r)return Promise.resolve(r);let o=Vt.get(e);return o||(o=new Promise(s=>{var i;let a=n?{src:n}:Gn(e);if(!a)return s(null);let u=Ge(document.createElement("script"));Fn(u,a),u.async=!0,u.onload=()=>{var l;let c=(l=window[t])!=null?l:null;c||Vt.delete(e),s(c)},u.onerror=()=>{Vt.delete(e),s(null)},((i=document.head)!=null?i:document.documentElement).appendChild(u)}),Vt.set(e,o)),o}function Fn(e,t){t.integrity&&(e.integrity=t.integrity,e.crossOrigin="anonymous"),e.src=t.src}var Wr="__sentientConsent",Pe=null,Un=!1,Ht=new Set,zn=()=>{let e=window[Wr];return typeof(e==null?void 0:e.consentWatcher)=="function"?e.consentWatcher:null},vt;function Vr(e){vt=e}function Ri(){Pe||(Pe=zn())||Un||(Un=!0,lt("consent.global.js",Wr,vt).then(e=>{if(Un=!1,!e)return Ni(vt!=null?vt:"consent.global.js");if(Pe=zn(),Pe)for(let t of Array.from(Ht))t()}))}function Ni(e){console.warn(`[sentient] could not load ${e} \u2014 tracking stays off. Set window.sentient.consentSrc to its URL.`)}function Xe(e){Ri();let t=null,n=()=>(!t&&(Pe!=null?Pe:Pe=zn())&&(t=Pe(e)),t);return{read:()=>{var r,o;return(o=(r=n())==null?void 0:r.read())!=null?o:null},refused:()=>{var r,o;return(o=(r=n())==null?void 0:r.refused())!=null?o:!1},subscribe(r){let o,s=!1,a=()=>{Ht.delete(a);let u=n();s||!u||(o=u.subscribe(r),r())};return n()?(o=t.subscribe(r),Promise.resolve().then(()=>{s||r()})):Ht.add(a),()=>{s=!0,Ht.delete(a),o==null||o()}}}}function Di(e){return e.replace(/\s+/g," ").trim().slice(0,300)}function Hr(e,t){let n=t>>>0;for(let r=0;r<e.length;r++)n^=e.charCodeAt(r),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,"0")}function Mi(e){let t=e.join("");return Hr(t,2166136261)+Hr(t,1523705862)}var Bi=new Set(["A","BUTTON"]),$i=/^H([1-6])$/,Ki=new Set(["P","LI","LABEL","BLOCKQUOTE","FIGCAPTION","DT","DD","TD","TH"]);var ji=new Set(["SCRIPT","STYLE","TEMPLATE","NOSCRIPT"]);function Gi(e){return Bi.has(e.tagName)||e.getAttribute("role")==="button"?!0:e.tagName==="INPUT"&&/^(submit|button)$/i.test(e.type)}function Fi(e){if($i.test(e.tagName)||Ki.has(e.tagName))return!0;let t=e.ownerDocument.defaultView,n=t?t.getComputedStyle(e).display:"";return n!==""&&n!=="inline"&&n!=="contents"}function Ui(e,t){let n=null;for(let r=e.parentElement;r&&r!==t.parentElement;r=r.parentElement){if(Gi(r)){n=r;break}if(r===t)break}if(n)return n;for(let r=e.parentElement;r;r=r.parentElement)if(r===t||Fi(r))return r;return t}function qt(e,t=40){var n,r,o;let s=e.ownerDocument.createTreeWalker(e,4),a=[];for(let l=s.nextNode();l;l=s.nextNode())if(((n=l.nodeValue)!=null?n:"").trim()!==""&&!ji.has((o=(r=l.parentElement)==null?void 0:r.tagName)!=null?o:"")&&(a.push(l),a.length>120))return{reason:"too_large"};if(a.length===0)return{reason:"empty"};let u=[],i=[];for(let l of a){let p=Ui(l,e),h=u.indexOf(p);h===-1&&(u.push(p),h=u.length-1),i.push(h)}if(u.length>t)return{reason:"too_large"};let c=a.map(l=>{var p;return Di((p=l.nodeValue)!=null?p:"")});return{textNodes:a,ownerEls:u,leafToNode:i,leaves:c,fp:Mi(c)}}var qr=["cookiebot","onetrust","cookieyes","tcf","google-consent-mode","shopify"];function zi(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=Object.entries(e);if(t.length<1||t.length>4)return null;let n={};for(let[r,o]of t){if(!Array.isArray(o)||o.length<2||o.length>6||!o.every(s=>typeof s=="string")||/[=|]/.test(r)||o.some(s=>/[=|]/.test(s)))return null;n[r]=o}return n}function Wi(e){return!Array.isArray(e)||e.length<2||e.length>12||!e.every(t=>typeof t=="string")?null:e}function Vi(e){try{return e()}catch(t){return}}function Jt(e){if(typeof e!="object"||e===null)return null;let t=e;if(typeof t.apiKey!="string"||!t.apiKey.startsWith("pk_"))return null;let n={};if(typeof t.slots=="object"&&t.slots!==null&&!Array.isArray(t.slots))for(let[u,i]of Object.entries(t.slots)){if(typeof i!="object"||i===null)continue;let c=i,l=zi(c.dims);if(!l||c.target!==void 0&&typeof c.target!="string")continue;let p=c.arms!==void 0?Wi(c.arms):null,h={dims:l};typeof c.target=="string"&&(h.target=c.target),p&&(h.arms=p),n[u]=h}let r={apiKey:t.apiKey,personaAttributes:t.personaAttributes===!0,slots:n};typeof t.consent=="boolean"?r.consent=t.consent:t.consent!==void 0&&s("consent");let o=t.consentFrom;if(typeof o=="string"&&qr.includes(o))r.consentFrom=o;else if(o&&typeof o=="object"&&!Array.isArray(o)){let u=o;typeof u.cmp=="string"&&qr.includes(u.cmp)||u.cmp===void 0&&(typeof u.cookie=="string"||typeof u.check=="function")?r.consentFrom=u:s("consentFrom")}else o!==void 0&&s("consentFrom");function s(u){r.consent=!1,console.warn(`[sentient] invalid ${u} \u2014 tracking stays OFF until it is fixed (sentient-ui.com/docs#consent).`)}(t.preConsentBehavior==="statistical_winner"||t.preConsentBehavior==="control")&&(r.preConsentBehavior=t.preConsentBehavior),t.debug===!0&&(r.debug=!0),typeof t.registry=="boolean"&&(r.registry=t.registry),typeof t.editorSrc=="string"&&(r.editorSrc=t.editorSrc),typeof t.consentSrc=="string"&&(r.consentSrc=t.consentSrc),typeof t.nonce=="string"&&t.nonce!==""&&(r.nonce=t.nonce),typeof t.apiBase=="string"&&(r.apiBase=t.apiBase),typeof t.sectionCapture=="boolean"&&(r.sectionCapture=t.sectionCapture);let a=typeof t.persona=="function"?Vi(t.persona):t.persona;if(typeof a=="string"&&a.trim()!==""&&(r.persona=a),Array.isArray(t.sections)){let u=t.sections.filter(i=>typeof i=="string"&&i.trim()!=="").slice(0,50);u.length>=2&&(r.sections=u)}return r}var Jr=new WeakMap;function Yr(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function Xr(e,t,n){var s,a,u;let r=Jr.get(e);if(r){if(r.fp!==n.fp||!Yr(r.leafToNode,n.leafToNode))return"mismatch"}else{let i=qt(e);if(!("fp"in i)||(r={fp:i.fp,leafToNode:i.leafToNode,textNodes:i.textNodes,ownerEls:i.ownerEls,classes:i.ownerEls.map(c=>{var l;return(l=c.getAttribute("class"))!=null?l:""})},r.fp!==n.fp||!Yr(r.leafToNode,n.leafToNode)))return"mismatch";Jr.set(e,r)}let o=r;for(let[i,c]of Object.entries(t.nodes)){let l=Number(i),p=o.ownerEls[l];if(p){if(typeof c.text=="string"){let h=!0;o.leafToNode.forEach((b,w)=>{b===l&&(o.textNodes[w].nodeValue=h?c.text:"",h=!1)})}c.like!==void 0&&o.classes[c.like]!==void 0&&p.setAttribute("class",o.classes[c.like]),c.hidden&&((s=p.style)==null||s.setProperty("display","none","important"))}}for(let i of Object.values((a=t.order)!=null?a:{})){let c=i.map(w=>o.ownerEls[w]).filter(w=>!!w),l=(u=c[0])==null?void 0:u.parentElement;if(!l||c.length!==i.length||c.some(w=>w.parentElement!==l))continue;let p=new Set(c),h=0;Array.from(l.children).map(w=>p.has(w)?c[h++]:w).forEach((w,S)=>{var K;l.children[S]!==w&&l.insertBefore(w,(K=l.children[S])!=null?K:null)})}return"applied"}function St(e){var n,r,o;let t=(r=(n=e.defaultView)!=null?n:typeof window!="undefined"?window:void 0)==null?void 0:r.location;return(o=t==null?void 0:t.pathname)!=null?o:""}function Hi(e,t){var n;if(t.tag&&e.tagName.toLowerCase()!==t.tag.toLowerCase())return!1;if(t.text){let r=((n=e.textContent)!=null?n:"").replace(/\s+/g," ").trim().toLowerCase(),o=t.text.replace(/\s+/g," ").trim().toLowerCase();if(!(r===o||r.startsWith(o)||o.startsWith(r)))return!1}return!0}function Yt(e,t){return!!(e!=null&&e.urlMatch)&&!St(t).includes(e.urlMatch)}var qi=/^[a-zA-Z_][-a-zA-Z0-9_]*$/;function Zr(e,t){var r;let n=[];if(e.id){let o=t.getElementById(e.id);n=o?[o]:[]}if(n.length===0&&((r=e.dataAttr)!=null&&r.name)&&qi.test(e.dataAttr.name))try{let o=e.dataAttr.value.replace(/["\\]/g,"\\$&");n=Array.from(t.querySelectorAll(`[${e.dataAttr.name}="${o}"]`))}catch(o){n=[]}if(n.length===0&&e.selector)try{n=Array.from(t.querySelectorAll(e.selector))}catch(o){n=[]}return n}function Te(e,t){if(e.urlMatch&&!St(t).includes(e.urlMatch))return null;let n=Zr(e,t);if(n.length!==1)return null;let r=n[0];return e.fingerprint&&!Hi(r,e.fingerprint)?null:r}function Qr(e,t){return Yt(e,t)?!1:!!e.selector&&!e.dataAttr&&!e.id&&!e.fingerprint&&e.page===void 0?eo(e,t):Te(e,t)!==null}function eo(e,t){return Zr(e,t).length>0}function Xt(e,t){return Yt(e,t)?!1:e.page!==void 0&&Wt.test(e.page)?Mn(e.page,St(t)):eo(e,t)}var to={color:"color",background:"background",fontSize:"font-size",fontWeight:"font-weight",textAlign:"text-align",padding:"padding",margin:"margin",borderRadius:"border-radius",width:"width",height:"height",maxWidth:"max-width",border:"border",boxShadow:"box-shadow",opacity:"opacity",lineHeight:"line-height",letterSpacing:"letter-spacing",textTransform:"text-transform",gap:"gap",fontFamily:"font-family"},Ji=/^(rgb|rgba|hsl|hsla|calc|var|min|max|clamp)$/i;function no(e){var r;if(e.trim().length===0||/[;{}<>]/.test(e))return!1;let t=/([A-Za-z-]*)\(/g,n;for(;(n=t.exec(e))!==null;)if(!Ji.test((r=n[1])!=null?r:""))return!1;return!0}function Yi(e){var r,o;let t=e.ownerDocument.createTreeWalker(e,4),n=null;for(let s=t.nextNode();s!==null;s=t.nextNode()){if(((r=s.nodeValue)!=null?r:"").trim()==="")continue;let a=(o=s.parentElement)==null?void 0:o.tagName;if(!(a==="SCRIPT"||a==="STYLE"||a==="TEMPLATE")){if(n!==null)return null;n=s}}return n}function bt(e,t){let n=Yi(e);n!==null?n.nodeValue=t:e.textContent=t}var Wn=/^https:\/\//i;function Zt(e){return typeof e=="string"&&!/[\s\x00-\x1f\\]/.test(e)&&(Wn.test(e)||e[0]==="/"&&e[1]!=="/")?e:null}var ro=new Map,Fe=null;function Xi(e){return e.replace(/["\\]/g,"\\$&")}function Zi(e){var t;(!Fe||!Fe.isConnected)&&(Fe=e.querySelector("style[data-sentient-ops]"),Fe||(Fe=Ge(e.createElement("style"),e),Fe.setAttribute("data-sentient-ops",""),((t=e.head)!=null?t:e.documentElement).appendChild(Fe))),Fe.textContent=[...ro.entries()].map(([n,r])=>`[data-snt-e="${Xi(n)}"]{${r}}`).join(`
2
- `)}function oo(e,t,n,r){var u;let o=!1,s=(u=t.moveBefore)!=null?u:t.moveAfter;if(s){let i=Te(s,r);!i||i===e||i.parentElement!==e.parentElement||!e.parentElement?o=!0:t.moveBefore?e.parentElement.insertBefore(e,i):e.parentElement.insertBefore(e,i.nextSibling)}typeof t.text=="string"&&bt(e,t.text),typeof t.href=="string"&&Wn.test(t.href)&&e.setAttribute("href",t.href),typeof t.imageSrc=="string"&&Wn.test(t.imageSrc)&&e.setAttribute("src",t.imageSrc),typeof t.imageAlt=="string"&&e.setAttribute("alt",t.imageAlt);let a=[];if(t.hidden&&a.push("display:none !important"),t.style)for(let[i,c]of Object.entries(t.style)){let l=to[i];l&&typeof c=="string"&&no(c)&&a.push(`${l}:${c.trim()} !important`)}return a.length>0&&(e.setAttribute("data-snt-e",n),ro.set(n,a.join(";")),Zi(r)),{anchorMiss:o}}var wt="data-sentient-block-arm",R=null;function Et(e){R=e!=null?e:null}var Ze=null;function kt(e){Ze=e!=null?e:null}var lo=e=>{var t;return typeof e=="string"?(t=Ze==null?void 0:Ze.entries.find(n=>n.id===e))==null?void 0:t.classes:void 0},uo=e=>{let t=typeof e=="string"?Ze==null?void 0:Ze.entries.find(n=>n.id===e):void 0;return t!=null&&t.computed.inheritsColor?t.computed.color:void 0},Re="data-sentient-blocks-hid",ut={none:"0",sm:"8px",md:"16px",lg:"24px"},Vn={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",between:"space-between"},io={sm:"0.875em",md:"1em",lg:"1.25em"},Qi={sm:"1.25em",md:"1.5em",lg:"2em"},es={sm:"6px 14px",md:"10px 20px",lg:"14px 28px"},so={sm:"8px",md:"16px",lg:"32px"},ts={square:"1 / 1",landscape:"4 / 3",wide:"16 / 9"},ns={normal:"400",medium:"500",bold:"700"};function he(e,t){for(let[n,r]of Object.entries(t))r!==void 0&&e.style.setProperty(n,r);return e}function ao(e){return e==="muted"?R!=null&&R.muted?{color:R.muted}:{opacity:"0.7"}:e==="accent"?{"font-weight":"600",color:R==null?void 0:R.accent}:{}}function co(e,t){let n=rs(e,t),r=uo(e.like);return n&&r&&(n.style.color=r),n}function rs(e,t){var n,r,o,s,a,u,i,c,l,p,h,b,w,S,K,L,D,_,A,x;try{let P=lo(e.like),m=e.maxWidth==="measure"?"65ch":void 0,v=d=>(d.className=P,he(d,{"max-width":m}));switch(e.type){case"stack":case"grid":{let d=t.createElement("div");if(e.type==="stack"){let M=e;he(d,{display:"flex","flex-direction":M.direction,gap:(r=ut[(n=M.gap)!=null?n:"md"])!=null?r:ut.md,"align-items":M.align?Vn[M.align]:void 0,"justify-content":M.justify?Vn[M.justify]:void 0,"flex-wrap":M.wrap?"wrap":void 0})}else{let M=e,q=(s=ut[(o=M.gap)!=null?o:"md"])!=null?s:ut.md;he(d,{display:"grid","grid-template-columns":`repeat(auto-fit, minmax(max(200px, calc((100% - ${M.columns-1} * ${q}) / ${M.columns})), 1fr))`,gap:q,"align-items":M.align?Vn[M.align]:void 0})}P&&(d.className=P);let g=!P&&e.type==="stack"&&e.surface==="raised",I=(a=e.pad)!=null?a:g?"md":void 0;I&&he(d,{padding:(u=ut[I])!=null?u:ut.md}),g&&he(d,{background:R==null?void 0:R.surface,color:R!=null&&R.surface?R==null?void 0:R.surfaceText:void 0,border:`1px solid ${(i=R==null?void 0:R.border)!=null?i:"currentColor"}`,"border-radius":(c=R==null?void 0:R.radius)!=null?c:"8px"});for(let M of(l=e.children)!=null?l:[]){let q=co(M,t);q&&d.appendChild(q)}return d}case"text":{let d=t.createElement("p");return d.textContent=e.value,P?v(d):he(d,Ke(U({margin:"0","font-size":e.size?io[e.size]:void 0,"font-weight":e.weight?ns[e.weight]:void 0,"text-align":e.align},ao(e.tone)),{"max-width":e.maxWidth==="measure"?"65ch":void 0}))}case"heading":{let d=t.createElement(`h${e.level}`);return d.textContent=e.value,P?v(d):he(d,{margin:"0","font-size":Qi[(p=e.size)!=null?p:"md"],"text-align":e.align,"max-width":e.maxWidth==="measure"?"65ch":void 0})}case"button":{let d=t.createElement("a");d.textContent=e.label;let g=Zt(e.href);if(g&&(d.href=g),e.tag&&d.setAttribute("data-sentient-tag",e.tag),P)return v(d);let I=(h=e.emphasis)!=null?h:"primary";return he(d,{display:"inline-block",padding:es[(b=e.size)!=null?b:"md"],"border-radius":(w=R==null?void 0:R.radius)!=null?w:"8px",font:"inherit","font-size":e.size?io[e.size]:void 0,"text-decoration":I==="ghost"?"underline":"none",cursor:"pointer",background:I==="primary"?(S=R==null?void 0:R.primaryBg)!=null?S:"#111827":"transparent",color:I==="primary"?(K=R==null?void 0:R.primaryText)!=null?K:"#ffffff":(L=R==null?void 0:R.accent)!=null?L:"inherit",border:I==="secondary"?`1px solid ${(D=R==null?void 0:R.accent)!=null?D:"currentColor"}`:"none"})}case"link":{let d=t.createElement("a");d.textContent=e.label;let g=Zt(e.href);return g&&(d.href=g),e.tag&&d.setAttribute("data-sentient-tag",e.tag),P?v(d):he(d,{color:"inherit","text-decoration":"underline"})}case"image":{let d=t.createElement("img"),g=Zt(e.src);return g&&(d.src=g),d.alt=e.alt,P&&(d.className=P),he(d,{display:"block","max-width":"100%","aspect-ratio":e.ratio&&e.ratio!=="auto"?ts[e.ratio]:void 0,"object-fit":e.fit,width:e.ratio&&e.ratio!=="auto"?"100%":void 0})}case"badge":{let d=t.createElement("span");return d.textContent=e.value,P?v(d):he(d,U({display:"inline-block",padding:"2px 10px","border-radius":"999px","font-size":"0.75em",border:`1px solid ${(_=R==null?void 0:R.border)!=null?_:"currentColor"}`},ao(e.tone)))}case"spacer":return he(t.createElement("div"),{height:(A=so[e.size])!=null?A:so.md});case"divider":return he(t.createElement("hr"),{border:"none","border-top":`1px solid ${(x=R==null?void 0:R.border)!=null?x:"currentColor"}`,margin:"0",width:"100%"});default:return null}}catch(P){return null}}function fo(e,t,n,r){var o,s;try{let a=new Set;for(let i of Array.from(e.children)){let c=i.getAttribute(wt);c!==null&&(t[c]===void 0?i.remove():a.add(c))}for(let[i,c]of Object.entries(t)){if(a.has(i))continue;let l="tree"in c?c:null,p=co(l?l.tree:c,r);if(!p)continue;let h=r.createElement("div");h.setAttribute(wt,i),h.style.display="none";let b=l?lo((o=l.surface)==null?void 0:o.like):void 0;if(b){let w=r.createElement("div");w.className=b;let S=uo((s=l.surface)==null?void 0:s.like);S&&(w.style.color=S),w.appendChild(p),h.appendChild(w)}else h.appendChild(p);e.appendChild(h)}let u=n!==void 0&&t[n]!==void 0;for(let i of Array.from(e.children)){let c=i.getAttribute(wt),l=i;c!==null?l.style.display=u&&c===n?"":"none":u?l.hasAttribute(Re)||(l.setAttribute(Re,l.style.display),l.style.display="none"):l.hasAttribute(Re)&&(l.style.display=l.getAttribute(Re),l.removeAttribute(Re))}}catch(a){}}function os(e){try{for(let t of Array.from(e.children)){let n=t;if(n.getAttribute(wt)!==null){n.remove();continue}n.hasAttribute(Re)&&(n.style.display=n.getAttribute(Re),n.removeAttribute(Re))}}catch(t){}}function Qt(e,t){try{let n=new Set;for(let r of Array.from(e.querySelectorAll(`[${wt}]`)))r.parentElement&&n.add(r.parentElement);for(let r of Array.from(e.querySelectorAll(`[${Re}]`)))r.parentElement&&n.add(r.parentElement);for(let r of n)t.has(r)||os(r)}catch(n){}}function Hn(e,t){if(!e)return[t.documentElement];try{return Array.from(t.querySelectorAll(e))}catch(n){return[]}}function en(e,t,n,r){n.documentElement.setAttribute("data-sentient-persona",e),n.documentElement.setAttribute("data-sentient-confidence",t),r==null||r(n.documentElement,"data-sentient-persona"),r==null||r(n.documentElement,"data-sentient-confidence")}function tn(e,t,n,r){var o;for(let[s,a]of Object.entries(t)){let u=e[s];if(!u||typeof u=="string")continue;let i=Hn(a.target,n);for(let c of i)for(let[l,p]of Object.entries(u))(o=a.dims[l])!=null&&o.includes(p)&&(c.setAttribute(`data-${l}`,p),r==null||r(c,`data-${l}`))}}function nn(e,t,n,r){for(let[o,s]of Object.entries(t)){let a=e[o];if(typeof a!="string"||!s.arms||!s.arms.includes(a))continue;let u=Hn(s.target,n);for(let i of u)i.setAttribute("data-sentient-arm",a),r==null||r(i,"data-sentient-arm")}}function rn(e,t,n,r){var u,i,c,l,p,h,b;let o=new Set,s=(u=r==null?void 0:r.contentAndOps)!=null?u:!0,a=[];for(let[w,S]of Object.entries(t)){if(Yt(S.locator,n))continue;let K;if(S.locator){let D=Te(S.locator,n);K=D?[D]:[],!D&&Xt(S.locator,n)&&a.push(w)}else K=Hn(S.target,n);let L=e[w];for(let D of K){if(L!==void 0)if(typeof L=="string")D.setAttribute("data-sentient-arm",L),(i=r==null?void 0:r.onAttr)==null||i.call(r,D,"data-sentient-arm"),s&&((c=r==null?void 0:r.onApplied)==null||c.call(r,w,L,D));else for(let[A,x]of Object.entries(L))D.setAttribute(`data-${A}`,x),(l=r==null?void 0:r.onAttr)==null||l.call(r,D,`data-${A}`);if((S.blocks||S.compose)&&!ss(n)){let A=Object.fromEntries([...Object.entries((p=S.blocks)!=null?p:{}).filter(([,x])=>!ht(x)),...Object.entries((h=S.compose)!=null?h:{}).filter(([,x])=>!ht(x.tree))]);Object.keys(A).length>0&&(fo(D,A,typeof L=="string"?L:void 0,n),o.add(D))}if(!s)continue;let _=D.textContent;S.edits?Xr(D,S.edits.edits,S.edits)==="mismatch"&&((b=r==null?void 0:r.onDrift)==null||b.call(r,w,S.edits.fp)):typeof S.content=="string"&&bt(D,S.content),S.ops&&oo(D,S.ops,w,n).anchorMiss&&!a.includes(w)&&a.push(w),Bn(D,Ke(U(U({previous:_},typeof L=="string"?{arm:L}:{}),(r==null?void 0:r.persona)!==void 0?{persona:r.persona}:{}),{doc:n}))}}return Qt(n,o),a}var is=/bot|crawler|spider|crawling|googlebot|bingbot|duckduckbot|baiduspider|yandexbot|slurp|gptbot|claudebot|anthropic|perplexity|ccbot|applebot|headlesschrome/i;function ss(e){var t,n,r;try{let o=(n=(t=e.defaultView)!=null?t:typeof window!="undefined"?window:void 0)==null?void 0:n.navigator;return o?o.webdriver===!0?!0:is.test((r=o.userAgent)!=null?r:""):!1}catch(o){return!1}}var as=800;function on(e,t,n){let r=[];return n.forEach(({slotId:o,arm:s,el:a},u)=>{r.push($n((h,b={})=>{try{e.track({projectId:t,componentId:o,variantId:s,eventType:"micro_signal",payload:U({signalType:h},b)})}catch(w){}},a,void 0,{tabLoss:u===0}));let i=null,c=0,l=()=>{c=Date.now(),i=setTimeout(()=>{try{e.track({projectId:t,componentId:o,variantId:s,eventType:"cursor_signal",payload:{hoverDuration:Date.now()-c}})}catch(h){}i=null},as)},p=()=>{i!==null&&(clearTimeout(i),i=null)};a.addEventListener("mouseenter",l),a.addEventListener("mouseleave",p),r.push(()=>{a.removeEventListener("mouseenter",l),a.removeEventListener("mouseleave",p),i!==null&&clearTimeout(i)})}),()=>{for(let o of r)o()}}function ls(e,t){if(!e)return!1;if(e==="/")return t==="/";let n=e.endsWith("/")?e.slice(0,-1):e;return t===n||t.startsWith(`${n}/`)}function go(e){return e?`_snt_fired_goals_${e.slice(0,12)}`:"_snt_fired_goals"}var us="_snt_fired_goals";function qn(e,t){try{e==null||e.sessionStorage.removeItem(go(t)),e==null||e.sessionStorage.removeItem(us)}catch(n){}}function po(e){var t;return[(t=e.slotId)!=null?t:"",e.goalId,e.event,e.locator?JSON.stringify(e.locator):""].join("|")}function cs(e,t){try{let n=e==null?void 0:e.sessionStorage.getItem(t);if(!n)return new Set;let r=JSON.parse(n);return Array.isArray(r)?new Set(r.filter(o=>typeof o=="string")):new Set}catch(n){return new Set}}function ds(e,t,n){try{e==null||e.sessionStorage.setItem(t,JSON.stringify([...n]))}catch(r){}}function mo(e,t,n,r){var L,D;let o=(L=n.defaultView)!=null?L:typeof window!="undefined"?window:null,s=go(r),a=cs(o,s),u=_=>{let A=po(_);if(!a.has(A))try{_.slotId?t.componentGoal(_.slotId,_.goalId):t.goal(_.goalId),a.add(A),ds(o,s,a)}catch(x){}},i=e.filter(_=>_.event==="click"),c=e.filter(_=>_.event==="form_submit"),l=e.filter(_=>_.event==="url_reached"),p=e.filter(_=>_.event==="scroll_depth"),h=(_,A)=>{if(!_.locator)return!1;let x=Te(_.locator,n);return!!x&&(x===A||x.contains(A))},b=_=>{let A=_.target;if(!(!A||typeof A.closest!="function"))for(let x of i)h(x,A)&&u(x)},w=_=>{let A=_.target;if(A)for(let x of c)h(x,A)&&u(x)},S=()=>{if(l.length===0)return;let _=St(n);for(let A of l)A.urlPattern&&ls(A.urlPattern,_)&&u(A)},K=()=>{var x;let _=n.documentElement,A=_.scrollHeight>0?(_.scrollTop+_.clientHeight)/_.scrollHeight:0;for(let P of p)A>=((x=P.threshold)!=null?x:.75)&&u(P);p.every(P=>a.has(po(P)))&&n.removeEventListener("scroll",K)};return n.addEventListener("click",b,!0),n.addEventListener("submit",w,!0),(D=n.defaultView)==null||D.addEventListener("popstate",S),S(),p.length>0&&(n.addEventListener("scroll",K,{passive:!0}),K()),{checkUrl:S,teardown:()=>{var _;n.removeEventListener("click",b,!0),n.removeEventListener("submit",w,!0),(_=n.defaultView)==null||_.removeEventListener("popstate",S),p.length>0&&n.removeEventListener("scroll",K)}}}function sn(e,t){if(!e||e.length<2||t.size!==e.length)return null;let n=[];for(let a of e){let u=t.get(a);if(!u||n.includes(u))return null;n.push(u)}let r=n[0].parentNode;if(!r||!n.every(a=>a.parentNode===r))return null;let o=n.slice().sort((a,u)=>a.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),s=[];for(let a=0;a<n.length;a++){let u=n[a];o[a]!==u&&(s.push({el:u,before:o[a]}),o.splice(o.indexOf(u),1),o.splice(a,0,u))}return s}var fs="__snt_editor_token";function ho(){try{return typeof sessionStorage!="undefined"?sessionStorage.getItem(fs):null}catch(e){return null}}function yo(e){let t=null;try{let n=location.hash.slice(1),r=RegExp("(^|[?&])"+e+"=([^&]*)").exec(n);if(r){t=r[2];let o=n.slice(r.index+r[0].length);r[1]!="&"&&o[0]=="&"&&(o=r[1]+o.slice(1));let s=n.slice(0,r.index)+o;history.replaceState(history.state,"",s?"#"+s:location.pathname+location.search)}}catch(n){}return t}var _t="0.32.2",un=_t!=="0.0.0-dev"?{name:"snippet",version:_t}:void 0,Ao=_t!=="0.0.0-dev"?{v:_t}:{},vo=5e3,ps=50,xo=(()=>{try{if(typeof window=="undefined")return[];let e=window.SentientSnippet;return Array.isArray(e==null?void 0:e.q)?e.q:[]}catch(e){return[]}})(),Z=null,k=null,Se={},ve=null,be=null,At=null,oe=null,ie=null,xt=0,H=null,Qe=null,So=!1,Jn=null,an=null,Ct=null,_e=!1,Ue=!1,cn=!1,dn=0,Co=e=>fe(e)===dn,ct=null,ce=!1,De=null,Ae=[],et=null,tt=null,ye=null,gs=3e3,ms=100;function bo(e,t){let n,r=new Promise(o=>{n=setTimeout(()=>o(null),t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}function Ne(e,...t){e!=null&&e.debug&&console.log("[sentient-snippet]",...t)}function Ot(e,t){return Z?(Z.personaAttributes&&H&&en(H.persona,H.band,e,t==null?void 0:t.onAttr),tn(Se,Z.slots,e,t==null?void 0:t.onAttr),nn(Se,Z.slots,e,t==null?void 0:t.onAttr),ve?rn(Se,ve,e,U(Ke(U({},t),{onDrift:(n,r)=>{var o,s;return(s=k==null?void 0:k.reportDrift)==null?void 0:s.call(k,n,r,(o=To[n])!=null?o:null,"fp_mismatch")}}),H?{persona:H.persona}:{})):(Qt(e,new Set),[])):[]}function Oo(e){var n;let t=new Map;for(let r of(n=Z==null?void 0:Z.sections)!=null?n:[])try{let o=e.querySelectorAll(r);o.length===1&&t.set(r,o[0])}catch(o){}return t}function Yn(e,t){var n,r;try{if(!e||e.length<2)return;for(let o of(n=sn(e,Oo(t)))!=null?n:[])(r=o.before.parentNode)==null||r.insertBefore(o.el,o.before)}catch(o){}}function hs(e,t,n){let r=(o,s)=>t.some(([a,u])=>a===o&&u===s);try{if(Array.isArray(e.stamped))for(let o of e.stamped){if(!Array.isArray(o))continue;let[s,a,u]=o;!s||typeof a!="string"||r(s,a)||(u==null?s.removeAttribute(a):s.setAttribute(a,u))}if(Array.isArray(e.html))for(let o of e.html)typeof o!="string"||r(n.documentElement,o)||n.documentElement.removeAttribute(o)}catch(o){}}function ys(){try{let e=window.__sntPP;return e&&typeof e=="object"&&typeof e.v=="number"?e:null}catch(e){return null}}function Io(e){return e.apiBase?`${e.apiBase.replace(/\/+$/,"")}/v1/events`:void 0}function pn(e){var t;return(t=e.apiBase)!=null?t:"https://api.sentient-ui.com"}function vs(e){return Promise.resolve().then(()=>fetch(`${pn(e)}/v1/registry/locators`,{headers:{authorization:`Bearer ${e.apiKey}`}})).then(t=>t.ok?t.json():null).then(t=>Array.isArray(t==null?void 0:t.slots)?t.slots:null).catch(()=>null)}function Xn(e,t){let n=[],r=[];for(let o of e)try{if(typeof(o==null?void 0:o.id)!="string")continue;!o.locator||Qr(o.locator,t)?n.push(o.id):Xt(o.locator,t)&&r.push(o.id)}catch(s){}return[n,r]}var To={};function Lo(e,t){var r;let n={};for(let o of e){let s=(r=De==null?void 0:De.find(c=>c.id===o))==null?void 0:r.locator,a=s?Te(s,t):null,u=a?qt(a):null,i=u&&"fp"in u?u.fp:void 0;i&&(To[o]=i),n[o]=Ke(U({},i?{fp:i}:{}),{forms:!1,compose:!0,content:!0})}return n}function Po(e,t){let n=null;for(let r of t)e!=null&&e[r]&&((n!=null?n:n={})[r]=e[r]);return n}var le=null;function Ro(){if(!_e){le&&et!==Ie()&&le(!0);return}!De||et===Ie()||(et=Ie(),Ss())}function Ss(){ye==null||ye();let e=Z,t=De;if(!e||!t)return;let n,r,o=()=>{clearTimeout(n),clearTimeout(u),r==null||r.disconnect(),ye===o&&(ye=null)},s=null,a=i=>{let[c,l]=Xn(t,document),p=c.filter(h=>!Ae.includes(h));s!==null&&c.some(h=>!s.has(h)&&!p.includes(h))&&It(),s=new Set(c),p.length>0&&bs(p).catch(()=>{}),(i||l.length===0&&!t.some(h=>!c.includes(h.id)&&!Ae.includes(h.id)))&&(o(),No(e,l))},u=setTimeout(()=>a(!0),gs);if(ye=o,a(),ye===o)try{r=new MutationObserver(()=>{clearTimeout(n),n=setTimeout(a,ms)}),r.observe(document.documentElement,{childList:!0,subtree:!0})}catch(i){}}function fn(e,t){if(!(!e||e.length===0||!t||!Z))try{be==null||be.teardown(),be=mo(e,t,document,Z.apiKey)}catch(n){}}async function bs(e){let t=Z,n=k;if(!t||!n)return;Ae=Ae.concat(e);let r=await n.decide(U({slotsFrom:"registry",registrySlotIds:e,render:Lo(e,document)},Ao));if(r||(Ae=Ae.filter(s=>!e.includes(s))),!r||ce||k!==n)return;Se=U(U({},Se),r.slots),!be&&r.goals&&(t.consent!==!1||Ue)&&fn(At=r.goals,n);let o=Po(r.slotConfig,e);o&&(ve=U(U({},ve),o)),It(),Ne(t,"late decide",e),tt&&Co(t.apiKey)&&He(t.apiKey,tt=U(Ke(U({},tt),{slots:Se,savedAt:Date.now()}),ve?{slotConfig:ve}:{}))}function No(e,t){if(t.length!==0)try{fetch(`${pn(e)}/v1/locator-miss`,{method:"POST",keepalive:!0,headers:{"content-type":"application/json",authorization:`Bearer ${e.apiKey}`},body:JSON.stringify({slots:t})}).catch(()=>{})}catch(n){}}function nt(){return!!(Z&&k&&Z.sectionCapture!==!1&&(Z.consent!==!1||Ue)&&!Ye())}function ws(){if(!k||!Z||!nt()||ie)return;let e=[];Ot(document,{contentAndOps:_e,onApplied:(t,n,r)=>e.push({slotId:t,arm:n,el:r})}),Qn();try{oe==null||oe(),oe=on(k,Z.apiKey,e)}catch(t){}}function Qn(){if(typeof document=="undefined"||!nt())return;let e;try{if(an&&an.length>0){let r=new Map;for(let o of an){if(o.urlMatch!==window.location.pathname)continue;let s=Te(o.locator,document);s&&r.set(s,o.type)}r.size>0&&(e=o=>{var s;return(s=r.get(o))!=null?s:null})}}catch(r){}let t=k,n=++xt;Ct=window.location.pathname,lt("engagement.global.js","__sentientEngagement").then(r=>{if(!(!r||n!==xt||k!==t||!t||!nt()))try{ie==null||ie(),ie=r.startEngagementCapture(t,U({apiKey:Z.apiKey,apiBase:Z.apiBase,doc:document,microSignals:!0},e?{typeOf:e}:{}))}catch(o){}})}function It(){try{let e=[];if(oe==null||oe(),oe=null,Ot(document,{contentAndOps:_e,onApplied:(t,n,r)=>e.push({slotId:t,arm:n,el:r})}),Yn(Qe,document),e.length>0&&nt())try{oe=on(k,Z.apiKey,e)}catch(t){}try{typeof window!="undefined"&&Ct!==null&&window.location.pathname!==Ct&&nt()&&(ie==null||ie(),ie=null,xt++,Qn())}catch(t){}}catch(e){}}function wo(){Jn===null&&(Jn=setTimeout(()=>{Jn=null,It();try{be==null||be.checkUrl()}catch(e){}Ro()},ps))}function Do(){if(!(So||typeof window=="undefined"||typeof history=="undefined")){So=!0;try{let e=t=>{let n=history[t];history[t]=function(r,o,s){let a=n.call(this,r,o,s!=null?s:null);return wo(),a}};e("pushState"),e("replaceState"),window.addEventListener("popstate",wo)}catch(e){}}}function ln(e){let t={};for(let[n,r]of Object.entries(e.slots))try{t[n]=r.target?document.querySelectorAll(r.target).length:1}catch(o){t[n]=0}return t}function Es(e,t,n){var r;try{window.__sentientEditor={token:t,code:n,apiBase:pn(e)};let o=e.editorSrc?{src:e.editorSrc}:Gn("editor.global.js");if(!o){ko();return}let s=Ge(document.createElement("script"));Fn(s,o),s.async=!0,s.onerror=()=>ko(),((r=document.head)!=null?r:document.documentElement).appendChild(s)}catch(o){}}var Eo="sentient-editor-load-notice";function ko(){var e;try{if(document.getElementById(Eo))return;let t=document.createElement("div");t.id=Eo,t.textContent="Couldn\u2019t load the editor \u2014 check your connection and reopen it from your dashboard.",t.style.cssText="position:fixed;bottom:16px;right:16px;z-index:2147483647;max-width:320px;padding:14px 16px;border-radius:14px;background:#111827;color:#fff;font:13px/1.45 system-ui,sans-serif;border:1px solid rgba(245,158,11,.6);cursor:pointer",t.onclick=()=>t.remove(),((e=document.body)!=null?e:document.documentElement).appendChild(t),setTimeout(()=>t.remove(),1e4)}catch(t){}}function ks(e){let t={cfg:e,apiBase:pn(e),set(n){n.slots!==void 0&&(Se=n.slots),n.slotConfig!==void 0&&(ve=n.slotConfig),n.persona!==void 0&&(H=n.persona),n.decided&&(_e=!0),n.look&&(Et(n.look.palette),kt(n.look.vocabulary))},apply:()=>Ot(document),installSpaHooks:Do,exposeGlobal:()=>{cn=!0,Zn(e)},dbg:(...n)=>Ne(e,...n)};return lt("preview.global.js","__sentientPreview").then(n=>n?n.runPreview(t):Promise.reject()).catch(()=>(t.exposeGlobal(),Ne(e,"preview chunk unavailable \u2014 page left as-is"),!0))}function Zn(e){let t=r=>{try{ie==null||ie(),ie=null,xt++,Ct=null,oe==null||oe(),oe=null,ye==null||ye(),be==null||be.teardown(),be=null,r&&qn(typeof window!="undefined"?window:null,e.apiKey),Ue=!1,ce=!0,r?(tt=null,H=null,k?k.destroy():it(e.apiKey)):k==null||k.dispose(),k=null}catch(o){}},n={consentWatcher:Xe,goal(r,o){try{k==null||k.goal(r,o)}catch(s){}},componentGoal(r,o){try{k==null||k.componentGoal(r,o)}catch(s){}},grantConsent(){try{if(!k&&ce||k!=null&&k.released)dn=fe(e.apiKey),k=yt(U({apiKey:e.apiKey,consent:!0,preConsentBehavior:e.preConsentBehavior,debug:e.debug,persona:e.persona,ingestUrl:Io(e)},un?{sdk:un}:{})),fn(At,k);else{let r=(k==null?void 0:k.gated)===!0;Kn(e.apiKey),r&&(dn=fe(e.apiKey)),fn(At,k)}ce=!1,le==null||le()}catch(r){}Ue=!0;try{ws()}catch(r){}},revokeConsent(){t(!0)},reapply:It,getState(){var r,o;try{return{apiKey:e.apiKey,persona:(r=H==null?void 0:H.persona)!=null?r:null,band:(o=H==null?void 0:H.band)!=null?o:null,slots:Se,matchCounts:ln(e),consent:!ce&&(e.consent!==!1||Ue)}}catch(s){return{apiKey:e.apiKey,persona:null,band:null,slots:{},matchCounts:{},consent:!1}}}};if(window.SentientSnippet=n,window.__sentientApi=n,e.consentFrom&&!ct&&!cn)try{let r=Xe(e.consentFrom),o=!1,s=!1,a=()=>!!k&&!ce&&(k.gated===void 0?e.consent!==!1||Ue:!k.gated);ct=r.subscribe(()=>{try{let u=r.read();u!==null&&(s=!0);let i=u!=null?u:s?!1:null,c=a(),l=!c&&i!==!0&&r.refused();if(l&&!o&&(k!=null&&k.gated?k.destroy():it(e.apiKey),qn(window,e.apiKey),tt=null,H=null),o=l,i===!0&&!c)n.grantConsent();else if(i===!1&&c){let p=r.refused();t(p),p&&(o=!0)}}catch(u){}})}catch(r){}for(let r of xo.splice(0))try{r[0]==="goal"?n.goal(r[1],r[2]):r[0]==="grantConsent"&&k?n.grantConsent():r[0]==="revokeConsent"&&k&&n.revokeConsent()}catch(o){}}function _o(){var e;try{if(typeof window=="undefined")return;let t=window;if(typeof((e=t.SentientSnippet)==null?void 0:e.goal)=="function")return;let n=()=>{};t.SentientSnippet={goal:n,componentGoal:n,grantConsent:n,revokeConsent:n,reapply:n,consentWatcher:Xe,getState:()=>({apiKey:"",persona:null,band:null,slots:{},matchCounts:{},consent:!1})},xo.length=0}catch(t){}}function _s(){try{let e=window.Shopify;return typeof(e==null?void 0:e.shop)=="string"&&e.shop!==""}catch(e){return!1}}async function Mo(){var e,t;try{let n=Jt(window.sentient);if(!n){_o();return}Z=n,ct==null||ct(),ct=null,!n.consentFrom&&n.consent===void 0&&_s()&&(n.consentFrom="shopify"),Vr(n.consentSrc),zt(n.nonce),cn=!1,_e=!1,le=null,Qe=null,Se={},ve=null,Et(null),kt(null),Ue=!1,ce=!1,At=null,De=null,Ae=[],et=null,tt=null,ye==null||ye(),ie==null||ie(),ie=null,xt++,Ct=null;let r=yo("sentient_editor_code"),o=r?null:ho();if(r||o){Es(n,o,r),cn=!0,Zn(n),Ne(n,"editor mode");return}if(typeof window!="undefined"&&/[?&]sentient_(preview|persona)=[^&]/.test(window.location.search)&&await ks(n))return;if(n.consentFrom&&n.consent===void 0)try{n.consent=Xe(n.consentFrom).read()===!0}catch(d){n.consent=!1}n.consent!==!1&&n.sectionCapture!==!1&&!Ye()&&lt("engagement.global.js","__sentientEngagement");let s=(e=n.registry)!=null?e:Object.keys(n.slots).length===0;n.registry===void 0&&!s&&Ne(n,"slots declared without registry: true, so dashboard-published components are not applied");let a=s?vs(n):null,u=ys();try{(t=u==null?void 0:u.stop)==null||t.call(u)}catch(d){}let i=n.consent!==!1&&!Ye()?ot(n.apiKey):null,c=[];i&&(H={persona:i.persona,band:i.band},Se=i.slots,i.slotConfig&&(ve=i.slotConfig),i.palette&&Et(i.palette),i.vocabulary&&kt(i.vocabulary),Ot(document,U({contentAndOps:!1},u?{onAttr:(d,g)=>c.push([d,g])}:{})),i.layoutOrder&&(Qe=i.layoutOrder,Yn(Qe,document))),u&&hs(u,c,document);let l=yt(U({apiKey:n.apiKey,consent:n.consent,preConsentBehavior:n.preConsentBehavior,debug:n.debug,persona:n.persona,ingestUrl:Io(n)},un?{sdk:un}:{}));k=l,dn=fe(n.apiKey),Zn(n),Do();let p=Object.entries(n.slots).map(([d,g])=>({id:d,dims:g.dims})),h=Ao,b={pp:u?u.v:0},w=[];if(a){let[d]=await Promise.all([bo(a,vo),document.readyState==="loading"?new Promise(g=>document.addEventListener("DOMContentLoaded",g,{once:!0})):null]);De=d,d&&(Ae=w=Xn(d,document)[0]),Ne(n,"registry scope",d&&w)}let S=(d=l)=>{let g=Array.from(Oo(document).keys());return d.decide(U(U(U(U({slots:p},h),b),g.length>=2?{sections:g}:{}),s?{slotsFrom:"registry",registrySlotIds:w,render:Lo(w,document)}:{}))},K=Ie(),L=l.gated===!0,D=!1,_=!1,A=!1,x=!1;le=(d=!1)=>{let g=k;!D||_||x||_e||ce||!g||g.gated||!d&&!A||(A=!1,x=!0,K=et=Ie(),De&&(Ae=w=Xn(De,document)[0]),S(g).then(I=>{x=!1,I&&!_e&&!ce&&k===g?v(I):(I||(Ae=[]),!_e&&(g.released||k!==g||ce)&&(A=!0))}).catch(()=>{x=!1}))};let P=S();P.then(()=>{D=!0},()=>{D=!0});let m=await bo(P,vo),v=d=>{var M,q,J,Y,xe;_=!0;let g=(k!=null?k:l).getPersona();g?H={persona:g.persona,band:g.band}:d.persona&&(H={persona:d.persona,band:"low"}),Se=d.slots,s?ve=Po(d.slotConfig,w):d.slotConfig&&(ve=d.slotConfig),d.palette&&Et(d.palette),d.vocabulary&&kt(d.vocabulary),Qe=(M=d.layoutOrder)!=null?M:Qe;let I=()=>{let O=[],B=Ot(document,{onApplied:(ne,ue,Q)=>O.push({slotId:ne,arm:ue,el:Q})});if(s||No(n,B),Yn(Qe,document),_e=!0,nt())try{oe==null||oe(),oe=on(k,n.apiKey,O)}catch(ne){}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",I,{once:!0}):I(),At=(q=d.goals)!=null?q:null,(n.consent!==!1||Ue)&&!ce&&fn(d.goals,k),an=(J=d.sectionMap)!=null?J:null,nt()&&Qn(),Ne(n,"applied",{persona:H,slots:Se,matches:ln(n)}),!ce&&(Co(n.apiKey)&&He(n.apiKey,tt=U(U(U({v:1,persona:(Y=H==null?void 0:H.persona)!=null?Y:d.persona,band:(xe=H==null?void 0:H.band)!=null?xe:"low",slots:d.slots,layoutOrder:d.layoutOrder,savedAt:Date.now()},ve?{slotConfig:ve}:{}),d.palette?{palette:d.palette}:{}),d.vocabulary?{vocabulary:d.vocabulary}:{})),et=null,Ro())};if(!m){Ne(n,"decide timeout/null \u2014 snapshot state stands",ln(n)),P.then(d=>{if(!d){if(_e)return;Ae=[],l.released===!0||k!==l||ce||L&&Ie()!==K?(A=!0,le==null||le()):et=K;return}if(!(!d||_e||ce)){if(k!==l){A=!0,le==null||le();return}v(d),Ne(n,"late decide applied",ln(n))}}).catch(()=>{});return}if(ce||k!==l){A=!0,le==null||le();return}v(m)}catch(n){_o()}}if(typeof window!="undefined"&&window.sentient){let e=window;if(!e.__sentientInitialized)e.__sentientInitialized=!0,Promise.resolve().then(()=>{Mo()});else{let t=window.__sentientApi;t&&Promise.resolve().then(()=>{window.SentientSnippet=t})}}return Vo(As);})();
1
+ "use strict";var SentientSnippet=(()=>{var Mt=Object.defineProperty,zo=Object.defineProperties,Ho=Object.getOwnPropertyDescriptor,Vo=Object.getOwnPropertyDescriptors,qo=Object.getOwnPropertyNames,mr=Object.getOwnPropertySymbols;var hr=Object.prototype.hasOwnProperty,Jo=Object.prototype.propertyIsEnumerable;var gr=(e,t,n)=>t in e?Mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U=(e,t)=>{for(var n in t||(t={}))hr.call(t,n)&&gr(e,n,t[n]);if(mr)for(var n of mr(t))Jo.call(t,n)&&gr(e,n,t[n]);return e},Ke=(e,t)=>zo(e,Vo(t));var yr=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>{for(var n in t)Mt(e,n,{get:t[n],enumerable:!0})},Yo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qo(t))!hr.call(e,o)&&o!==n&&Mt(e,o,{get:()=>t[o],enumerable:!(r=Ho(t,o))||r.enumerable});return e};var Xo=e=>Yo(Mt({},"__esModule",{value:!0}),e);var ii,si,ai,kr,li,ui,Er,j,qe,An=yr(()=>{"use strict";ii=Object.defineProperty,si=Object.defineProperties,ai=Object.getOwnPropertyDescriptors,kr=Object.getOwnPropertySymbols,li=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,Er=(e,t,n)=>t in e?ii(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j=(e,t)=>{for(var n in t||(t={}))li.call(t,n)&&Er(e,n,t[n]);if(kr)for(var n of kr(t))ui.call(t,n)&&Er(e,n,t[n]);return e},qe=(e,t)=>si(e,ai(t))});var Dr={};vr(Dr,{LOCAL_ENGINE_AVAILABLE:()=>pi,createLocalEngine:()=>mi});function mi(e){throw new Error("[sentient] createLocalEngine is not available in production builds. The local engine only exists under the `development` export condition.")}var pi,Mr=yr(()=>{"use strict";pi=!1});var Ts={};vr(Ts,{applyPersonaAttributes:()=>rn,applyRegistrySlots:()=>an,applySlotArms:()=>sn,applySlotAttributes:()=>on,consentWatcher:()=>Xe,parseSnippetConfig:()=>Zt,planReorder:()=>un,reapply:()=>Lt,run:()=>Go,version:()=>At});function We(e){return e?`_${e.slice(0,12)}`:""}var ze="_snt_uid";function gt(e){return`${ze}${We(e)}`}var kn="__sntForgetGen",Zo=()=>{try{return window[kn]}catch(e){return}};function $t(e){var t,n;try{let r=window,o=(t=r[kn])!=null?t:r[kn]={};o[e]=((n=o[e])!=null?n:0)+1}catch(r){}}function fe(e){var t,n;return(n=(t=Zo())==null?void 0:t[e])!=null?n:0}var ot="_snt_snap:",Qo=["low","medium","high"];function it(e){try{let t=localStorage.getItem(ot+e);if(!t)return null;let n=JSON.parse(t);if(!n||typeof n!="object"||n.v!==1||typeof n.persona!="string"||typeof n.band!="string"||!Qo.includes(n.band)||typeof n.slots!="object"||n.slots===null||Array.isArray(n.slots)||!(n.layoutOrder===null||Array.isArray(n.layoutOrder))||typeof n.savedAt!="number"||!(Date.now()-n.savedAt<2592e6)||!(n.slotConfig===void 0||typeof n.slotConfig=="object"&&n.slotConfig!==null&&!Array.isArray(n.slotConfig)))return null;let r=n.vocabulary;return r!==void 0&&(typeof r!="object"||r===null||!Array.isArray(r.entries)||!Array.isArray(r.images))&&delete n.vocabulary,n.stage!==void 0&&typeof n.stage!="string"&&delete n.stage,n}catch(t){return null}}function Ve(e,t){try{localStorage.setItem(ot+e,JSON.stringify(t))}catch(n){}}function je(e){if(typeof AbortController!="function")return{clear:()=>{}};let t=new AbortController,n=setTimeout(()=>t.abort(),e);return{signal:t.signal,clear:()=>clearTimeout(n)}}function xn(e,t){return new Promise(n=>{let r=setTimeout(()=>n(!1),t),o=()=>{clearTimeout(r),n(!0)};e.then(o,o)})}function He(e){return Math.min(6e4,1e3*2**Math.min(e,6))}function Bt(e){if(e.ok===!0)return"delivered";let{status:t}=e;return typeof t!="number"?"retry":t>=200&&t<300?"delivered":t>=400&&t<500&&t!==429?"dropped":"retry"}function br(e,t){try{let n=localStorage.getItem(e);if(!n)return[];let r=JSON.parse(n);return Array.isArray(r)?(localStorage.removeItem(e),r.slice(-t)):[]}catch(n){return[]}}function En(e,t,n){try{let r=(()=>{try{let s=localStorage.getItem(n);if(!s)return[];let a=JSON.parse(s);return Array.isArray(a)?a:[]}catch(s){return[]}})(),o=new Map;for(let s of r)o.set(s.id,s);for(let s of e)o.set(s.id,s);localStorage.setItem(n,JSON.stringify([...o.values()].slice(-t)))}catch(r){}}function Sr(e,t){try{let n=localStorage.getItem(t);if(!n)return;let r=JSON.parse(n);if(!Array.isArray(r))return;let o=new Set(e),s=r.filter(a=>!o.has(a.id));if(s.length===r.length)return;s.length===0?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(s))}catch(n){}}var ei=500,ti=56*1024;function Kt(e){return`_snt_retry_${e.slice(0,12)}`}var ni={push:()=>{},flush:()=>{},destroy:()=>{}};function wr(e){var t,n,r;if(typeof window=="undefined")return ni;let o=(t=e.flushIntervalMs)!=null?t:5e3,s=(n=e.maxBatchSize)!=null?n:20,a=(r=e.maxRetrySize)!=null?r:100,l=e.ingestUrl,i=e.apiKey,c=Kt(i),u=!1,p=fe(i),h=(...A)=>{!u&&fe(i)===p&&En(...A)},S=[],w=new Set,b=[],K=A=>{for(let B of A)L.delete(B),!w.has(B)&&(w.add(B),b.push(B));for(;b.length>ei;){let B=b.shift();B&&w.delete(B)}Sr(A,c)},L=new Set,M=()=>{for(;S.length>a;){let A=S.shift();A&&L.delete(A.id)}},E=A=>{w.has(A.id)||L.has(A.id)||(L.add(A.id),S.push(A),M())},x=A=>{for(let B of A)w.has(B.id)||(L.add(B.id),S.push(B));M()},C=br(c,a);for(let A of C)E(A);let R=0,g=0,v=(A,B=!0)=>{if(A.length===0)return;let ne=JSON.stringify(A),re=A.map(Me=>Me.id),Q,me=je(15e3);try{Q=fetch(l,{method:"POST",keepalive:!0,signal:me.signal,body:ne,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`}})}catch(Me){h(A,a,c),x(A),g++,R=Date.now()+He(g);return}Promise.resolve(Q).then(me.clear,me.clear);let ee=Me=>{if(Bt(Me)!=="retry"){if(!Me.ok&&B){let $e=A.filter(Le=>Le.eventType!=="pageview");if($e.length>0&&$e.length<A.length){K(A.filter(Le=>Le.eventType==="pageview").map(Le=>Le.id)),v($e,!1);return}}K(re),g=0,R=0;return}h(A,a,c),x(A),g++,R=Date.now()+He(g)};Q&&typeof Q.then=="function"?Q.then(ee).catch(()=>{h(A,a,c),x(A),g++,R=Date.now()+He(g)}):ee(Q)},d=typeof TextEncoder!="undefined"?new TextEncoder:null,m=A=>d?d.encode(A).length:A.length,O=A=>{let B=[],ne=2;for(let re of A){let Q=m(JSON.stringify(re))+1;if(B.length>0&&ne+Q>ti||B.length>=s)break;B.push(re),ne+=Q}return B},$=()=>{try{if(Date.now()<R)return;for(;S.length>0&&!(Date.now()<R);){let A=S.filter(ne=>!w.has(ne.id));if(S.length=0,A.length===0)break;let B=O(A);if(B.length===0)break;B.length<A.length&&S.push(...A.slice(B.length)),v(B)}}catch(A){}},q=!0,J=null;J=setInterval(()=>{q&&$()},o);let Y=()=>{document.visibilityState==="hidden"&&$()},xe=()=>{$()};return document.addEventListener("visibilitychange",Y),window.addEventListener("pagehide",xe),{push(A){E(A),S.length>=s&&$()},flush:$,destroy(A){A!=null&&A.forget&&(u=!0),q=!1,J!==null&&(clearInterval(J),J=null),document.removeEventListener("visibilitychange",Y),window.removeEventListener("pagehide",xe),$()}}}var ri=200;function jt(e){return`_snt_goal_retry_${e.slice(0,12)}`}var oi={send:()=>{},flush:()=>{},destroy:()=>{}};function _r(e){var t,n,r;if(typeof window=="undefined")return oi;let o=(t=e.flushIntervalMs)!=null?t:5e3,s=(n=e.maxRetrySize)!=null?n:100,a=(r=e.maxPerFlush)!=null?r:5,l=jt(e.apiKey),i=!1,c=fe(e.apiKey),u=(...m)=>{!i&&fe(e.apiKey)===c&&En(...m)},p=[],h=new Set,S=new Set,w=[],b=0,K=0,L=!1,M=m=>{for(h.delete(m.id),S.has(m.id)||(S.add(m.id),w.push(m.id));w.length>ri;){let O=w.shift();O&&S.delete(O)}Sr([m.id],l)},E=m=>{u([m],s,l),!S.has(m.id)&&!h.has(m.id)&&(h.add(m.id),p.push(m)),Date.now()>=b&&(K++,b=Date.now()+He(K))},x=m=>{let O,$=je(15e3);try{O=fetch(e.url,{method:"POST",keepalive:!0,signal:$.signal,body:m.body,headers:e.headers})}catch(J){E(m);return}let q=J=>{var Y;let xe=Bt(J);if(xe==="retry"){E(m);return}xe==="dropped"&&((Y=e.onDrop)==null||Y.call(e,m,J.status)),M(m),K=0,b=0};Promise.resolve(O).then($.clear,$.clear),O&&typeof O.then=="function"?O.then(q).catch(()=>E(m)):q(O)},C=()=>{try{if(L||Date.now()<b)return;let m=0;for(;p.length>0&&m<a&&!(Date.now()<b);){let O=p.shift();h.delete(O.id),!S.has(O.id)&&(m++,x(O))}}catch(m){}},R=br(l,s);for(let m of R)h.has(m.id)||(h.add(m.id),p.push(m));R.length>0&&En(R,s,l);let g=setInterval(C,o),v=()=>{document.visibilityState==="hidden"&&C()},d=()=>C();return document.addEventListener("visibilitychange",v),window.addEventListener("pagehide",d),{send(m){if(L){S.has(m.id)||u([m],s,l);return}if(!(S.has(m.id)||h.has(m.id))){if(Date.now()<b){u([m],s,l),h.add(m.id),p.push(m);return}x(m)}},flush:C,destroy(m){m!=null&&m.forget&&(i=!0),clearInterval(g),document.removeEventListener("visibilitychange",v),window.removeEventListener("pagehide",d),C(),L=!0}}}function st(e){if(typeof window=="undefined"||!e)return!1;$t(e);let t=!1,n=gt(e);try{if(new RegExp(`(?:^|; )${n}=`).test(document.cookie)){let a=location.protocol==="https:"?"; Secure":"";document.cookie=`${n}=; max-age=0; SameSite=lax; path=/${a}`,t=!0}}catch(a){}let r=We(e),o=[n,"_snt_graph_edges",ot+e,Kt(e),jt(e),`_snt_graph_nodes${r}`],s=[`_snt_asgn${r}_`];for(let a of["localStorage","sessionStorage"])try{let l=window[a];for(let i of o)l.getItem(i)!==null&&(l.removeItem(i),t=!0);for(let i=l.length-1;i>=0;i--){let c=l.key(i);c&&s.some(u=>c.startsWith(u))&&(l.removeItem(c),t=!0)}}catch(l){}try{(new RegExp(`(?:^|; )${ze}=[^;]`).test(document.cookie)||localStorage.getItem(ze)!==null||sessionStorage.getItem(ze)!==null)&&localStorage.setItem(`${ze}_tomb${r}`,"1")}catch(a){}return t}An();function Gt(e){return Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("|")}function xr(e){if(e.length===0)return null;let t={};for(let n of e.split("|")){let r=n.indexOf("=");if(r<=0||r!==n.lastIndexOf("=")||r===n.length-1)return null;let o=n.slice(0,r);if(o in t)return null;t[o]=n.slice(r+1)}return t}function Cn(e){var t,n,r;if(e.arms)return typeof e.baseline=="string"?e.baseline:(t=e.arms[0])!=null?t:"";if(e.baseline!==void 0&&typeof e.baseline=="object")return Gt(e.baseline);if(typeof e.baseline=="string")return e.baseline;let o={};for(let[s,a]of Object.entries((n=e.dims)!=null?n:{}))o[s]=(r=a[0])!=null?r:"";return Gt(o)}function Ar(e,t){var n,r;return e.dims!=null?(r=(n=xr(t))!=null?n:xr(Cn(e)))!=null?r:{}:t}function Je(e){return e>=.3?e<.7?"medium":"high":"low"}var Cr=["new","browsing","carted","customer","lapsed"];var ci=["GPTBot","ChatGPT-User","OAI-SearchBot","ClaudeBot","Claude-User","Claude-SearchBot","PerplexityBot","Perplexity-User","Google-Extended","Applebot-Extended","Meta-ExternalAgent","Bytespider","CCBot","Amazonbot","cohere-ai","Diffbot"];function Ir(e){return di(e)!==null}function di(e){var t;if(!e)return null;let n=e.toLowerCase();return(t=ci.find(r=>n.includes(r.toLowerCase())))!=null?t:null}function Or(e){let t=e.toLowerCase();return/ipad|tablet|playbook|kindle|silk/.test(t)?"tablet":/mobi|iphone|ipod|android.*mobile|phone/.test(t)?"mobile":"desktop"}function Tr(e,t){if(!e)return"direct";try{let n=new URL(e);if(t)try{if(new URL(t).host===n.host)return"direct"}catch(o){}let r=n.hostname.toLowerCase();return/(^|\.)(google|bing|duckduckgo|yahoo)\./.test(r)?"search":/(^|\.)(twitter\.com|x\.com|facebook\.com|linkedin\.com|reddit\.com|t\.co)$/.test(r)?"social":"referral"}catch(n){return"direct"}}function Lr(e){if(!e)return null;try{return new URL(e).hostname}catch(t){return null}}var fi=["gclid","gbraid","wbraid","fbclid","ttclid","msclkid","twclid","li_fat_id"];function Rr(e){let t={},n={};try{let r=typeof e=="string"||e instanceof URLSearchParams?new URLSearchParams(e):Object.entries(e).flatMap(([o,s])=>{let a=Array.isArray(s)?s[0]:s;return a===void 0?[]:[[o,a]]});for(let[o,s]of r)o.startsWith("utm_")?o in t||(t[o]=s):fi.includes(o)&&(o in n||(n[o]=s))}catch(r){}return{utmParams:t,clickIds:n}}function Pr(e){let t=e.getHours();return t<6?"night":t<12?"morning":t<18?"afternoon":"evening"}function In(e){return j(j(j({id:e.id},e.arms?{arms:[...e.arms]}:{}),e.dims?{dims:Object.fromEntries(Object.entries(e.dims).map(([t,n])=>[t,[...n]]))}:{}),e.baseline!==void 0?{baseline:e.baseline}:{})}function On(e){let t=In(e);return Ar(t,Cn(t))}function Nr(e){return typeof e=="string"?e:Gt(e)}An();var Dn;function Ht(e){Dn=typeof e=="string"&&e!==""?e:void 0}function Gr(e=document){if(Dn)return Dn;try{let t=e.querySelector("script[nonce]");return(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"))||void 0}catch(t){return}}function Ge(e,t=document){let n=Gr(t);return n&&e.setAttribute("nonce",n),e}function Fr(){try{if(typeof crypto!="undefined"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch(e){}try{if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"){let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t="";for(let n=0;n<16;n++)t+=e[n].toString(16).padStart(2,"0"),(n===3||n===5||n===7||n===9)&&(t+="-");return t}}catch(e){}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var $r="_snt_uid",gi=365,at="_snt_uid";function hi(){return Fr()}function Tn(e){try{let t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}catch(t){return null}}function Kn(){try{return location.protocol==="https:"?"; Secure":""}catch(e){return""}}function yi(e,t,n){try{document.cookie=`${e}=${encodeURIComponent(t)}; max-age=${n}; SameSite=lax; path=/${Kn()}`}catch(r){}}function Ft(e){try{return localStorage.getItem(e)}catch(t){return null}}function Br(e,t){try{return localStorage.setItem(e,t),!0}catch(n){return!1}}function Ln(e){try{return sessionStorage.getItem(e)}catch(t){return null}}function vi(e,t){try{return sessionStorage.setItem(e,t),!0}catch(n){return!1}}function bi(e){try{sessionStorage.removeItem(e)}catch(t){}}function Si(e){try{return document.cookie=`${e}_probe=1; max-age=1; SameSite=lax; path=/${Kn()}`,document.cookie.indexOf(`${e}_probe=1`)!==-1}catch(t){return!1}}function wi(e){try{localStorage.removeItem(e)}catch(t){}}function _i(e){try{document.cookie=`${e}=; max-age=0; SameSite=lax; path=/${Kn()}`}catch(t){}}var ki={getSessionId:()=>null,isEphemeral:()=>!1,destroy:()=>{}};function Ur(e){var t,n,r,o,s,a,l;if(typeof window=="undefined")return ki;let i=We(e==null?void 0:e.apiKey),c=(t=e==null?void 0:e.cookieName)!=null?t:gt(e==null?void 0:e.apiKey),u=`${at}${i}`,p=`${at}_tomb${i}`,h=((n=e==null?void 0:e.cookieTTLDays)!=null?n:gi)*24*60*60,S=x=>x&&x.length>0?x:null,w=()=>{var x,C;return i&&!(e!=null&&e.cookieName)&&Ft(p)===null?(C=(x=S(Tn($r)))!=null?x:S(Ft(at)))!=null?C:S(Ln(at)):null},b=(l=(a=(s=(o=(r=S(Tn(c)))!=null?r:S(Ft(u)))!=null?o:S(Ln(u)))!=null?s:w())!=null?a:S(e==null?void 0:e.ssrSessionId))!=null?l:hi();yi(c,b,h);let K=Br(u,b),L=Si(c),M=K?!1:vi(u,b),E=!K&&!L&&!M;return{getSessionId:()=>b,isEphemeral:()=>E,destroy:()=>{b=null,_i(c),wi(u),bi(u),i&&!(e!=null&&e.cookieName)&&(Tn($r)!==null||Ft(at)!==null||Ln(at)!==null)&&Br(p,"1")}}}var Ei=1800*1e3;function Ut(e,t){return`${encodeURIComponent(e)}:${encodeURIComponent(t)}`}function xi(e=Ei,t){let n=new Map,r=`_snt_asgn${We(t)}_`,o=(i,c)=>`${r}${encodeURIComponent(i)}:${encodeURIComponent(c)}`,s=i=>{let c=i.slice(r.length),u=c.indexOf(":");if(u<0)return null;try{return{componentId:decodeURIComponent(c.slice(0,u)),segment:decodeURIComponent(c.slice(u+1))}}catch(p){return null}},a=()=>{try{let i=[];for(let c=0;c<localStorage.length;c++){let u=localStorage.key(c);u!=null&&u.startsWith(r)&&i.push(u)}return i}catch(i){return[]}},l=i=>i.assignedAt+(i.ttlMs&&i.ttlMs>0?i.ttlMs:e)<Date.now();return typeof window!="undefined"&&(()=>{for(let i of a())try{let c=localStorage.getItem(i);if(!c)continue;let u=JSON.parse(c);if(l(u)){localStorage.removeItem(i);continue}let p=s(i);if(!p)continue;n.set(Ut(p.componentId,p.segment),u)}catch(c){}})(),{get(i,c){let u=n.get(Ut(i,c));return u?l(u)?(n.delete(Ut(i,c)),null):u:null},set(i,c,u){let p=Ut(i,c);n.set(p,u);try{localStorage.setItem(o(i,c),JSON.stringify(u))}catch(h){}},clear(){n.clear();for(let i of a())try{localStorage.removeItem(i)}catch(c){}}}}var Mn="data-sentient-stage";function yt(e,t){return!t||typeof e!="string"||!(e==="returning"||Cr.includes(e))?null:t!=="detailed"&&(e==="customer"||e==="lapsed")?"returning":e}function Vt(e,t=document){try{e?t.documentElement.setAttribute(Mn,e):t.documentElement.removeAttribute(Mn)}catch(n){}}var $n="[sentient] No API key configured \u2014 nothing is being learned. Set NEXT_PUBLIC_SENTIENT_API_KEY or pass localMode: true for local development.",Wr="[sentient] Local mode \u2014 decisions are simulated on-device and nothing is sent over the network. Add an API key to learn from real traffic.",Kr=!1,Wt=!1;function Ai(){var e;try{return(e=new URLSearchParams(window.location.search).get("sentient_persona"))!=null?e:void 0}catch(t){return}}function Ci(e){var t;let n=Ur({ssrSessionId:e.ssrSessionId,apiKey:e.apiKey}),r=(t=n.getSessionId())!=null?t:"local",o=Ai(),s=Promise.resolve().then(()=>(Mr(),Dr)).then(u=>{let p=u;return p.LOCAL_ENGINE_AVAILABLE?(Kr||(Kr=!0,console.info(Wr)),p):(Wt||(Wt=!0,console.error($n)),null)}).catch(()=>(Wt||(Wt=!0,console.error($n)),null)),a=null,l={low:.15,medium:.5,high:.85},i=(()=>{var u;if(e.initialPersona)return j({},e.initialPersona);let p=it(e.apiKey||"local");return p?{persona:p.persona,confidence:(u=l[p.band])!=null?u:.15}:null})();function c(u){let p=document.documentElement;p.dataset.sentientPersona===void 0&&(p.dataset.sentientPersona=u.persona,p.dataset.sentientConfidence=Je(u.confidence))}return{isLocal:!0,async decide(u){var p,h,S;let w=await s;if(!w)return null;let b=w.createLocalEngine({sessionId:r,forcedPersona:o}).decide(u);return a=qe(j({},b),{layoutOrder:(h=(p=b.layoutOrder)!=null?p:a==null?void 0:a.layoutOrder)!=null?h:null,slots:j(j({},(S=a==null?void 0:a.slots)!=null?S:{}),b.slots)}),Ve(e.apiKey||"local",{v:1,persona:a.persona,band:Je(a.confidence),slots:a.slots,layoutOrder:a.layoutOrder,savedAt:Date.now()}),c(b),b},getSlotResult(u){var p,h,S;return(S=(h=a==null?void 0:a.slots[u])!=null?h:(p=e.initialSlots)==null?void 0:p[u])!=null?S:null},getSlotConfig(u){var p,h;return(h=(p=e.initialSlotConfig)==null?void 0:p[u])!=null?h:null},getSitePalette(){var u;return(u=e.initialPalette)!=null?u:null},reportSlots(){},getPersona(){let u=a!=null?a:i;return u?{persona:u.persona,confidence:u.confidence,band:Je(u.confidence)}:null},async assign(u,p){var h;let S=await s;return!S||!p||p.length===0?p!=null&&p[0]?{variantId:p[0],assignmentTtlMs:0}:null:{variantId:(h=S.createLocalEngine({sessionId:r,forcedPersona:o}).decide({components:[{id:u,variantIds:p}]}).assignments[u])!=null?h:p[0],assignmentTtlMs:0}},track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,fetchWeights:()=>Promise.resolve([]),getGraph:()=>({pageNodes:[],capturedAt:0}),flush:()=>{},dispose:()=>{},destroy:()=>n.destroy()}}var qt=/^(\*|\/[^\s?#*]*(\/\*)?)$/;function Rn(e){let t=e.split(/[?#]/)[0]||"/";return t.length>1?t.replace(/\/+$/,"")||"/":t}function jn(e,t){if(e===void 0||!qt.test(e))return!1;if(e==="*")return!0;let n=Rn(t);if(e.endsWith("/*")){let r=Rn(e.slice(0,-2));return n.startsWith(r==="/"?"/":`${r}/`)&&n!==r}return n===Rn(e)}function vt(e){if(e==null||typeof e!="object"||Array.isArray(e))return!1;let t=e;return t.type==="form"?!0:Array.isArray(t.children)?t.children.some(vt):!1}var jr="sentient-reveal",lt="sentient-revealed",zr=240,Pn=!1;function Ii(e){if(Pn||e.getElementById(jr)){Pn=!0;return}let t=Ge(e.createElement("style"),e);t.id=jr,t.textContent=`@media (prefers-reduced-motion: no-preference){@keyframes ${lt}{from{opacity:.55;transform:translateY(2px)}to{opacity:1;transform:none}}.${lt}{animation:${lt} ${zr}ms cubic-bezier(.2,.6,.2,1) both}}`,e.head.appendChild(t),Pn=!0}function Gn(e,t={}){var n;let r=(n=t.doc)!=null?n:typeof document!="undefined"?document:void 0;if(!r||!(e instanceof Element)||(t.arm!==void 0&&e.setAttribute("data-sentient-arm",t.arm),t.persona!==void 0&&e.setAttribute("data-sentient-persona",t.persona),t.previous!==void 0&&t.previous===e.textContent))return!1;Ii(r),e.classList.remove(lt),e.offsetWidth,e.classList.add(lt);let o=()=>{e.classList.remove(lt),e.removeEventListener("animationend",o)};return e.addEventListener("animationend",o),!0}function Fn(e,t,n,r){let o=[];{let s=!1,a=[],l=()=>{if(s)return;let i=Date.now();for(a.push(i);a.length>0&&i-a[0]>500;)a.shift();a.length>=3&&(s=!0,e("rage_click"))};t.addEventListener("click",l),o.push(()=>t.removeEventListener("click",l))}{let s=!1,a=l=>{if(s||!(l.target instanceof Node)||!t.contains(l.target)&&t!==l.target)return;s=!0;let i=typeof window!="undefined"?window.getSelection():null,c=i?i.toString().length:0;e("text_copy",{selectionLength:c})};document.addEventListener("copy",a),o.push(()=>document.removeEventListener("copy",a))}{let s=!1,a=!1,l=null,i=()=>{l!==null&&(clearTimeout(l),l=null)},c=()=>{s||!a||(i(),l=setTimeout(()=>{!s&&a&&(s=!0,e("scroll_hesitation"))},3e3))},u=()=>{i(),c()},p=S=>{for(let w of S)a=w.intersectionRatio>.3,a?c():i()},h=new IntersectionObserver(p,{threshold:[.3]});h.observe(t),window.addEventListener("scroll",u,{passive:!0}),o.push(()=>{h.disconnect(),window.removeEventListener("scroll",u),i()})}if((r==null?void 0:r.tabLoss)!==!1){let s=!1,a=n!=null?n:Date.now(),l=()=>{if(s||document.visibilityState!=="hidden")return;let i=Date.now()-a;i<15e3&&(s=!0,e("tab_loss",{timeOnPage:i}))};document.addEventListener("visibilitychange",l),o.push(()=>document.removeEventListener("visibilitychange",l))}return()=>{for(let s of o)s()}}function Oi(){var e;return typeof process=="undefined"||((e=process.env)==null?void 0:e.NODE_ENV)!=="production"}var Hr="https://api.sentient-ui.com/v1/events",pe=new Map,Vr=null;function Ti(e){return"value"in e||"currency"in e||"externalId"in e||"metadata"in e||"weight"in e||"stepIndex"in e}var Li=3;function Nn(){return Fr()}function zt(){var e;if(typeof window!="undefined")return((e=window.location)==null?void 0:e.pathname)||void 0}function Ri(){let e=new WeakMap,t=new Map,n=!1,r=(l,i,c)=>{let u=l.get(i);return c===null?u?!0:(l.set(i,new Set),!1):u?u.has(c)?!0:(u.add(c),!1):(l.set(i,new Set([c])),!1)},o=typeof window!="undefined"&&"event"in window,s=()=>{if(!o)return;let l=window.event;return typeof Event=="function"&&l instanceof Event?l:void 0},a=()=>{if(o){Promise.resolve().then(()=>{n=!1,t.clear()});return}let l=!1,i=()=>{l||(l=!0,n=!1,t.clear())};if(setTimeout(i,0),typeof MessageChannel=="function"){let c=new MessageChannel;c.port1.onmessage=()=>{c.port1.close(),c.port2.close(),i()},c.port2.postMessage(0)}};return{firedBefore(l,i){let c=s();if(c){let p=e.get(c);return p||(p=new Map,e.set(c,p)),r(p,l,i)}let u=r(t,l,i);return!u&&!n&&(n=!0,a()),u}}}var qr=new Set;function Pi(e,t,n){let r=typeof window=="undefined"?null:window.history;if(!r)return()=>{};let o=!1,s,a=()=>{if(o)return;let c=zt();!c||c===s||(s=c,e.track({projectId:t,componentId:"__page__",eventType:"pageview",payload:{}}),n(`${t}:${c}`))},l=[];for(let c of["pushState","replaceState"]){let u=r[c],p=function(...h){let S=u.apply(this,h);return a(),S};r[c]=p,l.push([c,u,p])}window.addEventListener("popstate",a);let i=zt();return i&&qr.has(`${t}:${i}`)?s=i:a(),()=>{if(!o){o=!0,window.removeEventListener("popstate",a);for(let[c,u,p]of l)r[c]===p&&(r[c]=u)}}}var ht={track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,assign:()=>Promise.resolve(null),decide:()=>Promise.resolve(null),getSlotResult:()=>null,getSlotConfig:()=>null,getSitePalette:()=>null,reportSlots:()=>{},getPersona:()=>null,fetchWeights:()=>Promise.resolve([]),getGraph:()=>({pageNodes:[],capturedAt:0}),flush:()=>{},dispose:()=>{},destroy:()=>{}};function Ni(){try{return Rr(window.location.search)}catch(e){return{utmParams:{},clickIds:{}}}}function Jr(e){return e.replace(/\/events\/?$/,"")}function Ye(){return typeof navigator!="undefined"&&navigator.globalPrivacyControl===!0?!0:[typeof navigator!="undefined"?navigator.doNotTrack:void 0,typeof window!="undefined"?window.doNotTrack:void 0,typeof navigator!="undefined"?navigator.msDoNotTrack:void 0].some(e=>e==="1"||e==="yes")}function Un(e){var t;if(typeof window=="undefined")return;let n=e!=null?e:Vr;if(!n){console.warn("[sentient] grantConsent() called before init()");return}let r=pe.get(n);if(!r){console.warn("[sentient] grantConsent() called before init()");return}let{config:o,upgrade:s,reinit:a}=r;if(!s){r.upgradeBlockedReason&&console.warn(r.upgradeBlockedReason);return}if(o.respectDoNotTrack!==!1&&Ye())return;let l=(a!=null?a:bt)(qe(j({},o),{consent:!0}));s(l);let i=(t=pe.get(n))==null?void 0:t.dispose;pe.set(n,{config:qe(j({},o),{consent:!0}),upgrade:null,dispose:i})}function Di(e,t){var n;let r=e.preConsentBehavior==="statistical_winner",o=Jr((n=e.ingestUrl)!=null?n:Hr),s={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},a=new Map,l=new Map,i={track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,fetchWeights:()=>Promise.resolve([]),assign(g,v,d){if(!r)return Promise.resolve(null);let m=a.get(g);return m?Promise.resolve(m):Bn(l,g,async()=>{try{let O=new URLSearchParams({componentId:g});for(let Y of v!=null?v:[])O.append("variantIds[]",Y);let $=je(5e3),q;try{let Y=await fetch(`${o}/winner?${O.toString()}`,{headers:s,signal:$.signal});if(!Y.ok)return v!=null&&v[0]?{variantId:v[0],assignmentTtlMs:0}:null;q=await Y.json()}finally{$.clear()}let J={variantId:q.variantId,assignmentTtlMs:0};return a.set(g,J),J}catch(O){return v!=null&&v[0]?{variantId:v[0],assignmentTtlMs:0}:null}})},decide:()=>Promise.resolve(null),getSlotResult:()=>null,getSlotConfig:()=>null,getSitePalette:()=>null,reportSlots:()=>{},getPersona:()=>null,getGraph:()=>({pageNodes:[],capturedAt:0}),flush:()=>{},dispose:()=>{},destroy:()=>{}},c=!1,u=new Set,p=[],h=[],S=[],w=()=>{for(let[,,g]of S.splice(0))g(null);b.length=0},b=[],K=!1,L=()=>{if(c)return;K=!0;let g=pe.get(e.apiKey);(g==null?void 0:g.upgrade)===R&&pe.set(e.apiKey,{config:e,upgrade:null,upgradeBlockedReason:"[sentient] grantConsent(): client released before consent; call init() again"})},M=[],E=()=>{setTimeout(()=>{var g;try{(g=M.shift())==null||g(i)}catch(v){}M.length&&E()})},x=g=>{c?M.length?M.push(g):g(i):!t&&!K&&b.length<100?b.push(g):K&&e.debug&&console.warn("[sentient] goal dropped: client released")},C={get gated(){return!c&&!t},get released(){return K&&!c},takeHeld:()=>b.splice(0),track:g=>i.track(g),goal:((g,v,d,m)=>x(O=>O.goal(g,v,d,m))),componentGoal:(g,v,d)=>i.componentGoal(g,v,d),identify:g=>i.identify(g),getAssignment:(g,v)=>i.getAssignment(g,v),assign:(g,v,d,m)=>i.assign(g,v,d,m),decide:g=>c?i.decide(g):K||t?Promise.resolve(null):new Promise(v=>S.push([g,Oe(),v])),getSlotResult:g=>i.getSlotResult(g),isSlotDecided:g=>{var v,d;return(d=(v=i.isSlotDecided)==null?void 0:v.call(i,g))!=null?d:!0},getSlotConfig:g=>i.getSlotConfig(g),getSitePalette:()=>i.getSitePalette(),getStyleVocabulary:()=>{var g,v;return(v=(g=i.getStyleVocabulary)==null?void 0:g.call(i))!=null?v:null},reportSlots:(g,v,d,m)=>i.reportSlots(g,v,d,m),reportSkeleton:(g,v)=>{var d;return(d=i.reportSkeleton)==null?void 0:d.call(i,g,v)},reportDrift:(g,v,d,m)=>{var O;return(O=i.reportDrift)==null?void 0:O.call(i,g,v,d,m)},requestSlots:(g,v,d)=>{var m;return c?(m=i.requestSlots)==null?void 0:m.call(i,g,v,d):p.push([g,v,d])},decideSlots:g=>{var v;return c?(v=i.decideSlots)==null?void 0:v.call(i,g):h.push(...g)},cancelSlots:g=>{var v;if(c)return(v=i.cancelSlots)==null?void 0:v.call(i,g);let d=new Set(g);for(let m of p)m[0]=m[0].filter(O=>!d.has(O));h=h.filter(m=>!d.has(m.id))},onSlotsChanged:g=>(u.add(g),()=>{u.delete(g)}),getPersona:()=>i.getPersona(),fetchWeights:()=>i.fetchWeights(),getGraph:()=>i.getGraph(),flush:()=>i.flush(),dispose:()=>(L(),w(),i.dispose()),destroy:()=>(L(),w(),c?i.destroy():st(e.apiKey))};function R(g){var v,d,m;i=g,c=!0,b.length&&(M.push(...b.splice(0)),E());let O=Oe();for(let[$,q,J]of S.splice(0))q!==O?J(null):g.decide($).then(J,()=>J(null));(v=g.onSlotsChanged)==null||v.call(g,()=>u.forEach($=>$()));for(let[$,q,J]of p.splice(0))$.length>0&&((d=g.requestSlots)==null||d.call(g,$,q,J));h.length>0&&((m=g.decideSlots)==null||m.call(g,h.splice(0)))}return{proxy:C,setInner:R}}function Oe(){return typeof location=="undefined"?"":location.pathname+(/^#!?\//.test(location.hash)?location.hash:"")}function Bn(e,t,n){let r=e.get(t);if(r)return r;let o=(async()=>{try{return await n()}finally{e.delete(t)}})();return e.set(t,o),o}function bt(e){var t,n,r,o,s,a,l,i,c,u;if(typeof window=="undefined")return ht;e.nonce&&Ht(e.nonce),Vr=e.apiKey||"local";let p=pe.get(e.apiKey||"local");if(p!=null&&p.dispose)try{p.dispose()}catch(f){}let h=e.respectDoNotTrack!==!1&&Ye(),S=e.consent===!1||h,w=typeof e.apiKey=="string"&&e.apiKey.startsWith("pk_");if(e.localMode===!0||!w&&e.localMode!==!1)return pe.set(e.apiKey||"local",{config:e,upgrade:null,upgradeBlockedReason:"[sentient] grantConsent(): this client is keyless/local \u2014 there is no hosted client to upgrade to. Configure a pk_ API key to enable tracking."}),S?ht:Ci(e);if(S){if(!e.apiKey||!e.apiKey.startsWith("pk_"))return e.preConsentBehavior==="statistical_winner"&&console.warn("[sentient] init() called with an invalid apiKey \u2014 expected a pk_ public key. SDK disabled."),pe.set(e.apiKey||"local",{config:e,upgrade:null,upgradeBlockedReason:"[sentient] grantConsent(): the client was initialized with an invalid apiKey (expected a pk_ public key) \u2014 consent cannot enable tracking."}),ht;let{proxy:f,setInner:y}=Di(e,h);return pe.set(e.apiKey,{config:e,upgrade:h?null:y}),f}if(!e.apiKey||!e.apiKey.startsWith("pk_"))return console.warn("[sentient] init() called with an invalid apiKey \u2014 expected a pk_ public key. SDK disabled."),ht;if(e.ingestUrl==="")return console.warn("[sentient] init() called with an empty ingestUrl. SDK disabled."),ht;let b=(t=e.ingestUrl)!=null?t:Hr,K=Date.now(),L=Ur({ssrSessionId:e.ssrSessionId,apiKey:e.apiKey}),M=xi(void 0,e.apiKey),E=!1,x=fe(e.apiKey),C=()=>!E&&fe(e.apiKey)===x,R=qe(j({},M),{set:(...f)=>{C()&&M.set(...f)}}),g=wr({ingestUrl:b,apiKey:e.apiKey}),v=Jr(b),d={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},m=new Set,O=_r({url:`${v}/goals`,apiKey:e.apiKey,headers:d,onDrop:(f,y)=>{if(!e.debug){if(m.has(y))return;m.add(y)}console.warn(`[sentient] goal dropped (HTTP ${y}) \u2014 this will not be retried. `+(y===400?"The session was not found: call init() and let the session upsert complete before firing goals.":y===401||y===403?"Check the API key and that this origin is on the project allowlist.":"See the response status for the cause."),f)}}),$=Or((n=navigator.userAgent)!=null?n:""),q=window.location.origin,J=Tr((r=document.referrer)!=null?r:"",q),Y=(o=e.sessionSegment)!=null?o:`${$}:${J}`,xe=new Map,A=new Map,B=new Map,ne=new Set,re=new Map,Q=null,me=null,ee=null,Me=new Set,$e=new Set,Le=new Map,yn=new Map,or=new Set,ir=new Set,sr=new Set,vn=null,Rt=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/,ar=new Set,Pt=new Set,Nt=new Set,ft=new Map,bn=null,Dt=new Set,pt=new Map,Sn=null,Fo=2,lr=new Map,we=!1,ur=(f,y,N)=>{var W;let G=new Set,_=1;for(let I of f){y.delete(I);let T=((W=lr.get(I))!=null?W:0)+1;lr.set(I,T),T<=Fo&&(G.add(I),T>_&&(_=T))}G.size>0&&setTimeout(()=>{we||N(G)},He(_))},wn=f=>{for(let y of f)B.has(y.id)||B.set(y.id,On(y))};if(e.initialSlots)for(let[f,y]of Object.entries(e.initialSlots))B.set(f,y),ne.add(f);if(e.initialSlotConfig)for(let[f,y]of Object.entries(e.initialSlotConfig))re.set(f,y);e.initialPalette&&(Q=e.initialPalette),e.initialVocabulary&&(me=e.initialVocabulary);let Ae=it(e.apiKey);if(Ae){for(let[f,y]of Object.entries(Ae.slots))B.has(f)||B.set(f,y);for(let[f,y]of Object.entries((s=Ae.slotConfig)!=null?s:{}))re.has(f)||re.set(f,y);!Q&&Ae.palette&&(Q=Ae.palette),!me&&Ae.vocabulary&&(me=Ae.vocabulary)}let cr={low:.15,medium:.5,high:.85};if(e.initialPersona)ee=j({},e.initialPersona);else{let f=document.documentElement.dataset;f.sentientPersona?ee={persona:f.sentientPersona,confidence:(l=cr[(a=f.sentientConfidence)!=null?a:"low"])!=null?l:.15}:Ae&&(ee={persona:Ae.persona,confidence:(i=cr[Ae.band])!=null?i:.15})}if(e.initialAssignments)for(let[f,y]of Object.entries(e.initialAssignments))R.set(f,Y,{variantId:y,assignedAt:Date.now(),segment:Y,confidence:1});let Be=Promise.resolve(),dr=L.getSessionId();if(dr){let f=Lr((c=document.referrer)!=null?c:""),{utmParams:y,clickIds:N}=Ni(),W=j(j(j(j({sessionId:dr,deviceClass:$,trafficSource:J,referrerDomain:f,utmParams:y,clickIds:N,landingPath:typeof location!="undefined"?location.pathname:void 0,timeOfDay:Pr(new Date),dayOfWeek:["sun","mon","tue","wed","thu","fri","sat"][new Date().getDay()],ephemeral:L.isEphemeral(),automation:typeof navigator!="undefined"&&navigator.webdriver===!0||Ir((u=navigator.userAgent)!=null?u:"")},e.userId?{userId:e.userId}:{}),e.persona?{persona:e.persona}:{}),e.country?{country:e.country}:{}),e.sdk?{sdk:e.sdk.name,sdkVersion:e.sdk.version}:{}),G=async()=>{for(let _=0;;_++){if(we||!C())return;let I=je(5e3);try{let T=await fetch(`${v}/sessions`,{method:"POST",keepalive:!0,body:JSON.stringify(W),headers:d,signal:I.signal});if(T.status===402){console.warn("[SentientUI] Session limit exceeded for this project. The bandit will stop learning until the limit resets. Upgrade at sentient-ui.com/pricing");return}if(T.ok||Bt(T)==="dropped")return}catch(T){}finally{I.clear()}if(_>=Li){console.warn("[SentientUI] Could not register the session after retries. Conversions in this visit may not be recorded.");return}await new Promise(T=>setTimeout(T,He(_+1)))}};try{Be=G()}catch(_){}}e.debug&&(console.log("[sentient] initialized",{context:e.context}),window.__sentient={client:null,queue:g});let Uo=Ri(),mt=null,_n=!1,ae={goal(f,y={},N=1,W=0){var G,_,I,T,H,F,te;let oe=L.getSessionId();if(!oe||we||!C())return;let z=Ti(y)?y:{metadata:y},ge=[f,(G=z.externalId)!=null?G:"",(_=z.stepIndex)!=null?_:W,(I=z.weight)!=null?I:N].join("\0"),_e=z.value!==void 0?`${z.value}\0${(T=z.currency)!=null?T:""}`:null;if(Uo.firedBefore(ge,_e)){e.debug&&console.log(`[sentient] goal("${f}") already recorded for this action \u2014 not sent twice`);return}let de=Nn(),le={sessionId:oe,name:f,metadata:(H=z.metadata)!=null?H:{},weight:(F=z.weight)!=null?F:N,stepIndex:(te=z.stepIndex)!=null?te:W,goalId:de,value:z.value,currency:z.currency,externalId:z.externalId};e.debug&&console.log("[sentient] goal",le);let D={id:de,body:JSON.stringify(le)};Be.then(()=>O.send(D))},componentGoal(f,y,N){var W,G,_;let I=L.getSessionId();if(!I||we||!C())return;let T=R.get(f,Y),H=T?null:(W=B.get(f))!=null?W:null;if(!T&&H===null){e.debug&&console.warn(`[sentient] componentGoal("${f}"): no assignment or slot decision yet \u2014 render its <Adaptive>/adaptive hook or call assign()/decide() before recording a goal.`);return}if(!T&&!ne.has(f)){e.debug&&console.warn(`[sentient] componentGoal("${f}"): slot not decided this session \u2014 not attributed`);return}let F=T?T.variantId:Nr(H),te={id:Nn(),sessionId:I,projectId:e.apiKey,componentId:f,variantId:F,eventType:"goal_achieved",goalType:y,payload:j({reward:(G=N==null?void 0:N.reward)!=null?G:1,goalValue:N==null?void 0:N.value,currency:N==null?void 0:N.currency},(_=N==null?void 0:N.metadata)!=null?_:{}),timestamp:Date.now(),timeInSession:Date.now()-K,path:zt()};e.debug&&console.log("[sentient] componentGoal",te),Be.then(()=>{!we&&C()&&g.push(te)})},identify(f){let y=L.getSessionId();!y||we||!C()||Be.then(()=>{fetch(`${v}/sessions`,{method:"POST",keepalive:!0,body:JSON.stringify({sessionId:y,userId:f,ephemeral:L.isEphemeral()}),headers:d}).catch(()=>{})})},track(f){let y=L.getSessionId();if(!y||we||!C()||f.eventType==="variant_assigned"&&B.get(f.componentId)!==void 0&&!ne.has(f.componentId)&&!R.get(f.componentId,Y))return;let N=qe(j({path:zt()},f),{id:Nn(),sessionId:y,timestamp:Date.now(),timeInSession:Date.now()-K});e.debug&&console.log("[sentient] track",N),Be.then(()=>g.push(N))},getAssignment(f,y){return R.get(f,y)},async assign(f,y,N,W){let G=L.getSessionId();if(!G)return null;let _=R.get(f,Y);if(_&&(y!=null&&y.length||_.content!==void 0)){let I=_.ttlMs&&_.ttlMs>0?Math.max(0,_.assignedAt+_.ttlMs-Date.now()):0;return{variantId:_.variantId,assignmentTtlMs:I,content:_.content}}return Bn(xe,f,async()=>{if(!await xn(Be,2500)||we||!C())return null;let I=je(3e4);try{let T={sessionId:G,componentId:f,variantIds:y};W!==void 0?T.agentDataByVariant=W:N!==void 0&&(T.agentData=N);let H=await fetch(`${v}/assign`,{method:"POST",body:JSON.stringify(T),headers:d,signal:I.signal});if(!H.ok)return null;let F=await H.json();return R.set(f,Y,j({variantId:F.variantId,assignedAt:Date.now(),segment:Y,confidence:1,content:F.content},F.assignmentTtlMs&&F.assignmentTtlMs>0?{ttlMs:F.assignmentTtlMs}:{})),F}catch(T){return null}finally{I.clear()}})},async decide(f){var y,N;let W=L.getSessionId();if(!W)return null;let G=(y=f.slots)!=null?y:[],_={sessionId:W};f.sections&&f.sections.length>0&&(_.sections=f.sections.map(T=>({id:T}))),_.components=(N=f.components)!=null?N:[],G.length>0&&(_.slots=G.map(In)),f.slotsFrom==="registry"&&(_.slotsFrom="registry",f.registrySlotIds&&(_.registrySlotIds=f.registrySlotIds),f.bootstrap===!1&&(_.bootstrap=!1),f.render&&Object.keys(f.render).length>0&&(_.render=f.render)),f.v&&(_.v=f.v),typeof f.pp=="number"&&(_.pp=f.pp),e.persona&&(_.persona=e.persona);let I=JSON.stringify(_);return Bn(A,I,async()=>{var T,H,F,te,oe,z,ge,_e;if(!await xn(Be,2500)||we||!C())return wn(G),null;let de=je(3e4);try{let le=await fetch(`${v}/decide`,{method:"POST",body:I,headers:d,signal:de.signal});if(!le.ok)return wn(G),null;let D=await le.json(),Ce=yt(D.stage,e.stageAttributes);e.stageAttributes&&Vt(Ce);let rt={};for(let X of G){let Ie=(T=D.slots)==null?void 0:T[X.id];if(Ie!==void 0){rt[X.id]=Ie,B.set(X.id,Ie),ne.add(X.id);continue}let fr=B.get(X.id);if(fr!==void 0)rt[X.id]=fr;else{let pr=On(X);rt[X.id]=pr,B.set(X.id,pr)}}if(D.slots)for(let[X,Ie]of Object.entries(D.slots))X in rt||(rt[X]=Ie,B.set(X,Ie),ne.add(X));let Wo=ee!=null&&ee.persona!=="unknown";D.persona&&!(D.persona==="unknown"&&Wo)?ee={persona:D.persona,confidence:(H=D.confidence)!=null?H:0}:ee||(ee={persona:"unknown",confidence:0});for(let[X,Ie]of Object.entries((F=D.assignments)!=null?F:{}))R.set(X,Y,{variantId:Ie,assignedAt:Date.now(),segment:Y,confidence:1});if(D.slotConfig)for(let[X,Ie]of Object.entries(D.slotConfig))re.set(X,Ie);D.palette&&(Q=D.palette),D.vocabulary&&(me=D.vocabulary);for(let X of(te=f.registrySlotIds)!=null?te:[])(oe=D.slotConfig)!=null&&oe[X]||(re.delete(X),B.delete(X),ne.delete(X));return C()&&Ve(e.apiKey,j(j(j(j({v:1,persona:ee.persona,band:Je(ee.confidence),slots:Object.fromEntries(B),layoutOrder:(z=D.layoutOrder)!=null?z:null,savedAt:Date.now()},re.size>0?{slotConfig:Object.fromEntries(re)}:{}),Q?{palette:Q}:{}),me?{vocabulary:me}:{}),Ce?{stage:Ce}:{})),j(j(j(j(j(j(j({layoutOrder:(ge=D.layoutOrder)!=null?ge:null,assignments:(_e=D.assignments)!=null?_e:{},slots:rt,persona:ee.persona,confidence:ee.confidence},D.slotConfig?{slotConfig:D.slotConfig}:{}),D.goals?{goals:D.goals}:{}),D.sectionMap?{sectionMap:D.sectionMap}:{}),D.palette?{palette:D.palette}:{}),D.vocabulary?{vocabulary:D.vocabulary}:{}),D.stage?{stage:D.stage}:{}),D.context?{context:D.context}:{})}catch(le){return wn(G),null}finally{de.clear()}})},getSlotResult(f){var y;return(y=B.get(f))!=null?y:null},isSlotDecided(f){return ne.has(f)},getSlotConfig(f){var y;return(y=re.get(f))!=null?y:null},reportSlots(f,y,N,W){var G;let _={};for(let[I,T]of Object.entries(W!=null?W:{}))for(let H of T){let F=`${I}|${H.key}`;!Rt.test(I)||sr.has(F)||(sr.add(F),((G=_[I])!=null?G:_[I]=[]).push(H))}Object.keys(_).length>0&&fetch(`${v}/slots/observed`,{method:"POST",headers:d,body:JSON.stringify({slotIds:Object.keys(_),authoredArms:_})}).catch(()=>{});for(let I of f)if(!(typeof I!="string"||I.length===0)){if(!Rt.test(I)){Oi()&&!ar.has(I)&&(ar.add(I),console.warn(`[sentient] reportSlots: slot id ${JSON.stringify(I)} will not register \u2014 ids must start with a letter or digit and contain only letters, digits, '_' or '-' (max 128 chars): /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/.`));continue}if(!Me.has(I)){Me.add(I),$e.add(I);let T=y==null?void 0:y[I];if(typeof T=="string"){let F=T.replace(/\s+/g," ").trim().slice(0,400);F!==""&&Le.set(I,F)}let H=N==null?void 0:N[I];H!==void 0&&yn.set(I,H)}}$e.size===0||vn!=null||(vn=setTimeout(()=>{vn=null;let I=[...$e];$e.clear();for(let T=0;T<I.length;T+=20){let H=I.slice(T,T+20),F={},te={};for(let oe of H){let z=Le.get(oe);z!==void 0&&(F[oe]=z,Le.delete(oe));let ge=yn.get(oe);ge!==void 0&&(te[oe]=ge,yn.delete(oe))}fetch(`${v}/slots/observed`,{method:"POST",headers:d,body:JSON.stringify(j(qe(j(j({slotIds:H},Object.keys(F).length>0?{baselineTexts:F}:{}),Object.keys(te).length>0?{baselineSkeletons:te}:{}),{pagePaths:Object.fromEntries(H.map(oe=>[oe,location.pathname]))}),Object.keys(F).length>0&&L.getSessionId()?{sessionId:L.getSessionId()}:{}))}).catch(()=>{})}},1e3))},reportSkeleton(f,y){!Rt.test(f)||or.has(f)||(or.add(f),fetch(`${v}/slots/observed`,{method:"POST",headers:d,body:JSON.stringify({slotIds:[f],baselineSkeletons:{[f]:y}})}).catch(()=>{}))},reportDrift(f,y,N,W){let G=`${f}|${y}`,_=L.getSessionId();!_||ir.has(G)||(ir.add(G),fetch(`${v}/slots/drift`,{method:"POST",headers:d,body:JSON.stringify({sessionId:_,reports:[{slotId:f,expectedFp:y,observedFp:N,reason:W}]})}).catch(()=>{}))},requestSlots(f,y,N){var W,G;for(let _ of f)Nt.has(_)||(Nt.add(_),Rt.test(_)?ft.set(_,{text:y==null?void 0:y[_],render:(W=N==null?void 0:N.render)==null?void 0:W[_],skeleton:(G=N==null?void 0:N.skeletons)==null?void 0:G[_]}):ae.reportSlots([_]));ft.size===0||bn!=null||(bn=setTimeout(()=>{bn=null;let _=[...ft];ft.clear();for(let I=0;I<_.length;I+=50){let T=_.slice(I,I+50),H={};for(let[F,te]of T)te.render&&(H[F]=te.render);ae.decide({slotsFrom:"registry",registrySlotIds:T.map(([F])=>F),bootstrap:!1,render:H}).then(F=>{var te,oe;if(F){let z={},ge={},_e=[];for(let[de,le]of T){let D=(te=F.slotConfig)==null?void 0:te[de];if(D){D.needsSkeleton&&le.skeleton&&((oe=ae.reportSkeleton)==null||oe.call(ae,de,le.skeleton));continue}_e.push(de),le.text&&(z[de]=le.text),le.skeleton&&(ge[de]=le.skeleton)}_e.length>0&&ae.reportSlots(_e,z,ge)}else ur(T.map(([z])=>z),Nt,z=>{var ge;let _e={},de={},le={};for(let[D,Ce]of T)z.has(D)&&(Ce.text&&(_e[D]=Ce.text),Ce.render&&(de[D]=Ce.render),Ce.skeleton&&(le[D]=Ce.skeleton));(ge=ae.requestSlots)==null||ge.call(ae,[...z],_e,{render:de,skeletons:le})});Pt.forEach(z=>z())})}},0))},decideSlots(f){for(let y of f)Dt.has(y.id)||(Dt.add(y.id),pt.set(y.id,y));pt.size===0||Sn!=null||(Sn=setTimeout(()=>{Sn=null;let y=[...pt.values()];pt.clear();for(let N=0;N<y.length;N+=30){let W=y.slice(N,N+30);ae.decide({slots:W}).then(G=>{G||ur(W.map(_=>_.id),Dt,_=>{var I;return(I=ae.decideSlots)==null?void 0:I.call(ae,W.filter(T=>_.has(T.id)))}),Pt.forEach(_=>_())})}},0))},cancelSlots(f){for(let y of f)ft.delete(y)&&Nt.delete(y),pt.delete(y)&&Dt.delete(y)},onSlotsChanged(f){return Pt.add(f),()=>{Pt.delete(f)}},getStyleVocabulary(){return me},getSitePalette(){return Q},getPersona(){return ee?{persona:ee.persona,confidence:ee.confidence,band:Je(ee.confidence)}:null},async fetchWeights(){var f;let y=je(5e3);try{let N=await fetch(`${v}/weights`,{headers:d,signal:y.signal});return N.ok?(f=(await N.json()).components)!=null?f:[]:[]}catch(N){return[]}finally{y.clear()}},getGraph(){return{pageNodes:[],capturedAt:0}},flush(){g.flush(),O.flush()},dispose(){var f;mt==null||mt(),_n=!0,we=!0,g.destroy(),O.destroy(),((f=pe.get(e.apiKey))==null?void 0:f.dispose)===ae.dispose&&pe.delete(e.apiKey),e.debug&&console.log("[sentient] disposed")},destroy(){var f;mt==null||mt(),_n=!0,we=!0,E=!0,$t(e.apiKey),g.destroy({forget:!0}),O.destroy({forget:!0}),L.destroy(),R.clear(),((f=pe.get(e.apiKey))==null?void 0:f.dispose)===ae.dispose&&pe.delete(e.apiKey);try{localStorage.removeItem(ot+e.apiKey),localStorage.removeItem(Kt(e.apiKey)),localStorage.removeItem(jt(e.apiKey)),localStorage.removeItem(`_snt_graph_nodes${We(e.apiKey)}`),localStorage.removeItem("_snt_graph_edges")}catch(y){}e.debug&&console.log("[sentient] destroyed")}};if(pe.set(e.apiKey,{config:e,upgrade:null,dispose:ae.dispose}),mt=Pi(ae,e.apiKey,f=>{Be.then(()=>{_n||qr.add(f)})}),e.debug){let f=window;f.__sentient&&(f.__sentient.client=ae)}return ae}var Wn=/(^|\/)snippet(\.global)?(\.min)?\.js(\?|$)/,Mi=(()=>{var e,t;try{return(t=(e=document.currentScript)==null?void 0:e.src)!=null?t:""}catch(n){return""}})(),$i=/@\d+\.\d+\.\d+[^/]*\//;function zn(e){var t;try{let n=Mi||((t=Array.from(document.getElementsByTagName("script")).find(r=>Wn.test(r.src)))==null?void 0:t.src);for(let r of n?[n]:[]){let o=Wn.test(r)?r.replace(Wn,`$1${e}$4`):r.replace(/[^/?#]*([?#].*)?$/,e),s=(e==="consent.global.js"?"sha384-+7/RqBOFLU5bMaQ6bcBAWzG589skmxN8tedG9hkoQQ6HaQkRRBJfoRVD94e/fJcM":e==="editor.global.js"?"sha384-EoAiSGo1RH6/ueo+geGaOGKbv4h6QraiVRGX0QgIrmw5zwy8fPclFnz8R8+4oa3I":e==="preview.global.js"?"sha384-wT7q44HEqP/ffe8U9vqOXtq/aqNKi6/kl4ymyk7J0FHXu/HEDkQCuMbgWYKVn6uT":"sha384-OAQ7UQm5r+48WW3TX1LtHxQVhOYcuHjXRFqRoE6GV1C9C9iH1O9UvVgsfRqSCD/t")||"";return $i.test(o)&&s.indexOf("sha384-")===0?{src:o,integrity:s}:{src:o}}}catch(n){}return null}var Jt=new Map;function ut(e,t,n){let r=window[t];if(r)return Promise.resolve(r);let o=Jt.get(e);return o||(o=new Promise(s=>{var i;let a=n?{src:n}:zn(e);if(!a)return s(null);let l=Ge(document.createElement("script"));Hn(l,a),l.async=!0,l.onload=()=>{var u;let c=(u=window[t])!=null?u:null;c||Jt.delete(e),s(c)},l.onerror=()=>{Jt.delete(e),s(null)},((i=document.head)!=null?i:document.documentElement).appendChild(l)}),Jt.set(e,o)),o}function Hn(e,t){t.integrity&&(e.integrity=t.integrity,e.crossOrigin="anonymous"),e.src=t.src}var Yr="__sentientConsent",Re=null,Vn=!1,Yt=new Set,qn=()=>{let e=window[Yr];return typeof(e==null?void 0:e.consentWatcher)=="function"?e.consentWatcher:null},St;function Xr(e){St=e}function Bi(){Re||(Re=qn())||Vn||(Vn=!0,ut("consent.global.js",Yr,St).then(e=>{if(Vn=!1,!e)return Ki(St!=null?St:"consent.global.js");if(Re=qn(),Re)for(let t of Array.from(Yt))t()}))}function Ki(e){console.warn(`[sentient] could not load ${e} \u2014 tracking stays off. Set window.sentient.consentSrc to its URL.`)}function Xe(e){Bi();let t=null,n=()=>(!t&&(Re!=null?Re:Re=qn())&&(t=Re(e)),t);return{read:()=>{var r,o;return(o=(r=n())==null?void 0:r.read())!=null?o:null},refused:()=>{var r,o;return(o=(r=n())==null?void 0:r.refused())!=null?o:!1},subscribe(r){let o,s=!1,a=()=>{Yt.delete(a);let l=n();s||!l||(o=l.subscribe(r),r())};return n()?(o=t.subscribe(r),Promise.resolve().then(()=>{s||r()})):Yt.add(a),()=>{s=!0,Yt.delete(a),o==null||o()}}}}function ji(e){return e.replace(/\s+/g," ").trim().slice(0,300)}function Zr(e,t){let n=t>>>0;for(let r=0;r<e.length;r++)n^=e.charCodeAt(r),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,"0")}function Gi(e){let t=e.join("");return Zr(t,2166136261)+Zr(t,1523705862)}var Fi=new Set(["A","BUTTON"]),Ui=/^H([1-6])$/,Wi=new Set(["P","LI","LABEL","BLOCKQUOTE","FIGCAPTION","DT","DD","TD","TH"]);var zi=new Set(["SCRIPT","STYLE","TEMPLATE","NOSCRIPT"]);function Hi(e){return Fi.has(e.tagName)||e.getAttribute("role")==="button"?!0:e.tagName==="INPUT"&&/^(submit|button)$/i.test(e.type)}function Vi(e){if(Ui.test(e.tagName)||Wi.has(e.tagName))return!0;let t=e.ownerDocument.defaultView,n=t?t.getComputedStyle(e).display:"";return n!==""&&n!=="inline"&&n!=="contents"}function qi(e,t){let n=null;for(let r=e.parentElement;r&&r!==t.parentElement;r=r.parentElement){if(Hi(r)){n=r;break}if(r===t)break}if(n)return n;for(let r=e.parentElement;r;r=r.parentElement)if(r===t||Vi(r))return r;return t}function Xt(e,t=40){var n,r,o;let s=e.ownerDocument.createTreeWalker(e,4),a=[];for(let u=s.nextNode();u;u=s.nextNode())if(((n=u.nodeValue)!=null?n:"").trim()!==""&&!zi.has((o=(r=u.parentElement)==null?void 0:r.tagName)!=null?o:"")&&(a.push(u),a.length>120))return{reason:"too_large"};if(a.length===0)return{reason:"empty"};let l=[],i=[];for(let u of a){let p=qi(u,e),h=l.indexOf(p);h===-1&&(l.push(p),h=l.length-1),i.push(h)}if(l.length>t)return{reason:"too_large"};let c=a.map(u=>{var p;return ji((p=u.nodeValue)!=null?p:"")});return{textNodes:a,ownerEls:l,leafToNode:i,leaves:c,fp:Gi(c)}}var Qr=["cookiebot","onetrust","cookieyes","tcf","google-consent-mode","shopify"];function Ji(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=Object.entries(e);if(t.length<1||t.length>4)return null;let n={};for(let[r,o]of t){if(!Array.isArray(o)||o.length<2||o.length>6||!o.every(s=>typeof s=="string")||/[=|]/.test(r)||o.some(s=>/[=|]/.test(s)))return null;n[r]=o}return n}function Yi(e){return!Array.isArray(e)||e.length<2||e.length>12||!e.every(t=>typeof t=="string")?null:e}function Xi(e){try{return e()}catch(t){return}}function Zt(e){if(typeof e!="object"||e===null)return null;let t=e;if(typeof t.apiKey!="string"||!t.apiKey.startsWith("pk_"))return null;let n={};if(typeof t.slots=="object"&&t.slots!==null&&!Array.isArray(t.slots))for(let[l,i]of Object.entries(t.slots)){if(typeof i!="object"||i===null)continue;let c=i,u=Ji(c.dims);if(!u||c.target!==void 0&&typeof c.target!="string")continue;let p=c.arms!==void 0?Yi(c.arms):null,h={dims:u};typeof c.target=="string"&&(h.target=c.target),p&&(h.arms=p),n[l]=h}let r={apiKey:t.apiKey,personaAttributes:t.personaAttributes===!0,slots:n};typeof t.consent=="boolean"?r.consent=t.consent:t.consent!==void 0&&s("consent");let o=t.consentFrom;if(typeof o=="string"&&Qr.includes(o))r.consentFrom=o;else if(o&&typeof o=="object"&&!Array.isArray(o)){let l=o;typeof l.cmp=="string"&&Qr.includes(l.cmp)||l.cmp===void 0&&(typeof l.cookie=="string"||typeof l.check=="function")?r.consentFrom=l:s("consentFrom")}else o!==void 0&&s("consentFrom");function s(l){r.consent=!1,console.warn(`[sentient] invalid ${l} \u2014 tracking stays OFF until it is fixed (sentient-ui.com/docs#consent).`)}(t.preConsentBehavior==="statistical_winner"||t.preConsentBehavior==="control")&&(r.preConsentBehavior=t.preConsentBehavior),t.debug===!0&&(r.debug=!0),(t.stageAttributes===!0||t.stageAttributes==="detailed")&&(r.stageAttributes=t.stageAttributes),typeof t.registry=="boolean"&&(r.registry=t.registry),typeof t.editorSrc=="string"&&(r.editorSrc=t.editorSrc),typeof t.consentSrc=="string"&&(r.consentSrc=t.consentSrc),typeof t.nonce=="string"&&t.nonce!==""&&(r.nonce=t.nonce),typeof t.apiBase=="string"&&(r.apiBase=t.apiBase),typeof t.sectionCapture=="boolean"&&(r.sectionCapture=t.sectionCapture);let a=typeof t.persona=="function"?Xi(t.persona):t.persona;if(typeof a=="string"&&a.trim()!==""&&(r.persona=a),Array.isArray(t.sections)){let l=t.sections.filter(i=>typeof i=="string"&&i.trim()!=="").slice(0,50);l.length>=2&&(r.sections=l)}return r}var eo=new WeakMap;function to(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function no(e,t,n){var s,a,l;let r=eo.get(e);if(r){if(r.fp!==n.fp||!to(r.leafToNode,n.leafToNode))return"mismatch"}else{let i=Xt(e);if(!("fp"in i)||(r={fp:i.fp,leafToNode:i.leafToNode,textNodes:i.textNodes,ownerEls:i.ownerEls,classes:i.ownerEls.map(c=>{var u;return(u=c.getAttribute("class"))!=null?u:""})},r.fp!==n.fp||!to(r.leafToNode,n.leafToNode)))return"mismatch";eo.set(e,r)}let o=r;for(let[i,c]of Object.entries(t.nodes)){let u=Number(i),p=o.ownerEls[u];if(p){if(typeof c.text=="string"){let h=!0;o.leafToNode.forEach((S,w)=>{S===u&&(o.textNodes[w].nodeValue=h?c.text:"",h=!1)})}c.like!==void 0&&o.classes[c.like]!==void 0&&p.setAttribute("class",o.classes[c.like]),c.hidden&&((s=p.style)==null||s.setProperty("display","none","important"))}}for(let i of Object.values((a=t.order)!=null?a:{})){let c=i.map(w=>o.ownerEls[w]).filter(w=>!!w),u=(l=c[0])==null?void 0:l.parentElement;if(!u||c.length!==i.length||c.some(w=>w.parentElement!==u))continue;let p=new Set(c),h=0;Array.from(u.children).map(w=>p.has(w)?c[h++]:w).forEach((w,b)=>{var K;u.children[b]!==w&&u.insertBefore(w,(K=u.children[b])!=null?K:null)})}return"applied"}function wt(e){var n,r,o;let t=(r=(n=e.defaultView)!=null?n:typeof window!="undefined"?window:void 0)==null?void 0:r.location;return(o=t==null?void 0:t.pathname)!=null?o:""}function Zi(e,t){var n;if(t.tag&&e.tagName.toLowerCase()!==t.tag.toLowerCase())return!1;if(t.text){let r=((n=e.textContent)!=null?n:"").replace(/\s+/g," ").trim().toLowerCase(),o=t.text.replace(/\s+/g," ").trim().toLowerCase();if(!(r===o||r.startsWith(o)||o.startsWith(r)))return!1}return!0}function Qt(e,t){return!!(e!=null&&e.urlMatch)&&!wt(t).includes(e.urlMatch)}var Qi=/^[a-zA-Z_][-a-zA-Z0-9_]*$/;function ro(e,t){var r;let n=[];if(e.id){let o=t.getElementById(e.id);n=o?[o]:[]}if(n.length===0&&((r=e.dataAttr)!=null&&r.name)&&Qi.test(e.dataAttr.name))try{let o=e.dataAttr.value.replace(/["\\]/g,"\\$&");n=Array.from(t.querySelectorAll(`[${e.dataAttr.name}="${o}"]`))}catch(o){n=[]}if(n.length===0&&e.selector)try{n=Array.from(t.querySelectorAll(e.selector))}catch(o){n=[]}return n}function Te(e,t){if(e.urlMatch&&!wt(t).includes(e.urlMatch))return null;let n=ro(e,t);if(n.length!==1)return null;let r=n[0];return e.fingerprint&&!Zi(r,e.fingerprint)?null:r}function oo(e,t){return Qt(e,t)?!1:!!e.selector&&!e.dataAttr&&!e.id&&!e.fingerprint&&e.page===void 0?io(e,t):Te(e,t)!==null}function io(e,t){return ro(e,t).length>0}function en(e,t){return Qt(e,t)?!1:e.page!==void 0&&qt.test(e.page)?jn(e.page,wt(t)):io(e,t)}var so={color:"color",background:"background",fontSize:"font-size",fontWeight:"font-weight",textAlign:"text-align",padding:"padding",margin:"margin",borderRadius:"border-radius",width:"width",height:"height",maxWidth:"max-width",border:"border",boxShadow:"box-shadow",opacity:"opacity",lineHeight:"line-height",letterSpacing:"letter-spacing",textTransform:"text-transform",gap:"gap",fontFamily:"font-family"},es=/^(rgb|rgba|hsl|hsla|calc|var|min|max|clamp)$/i;function ao(e){var r;if(e.trim().length===0||/[;{}<>]/.test(e))return!1;let t=/([A-Za-z-]*)\(/g,n;for(;(n=t.exec(e))!==null;)if(!es.test((r=n[1])!=null?r:""))return!1;return!0}function ts(e){var r,o;let t=e.ownerDocument.createTreeWalker(e,4),n=null;for(let s=t.nextNode();s!==null;s=t.nextNode()){if(((r=s.nodeValue)!=null?r:"").trim()==="")continue;let a=(o=s.parentElement)==null?void 0:o.tagName;if(!(a==="SCRIPT"||a==="STYLE"||a==="TEMPLATE")){if(n!==null)return null;n=s}}return n}function _t(e,t){let n=ts(e);n!==null?n.nodeValue=t:e.textContent=t}var Jn=/^https:\/\//i;function tn(e){return typeof e=="string"&&!/[\s\x00-\x1f\\]/.test(e)&&(Jn.test(e)||e[0]==="/"&&e[1]!=="/")?e:null}var lo=new Map,Fe=null;function ns(e){return e.replace(/["\\]/g,"\\$&")}function rs(e){var t;(!Fe||!Fe.isConnected)&&(Fe=e.querySelector("style[data-sentient-ops]"),Fe||(Fe=Ge(e.createElement("style"),e),Fe.setAttribute("data-sentient-ops",""),((t=e.head)!=null?t:e.documentElement).appendChild(Fe))),Fe.textContent=[...lo.entries()].map(([n,r])=>`[data-snt-e="${ns(n)}"]{${r}}`).join(`
2
+ `)}function uo(e,t,n,r){var l;let o=!1,s=(l=t.moveBefore)!=null?l:t.moveAfter;if(s){let i=Te(s,r);!i||i===e||i.parentElement!==e.parentElement||!e.parentElement?o=!0:t.moveBefore?e.parentElement.insertBefore(e,i):e.parentElement.insertBefore(e,i.nextSibling)}typeof t.text=="string"&&_t(e,t.text),typeof t.href=="string"&&Jn.test(t.href)&&e.setAttribute("href",t.href),typeof t.imageSrc=="string"&&Jn.test(t.imageSrc)&&e.setAttribute("src",t.imageSrc),typeof t.imageAlt=="string"&&e.setAttribute("alt",t.imageAlt);let a=[];if(t.hidden&&a.push("display:none !important"),t.style)for(let[i,c]of Object.entries(t.style)){let u=so[i];u&&typeof c=="string"&&ao(c)&&a.push(`${u}:${c.trim()} !important`)}return a.length>0&&(e.setAttribute("data-snt-e",n),lo.set(n,a.join(";")),rs(r)),{anchorMiss:o}}var kt="data-sentient-block-arm",P=null;function Et(e){P=e!=null?e:null}var Ze=null;function xt(e){Ze=e!=null?e:null}var mo=e=>{var t;return typeof e=="string"?(t=Ze==null?void 0:Ze.entries.find(n=>n.id===e))==null?void 0:t.classes:void 0},go=e=>{let t=typeof e=="string"?Ze==null?void 0:Ze.entries.find(n=>n.id===e):void 0;return t!=null&&t.computed.inheritsColor?t.computed.color:void 0},Pe="data-sentient-blocks-hid",ct={none:"0",sm:"8px",md:"16px",lg:"24px"},Yn={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",between:"space-between"},co={sm:"0.875em",md:"1em",lg:"1.25em"},os={sm:"1.25em",md:"1.5em",lg:"2em"},is={sm:"6px 14px",md:"10px 20px",lg:"14px 28px"},fo={sm:"8px",md:"16px",lg:"32px"},ss={square:"1 / 1",landscape:"4 / 3",wide:"16 / 9"},as={normal:"400",medium:"500",bold:"700"};function he(e,t){for(let[n,r]of Object.entries(t))r!==void 0&&e.style.setProperty(n,r);return e}function po(e){return e==="muted"?P!=null&&P.muted?{color:P.muted}:{opacity:"0.7"}:e==="accent"?{"font-weight":"600",color:P==null?void 0:P.accent}:{}}function ho(e,t){let n=ls(e,t),r=go(e.like);return n&&r&&(n.style.color=r),n}function ls(e,t){var n,r,o,s,a,l,i,c,u,p,h,S,w,b,K,L,M,E,x,C;try{let R=mo(e.like),g=e.maxWidth==="measure"?"65ch":void 0,v=d=>(d.className=R,he(d,{"max-width":g}));switch(e.type){case"stack":case"grid":{let d=t.createElement("div");if(e.type==="stack"){let $=e;he(d,{display:"flex","flex-direction":$.direction,gap:(r=ct[(n=$.gap)!=null?n:"md"])!=null?r:ct.md,"align-items":$.align?Yn[$.align]:void 0,"justify-content":$.justify?Yn[$.justify]:void 0,"flex-wrap":$.wrap?"wrap":void 0})}else{let $=e,q=(s=ct[(o=$.gap)!=null?o:"md"])!=null?s:ct.md;he(d,{display:"grid","grid-template-columns":`repeat(auto-fit, minmax(max(200px, calc((100% - ${$.columns-1} * ${q}) / ${$.columns})), 1fr))`,gap:q,"align-items":$.align?Yn[$.align]:void 0})}R&&(d.className=R);let m=!R&&e.type==="stack"&&e.surface==="raised",O=(a=e.pad)!=null?a:m?"md":void 0;O&&he(d,{padding:(l=ct[O])!=null?l:ct.md}),m&&he(d,{background:P==null?void 0:P.surface,color:P!=null&&P.surface?P==null?void 0:P.surfaceText:void 0,border:`1px solid ${(i=P==null?void 0:P.border)!=null?i:"currentColor"}`,"border-radius":(c=P==null?void 0:P.radius)!=null?c:"8px"});for(let $ of(u=e.children)!=null?u:[]){let q=ho($,t);q&&d.appendChild(q)}return d}case"text":{let d=t.createElement("p");return d.textContent=e.value,R?v(d):he(d,Ke(U({margin:"0","font-size":e.size?co[e.size]:void 0,"font-weight":e.weight?as[e.weight]:void 0,"text-align":e.align},po(e.tone)),{"max-width":e.maxWidth==="measure"?"65ch":void 0}))}case"heading":{let d=t.createElement(`h${e.level}`);return d.textContent=e.value,R?v(d):he(d,{margin:"0","font-size":os[(p=e.size)!=null?p:"md"],"text-align":e.align,"max-width":e.maxWidth==="measure"?"65ch":void 0})}case"button":{let d=t.createElement("a");d.textContent=e.label;let m=tn(e.href);if(m&&(d.href=m),e.tag&&d.setAttribute("data-sentient-tag",e.tag),R)return v(d);let O=(h=e.emphasis)!=null?h:"primary";return he(d,{display:"inline-block",padding:is[(S=e.size)!=null?S:"md"],"border-radius":(w=P==null?void 0:P.radius)!=null?w:"8px",font:"inherit","font-size":e.size?co[e.size]:void 0,"text-decoration":O==="ghost"?"underline":"none",cursor:"pointer",background:O==="primary"?(b=P==null?void 0:P.primaryBg)!=null?b:"#111827":"transparent",color:O==="primary"?(K=P==null?void 0:P.primaryText)!=null?K:"#ffffff":(L=P==null?void 0:P.accent)!=null?L:"inherit",border:O==="secondary"?`1px solid ${(M=P==null?void 0:P.accent)!=null?M:"currentColor"}`:"none"})}case"link":{let d=t.createElement("a");d.textContent=e.label;let m=tn(e.href);return m&&(d.href=m),e.tag&&d.setAttribute("data-sentient-tag",e.tag),R?v(d):he(d,{color:"inherit","text-decoration":"underline"})}case"image":{let d=t.createElement("img"),m=tn(e.src);return m&&(d.src=m),d.alt=e.alt,R&&(d.className=R),he(d,{display:"block","max-width":"100%","aspect-ratio":e.ratio&&e.ratio!=="auto"?ss[e.ratio]:void 0,"object-fit":e.fit,width:e.ratio&&e.ratio!=="auto"?"100%":void 0})}case"badge":{let d=t.createElement("span");return d.textContent=e.value,R?v(d):he(d,U({display:"inline-block",padding:"2px 10px","border-radius":"999px","font-size":"0.75em",border:`1px solid ${(E=P==null?void 0:P.border)!=null?E:"currentColor"}`},po(e.tone)))}case"spacer":return he(t.createElement("div"),{height:(x=fo[e.size])!=null?x:fo.md});case"divider":return he(t.createElement("hr"),{border:"none","border-top":`1px solid ${(C=P==null?void 0:P.border)!=null?C:"currentColor"}`,margin:"0",width:"100%"});default:return null}}catch(R){return null}}function yo(e,t,n,r){var o,s;try{let a=new Set;for(let i of Array.from(e.children)){let c=i.getAttribute(kt);c!==null&&(t[c]===void 0?i.remove():a.add(c))}for(let[i,c]of Object.entries(t)){if(a.has(i))continue;let u="tree"in c?c:null,p=ho(u?u.tree:c,r);if(!p)continue;let h=r.createElement("div");h.setAttribute(kt,i),h.style.display="none";let S=u?mo((o=u.surface)==null?void 0:o.like):void 0;if(S){let w=r.createElement("div");w.className=S;let b=go((s=u.surface)==null?void 0:s.like);b&&(w.style.color=b),w.appendChild(p),h.appendChild(w)}else h.appendChild(p);e.appendChild(h)}let l=n!==void 0&&t[n]!==void 0;for(let i of Array.from(e.children)){let c=i.getAttribute(kt),u=i;c!==null?u.style.display=l&&c===n?"":"none":l?u.hasAttribute(Pe)||(u.setAttribute(Pe,u.style.display),u.style.display="none"):u.hasAttribute(Pe)&&(u.style.display=u.getAttribute(Pe),u.removeAttribute(Pe))}}catch(a){}}function us(e){try{for(let t of Array.from(e.children)){let n=t;if(n.getAttribute(kt)!==null){n.remove();continue}n.hasAttribute(Pe)&&(n.style.display=n.getAttribute(Pe),n.removeAttribute(Pe))}}catch(t){}}function nn(e,t){try{let n=new Set;for(let r of Array.from(e.querySelectorAll(`[${kt}]`)))r.parentElement&&n.add(r.parentElement);for(let r of Array.from(e.querySelectorAll(`[${Pe}]`)))r.parentElement&&n.add(r.parentElement);for(let r of n)t.has(r)||us(r)}catch(n){}}function Xn(e,t){if(!e)return[t.documentElement];try{return Array.from(t.querySelectorAll(e))}catch(n){return[]}}function rn(e,t,n,r){n.documentElement.setAttribute("data-sentient-persona",e),n.documentElement.setAttribute("data-sentient-confidence",t),r==null||r(n.documentElement,"data-sentient-persona"),r==null||r(n.documentElement,"data-sentient-confidence")}function on(e,t,n,r){var o;for(let[s,a]of Object.entries(t)){let l=e[s];if(!l||typeof l=="string")continue;let i=Xn(a.target,n);for(let c of i)for(let[u,p]of Object.entries(l))(o=a.dims[u])!=null&&o.includes(p)&&(c.setAttribute(`data-${u}`,p),r==null||r(c,`data-${u}`))}}function sn(e,t,n,r){for(let[o,s]of Object.entries(t)){let a=e[o];if(typeof a!="string"||!s.arms||!s.arms.includes(a))continue;let l=Xn(s.target,n);for(let i of l)i.setAttribute("data-sentient-arm",a),r==null||r(i,"data-sentient-arm")}}function an(e,t,n,r){var l,i,c,u,p,h,S;let o=new Set,s=(l=r==null?void 0:r.contentAndOps)!=null?l:!0,a=[];for(let[w,b]of Object.entries(t)){if(Qt(b.locator,n))continue;let K;if(b.locator){let M=Te(b.locator,n);K=M?[M]:[],!M&&en(b.locator,n)&&a.push(w)}else K=Xn(b.target,n);let L=e[w];for(let M of K){if(L!==void 0)if(typeof L=="string")M.setAttribute("data-sentient-arm",L),(i=r==null?void 0:r.onAttr)==null||i.call(r,M,"data-sentient-arm"),s&&((c=r==null?void 0:r.onApplied)==null||c.call(r,w,L,M));else for(let[x,C]of Object.entries(L))M.setAttribute(`data-${x}`,C),(u=r==null?void 0:r.onAttr)==null||u.call(r,M,`data-${x}`);if((b.blocks||b.compose)&&!ds(n)){let x=Object.fromEntries([...Object.entries((p=b.blocks)!=null?p:{}).filter(([,C])=>!vt(C)),...Object.entries((h=b.compose)!=null?h:{}).filter(([,C])=>!vt(C.tree))]);Object.keys(x).length>0&&(yo(M,x,typeof L=="string"?L:void 0,n),o.add(M))}if(!s)continue;let E=M.textContent;b.edits?no(M,b.edits.edits,b.edits)==="mismatch"&&((S=r==null?void 0:r.onDrift)==null||S.call(r,w,b.edits.fp)):typeof b.content=="string"&&_t(M,b.content),b.ops&&uo(M,b.ops,w,n).anchorMiss&&!a.includes(w)&&a.push(w),Gn(M,Ke(U(U({previous:E},typeof L=="string"?{arm:L}:{}),(r==null?void 0:r.persona)!==void 0?{persona:r.persona}:{}),{doc:n}))}}return nn(n,o),a}var cs=/bot|crawler|spider|crawling|googlebot|bingbot|duckduckbot|baiduspider|yandexbot|slurp|gptbot|claudebot|anthropic|perplexity|ccbot|applebot|headlesschrome/i;function ds(e){var t,n,r;try{let o=(n=(t=e.defaultView)!=null?t:typeof window!="undefined"?window:void 0)==null?void 0:n.navigator;return o?o.webdriver===!0?!0:cs.test((r=o.userAgent)!=null?r:""):!1}catch(o){return!1}}var fs=800;function ln(e,t,n){let r=[];return n.forEach(({slotId:o,arm:s,el:a},l)=>{r.push(Fn((h,S={})=>{try{e.track({projectId:t,componentId:o,variantId:s,eventType:"micro_signal",payload:U({signalType:h},S)})}catch(w){}},a,void 0,{tabLoss:l===0}));let i=null,c=0,u=()=>{c=Date.now(),i=setTimeout(()=>{try{e.track({projectId:t,componentId:o,variantId:s,eventType:"cursor_signal",payload:{hoverDuration:Date.now()-c}})}catch(h){}i=null},fs)},p=()=>{i!==null&&(clearTimeout(i),i=null)};a.addEventListener("mouseenter",u),a.addEventListener("mouseleave",p),r.push(()=>{a.removeEventListener("mouseenter",u),a.removeEventListener("mouseleave",p),i!==null&&clearTimeout(i)})}),()=>{for(let o of r)o()}}function ps(e,t){if(!e)return!1;if(e==="/")return t==="/";let n=e.endsWith("/")?e.slice(0,-1):e;return t===n||t.startsWith(`${n}/`)}function bo(e){return e?`_snt_fired_goals_${e.slice(0,12)}`:"_snt_fired_goals"}var ms="_snt_fired_goals";function Zn(e,t){try{e==null||e.sessionStorage.removeItem(bo(t)),e==null||e.sessionStorage.removeItem(ms)}catch(n){}}function vo(e){var t;return[(t=e.slotId)!=null?t:"",e.goalId,e.event,e.locator?JSON.stringify(e.locator):""].join("|")}function gs(e,t){try{let n=e==null?void 0:e.sessionStorage.getItem(t);if(!n)return new Set;let r=JSON.parse(n);return Array.isArray(r)?new Set(r.filter(o=>typeof o=="string")):new Set}catch(n){return new Set}}function hs(e,t,n){try{e==null||e.sessionStorage.setItem(t,JSON.stringify([...n]))}catch(r){}}function So(e,t,n,r){var L,M;let o=(L=n.defaultView)!=null?L:typeof window!="undefined"?window:null,s=bo(r),a=gs(o,s),l=E=>{let x=vo(E);if(!a.has(x))try{E.slotId?t.componentGoal(E.slotId,E.goalId):t.goal(E.goalId),a.add(x),hs(o,s,a)}catch(C){}},i=e.filter(E=>E.event==="click"),c=e.filter(E=>E.event==="form_submit"),u=e.filter(E=>E.event==="url_reached"),p=e.filter(E=>E.event==="scroll_depth"),h=(E,x)=>{if(!E.locator)return!1;let C=Te(E.locator,n);return!!C&&(C===x||C.contains(x))},S=E=>{let x=E.target;if(!(!x||typeof x.closest!="function"))for(let C of i)h(C,x)&&l(C)},w=E=>{let x=E.target;if(x)for(let C of c)h(C,x)&&l(C)},b=()=>{if(u.length===0)return;let E=wt(n);for(let x of u)x.urlPattern&&ps(x.urlPattern,E)&&l(x)},K=()=>{var C;let E=n.documentElement,x=E.scrollHeight>0?(E.scrollTop+E.clientHeight)/E.scrollHeight:0;for(let R of p)x>=((C=R.threshold)!=null?C:.75)&&l(R);p.every(R=>a.has(vo(R)))&&n.removeEventListener("scroll",K)};return n.addEventListener("click",S,!0),n.addEventListener("submit",w,!0),(M=n.defaultView)==null||M.addEventListener("popstate",b),b(),p.length>0&&(n.addEventListener("scroll",K,{passive:!0}),K()),{checkUrl:b,teardown:()=>{var E;n.removeEventListener("click",S,!0),n.removeEventListener("submit",w,!0),(E=n.defaultView)==null||E.removeEventListener("popstate",b),p.length>0&&n.removeEventListener("scroll",K)}}}function un(e,t){if(!e||e.length<2||t.size!==e.length)return null;let n=[];for(let a of e){let l=t.get(a);if(!l||n.includes(l))return null;n.push(l)}let r=n[0].parentNode;if(!r||!n.every(a=>a.parentNode===r))return null;let o=n.slice().sort((a,l)=>a.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),s=[];for(let a=0;a<n.length;a++){let l=n[a];o[a]!==l&&(s.push({el:l,before:o[a]}),o.splice(o.indexOf(l),1),o.splice(a,0,l))}return s}var ys="__snt_editor_token";function wo(){try{return typeof sessionStorage!="undefined"?sessionStorage.getItem(ys):null}catch(e){return null}}function _o(e){let t=null;try{let n=location.hash.slice(1),r=RegExp("(^|[?&])"+e+"=([^&]*)").exec(n);if(r){t=r[2];let o=n.slice(r.index+r[0].length);r[1]!="&"&&o[0]=="&"&&(o=r[1]+o.slice(1));let s=n.slice(0,r.index)+o;history.replaceState(history.state,"",s?"#"+s:location.pathname+location.search)}}catch(n){}return t}var At="0.33.0",fn=At!=="0.0.0-dev"?{name:"snippet",version:At}:void 0,To=At!=="0.0.0-dev"?{v:At}:{},ko=5e3,vs=50,Lo=(()=>{try{if(typeof window=="undefined")return[];let e=window.SentientSnippet;return Array.isArray(e==null?void 0:e.q)?e.q:[]}catch(e){return[]}})(),Z=null,k=null,be={},ve=null,Se=null,Ct=null,ie=null,se=null,It=0,V=null,Qe=null,Eo=!1,Qn=null,cn=null,Ot=null,ke=!1,Ue=!1,pn=!1,mn=0,Ro=e=>fe(e)===mn,dt=null,ce=!1,De=null,Ee=[],et=null,tt=null,ye=null,bs=3e3,Ss=100;function xo(e,t){let n,r=new Promise(o=>{n=setTimeout(()=>o(null),t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}function Ne(e,...t){e!=null&&e.debug&&console.log("[sentient-snippet]",...t)}function Tt(e,t){return Z?(Z.personaAttributes&&V&&rn(V.persona,V.band,e,t==null?void 0:t.onAttr),on(be,Z.slots,e,t==null?void 0:t.onAttr),sn(be,Z.slots,e,t==null?void 0:t.onAttr),ve?an(be,ve,e,U(Ke(U({},t),{onDrift:(n,r)=>{var o,s;return(s=k==null?void 0:k.reportDrift)==null?void 0:s.call(k,n,r,(o=Do[n])!=null?o:null,"fp_mismatch")}}),V?{persona:V.persona}:{})):(nn(e,new Set),[])):[]}function Po(e){var n;let t=new Map;for(let r of(n=Z==null?void 0:Z.sections)!=null?n:[])try{let o=e.querySelectorAll(r);o.length===1&&t.set(r,o[0])}catch(o){}return t}function er(e,t){var n,r;try{if(!e||e.length<2)return;for(let o of(n=un(e,Po(t)))!=null?n:[])(r=o.before.parentNode)==null||r.insertBefore(o.el,o.before)}catch(o){}}function ws(e,t,n){let r=(o,s)=>t.some(([a,l])=>a===o&&l===s);try{if(Array.isArray(e.stamped))for(let o of e.stamped){if(!Array.isArray(o))continue;let[s,a,l]=o;!s||typeof a!="string"||r(s,a)||(l==null?s.removeAttribute(a):s.setAttribute(a,l))}if(Array.isArray(e.html))for(let o of e.html)typeof o!="string"||r(n.documentElement,o)||n.documentElement.removeAttribute(o)}catch(o){}}function _s(){try{let e=window.__sntPP;return e&&typeof e=="object"&&typeof e.v=="number"?e:null}catch(e){return null}}function No(e){return e.apiBase?`${e.apiBase.replace(/\/+$/,"")}/v1/events`:void 0}function hn(e){var t;return(t=e.apiBase)!=null?t:"https://api.sentient-ui.com"}function ks(e){return Promise.resolve().then(()=>fetch(`${hn(e)}/v1/registry/locators`,{headers:{authorization:`Bearer ${e.apiKey}`}})).then(t=>t.ok?t.json():null).then(t=>Array.isArray(t==null?void 0:t.slots)?t.slots:null).catch(()=>null)}function tr(e,t){let n=[],r=[];for(let o of e)try{if(typeof(o==null?void 0:o.id)!="string")continue;!o.locator||oo(o.locator,t)?n.push(o.id):en(o.locator,t)&&r.push(o.id)}catch(s){}return[n,r]}var Do={};function Mo(e,t){var r;let n={};for(let o of e){let s=(r=De==null?void 0:De.find(c=>c.id===o))==null?void 0:r.locator,a=s?Te(s,t):null,l=a?Xt(a):null,i=l&&"fp"in l?l.fp:void 0;i&&(Do[o]=i),n[o]=Ke(U({},i?{fp:i}:{}),{forms:!1,compose:!0,content:!0})}return n}function $o(e,t){let n=null;for(let r of t)e!=null&&e[r]&&((n!=null?n:n={})[r]=e[r]);return n}var ue=null;function Bo(){if(!ke){ue&&et!==Oe()&&ue(!0);return}!De||et===Oe()||(et=Oe(),Es())}function Es(){ye==null||ye();let e=Z,t=De;if(!e||!t)return;let n,r,o=()=>{clearTimeout(n),clearTimeout(l),r==null||r.disconnect(),ye===o&&(ye=null)},s=null,a=i=>{let[c,u]=tr(t,document),p=c.filter(h=>!Ee.includes(h));s!==null&&c.some(h=>!s.has(h)&&!p.includes(h))&&Lt(),s=new Set(c),p.length>0&&xs(p).catch(()=>{}),(i||u.length===0&&!t.some(h=>!c.includes(h.id)&&!Ee.includes(h.id)))&&(o(),Ko(e,u))},l=setTimeout(()=>a(!0),bs);if(ye=o,a(),ye===o)try{r=new MutationObserver(()=>{clearTimeout(n),n=setTimeout(a,Ss)}),r.observe(document.documentElement,{childList:!0,subtree:!0})}catch(i){}}function gn(e,t){if(!(!e||e.length===0||!t||!Z))try{Se==null||Se.teardown(),Se=So(e,t,document,Z.apiKey)}catch(n){}}async function xs(e){let t=Z,n=k;if(!t||!n)return;Ee=Ee.concat(e);let r=await n.decide(U({slotsFrom:"registry",registrySlotIds:e,render:Mo(e,document)},To));if(r||(Ee=Ee.filter(s=>!e.includes(s))),!r||ce||k!==n)return;be=U(U({},be),r.slots),!Se&&r.goals&&(t.consent!==!1||Ue)&&gn(Ct=r.goals,n);let o=$o(r.slotConfig,e);o&&(ve=U(U({},ve),o)),Lt(),Ne(t,"late decide",e),tt&&Ro(t.apiKey)&&Ve(t.apiKey,tt=U(Ke(U({},tt),{slots:be,savedAt:Date.now()}),ve?{slotConfig:ve}:{}))}function Ko(e,t){if(t.length!==0)try{fetch(`${hn(e)}/v1/locator-miss`,{method:"POST",keepalive:!0,headers:{"content-type":"application/json",authorization:`Bearer ${e.apiKey}`},body:JSON.stringify({slots:t})}).catch(()=>{})}catch(n){}}function nt(){return!!(Z&&k&&Z.sectionCapture!==!1&&(Z.consent!==!1||Ue)&&!Ye())}function As(){if(!k||!Z||!nt()||se)return;let e=[];Tt(document,{contentAndOps:ke,onApplied:(t,n,r)=>e.push({slotId:t,arm:n,el:r})}),rr();try{ie==null||ie(),ie=ln(k,Z.apiKey,e)}catch(t){}}function rr(){if(typeof document=="undefined"||!nt())return;let e;try{if(cn&&cn.length>0){let r=new Map;for(let o of cn){if(o.urlMatch!==window.location.pathname)continue;let s=Te(o.locator,document);s&&r.set(s,o.type)}r.size>0&&(e=o=>{var s;return(s=r.get(o))!=null?s:null})}}catch(r){}let t=k,n=++It;Ot=window.location.pathname,ut("engagement.global.js","__sentientEngagement").then(r=>{if(!(!r||n!==It||k!==t||!t||!nt()))try{se==null||se(),se=r.startEngagementCapture(t,U({apiKey:Z.apiKey,apiBase:Z.apiBase,doc:document,microSignals:!0},e?{typeOf:e}:{}))}catch(o){}})}function Lt(){try{let e=[];if(ie==null||ie(),ie=null,Tt(document,{contentAndOps:ke,onApplied:(t,n,r)=>e.push({slotId:t,arm:n,el:r})}),er(Qe,document),e.length>0&&nt())try{ie=ln(k,Z.apiKey,e)}catch(t){}try{typeof window!="undefined"&&Ot!==null&&window.location.pathname!==Ot&&nt()&&(se==null||se(),se=null,It++,rr())}catch(t){}}catch(e){}}function Ao(){Qn===null&&(Qn=setTimeout(()=>{Qn=null,Lt();try{Se==null||Se.checkUrl()}catch(e){}Bo()},vs))}function jo(){if(!(Eo||typeof window=="undefined"||typeof history=="undefined")){Eo=!0;try{let e=t=>{let n=history[t];history[t]=function(r,o,s){let a=n.call(this,r,o,s!=null?s:null);return Ao(),a}};e("pushState"),e("replaceState"),window.addEventListener("popstate",Ao)}catch(e){}}}function dn(e){let t={};for(let[n,r]of Object.entries(e.slots))try{t[n]=r.target?document.querySelectorAll(r.target).length:1}catch(o){t[n]=0}return t}function Cs(e,t,n){var r;try{window.__sentientEditor={token:t,code:n,apiBase:hn(e)};let o=e.editorSrc?{src:e.editorSrc}:zn("editor.global.js");if(!o){Io();return}let s=Ge(document.createElement("script"));Hn(s,o),s.async=!0,s.onerror=()=>Io(),((r=document.head)!=null?r:document.documentElement).appendChild(s)}catch(o){}}var Co="sentient-editor-load-notice";function Io(){var e;try{if(document.getElementById(Co))return;let t=document.createElement("div");t.id=Co,t.textContent="Couldn\u2019t load the editor \u2014 check your connection and reopen it from your dashboard.",t.style.cssText="position:fixed;bottom:16px;right:16px;z-index:2147483647;max-width:320px;padding:14px 16px;border-radius:14px;background:#111827;color:#fff;font:13px/1.45 system-ui,sans-serif;border:1px solid rgba(245,158,11,.6);cursor:pointer",t.onclick=()=>t.remove(),((e=document.body)!=null?e:document.documentElement).appendChild(t),setTimeout(()=>t.remove(),1e4)}catch(t){}}function Is(e){let t={cfg:e,apiBase:hn(e),set(n){n.slots!==void 0&&(be=n.slots),n.slotConfig!==void 0&&(ve=n.slotConfig),n.persona!==void 0&&(V=n.persona),n.decided&&(ke=!0),n.look&&(Et(n.look.palette),xt(n.look.vocabulary))},apply:()=>Tt(document),installSpaHooks:jo,exposeGlobal:()=>{pn=!0,nr(e)},dbg:(...n)=>Ne(e,...n)};return ut("preview.global.js","__sentientPreview").then(n=>n?n.runPreview(t):Promise.reject()).catch(()=>(t.exposeGlobal(),Ne(e,"preview chunk unavailable \u2014 page left as-is"),!0))}function nr(e){let t=r=>{try{se==null||se(),se=null,It++,Ot=null,ie==null||ie(),ie=null,ye==null||ye(),Se==null||Se.teardown(),Se=null,r&&Zn(typeof window!="undefined"?window:null,e.apiKey),Ue=!1,ce=!0,r?(tt=null,V=null,k?k.destroy():st(e.apiKey)):k==null||k.dispose(),k=null}catch(o){}},n={consentWatcher:Xe,goal(r,o){try{k==null||k.goal(r,o)}catch(s){}},componentGoal(r,o){try{k==null||k.componentGoal(r,o)}catch(s){}},grantConsent(){try{if(!k&&ce||k!=null&&k.released)mn=fe(e.apiKey),k=bt(U({apiKey:e.apiKey,consent:!0,preConsentBehavior:e.preConsentBehavior,debug:e.debug,persona:e.persona,ingestUrl:No(e)},fn?{sdk:fn}:{})),gn(Ct,k);else{let r=(k==null?void 0:k.gated)===!0;Un(e.apiKey),r&&(mn=fe(e.apiKey)),gn(Ct,k)}ce=!1,ue==null||ue()}catch(r){}Ue=!0;try{As()}catch(r){}},revokeConsent(){t(!0)},reapply:Lt,getState(){var r,o;try{return{apiKey:e.apiKey,persona:(r=V==null?void 0:V.persona)!=null?r:null,band:(o=V==null?void 0:V.band)!=null?o:null,slots:be,matchCounts:dn(e),consent:!ce&&(e.consent!==!1||Ue)}}catch(s){return{apiKey:e.apiKey,persona:null,band:null,slots:{},matchCounts:{},consent:!1}}}};if(window.SentientSnippet=n,window.__sentientApi=n,e.consentFrom&&!dt&&!pn)try{let r=Xe(e.consentFrom),o=!1,s=!1,a=()=>!!k&&!ce&&(k.gated===void 0?e.consent!==!1||Ue:!k.gated);dt=r.subscribe(()=>{try{let l=r.read();l!==null&&(s=!0);let i=l!=null?l:s?!1:null,c=a(),u=!c&&i!==!0&&r.refused();if(u&&!o&&(k!=null&&k.gated?k.destroy():st(e.apiKey),Zn(window,e.apiKey),tt=null,V=null),o=u,i===!0&&!c)n.grantConsent();else if(i===!1&&c){let p=r.refused();t(p),p&&(o=!0)}}catch(l){}})}catch(r){}for(let r of Lo.splice(0))try{r[0]==="goal"?n.goal(r[1],r[2]):r[0]==="grantConsent"&&k?n.grantConsent():r[0]==="revokeConsent"&&k&&n.revokeConsent()}catch(o){}}function Oo(){var e;try{if(typeof window=="undefined")return;let t=window;if(typeof((e=t.SentientSnippet)==null?void 0:e.goal)=="function")return;let n=()=>{};t.SentientSnippet={goal:n,componentGoal:n,grantConsent:n,revokeConsent:n,reapply:n,consentWatcher:Xe,getState:()=>({apiKey:"",persona:null,band:null,slots:{},matchCounts:{},consent:!1})},Lo.length=0}catch(t){}}function Os(){try{let e=window.Shopify;return typeof(e==null?void 0:e.shop)=="string"&&e.shop!==""}catch(e){return!1}}async function Go(){var e,t;try{let n=Zt(window.sentient);if(!n){Oo();return}Z=n,dt==null||dt(),dt=null,!n.consentFrom&&n.consent===void 0&&Os()&&(n.consentFrom="shopify"),Xr(n.consentSrc),Ht(n.nonce),pn=!1,ke=!1,ue=null,Qe=null,be={},ve=null,Et(null),xt(null),Ue=!1,ce=!1,Ct=null,De=null,Ee=[],et=null,tt=null,ye==null||ye(),se==null||se(),se=null,It++,Ot=null;let r=_o("sentient_editor_code"),o=r?null:wo();if(r||o){Cs(n,o,r),pn=!0,nr(n),Ne(n,"editor mode");return}if(typeof window!="undefined"&&/[?&]sentient_(preview|persona|context)=[^&]/.test(window.location.search)&&await Is(n))return;if(n.consentFrom&&n.consent===void 0)try{n.consent=Xe(n.consentFrom).read()===!0}catch(d){n.consent=!1}n.consent!==!1&&n.sectionCapture!==!1&&!Ye()&&ut("engagement.global.js","__sentientEngagement");let s=(e=n.registry)!=null?e:Object.keys(n.slots).length===0;n.registry===void 0&&!s&&Ne(n,"slots declared without registry: true, so dashboard-published components are not applied");let a=s?ks(n):null,l=_s();try{(t=l==null?void 0:l.stop)==null||t.call(l)}catch(d){}let i=n.consent!==!1&&!Ye()?it(n.apiKey):null,c=[];if(i){V={persona:i.persona,band:i.band},be=i.slots,i.slotConfig&&(ve=i.slotConfig),i.palette&&Et(i.palette),i.vocabulary&&xt(i.vocabulary),Tt(document,U({contentAndOps:!1},l?{onAttr:(m,O)=>c.push([m,O])}:{})),i.layoutOrder&&(Qe=i.layoutOrder,er(Qe,document));let d=yt(i.stage,n.stageAttributes);d&&(Vt(d),c.push([document.documentElement,"data-sentient-stage"]))}l&&ws(l,c,document);let u=bt(U({apiKey:n.apiKey,consent:n.consent,preConsentBehavior:n.preConsentBehavior,debug:n.debug,persona:n.persona,stageAttributes:n.stageAttributes,ingestUrl:No(n)},fn?{sdk:fn}:{}));k=u,mn=fe(n.apiKey),nr(n),jo();let p=Object.entries(n.slots).map(([d,m])=>({id:d,dims:m.dims})),h=To,S={pp:l?l.v:0},w=[];if(a){let[d]=await Promise.all([xo(a,ko),document.readyState==="loading"?new Promise(m=>document.addEventListener("DOMContentLoaded",m,{once:!0})):null]);De=d,d&&(Ee=w=tr(d,document)[0]),Ne(n,"registry scope",d&&w)}let b=(d=u)=>{let m=Array.from(Po(document).keys());return d.decide(U(U(U(U({slots:p},h),S),m.length>=2?{sections:m}:{}),s?{slotsFrom:"registry",registrySlotIds:w,render:Mo(w,document)}:{}))},K=Oe(),L=u.gated===!0,M=!1,E=!1,x=!1,C=!1;ue=(d=!1)=>{let m=k;!M||E||C||ke||ce||!m||m.gated||!d&&!x||(x=!1,C=!0,K=et=Oe(),De&&(Ee=w=tr(De,document)[0]),b(m).then(O=>{C=!1,O&&!ke&&!ce&&k===m?v(O):(O||(Ee=[]),!ke&&(m.released||k!==m||ce)&&(x=!0))}).catch(()=>{C=!1}))};let R=b();R.then(()=>{M=!0},()=>{M=!0});let g=await xo(R,ko),v=d=>{var $,q,J,Y,xe;E=!0;let m=(k!=null?k:u).getPersona();m?V={persona:m.persona,band:m.band}:d.persona&&(V={persona:d.persona,band:"low"}),be=d.slots,s?ve=$o(d.slotConfig,w):d.slotConfig&&(ve=d.slotConfig),d.palette&&Et(d.palette),d.vocabulary&&xt(d.vocabulary),Qe=($=d.layoutOrder)!=null?$:Qe;let O=()=>{var ne;let A=[],B=Tt(document,{onApplied:(re,Q,me)=>A.push({slotId:re,arm:Q,el:me})});s||Ko(n,B),er(Qe,document);try{(ne=l==null?void 0:l.reveal)==null||ne.call(l)}catch(re){}if(ke=!0,nt())try{ie==null||ie(),ie=ln(k,n.apiKey,A)}catch(re){}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",O,{once:!0}):O(),Ct=(q=d.goals)!=null?q:null,(n.consent!==!1||Ue)&&!ce&&gn(d.goals,k),cn=(J=d.sectionMap)!=null?J:null,nt()&&rr(),Ne(n,"applied",{persona:V,slots:be,matches:dn(n)}),!ce&&(Ro(n.apiKey)&&Ve(n.apiKey,tt=U(U(U(U({v:1,persona:(Y=V==null?void 0:V.persona)!=null?Y:d.persona,band:(xe=V==null?void 0:V.band)!=null?xe:"low",slots:d.slots,layoutOrder:d.layoutOrder,savedAt:Date.now()},ve?{slotConfig:ve}:{}),d.palette?{palette:d.palette}:{}),d.vocabulary?{vocabulary:d.vocabulary}:{}),(A=>A?{stage:A}:{})(yt(d.stage,n.stageAttributes)))),et=null,Bo())};if(!g){Ne(n,"decide timeout/null \u2014 snapshot state stands",dn(n)),R.then(d=>{if(!d){if(ke)return;Ee=[],u.released===!0||k!==u||ce||L&&Oe()!==K?(x=!0,ue==null||ue()):et=K;return}if(!(!d||ke||ce)){if(k!==u){x=!0,ue==null||ue();return}v(d),Ne(n,"late decide applied",dn(n))}}).catch(()=>{});return}if(ce||k!==u){x=!0,ue==null||ue();return}v(g)}catch(n){Oo()}}if(typeof window!="undefined"&&window.sentient){let e=window;if(!e.__sentientInitialized)e.__sentientInitialized=!0,Promise.resolve().then(()=>{Go()});else{let t=window.__sentientApi;t&&Promise.resolve().then(()=>{window.SentientSnippet=t})}}return Xo(Ts);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentientui/snippet",
3
- "version": "0.32.2",
3
+ "version": "0.33.0",
4
4
  "private": false,
5
5
  "description": "SentientUI Style-rung snippet for non-React sites — persona attributes and adaptive style tokens from one script tag",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "tsx": "^4.19.2",
42
42
  "typescript": "^5.7.2",
43
43
  "vitest": "^2.1.8",
44
- "@sentientui/core": "0.36.2"
44
+ "@sentientui/core": "0.38.0"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsup && node scripts/stamp-chunk-sri.mjs",