PageSourceSearch

https://www.viewsapp.ai/assets/useUserSpeechBubbleColor-BWPOC4hb.js

js viewsapp.ai collected 2026-10-05 15:25:55 UTC 1,962 bytes, 1 lines download raw bytes

1import{A as e,At as t,G as n,St as r}from"./vendor-Nr3T4a0l.js";import{a as i}from"./logger-CqL7pGja.js";import{t as a}from"./errorLogging-y9Tkqa1s.js";import{r as o,t as s}from"./features-B-Kw_94I.js";import{O as c}from"./index-2EFrgcSo.js";n(),r();var l=`ExpressUserSpeechBubbleColor`,u=new Map(o.map(e=>[e.id,e])),d=new Set(o.map(e=>e.id)),f=t(s),p=t(!1),m=t(!1),h=t(!1),g=null;function _(e){return d.has(e)?e:s}function v(e){let t=_(e);return u.get(t)||u.get(`evergreen`)}function y(e){return e.settings.find(e=>e.keyName===l)}async function b(e,t=!1){return t&&(h.value=!1,g=null),h.value&&!t?f.value:g||(g=(async()=>{p.value=!0;try{return e.isInitialized||await e.loadSettings(),f.value=_(y(e)?.value),h.value=!0,f.value}catch(e){return f.value=s,h.value=!0,i(`Failed to initialize speech bubble color preference`,a(e,{context:`use-user-speech-bubble-color.initialize`,includeBackendMessage:!0})),f.value}finally{p.value=!1,g=null}})(),g)}async function x(e,t){let n=f.value,r=_(t);f.value=r,m.value=!0;try{return await e.upsertUserSetting({keyName:l,value:r,enabled:!0},{silent:!0}),r}catch(e){throw f.value=n,i(`Failed to persist speech bubble color preference`,a(e,{context:`use-user-speech-bubble-color.persist`,includeBackendMessage:!0,extra:{colorId:r}})),e}finally{m.value=!1}}function S(){let t=c(),n=e(()=>v(f.value)),r=e(()=>
1({"--user-bubble-bg":n.value.bubbleBackground,"--user-bubble-border":n.value.bubbleBorder,"--user-bubble-avatar-bg":n.value.avatarBackground,"--user-bubble-avatar-border":n.value.avatarBorder})),i=e(()=>({"--user-bubble-avatar-bg":n.value.avatarBackground,"--user-bubble-avatar-border":n.value.avatarBorder}));async function a(e=!1){return b(t,e)}async function s(e){return x(t,e)}return{speechBubbleColors:o,selectedSpeechBubbleColorId:f,speechBubbleColor:n,isLoadingSpeechBubbleColor:p,isSavingSpeechBubbleColor:m,bubbleStyleVars:r,avatarStyleVars:i,initializeSpeechBubbleColor:a,setSpeechBubbleColor:s}}export{S as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.