@sentientui/core 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -5
- package/dist/chunk-SFNOFZUH.mjs +2 -0
- package/dist/chunk-SFNOFZUH.mjs.map +1 -0
- package/dist/{index-B0PkJoeB.d.cts → index-DErBinAw.d.cts} +68 -3
- package/dist/{index-BIdUwF-v.d.ts → index-DxWcBI5U.d.ts} +68 -3
- package/dist/index-engagement.js +1 -1
- package/dist/index-engagement.js.map +1 -1
- package/dist/index-engagement.mjs +1 -1
- package/dist/index-graph.d.cts +4 -4
- package/dist/index-graph.d.ts +4 -4
- package/dist/index-graph.js +1 -1
- package/dist/index-graph.js.map +1 -1
- package/dist/index-graph.mjs +1 -1
- package/dist/index-graph.mjs.map +1 -1
- package/dist/index-local.d.cts +2 -2
- package/dist/index-local.d.ts +2 -2
- package/dist/index-local.js +1 -1
- package/dist/index-local.js.map +1 -1
- package/dist/index-local.mjs +1 -1
- package/dist/index-local.mjs.map +1 -1
- package/dist/index-server.d.cts +14 -3
- package/dist/index-server.d.ts +14 -3
- package/dist/index-server.js +1 -1
- package/dist/index-server.js.map +1 -1
- package/dist/index-server.mjs +1 -1
- package/dist/index-server.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{session-meta-CY_Luh5i.d.ts → session-meta-DydKfQiR.d.cts} +2 -0
- package/dist/{session-meta-CY_Luh5i.d.cts → session-meta-DydKfQiR.d.ts} +2 -0
- package/llms.txt +4 -4
- package/package.json +2 -2
- package/dist/chunk-HY23LTUY.mjs +0 -2
- package/dist/chunk-HY23LTUY.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as T,B as U,C as V,D as W,E as X,F as Y,G as Z,H as _,I as $,J as aa,K as ba,L as ca,M as da,a as t,b as u,c as v,d as w,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J,r as K,s as L,t as M,u as N,v as O,w as P,x as Q,y as R,z as S}from"./chunk-
|
|
1
|
+
import{A as T,B as U,C as V,D as W,E as X,F as Y,G as Z,H as _,I as $,J as aa,K as ba,L as ca,M as da,N as ea,O as fa,a as t,b as u,c as v,d as w,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J,r as K,s as L,t as M,u as N,v as O,w as P,x as Q,y as R,z as S}from"./chunk-SFNOFZUH.mjs";import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,r as p,s as q,t as r,u as s}from"./chunk-2NVSFI4V.mjs";import"./chunk-TMCGHANO.mjs";export{f as AGENT_INTENTS,C as BLOCK_ALIGNS,H as BLOCK_EMPHASES,K as BLOCK_FITS,B as BLOCK_GAPS,L as BLOCK_GRID_COLUMNS,M as BLOCK_HEADING_LEVELS,D as BLOCK_JUSTIFIES,P as BLOCK_MAX_WIDTHS,O as BLOCK_PADS,J as BLOCK_RATIOS,E as BLOCK_SIZES,N as BLOCK_SURFACES,I as BLOCK_TEXT_ALIGNS,G as BLOCK_TONES,F as BLOCK_WEIGHTS,l as CLICK_ID_KEYS,Q as FORM_FIELD_KINDS,R as FORM_INPUT_TYPES,a as LEGACY_SESSION_COOKIE_NAME,y as LOCAL_MODE_BANNER,X as MAX_BLOCK_ARMS,W as MAX_BLOCK_CHILDREN,V as MAX_BLOCK_DEPTH,U as MAX_BLOCK_NODES,Y as MAX_BLOCK_TEXT_LEN,S as MAX_FORM_FIELDS,T as MAX_FORM_SELECT_OPTIONS,z as PAGE_SCOPE_RE,x as PROD_KEYLESS_ERROR,_ as REVEAL_MS,t as SNAPSHOT_STORAGE_KEY_PREFIX,ca as _registerConsentUpgradeInit,g as agentIntent,c as agentUaList,s as armOfResult,ba as attachMicroSignalDetectors,q as baselineResultFor,r as baselineSlots,h as classifiedAgents,Z as containsFormBlock,o as deriveSessionSegment,i as detectDeviceClass,n as detectTimeOfDay,j as detectTrafficSource,m as extractTrackedParams,ea as grantConsent,fa as init,da as isDoNotTrackEnabled,e as matchedAgentToken,A as pageScopeMatches,u as readSnapshot,k as referrerDomainFromReferer,w as renderPrePaintScript,$ as resetRevealStyles,aa as reveal,b as sessionCookieName,p as toWireSlot,d as uaTokenMatch,v as writeSnapshot};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -247,6 +247,8 @@ type CompoundLocator = {
|
|
|
247
247
|
};
|
|
248
248
|
selector?: string;
|
|
249
249
|
urlMatch?: string;
|
|
250
|
+
/** Where the element is expected to exist — see page-scope.ts. Health only, never serving. */
|
|
251
|
+
page?: string;
|
|
250
252
|
fingerprint?: {
|
|
251
253
|
tag?: string;
|
|
252
254
|
text?: string;
|
|
@@ -247,6 +247,8 @@ type CompoundLocator = {
|
|
|
247
247
|
};
|
|
248
248
|
selector?: string;
|
|
249
249
|
urlMatch?: string;
|
|
250
|
+
/** Where the element is expected to exist — see page-scope.ts. Health only, never serving. */
|
|
251
|
+
page?: string;
|
|
250
252
|
fingerprint?: {
|
|
251
253
|
tag?: string;
|
|
252
254
|
text?: string;
|
package/llms.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SentientUI
|
|
2
2
|
|
|
3
3
|
> SentientUI makes websites adapt to each visitor. The SDK observes behaviour, classifies
|
|
4
|
-
> visitors into personas
|
|
5
|
-
> persona-keyed optimizer picks
|
|
6
|
-
> to show, learning from real conversions. Decisions are locked per session: Visit 1 learns,
|
|
4
|
+
> visitors into the personas your app declares (e.g. admin, evaluator) or discovery proposes
|
|
5
|
+
> (`unknown` until then), and a server-side persona-keyed optimizer picks, per visitor type,
|
|
6
|
+
> which styling, content, and section order to show, learning from real conversions. Decisions are locked per session: Visit 1 learns,
|
|
7
7
|
> Visit 2 converts. React SDK, vanilla JS SDK, and a script-tag snippet are open source; the
|
|
8
8
|
> learning API is hosted (api.sentient-ui.com).
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
layout: it prints the wrap snippet — you must wrap the app with <AdaptiveRoot> (or
|
|
15
15
|
<AdaptiveProvider>) yourself, or nothing adapts and nothing is tracked. Works with NO API key
|
|
16
16
|
(keyless local mode: deterministic simulated decisions).
|
|
17
|
-
Verify by opening the app with `?sentient_persona=
|
|
17
|
+
Verify by opening the app with `?sentient_persona=admin` vs `?sentient_persona=evaluator` (any key works).
|
|
18
18
|
- Real learning: create a project at https://sentient-ui.com, put the pk_ key in
|
|
19
19
|
NEXT_PUBLIC_SENTIENT_API_KEY, add the domain to allowed origins.
|
|
20
20
|
- Non-React site: use @sentientui/snippet (one script tag, Style rung only) or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentientui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"llms.txt"
|
|
72
72
|
],
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@sentientui/policy": "0.
|
|
74
|
+
"@sentientui/policy": "0.11.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/node": "^22.10.2",
|
package/dist/chunk-HY23LTUY.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as me,c as Ie,e as Ce,j as Oe,k as Ae,l as Te,n as Re,o as Be,r as Le,s as ye,u as Pe}from"./chunk-2NVSFI4V.mjs";import{a as I,b as oe}from"./chunk-TMCGHANO.mjs";function Se(){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 s=0;s<16;s++)t+=e[s].toString(16).padStart(2,"0"),(s===3||s===5||s===7||s===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 yt="_snt_uid",St=365,he="_snt_uid";function ht(){return Se()}function tt(e){try{let t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}catch(t){return null}}function vt(e,t,s){try{document.cookie=`${e}=${encodeURIComponent(t)}; max-age=${s}; SameSite=strict; path=/`}catch(u){}}function De(e){try{return localStorage.getItem(e)}catch(t){return null}}function nt(e,t){try{return localStorage.setItem(e,t),!0}catch(s){return!1}}function ot(e){try{return sessionStorage.getItem(e)}catch(t){return null}}function wt(e,t){try{return sessionStorage.setItem(e,t),!0}catch(s){return!1}}function kt(e){try{sessionStorage.removeItem(e)}catch(t){}}function xt(e){try{return document.cookie=`${e}_probe=1; max-age=1; SameSite=strict; path=/`,document.cookie.indexOf(`${e}_probe=1`)!==-1}catch(t){return!1}}function bt(e){try{localStorage.removeItem(e)}catch(t){}}function Et(e){try{document.cookie=`${e}=; max-age=0; SameSite=strict; path=/`}catch(t){}}var _t={getSessionId:()=>null,isEphemeral:()=>!1,destroy:()=>{}};function ve(e){var b,L,P,E,F,$,O;if(typeof window=="undefined")return _t;let t=me(e==null?void 0:e.apiKey),s=(b=e==null?void 0:e.cookieName)!=null?b:Ie(e==null?void 0:e.apiKey),u=`${he}${t}`,f=`${he}_tomb${t}`,c=((L=e==null?void 0:e.cookieTTLDays)!=null?L:St)*24*60*60,i=T=>T&&T.length>0?T:null,p=()=>{var T,A;return t&&!(e!=null&&e.cookieName)&&De(f)===null?(A=(T=i(tt(yt)))!=null?T:i(De(he)))!=null?A:i(ot(he)):null},r=(O=($=(F=(E=(P=i(tt(s)))!=null?P:i(De(u)))!=null?E:i(ot(u)))!=null?F:p())!=null?$:i(e==null?void 0:e.ssrSessionId))!=null?O:ht();vt(s,r,c);let n=nt(u,r),o=xt(s),y=n?!1:wt(u,r),w=!n&&!o&&!y;return{getSessionId:()=>r,isEphemeral:()=>w,destroy:()=>{r=null,Et(s),bt(u),kt(u),t&&!(e!=null&&e.cookieName)&&nt(f,"1")}}}function Y(e){return Math.min(6e4,1e3*2**Math.min(e,6))}function se(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 we(e,t){try{let s=localStorage.getItem(e);if(!s)return[];let u=JSON.parse(s);return Array.isArray(u)?(localStorage.removeItem(e),u.slice(-t)):[]}catch(s){return[]}}function q(e,t,s){try{let u=(()=>{try{let l=localStorage.getItem(s);if(!l)return[];let c=JSON.parse(l);return Array.isArray(c)?c:[]}catch(l){return[]}})(),f=new Map;for(let l of u)f.set(l.id,l);for(let l of e)f.set(l.id,l);localStorage.setItem(s,JSON.stringify([...f.values()].slice(-t)))}catch(u){}}function ke(e,t){try{let s=localStorage.getItem(t);if(!s)return;let u=JSON.parse(s);if(!Array.isArray(u))return;let f=new Set(e),l=u.filter(c=>!f.has(c.id));if(l.length===u.length)return;l.length===0?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(l))}catch(s){}}var It=500,Ct=56*1024;function Me(e){return`_snt_retry_${e.slice(0,12)}`}var Ot={push:()=>{},flush:()=>{},destroy:()=>{}};function st(e){var Q,Z,ae;if(typeof window=="undefined")return Ot;let t=(Q=e.flushIntervalMs)!=null?Q:5e3,s=(Z=e.maxBatchSize)!=null?Z:20,u=(ae=e.maxRetrySize)!=null?ae:100,f=e.ingestUrl,l=e.apiKey,c=Me(l),i=[],p=new Set,r=[],n=S=>{for(let v of S)o.delete(v),!p.has(v)&&(p.add(v),r.push(v));for(;r.length>It;){let v=r.shift();v&&p.delete(v)}ke(S,c)},o=new Set,y=()=>{for(;i.length>u;){let S=i.shift();S&&o.delete(S.id)}},w=S=>{p.has(S.id)||o.has(S.id)||(o.add(S.id),i.push(S),y())},b=S=>{for(let v of S)p.has(v.id)||(o.add(v.id),i.push(v));y()},L=we(c,u);for(let S of L)w(S);let P=0,E=0,F=(S,v=!0)=>{if(S.length===0)return;let J=JSON.stringify(S),K=S.map(N=>N.id),z;try{z=fetch(f,{method:"POST",keepalive:!0,body:J,headers:{"Content-Type":"application/json",Authorization:`Bearer ${l}`}})}catch(N){q(S,u,c),b(S),E++,P=Date.now()+Y(E);return}let ge=N=>{if(se(N)!=="retry"){if(!N.ok&&v){let ee=S.filter(U=>U.eventType!=="pageview");if(ee.length>0&&ee.length<S.length){n(S.filter(U=>U.eventType==="pageview").map(U=>U.id)),F(ee,!1);return}}n(K),E=0,P=0;return}q(S,u,c),b(S),E++,P=Date.now()+Y(E)};z instanceof Promise?z.then(ge).catch(()=>{q(S,u,c),b(S),E++,P=Date.now()+Y(E)}):ge(z)},$=typeof TextEncoder!="undefined"?new TextEncoder:null,O=S=>$?$.encode(S).length:S.length,T=S=>{let v=[],J=2;for(let K of S){let z=O(JSON.stringify(K))+1;if(v.length>0&&J+z>Ct||v.length>=s)break;v.push(K),J+=z}return v},A=()=>{try{if(Date.now()<P)return;for(;i.length>0&&!(Date.now()<P);){let S=i.filter(J=>!p.has(J.id));if(i.length=0,S.length===0)break;let v=T(S);if(v.length===0)break;v.length<S.length&&i.push(...S.slice(v.length)),F(v)}}catch(S){}},g=!0,R=null;R=setInterval(()=>{g&&A()},t);let j=()=>{document.visibilityState==="hidden"&&A()},W=()=>{A()};return document.addEventListener("visibilitychange",j),window.addEventListener("pagehide",W),{push(S){w(S),i.length>=s&&A()},flush:A,destroy(){g=!1,R!==null&&(clearInterval(R),R=null),document.removeEventListener("visibilitychange",j),window.removeEventListener("pagehide",W),A()}}}var At=200;function Ke(e){return`_snt_goal_retry_${e.slice(0,12)}`}var Tt={send:()=>{},flush:()=>{},destroy:()=>{}};function rt(e){var O,T,A;if(typeof window=="undefined")return Tt;let t=(O=e.flushIntervalMs)!=null?O:5e3,s=(T=e.maxRetrySize)!=null?T:100,u=(A=e.maxPerFlush)!=null?A:5,f=Ke(e.apiKey),l=[],c=new Set,i=new Set,p=[],r=0,n=0,o=!1,y=g=>{for(c.delete(g.id),i.has(g.id)||(i.add(g.id),p.push(g.id));p.length>At;){let R=p.shift();R&&i.delete(R)}ke([g.id],f)},w=g=>{q([g],s,f),!i.has(g.id)&&!c.has(g.id)&&(c.add(g.id),l.push(g)),Date.now()>=r&&(n++,r=Date.now()+Y(n))},b=g=>{let R;try{R=fetch(e.url,{method:"POST",keepalive:!0,body:g.body,headers:e.headers})}catch(W){w(g);return}let j=W=>{var Z;let Q=se(W);if(Q==="retry"){w(g);return}Q==="dropped"&&((Z=e.onDrop)==null||Z.call(e,g,W.status)),y(g),n=0,r=0};R instanceof Promise?R.then(j).catch(()=>w(g)):j(R)},L=()=>{try{if(o||Date.now()<r)return;let g=0;for(;l.length>0&&g<u&&!(Date.now()<r);){let R=l.shift();c.delete(R.id),!i.has(R.id)&&(g++,b(R))}}catch(g){}},P=we(f,s);for(let g of P)c.has(g.id)||(c.add(g.id),l.push(g));P.length>0&&q(P,s,f);let E=setInterval(L,t),F=()=>{document.visibilityState==="hidden"&&L()},$=()=>L();return document.addEventListener("visibilitychange",F),window.addEventListener("pagehide",$),{send(g){if(!o&&!(i.has(g.id)||c.has(g.id))){if(Date.now()<r){q([g],s,f),c.add(g.id),l.push(g);return}b(g)}},flush:L,destroy(){clearInterval(E),document.removeEventListener("visibilitychange",F),window.removeEventListener("pagehide",$),L(),o=!0}}}var Rt=1800*1e3;function xe(e,t){return`${encodeURIComponent(e)}:${encodeURIComponent(t)}`}function it(e=Rt,t){let s=new Map,u=`_snt_asgn${me(t)}_`,f=(r,n)=>`${u}${encodeURIComponent(r)}:${encodeURIComponent(n)}`,l=r=>{let n=r.slice(u.length),o=n.indexOf(":");if(o<0)return null;try{return{componentId:decodeURIComponent(n.slice(0,o)),segment:decodeURIComponent(n.slice(o+1))}}catch(y){return null}},c=()=>{try{let r=[];for(let n=0;n<localStorage.length;n++){let o=localStorage.key(n);o!=null&&o.startsWith(u)&&r.push(o)}return r}catch(r){return[]}},i=r=>r.assignedAt+(r.ttlMs&&r.ttlMs>0?r.ttlMs:e)<Date.now();return typeof window!="undefined"&&(()=>{for(let r of c())try{let n=localStorage.getItem(r);if(!n)continue;let o=JSON.parse(n);if(i(o)){localStorage.removeItem(r);continue}let y=l(r);if(!y)continue;s.set(xe(y.componentId,y.segment),o)}catch(n){}})(),{get(r,n){let o=s.get(xe(r,n));return o?i(o)?(s.delete(xe(r,n)),null):o:null},set(r,n,o){let y=xe(r,n);s.set(y,o);try{localStorage.setItem(f(r,n),JSON.stringify(o))}catch(w){}},clear(){s.clear();for(let r of c())try{localStorage.removeItem(r)}catch(n){}}}}var re="_snt_snap:",Bt=["low","medium","high"];function de(e){try{let t=localStorage.getItem(re+e);if(!t)return null;let s=JSON.parse(t);return!s||typeof s!="object"||s.v!==1||typeof s.persona!="string"||typeof s.band!="string"||!Bt.includes(s.band)||typeof s.slots!="object"||s.slots===null||Array.isArray(s.slots)||!(s.layoutOrder===null||Array.isArray(s.layoutOrder))||typeof s.savedAt!="number"||!(s.slotConfig===void 0||typeof s.slotConfig=="object"&&s.slotConfig!==null&&!Array.isArray(s.slotConfig))?null:s}catch(t){return null}}function ue(e,t){try{localStorage.setItem(re+e,JSON.stringify(t))}catch(s){}}function Lt(e){return"(function(){try{var r=localStorage.getItem("+JSON.stringify(re+e).replace(/</g,"\\u003c")+');if(!r)return;var s=JSON.parse(r);if(!s||s.v!==1||typeof s.persona!=="string"||typeof s.band!=="string")return;var d=document.documentElement;if(d.hasAttribute("data-sentient-persona"))return;d.setAttribute("data-sentient-persona",s.persona);d.setAttribute("data-sentient-confidence",s.band);}catch(e){}})();'}import{confidenceBand as dt}from"@sentientui/policy";import{confidenceBand as Ne}from"@sentientui/policy";var Ge="[sentient] No API key configured \u2014 nothing is being learned. Set NEXT_PUBLIC_SENTIENT_API_KEY or pass localMode: true for local development.",lt="[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.",at=!1,be=!1;function Pt(){var e;try{return(e=new URLSearchParams(window.location.search).get("sentient_persona"))!=null?e:void 0}catch(t){return}}function ct(e){var r;let t=ve({ssrSessionId:e.ssrSessionId,apiKey:e.apiKey}),s=(r=t.getSessionId())!=null?r:"local",u=Pt(),f=import("@sentientui/core/local").then(n=>{let o=n;return o.LOCAL_ENGINE_AVAILABLE?(at||(at=!0,console.info(lt)),o):(be||(be=!0,console.error(Ge)),null)}).catch(()=>(be||(be=!0,console.error(Ge)),null)),l=null,c={low:.15,medium:.5,high:.85},i=(()=>{var o;if(e.initialPersona)return I({},e.initialPersona);let n=de(e.apiKey||"local");return n?{persona:n.persona,confidence:(o=c[n.band])!=null?o:.15}:null})();function p(n){let o=document.documentElement;o.dataset.sentientPersona===void 0&&(o.dataset.sentientPersona=n.persona,o.dataset.sentientConfidence=Ne(n.confidence))}return{isLocal:!0,async decide(n){var w,b,L;let o=await f;if(!o)return null;let y=o.createLocalEngine({sessionId:s,forcedPersona:u}).decide(n);return l=oe(I({},y),{layoutOrder:(b=(w=y.layoutOrder)!=null?w:l==null?void 0:l.layoutOrder)!=null?b:null,slots:I(I({},(L=l==null?void 0:l.slots)!=null?L:{}),y.slots)}),ue(e.apiKey||"local",{v:1,persona:l.persona,band:Ne(l.confidence),slots:l.slots,layoutOrder:l.layoutOrder,savedAt:Date.now()}),p(y),y},getSlotResult(n){var o,y,w;return(w=(y=l==null?void 0:l.slots[n])!=null?y:(o=e.initialSlots)==null?void 0:o[n])!=null?w:null},getSlotConfig(n){var o,y;return(y=(o=e.initialSlotConfig)==null?void 0:o[n])!=null?y:null},getSitePalette(){var n;return(n=e.initialPalette)!=null?n:null},reportSlots(){},getPersona(){let n=l!=null?l:i;return n?{persona:n.persona,confidence:n.confidence,band:Ne(n.confidence)}:null},async assign(n,o){var b;let y=await f;return!y||!o||o.length===0?o!=null&&o[0]?{variantId:o[0],assignmentTtlMs:0}:null:{variantId:(b=y.createLocalEngine({sessionId:s,forcedPersona:u}).decide({components:[{id:n,variantIds:o}]}).assignments[n])!=null?b:o[0],assignmentTtlMs:0}},track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,fetchWeights:()=>Promise.resolve([]),getGraph:()=>({pageNodes:[],capturedAt:0}),dispose:()=>{},destroy:()=>t.destroy()}}var gn=["none","sm","md","lg"],fn=["start","center","end","stretch"],mn=["start","center","end","between"],yn=["sm","md","lg"],Sn=["normal","medium","bold"],hn=["default","muted","accent"],vn=["primary","secondary","ghost"],wn=["left","center","right"],kn=["auto","square","landscape","wide"],xn=["cover","contain"],bn=[2,3,4],En=[2,3,4],_n=["default","raised"],In=["none","sm","md","lg"],Cn=["measure"],On=["input","textarea","select"],An=["text","email","number","tel"],Tn=5,Rn=8,Bn=64,Ln=5,Pn=12,Dn=4,Mn=500;function Dt(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(Dt):!1}var Fe="sentient-reveal",ie="sentient-revealed",Mt=240,Ee=!1;function Kt(){var e;Ee=!1,typeof document!="undefined"&&((e=document.getElementById(Fe))==null||e.remove())}function Nt(e){if(Ee||e.getElementById(Fe)){Ee=!0;return}let t=e.createElement("style");t.id=Fe,t.textContent=`@media (prefers-reduced-motion: no-preference){@keyframes ${ie}{from{opacity:.55;transform:translateY(2px)}to{opacity:1;transform:none}}.${ie}{animation:${ie} 240ms cubic-bezier(.2,.6,.2,1) both}}`,e.head.appendChild(t),Ee=!0}function Gt(e,t={}){var f;let s=(f=t.doc)!=null?f:typeof document!="undefined"?document:void 0;if(!s||!(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;Nt(s),e.classList.remove(ie),e.offsetWidth,e.classList.add(ie);let u=()=>{e.classList.remove(ie),e.removeEventListener("animationend",u)};return e.addEventListener("animationend",u),!0}function Ft(e,t,s,u){let f=[];{let i=!1,p=[],r=()=>{if(i)return;let n=Date.now();for(p.push(n);p.length>0&&n-p[0]>500;)p.shift();p.length>=3&&(i=!0,e("rage_click"))};t.addEventListener("click",r),f.push(()=>t.removeEventListener("click",r))}{let l=!1,c=i=>{if(l||!(i.target instanceof Node)||!t.contains(i.target)&&t!==i.target)return;l=!0;let p=typeof window!="undefined"?window.getSelection():null,r=p?p.toString().length:0;e("text_copy",{selectionLength:r})};document.addEventListener("copy",c),f.push(()=>document.removeEventListener("copy",c))}{let l=!1,c=!1,i=null,p=()=>{i!==null&&(clearTimeout(i),i=null)},r=()=>{l||!c||(p(),i=setTimeout(()=>{!l&&c&&(l=!0,e("scroll_hesitation"))},3e3))},n=()=>{p(),r()},o=w=>{for(let b of w)c=b.intersectionRatio>.3,c?r():p()},y=new IntersectionObserver(o,{threshold:[.3]});y.observe(t),window.addEventListener("scroll",n,{passive:!0}),f.push(()=>{y.disconnect(),window.removeEventListener("scroll",n),p()})}if((u==null?void 0:u.tabLoss)!==!1){let l=!1,c=s!=null?s:Date.now(),i=()=>{if(l||document.visibilityState!=="hidden")return;let p=Date.now()-c;p<15e3&&(l=!0,e("tab_loss",{timeOnPage:p}))};document.addEventListener("visibilitychange",i),f.push(()=>document.removeEventListener("visibilitychange",i))}return()=>{for(let l of f)l()}}function Ut(){var e;return typeof process=="undefined"||((e=process.env)==null?void 0:e.NODE_ENV)!=="production"}var ut="https://api.sentient-ui.com/v1/events",G=new Map,pt=null;function io(e,t){let s=G.get(e);s&&s.upgrade&&(s.reinit=t)}function $t(e){return"value"in e||"currency"in e||"externalId"in e||"metadata"in e||"weight"in e||"stepIndex"in e}var jt=3;function Ue(){return Se()}function _e(){var e;if(typeof window!="undefined")return((e=window.location)==null?void 0:e.pathname)||void 0}function Wt(){let e=new WeakMap,t=new Map,s=!1,u=(i,p,r)=>{let n=i.get(p);return r===null?n?!0:(i.set(p,new Set),!1):n?n.has(r)?!0:(n.add(r),!1):(i.set(p,new Set([r])),!1)},f=typeof window!="undefined"&&"event"in window,l=()=>{if(!f)return;let i=window.event;return typeof Event=="function"&&i instanceof Event?i:void 0},c=()=>{if(f){Promise.resolve().then(()=>{s=!1,t.clear()});return}let i=!1,p=()=>{i||(i=!0,s=!1,t.clear())};if(setTimeout(p,0),typeof MessageChannel=="function"){let r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),r.port2.close(),p()},r.port2.postMessage(0)}};return{firedBefore(i,p){let r=l();if(r){let o=e.get(r);return o||(o=new Map,e.set(r,o)),u(o,i,p)}let n=u(t,i,p);return!n&&!s&&(s=!0,c()),n}}}var gt=new Set;function zt(e,t,s){let u=typeof window=="undefined"?null:window.history;if(!u)return()=>{};let f=!1,l,c=()=>{if(f)return;let r=_e();!r||r===l||(l=r,e.track({projectId:t,componentId:"__page__",eventType:"pageview",payload:{}}),s(`${t}:${r}`))},i=[];for(let r of["pushState","replaceState"]){let n=u[r],o=function(...y){let w=n.apply(this,y);return c(),w};u[r]=o,i.push([r,n,o])}window.addEventListener("popstate",c);let p=_e();return p&>.has(`${t}:${p}`)?l=p:c(),()=>{if(!f){f=!0,window.removeEventListener("popstate",c);for(let[r,n,o]of i)u[r]===o&&(u[r]=n)}}}var pe={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}),dispose:()=>{},destroy:()=>{}};function Ht(){try{return Re(window.location.search)}catch(e){return{utmParams:{},clickIds:{}}}}function ft(e){return e.replace(/\/events\/?$/,"")}function mt(){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(t=>t==="1"||t==="yes")}function ao(e){var p;if(typeof window=="undefined")return;let t=e!=null?e:pt;if(!t){console.warn("[sentient] grantConsent() called before init()");return}let s=G.get(t);if(!s){console.warn("[sentient] grantConsent() called before init()");return}let{config:u,upgrade:f,reinit:l}=s;if(!f){s.upgradeBlockedReason&&console.warn(s.upgradeBlockedReason);return}if(u.respectDoNotTrack!==!1&&mt())return;let c=(l!=null?l:Jt)(oe(I({},u),{consent:!0}));f(c);let i=(p=G.get(t))==null?void 0:p.dispose;G.set(t,{config:oe(I({},u),{consent:!0}),upgrade:null,dispose:i})}function Qt(e){var r;let t=e.preConsentBehavior==="statistical_winner",s=ft((r=e.ingestUrl)!=null?r:ut),u={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},f=new Map,l=new Map,c={track:()=>{},goal:()=>{},componentGoal:()=>{},identify:()=>{},getAssignment:()=>null,fetchWeights:()=>Promise.resolve([]),assign(n,o,y){if(!t)return Promise.resolve(null);let w=f.get(n);return w?Promise.resolve(w):$e(l,n,async()=>{try{let b=new URLSearchParams({componentId:n});for(let F of o!=null?o:[])b.append("variantIds[]",F);let L=await fetch(`${s}/winner?${b.toString()}`,{headers:u});if(!L.ok)return o!=null&&o[0]?{variantId:o[0],assignmentTtlMs:0}:null;let E={variantId:(await L.json()).variantId,assignmentTtlMs:0};return f.set(n,E),E}catch(b){return o!=null&&o[0]?{variantId:o[0],assignmentTtlMs:0}:null}})},decide:()=>Promise.resolve(null),getSlotResult:()=>null,getSlotConfig:()=>null,getSitePalette:()=>null,reportSlots:()=>{},getPersona:()=>null,getGraph:()=>({pageNodes:[],capturedAt:0}),dispose:()=>{},destroy:()=>{}},i={track:n=>c.track(n),goal:((n,o,y,w)=>c.goal(n,o,y,w)),componentGoal:(n,o,y)=>c.componentGoal(n,o,y),identify:n=>c.identify(n),getAssignment:(n,o)=>c.getAssignment(n,o),assign:(n,o,y,w)=>c.assign(n,o,y,w),decide:n=>c.decide(n),getSlotResult:n=>c.getSlotResult(n),getSlotConfig:n=>c.getSlotConfig(n),getSitePalette:()=>c.getSitePalette(),reportSlots:(n,o)=>c.reportSlots(n,o),getPersona:()=>c.getPersona(),fetchWeights:()=>c.fetchWeights(),getGraph:()=>c.getGraph(),dispose:()=>c.dispose(),destroy:()=>c.destroy()};function p(n){c=n}return{proxy:i,setInner:p}}function $e(e,t,s){let u=e.get(t);if(u)return u;let f=(async()=>{try{return await s()}finally{e.delete(t)}})();return e.set(t,f),f}function Jt(e){var je,We,ze,He,Qe,Je,Ve,Xe,Ye,qe;if(typeof window=="undefined")return pe;pt=e.apiKey||"local";let t=G.get(e.apiKey||"local");if(t!=null&&t.dispose)try{t.dispose()}catch(a){}let s=e.respectDoNotTrack!==!1&&mt(),u=e.consent===!1||s,f=typeof e.apiKey=="string"&&e.apiKey.startsWith("pk_");if(e.localMode===!0||!f&&e.localMode!==!1)return G.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."}),u?pe:ct(e);if(u){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."),G.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."}),pe;let{proxy:a,setInner:d}=Qt(e);return G.set(e.apiKey,{config:e,upgrade:s?null:d}),a}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."),pe;if(e.ingestUrl==="")return console.warn("[sentient] init() called with an empty ingestUrl. SDK disabled."),pe;let l=(je=e.ingestUrl)!=null?je:ut,c=Date.now(),i=ve({ssrSessionId:e.ssrSessionId,apiKey:e.apiKey}),p=it(void 0,e.apiKey),r=st({ingestUrl:l,apiKey:e.apiKey}),n=ft(l),o={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},y=new Set,w=rt({url:`${n}/goals`,apiKey:e.apiKey,headers:o,onDrop:(a,d)=>{if(!e.debug){if(y.has(d))return;y.add(d)}console.warn(`[sentient] goal dropped (HTTP ${d}) \u2014 this will not be retried. `+(d===400?"The session was not found: call init() and let the session upsert complete before firing goals.":d===401||d===403?"Check the API key and that this origin is on the project allowlist.":"See the response status for the cause."),a)}}),b=Oe((We=navigator.userAgent)!=null?We:""),L=window.location.origin,P=Ae((ze=document.referrer)!=null?ze:"",L),E=(He=e.sessionSegment)!=null?He:`${b}:${P}`,F=new Map,$=new Map,O=new Map,T=new Map,A=null,g=null,R=new Set,j=new Set,W=new Map,Q=null,Z=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/,ae=new Set,S=a=>{for(let d of a)O.has(d.id)||O.set(d.id,ye(d))};if(e.initialSlots)for(let[a,d]of Object.entries(e.initialSlots))O.set(a,d);if(e.initialSlotConfig)for(let[a,d]of Object.entries(e.initialSlotConfig))T.set(a,d);e.initialPalette&&(A=e.initialPalette);let v=de(e.apiKey);if(v){for(let[a,d]of Object.entries(v.slots))O.has(a)||O.set(a,d);for(let[a,d]of Object.entries((Qe=v.slotConfig)!=null?Qe:{}))T.has(a)||T.set(a,d);!A&&v.palette&&(A=v.palette)}let J={low:.15,medium:.5,high:.85};if(e.initialPersona)g=I({},e.initialPersona);else{let a=document.documentElement.dataset;a.sentientPersona?g={persona:a.sentientPersona,confidence:(Ve=J[(Je=a.sentientConfidence)!=null?Je:"low"])!=null?Ve:.15}:v&&(g={persona:v.persona,confidence:(Xe=J[v.band])!=null?Xe:.15})}if(e.initialAssignments)for(let[a,d]of Object.entries(e.initialAssignments))p.set(a,E,{variantId:d,assignedAt:Date.now(),segment:E,confidence:1});let K=Promise.resolve(),z=i.getSessionId();if(z){let a=Te((Ye=document.referrer)!=null?Ye:""),{utmParams:d,clickIds:m}=Ht(),k=I(I(I(I({sessionId:z,deviceClass:b,trafficSource:P,referrerDomain:a,utmParams:d,clickIds:m,timeOfDay:Be(new Date),dayOfWeek:["sun","mon","tue","wed","thu","fri","sat"][new Date().getDay()],ephemeral:i.isEphemeral(),automation:typeof navigator!="undefined"&&navigator.webdriver===!0||Ce((qe=navigator.userAgent)!=null?qe:"")},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}:{}),C=async()=>{for(let h=0;;h++){try{let _=await fetch(`${n}/sessions`,{method:"POST",keepalive:!0,body:JSON.stringify(k),headers:o});if(_.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(_.ok||se(_)==="dropped")return}catch(_){}if(h>=jt){console.warn("[SentientUI] Could not register the session after retries. Conversions in this visit may not be recorded.");return}await new Promise(_=>setTimeout(_,Y(h+1)))}};try{K=C()}catch(h){}}e.debug&&(console.log("[sentient] initialized",{context:e.context}),window.__sentient={client:null,queue:r});let ge=Wt(),N=null,ee=!1,U={goal(a,d={},m=1,k=0){var le,ce,ne,x,V,fe,B;let C=i.getSessionId();if(!C)return;let h=$t(d)?d:{metadata:d},_=[a,(le=h.externalId)!=null?le:"",(ce=h.stepIndex)!=null?ce:k,(ne=h.weight)!=null?ne:m].join("\0"),D=h.value!==void 0?`${h.value}\0${(x=h.currency)!=null?x:""}`:null;if(ge.firedBefore(_,D)){e.debug&&console.log(`[sentient] goal("${a}") already recorded for this action \u2014 not sent twice`);return}let M=Ue(),X={sessionId:C,name:a,metadata:(V=h.metadata)!=null?V:{},weight:(fe=h.weight)!=null?fe:m,stepIndex:(B=h.stepIndex)!=null?B:k,goalId:M,value:h.value,currency:h.currency,externalId:h.externalId};e.debug&&console.log("[sentient] goal",X);let te={id:M,body:JSON.stringify(X)};K.then(()=>w.send(te))},componentGoal(a,d,m){var M,X,te;let k=i.getSessionId();if(!k)return;let C=p.get(a,E),h=C?null:(M=O.get(a))!=null?M:null;if(!C&&h===null){e.debug&&console.warn(`[sentient] componentGoal("${a}"): no assignment or slot decision yet \u2014 render its <Adaptive>/adaptive hook or call assign()/decide() before recording a goal.`);return}let _=C?C.variantId:Pe(h),D={id:Ue(),sessionId:k,projectId:e.apiKey,componentId:a,variantId:_,eventType:"goal_achieved",goalType:d,payload:I({reward:(X=m==null?void 0:m.reward)!=null?X:1,goalValue:m==null?void 0:m.value,currency:m==null?void 0:m.currency},(te=m==null?void 0:m.metadata)!=null?te:{}),timestamp:Date.now(),timeInSession:Date.now()-c,path:_e()};e.debug&&console.log("[sentient] componentGoal",D),K.then(()=>r.push(D))},identify(a){let d=i.getSessionId();d&&K.then(()=>{fetch(`${n}/sessions`,{method:"POST",keepalive:!0,body:JSON.stringify({sessionId:d,userId:a,ephemeral:i.isEphemeral()}),headers:o}).catch(()=>{})})},track(a){let d=i.getSessionId();if(!d)return;let m=oe(I({path:_e()},a),{id:Ue(),sessionId:d,timestamp:Date.now(),timeInSession:Date.now()-c});e.debug&&console.log("[sentient] track",m),K.then(()=>r.push(m))},getAssignment(a,d){return p.get(a,d)},async assign(a,d,m,k){let C=i.getSessionId();if(!C)return null;let h=p.get(a,E);if(h&&(d!=null&&d.length||h.content!==void 0)){let _=h.ttlMs&&h.ttlMs>0?Math.max(0,h.assignedAt+h.ttlMs-Date.now()):0;return{variantId:h.variantId,assignmentTtlMs:_,content:h.content}}return $e(F,a,async()=>{await K;try{let _={sessionId:C,componentId:a,variantIds:d};k!==void 0?_.agentDataByVariant=k:m!==void 0&&(_.agentData=m);let D=await fetch(`${n}/assign`,{method:"POST",body:JSON.stringify(_),headers:o});if(!D.ok)return null;let M=await D.json();return p.set(a,E,I({variantId:M.variantId,assignedAt:Date.now(),segment:E,confidence:1,content:M.content},M.assignmentTtlMs&&M.assignmentTtlMs>0?{ttlMs:M.assignmentTtlMs}:{})),M}catch(_){return null}})},async decide(a){var h,_;let d=i.getSessionId();if(!d)return null;let m=(h=a.slots)!=null?h:[],k={sessionId:d};a.sections&&a.sections.length>0&&(k.sections=a.sections.map(D=>({id:D}))),k.components=(_=a.components)!=null?_:[],m.length>0&&(k.slots=m.map(Le)),a.slotsFrom==="registry"&&(k.slotsFrom="registry"),a.v&&(k.v=a.v),typeof a.pp=="number"&&(k.pp=a.pp),e.persona&&(k.persona=e.persona);let C=JSON.stringify(k);return $e($,C,async()=>{var D,M,X,te,le,ce;await K;try{let ne=await fetch(`${n}/decide`,{method:"POST",body:C,headers:o});if(!ne.ok)return S(m),null;let x=await ne.json(),V={};for(let B of m){let H=(D=x.slots)==null?void 0:D[B.id];if(H!==void 0){V[B.id]=H,O.set(B.id,H);continue}let Ze=O.get(B.id);if(Ze!==void 0)V[B.id]=Ze;else{let et=ye(B);V[B.id]=et,O.set(B.id,et)}}if(x.slots)for(let[B,H]of Object.entries(x.slots))B in V||(V[B]=H,O.set(B,H));let fe=g!=null&&g.persona!=="unknown";x.persona&&!(x.persona==="unknown"&&fe)?g={persona:x.persona,confidence:(M=x.confidence)!=null?M:0}:g||(g={persona:"unknown",confidence:0});for(let[B,H]of Object.entries((X=x.assignments)!=null?X:{}))p.set(B,E,{variantId:H,assignedAt:Date.now(),segment:E,confidence:1});if(x.slotConfig)for(let[B,H]of Object.entries(x.slotConfig))T.set(B,H);return x.palette&&(A=x.palette),ue(e.apiKey,I(I({v:1,persona:g.persona,band:dt(g.confidence),slots:Object.fromEntries(O),layoutOrder:(te=x.layoutOrder)!=null?te:null,savedAt:Date.now()},T.size>0?{slotConfig:Object.fromEntries(T)}:{}),A?{palette:A}:{})),I(I(I(I({layoutOrder:(le=x.layoutOrder)!=null?le:null,assignments:(ce=x.assignments)!=null?ce:{},slots:V,persona:g.persona,confidence:g.confidence},x.slotConfig?{slotConfig:x.slotConfig}:{}),x.goals?{goals:x.goals}:{}),x.sectionMap?{sectionMap:x.sectionMap}:{}),x.palette?{palette:x.palette}:{})}catch(ne){return S(m),null}})},getSlotResult(a){var d;return(d=O.get(a))!=null?d:null},getSlotConfig(a){var d;return(d=T.get(a))!=null?d:null},reportSlots(a,d){for(let m of a)if(!(typeof m!="string"||m.length===0)){if(!Z.test(m)){Ut()&&!ae.has(m)&&(ae.add(m),console.warn(`[sentient] reportSlots: slot id ${JSON.stringify(m)} 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(!R.has(m)){R.add(m),j.add(m);let k=d==null?void 0:d[m];if(typeof k=="string"){let C=k.replace(/\s+/g," ").trim().slice(0,400);C!==""&&W.set(m,C)}}}j.size===0||Q!=null||(Q=setTimeout(()=>{Q=null;let m=[...j];j.clear();for(let k=0;k<m.length;k+=20){let C=m.slice(k,k+20),h={};for(let _ of C){let D=W.get(_);D!==void 0&&(h[_]=D,W.delete(_))}fetch(`${n}/slots/observed`,{method:"POST",headers:o,body:JSON.stringify(I({slotIds:C},Object.keys(h).length>0?{baselineTexts:h}:{}))}).catch(()=>{})}},1e3))},getSitePalette(){return A},getPersona(){return g?{persona:g.persona,confidence:g.confidence,band:dt(g.confidence)}:null},async fetchWeights(){var a;try{let d=await fetch(`${n}/weights`,{headers:o});return d.ok?(a=(await d.json()).components)!=null?a:[]:[]}catch(d){return[]}},getGraph(){return{pageNodes:[],capturedAt:0}},dispose(){var a;N==null||N(),ee=!0,r.destroy(),w.destroy(),((a=G.get(e.apiKey))==null?void 0:a.dispose)===U.dispose&&G.delete(e.apiKey),e.debug&&console.log("[sentient] disposed")},destroy(){var a;N==null||N(),ee=!0,r.destroy(),w.destroy(),i.destroy(),p.clear(),((a=G.get(e.apiKey))==null?void 0:a.dispose)===U.dispose&&G.delete(e.apiKey);try{localStorage.removeItem(re+e.apiKey),localStorage.removeItem(Me(e.apiKey)),localStorage.removeItem(Ke(e.apiKey))}catch(d){}e.debug&&console.log("[sentient] destroyed")}};if(G.set(e.apiKey,{config:e,upgrade:null,dispose:U.dispose}),N=zt(U,e.apiKey,a=>{K.then(()=>{ee||gt.add(a)})}),e.debug){let a=window;a.__sentient&&(a.__sentient.client=U)}return U}export{re as a,de as b,ue as c,Lt as d,Ge as e,lt as f,gn as g,fn as h,mn as i,yn as j,Sn as k,hn as l,vn as m,wn as n,kn as o,xn as p,bn as q,En as r,_n as s,In as t,Cn as u,On as v,An as w,Tn as x,Rn as y,Bn as z,Ln as A,Pn as B,Dn as C,Mn as D,Dt as E,Mt as F,Kt as G,Gt as H,Ft as I,io as J,mt as K,ao as L,Jt as M};
|
|
2
|
-
//# sourceMappingURL=chunk-HY23LTUY.mjs.map
|