@nexlylab/widget 1.32.17 → 1.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.
- package/dist/INSTALL.txt +1 -1
- package/dist/runtime/{1.32.17/chunks/ClickToLoadEmbed-D9eMaBG8-r9dN9klo.js → 1.33.0/chunks/ClickToLoadEmbed-DdH19Upf-CnpjmfE1.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/PanelInfoVideo-DMU0-9Az-BrU-Qlul.js → 1.33.0/chunks/PanelInfoVideo-XFcVoL2c-qpxDXdLm.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js → 1.33.0/chunks/allowed-elements-C0OfX2zF-DIBV8lKu.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/assistant-link-components-D0uKk8Hv-xEDu0ls0.js → 1.33.0/chunks/assistant-link-components-gMuMhmaU-rHpeX4O6.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/assistant-link-policy-CogLpq-3-Cc-yj-a-.js → 1.33.0/chunks/assistant-link-policy-DlGAtyk7-By6jpR50.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/block-rating-BgOeTm52-CoiP5C2K.js → 1.33.0/chunks/block-rating-CAVRRYuG-CQMNokIy.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/external-url-ninK7gY9-CJQjg_od.js → 1.33.0/chunks/external-url-JbUnX7Da-rLiy7c9v.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DsQ3ssZW-DbuSZfeK.js → 1.33.0/chunks/index--H6hRpBJ-F9_TzvkO.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-ByEsnceF-CSQQTbsg.js → 1.33.0/chunks/index--pcCOJWb-BzpgdoE8.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CHUW1nlj-DAdxCQyi.js → 1.33.0/chunks/index-7yhyghzH-BlFXtfQb.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D3fwWbIM-BcW8HKb8.js → 1.33.0/chunks/index-BCxeWwto-B9PuY2Gx.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-zmuItIIf-oy07dUaV.js → 1.33.0/chunks/index-BO0vI80C-qK4w7DnX.js} +4 -4
- package/dist/runtime/{1.32.17/chunks/index-CaHbIY6I-QeFj7CR9.js → 1.33.0/chunks/index-BP1Q45X4-f3F4IxQ5.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CPjLHywY-DBhSkJ7i.js → 1.33.0/chunks/index-BPfUysTZ-CV5ZiVsD.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-C5olj-Fr-C3bBvEcm.js → 1.33.0/chunks/index-BWY1nqf0-DX50C5MZ.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-1JK_DoDz-D6wzHiS0.js → 1.33.0/chunks/index-BblCrrAW-bh6F7tw3.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BWMbr4oS-Dsa9X9U7.js → 1.33.0/chunks/index-Bd_8PmPr-CgO1smBF.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DnDMirl9-Dp5AxBD4.js → 1.33.0/chunks/index-BjHXOMPQ-Bt7j8evJ.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D6YQ4lFv-pbKZ0WGs.js → 1.33.0/chunks/index-BwnCq3yC-LScXPMbE.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DzHo_iNR-Dm9kbc85.js → 1.33.0/chunks/index-BzVJMW3i-Bhh8_8Oh.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D3OBLy0s-k8E4HOBM.js → 1.33.0/chunks/index-CDlumsdH-BgpZz7kC.js} +3 -3
- package/dist/runtime/{1.32.17/chunks/index-D30-Ox5Z-BLxOZxZv.js → 1.33.0/chunks/index-CH-C6uk_-B-pT4hKt.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CpCgmp7C-C9wFr7fa.js → 1.33.0/chunks/index-CNP-4dFm-BlRhWcs1.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DDHI4Kxr-DrVjDDba.js → 1.33.0/chunks/index-CNbQ508J-BPOHZMXu.js} +4 -4
- package/dist/runtime/{1.32.17/chunks/index-Dwtd4id8-CiRb-0NX.js → 1.33.0/chunks/index-CPGSyaZ4-BoVmvEOm.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DAai_PkG-Dr1V6OGz.js → 1.33.0/chunks/index-CVtuVQCx-Dtq7n928.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-Ba5nbqA8-B620AdXN.js → 1.33.0/chunks/index-CYP-tLa5-DLVDVk-F.js} +4 -4
- package/dist/runtime/{1.32.17/chunks/index-CtNAXlUH-DQBGsPwB.js → 1.33.0/chunks/index-CZCcZigQ-qH_mrcVT.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BsUIWTU6-BQ7DWJhg.js → 1.33.0/chunks/index-CZSW9eXg-BwcGrX1b.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-Ce0ahORn-bdo5pwX-.js → 1.33.0/chunks/index-Cfy6Ocqe-CzwqZYRk.js} +2 -2
- package/dist/runtime/1.33.0/chunks/index-Ci7P37Ya-W5nof5Mx.js +6 -0
- package/dist/runtime/{1.32.17/chunks/index-BDhTixUR-Aqz1AnQ5.js → 1.33.0/chunks/index-CmM1q2bg-D6H0juMn.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BlGeDG8W-CoI3p0S7.js → 1.33.0/chunks/index-CnknkPUN-Yl3jEGAx.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BJxJr5j5-C_0Ll4qr.js → 1.33.0/chunks/index-D9fi5TQ9-k8zxZkfU.js} +2 -2
- package/dist/runtime/1.33.0/chunks/index-DG6McKPZ-CqZ9_vG_.js +2 -0
- package/dist/runtime/{1.32.17/chunks/index-Bl_8GpS0-CahNhEcx.js → 1.33.0/chunks/index-DOJHU9qy-Bil-vDLm.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-C_zmepmr-H31PHMqm.js → 1.33.0/chunks/index-DTa1aDGz-Deg8QEW2.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DAJM_cb9-VhJcCfAC.js → 1.33.0/chunks/index-DUV1wU5j-ErDxRmJu.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DMM00SC5-R_xuAEQV.js → 1.33.0/chunks/index-DZNxd978-BmIQ-NmU.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-B0-9mIbB-DP0QKkgf.js → 1.33.0/chunks/index-DsyaMk1k-DpMzyqHN.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D5EHdeyl-_M0CWPEY.js → 1.33.0/chunks/index-HIu_g6Cr-CEIHlemy.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-Wza_7CGb-W1lJrIDD.js → 1.33.0/chunks/index-NPLN6oCC-VW9D8cgC.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CIFQrVkq-DUgMllqN.js → 1.33.0/chunks/index-S2W2KqpV-PMvqlUvO.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DIMi29lU-3B-eE3K7.js → 1.33.0/chunks/index-SV2KdT0_-BZw4n83V.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DzCfV77F-C1BzRUwZ.js → 1.33.0/chunks/index-qzvjftnO-CDVtcfdt.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CM0iRJSw-pkywvGDF.js → 1.33.0/chunks/index-s0zHGN1t-DWm0RYZF.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-B97ASd4H-ZRnEJoQe.js → 1.33.0/chunks/index-uYSCRIpT-qsVnaLmo.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CSDD7Z6C-BpgnWlB8.js → 1.33.0/chunks/index-v9CNsbwM-CavFmRiD.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-_R8QyLD7-TEMHje2B.js → 1.33.0/chunks/index-xQDKGkvA-pCzSL4DD.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index.modern-CioVZ357-BA5NTOmY.js → 1.33.0/chunks/index.modern-CioVZ357-nfRNslCS.js} +2 -2
- package/dist/runtime/1.33.0/nexly.js +61 -0
- package/dist/v1.js +1 -1
- package/package.json +1 -1
- package/dist/runtime/1.32.17/chunks/index-D0qsMexH-I68tb-d3.js +0 -2
- package/dist/runtime/1.32.17/chunks/index-tapacGlG--YMQ21rc.js +0 -6
- package/dist/runtime/1.32.17/nexly.js +0 -61
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as p,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as p,j as e,e as n}from"../nexly.js";const a=o=>`$${o.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})}`;function M({data:o,config:h,actions:l,metadata:x,i18n:j}){const s=j?.t??(i=>i),u=h.mode??o.mode??"basic",c=o.forecast,r=o.aiTip,[m,d]=p.useState("idle"),[N,b]=p.useState(!1);if(!c&&!o.error)return e.jsx(n,{blockType:"commission-forecast",children:e.jsx("div",{className:"cf-block",children:e.jsxs("div",{className:"cf-hero",children:[e.jsx("div",{className:"cf-hero-label",children:s("commission_forecast.estimated_commission")}),e.jsx("div",{className:"cf-hero-amount",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"—"}),e.jsx("div",{className:"cf-hero-sub",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:x?.dataQuality==="none"?s("commission_forecast.signin_prompt"):s("commission_forecast.calculating")})]})})});if(o.error||!c)return e.jsx(n,{blockType:"commission-forecast",children:e.jsx("p",{style:{color:"var(--es-color-error, #AD2C26)",fontSize:13},children:s("commission_forecast.load_error")})});const t=c.deltaVsLastMonth,v=c.projectedMonthEnd>0?Math.min(100,Math.round(c.totalEstimated/c.projectedMonthEnd*100)):0,_=Math.round((c.scenarioOneMember-c.projectedMonthEnd)/Math.max(1,c.projectedMonthEnd)*100),g=()=>{r&&(navigator.clipboard.writeText(r).catch(()=>{}),d("copied"),l?.emit?.("cf:tipCopied",{tip:r}),setTimeout(()=>d("idle"),2e3))},f=()=>{b(!0),l?.emit?.("cf:scenarioViewed",{scenarioOneMember:c.scenarioOneMember})};return e.jsx(n,{blockType:"commission-forecast",children:e.jsxs("div",{className:"cf-block",children:[e.jsxs("div",{className:"cf-hero",children:[e.jsx("div",{className:"cf-hero-label",children:s("commission_forecast.estimated_commission")}),e.jsx("div",{className:"cf-hero-amount",children:a(c.totalEstimated)}),e.jsxs("div",{className:"cf-hero-sub",children:[e.jsxs("span",{children:[s("commission_forecast.projected_month_end_label")," ",e.jsx("strong",{children:a(c.projectedMonthEnd)})]}),t!==null&&e.jsxs("span",{className:`cf-delta-badge ${t>=0?"cf-delta--positive":"cf-delta--negative"}`,children:[t>=0?"↑":"↓"," ",a(Math.abs(t))," ",s("commission_forecast.vs_last_month")]})]})]}),e.jsxs("div",{className:"cf-forecast-row",children:[e.jsxs("div",{className:"cf-forecast-labels",children:[e.jsxs("span",{children:[s("commission_forecast.current_label")," ",a(c.totalEstimated)]}),e.jsxs("span",{children:[s("commission_forecast.target_label")," ",a(c.projectedMonthEnd)]})]}),e.jsx("div",{className:"cf-forecast-bar-track",children:e.jsx("div",{className:"cf-forecast-bar-fill",style:{width:`${v}%`}})}),e.jsx("div",{className:"cf-days-left",children:s("commission_forecast.days_left_run_rate",{days:c.daysLeft,rate:a(c.dailyRunRate)})})]}),e.jsxs("div",{className:"cf-scenario",onClick:f,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),f())},tabIndex:0,role:"button",children:[e.jsx("div",{className:"cf-scenario-label",children:s("commission_forecast.scenario_title")}),e.jsxs("div",{className:"cf-scenario-row",children:[e.jsx("span",{className:"cf-scenario-desc",children:s("commission_forecast.scenario_desc")}),e.jsx("span",{className:"cf-scenario-value",children:a(c.scenarioOneMember)})]}),e.jsx("div",{className:"cf-scenario-uplift",children:s("commission_forecast.uplift",{pct:_,amount:a(c.scenarioOneMember-c.projectedMonthEnd)})})]}),u==="pro"&&c.tiers.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cf-section-title",children:s("commission_forecast.by_tier",{count:c.tiers.length})}),e.jsx("div",{className:"cf-tier-list",children:c.tiers.map(i=>e.jsxs("div",{className:`cf-tier${i.status==="unreachable"?" cf-tier--unreachable":""}`,children:[e.jsxs("div",{className:"cf-tier-header",children:[e.jsx("span",{className:"cf-tier-engine",children:s("commission_forecast.engine_number",{id:i.engineId})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{className:`cf-tier-status cf-status--${i.status==="in progress"?"in-progress":"unreachable"}`,children:i.status==="in progress"?s("commission_forecast.status.in_progress"):s("commission_forecast.status.unreachable")}),e.jsx("span",{className:"cf-tier-amount",children:a(i.estimatedCommission)})]})]}),e.jsx("div",{className:"cf-tier-progress-track",children:e.jsx("div",{className:"cf-tier-progress-fill",style:{width:`${i.progressPct}%`}})}),e.jsxs("div",{className:"cf-tier-meta",children:[e.jsx("span",{children:s("commission_forecast.volume_label",{current:i.salesVolume.toLocaleString(),max:i.salesVolumeMax.toLocaleString()})}),e.jsx("span",{children:s("commission_forecast.points_label",{current:i.personalPoints,max:i.personalPointsMax})})]})]},i.engineId))})]}),r&&e.jsxs("div",{className:"cf-tip-box",children:[e.jsxs("div",{className:"cf-tip-header",children:[e.jsx("span",{className:"cf-tip-label",children:s("commission_forecast.ai_coach_label")}),e.jsx("button",{className:`cf-copy-btn${m==="copied"?" cf-copied":""}`,onClick:g,children:m==="copied"?`✓ ${s("common.copied")}`:s("common.copy")})]}),e.jsx("p",{className:"cf-tip-text",children:r})]})]})})}const k={slug:"commission-forecast",name:"Commission Forecast",version:"1.0.0",category:"data",requiredService:"commission-forecast",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:260,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"commission-forecast",inputSchema:{type:"object",properties:{forecast:{type:"object"},aiTip:{type:"string"},mode:{type:"string"}},required:["forecast","mode"]}},events:{emits:[{name:"cf:tipCopied",description:"User copied the AI commission tip"},{name:"cf:scenarioViewed",description:"User viewed the +1 member scenario projection"}]}};export{M as CommissionForecastBlock,M as Component,k as manifest};
|
|
2
|
+
//# sourceMappingURL=index-BWY1nqf0-DX50C5MZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as i,L as B,j as e,e as j}from"../nexly.js";const z={slug:"auth-login",name:"User Login",version:"1.0.0",category:"interactive",requiredService:"",configSchema:{properties:{loginMethod:{type:"string",default:"password"},showGuestOption:{type:"boolean",default:!0},submitLabel:{type:"string",default:""}}},defaultConfig:{loginMethod:"password",showGuestOption:!0,submitLabel:""},dataContract:{serviceSlug:"chat-bot",inputSchema:{type:"object",properties:{authenticated:{type:"boolean"}}},previewDataOverride:{authenticated:!1}},fields:[{id:"loginMethod",type:"select",label:"Login method",default:"password",options:[{label:"Password",value:"password"},{label:"Magic Link",value:"magic-link"},{label:"Guest",value:"guest"}],group:"Behavior"},{id:"showGuestOption",type:"toggle",label:"Show guest login option",default:!0,group:"Behavior"},{id:"submitLabel",type:"localized-text",label:"Submit button label",default:"",placeholder:'Leave empty to use translated default (e.g. "Login")',group:"Content"}],events:{emits:[{name:"auth:login",description:"User successfully logged in — carries { user, accessToken }"},{name:"auth:loginFailed",description:"Login attempt failed"},{name:"auth:guestContinued",description:"User chose to continue as guest"}],listens:[{name:"auth:reset",description:"Reset the login form"}]},supportedPlacements:["main"],sizing:{minWidth:280,preferredHeight:"auto",scrollable:!1}};function L({config:u,actions:s,i18n:d}){const r=d?.t??(o=>o),h=d?.currentLanguage??"en",[p,m]=i.useState(""),[g,y]=i.useState(""),[b,v]=i.useState(""),[l,n]=i.useState(!1),[c,t]=i.useState(null),f=u.loginMethod??"password",x=u.showGuestOption??!0,w=B(u.submitLabel,h,{t:r,fallbackKey:"auth.login.submit",enDefault:"Login"});async function S(o){o.preventDefault(),n(!0),t(null);try{let a;f==="api_key"?a=await s.call("login",{apiKey:p}):a=await s.call("login",{email:g,password:b}),a?.error?t({error:a.error}):(s.emit("auth:login",{user:a.user,accessToken:a.accessToken}),t({success:!0,user:a?.user}))}catch{t({error:r("auth.login.error_failed")})}finally{n(!1)}}async function k(){n(!0),t(null);try{const o=await s.call("login",{guest:!0});o?.error?t({error:o.error}):(s.emit("auth:login",{user:o.user}),t({success:!0}))}catch{t({error:r("auth.login.error_guest_failed")})}finally{n(!1)}}return c?.success?null:e.jsx(j,{blockType:"auth-login",children:e.jsxs("div",{className:"es-block__body",style:{padding:16},children:[e.jsxs("form",{onSubmit:S,children:[f==="api_key"?e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.login.api_key_label")}),e.jsx("input",{type:"text",value:p,onChange:o=>m(o.target.value),placeholder:"eu_live_...",required:!0,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",fontFamily:"monospace",boxSizing:"border-box"}})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.email_label")}),e.jsx("input",{type:"email",value:g,onChange:o=>y(o.target.value),placeholder:r("auth.email_placeholder"),required:!0,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",boxSizing:"border-box"}})]}),e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.password_label")}),e.jsx("input",{type:"password",value:b,onChange:o=>v(o.target.value),placeholder:r("auth.password_placeholder"),required:!0,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",boxSizing:"border-box"}})]})]}),c?.error&&e.jsx("div",{style:{fontSize:12,color:"var(--es-color-error, #AD2C26)",marginBottom:8},children:c.error}),e.jsx("button",{type:"submit",disabled:l,style:{width:"100%",padding:"10px 16px",borderRadius:6,border:"none",background:l?"var(--es-color-on-surface-muted, #4B5563)":"var(--es-color-primary, #2563EB)",color:"var(--es-color-on-primary, #ffffff)",fontSize:14,fontWeight:600,cursor:l?"wait":"pointer"},children:l?r("auth.login.submitting"):w})]}),x&&e.jsx("button",{type:"button",onClick:k,disabled:l,style:{width:"100%",marginTop:8,padding:"8px 16px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"transparent",color:"var(--es-color-on-surface-muted, #4B5563)",fontSize:13,cursor:l?"wait":"pointer"},children:r("auth.gate.guest_cta")})]})})}export{L as Component,z as manifest};
|
|
2
|
+
//# sourceMappingURL=index-BblCrrAW-bh6F7tw3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as e,T as N,r as d}from"../nexly.js";const f={"--ai-bg":"#141414","--ai-bg-elevated":"#1F1F1F","--ai-bg-card":"#1F1F1F","--ai-bg-input":"#141414","--ai-bg-footer":"#141414","--ai-fg":"#F5F5F5","--ai-fg-secondary":"#D1D5DB","--ai-muted":"#9CA3AF","--ai-muted-dim":"#6B7280","--ai-border":"#2a2a2a","--ai-border-subtle":"#1e1e1e","--ai-accent":"#FFCC00","--ai-accent-fg":"#1A1A1A","--ai-accent-hover":"#E6B800","--ai-accent-subtle":"rgba(255, 204, 0, 0.12)","--ai-accent-on-subtle":"#FFCC00","--ai-accent-on-subtle-strong":"#FFCC00","--ai-accent-border":"#75600C","--ai-user-bubble":"#FFCC00","--ai-user-bubble-fg":"#1A1A1A","--ai-assistant-bubble":"#1F1F1F","--ai-assistant-bubble-fg":"#F5F5F5","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.7)","--ai-scrollbar":"#FFCC00","--ai-success":"#22C55E","--ai-warning":"#EAB308","--ai-error":"#F87171","--ai-info":"#38BDF8","--es-color-surface":"#141414","--es-color-surface-elevated":"#1F1F1F","--es-color-surface-hover":"#2E2E2E","--es-color-on-surface":"#F5F5F5","--es-color-on-surface-muted":"#9CA3AF","--es-color-primary":"#FFCC00","--es-color-on-primary":"#1A1A1A","--es-color-primary-muted":"rgba(255, 204, 0, 0.12)","--es-color-primary-on-muted":"#FFCC00","--es-color-border":"#2a2a2a","--es-color-control-border":"#6B7280","--es-color-error":"#F87171","--es-color-success":"#22C55E","--es-color-on-success":"#1A1A1A","--es-color-warning":"#EAB308","--es-color-interactive":"#FFE066"},S={"--ai-bg":"#FFFFFF","--ai-bg-elevated":"#FAFAFA","--ai-bg-card":"#F2F2F2","--ai-bg-input":"#F2F2F2","--ai-bg-footer":"#FFFFFF","--ai-fg":"#1A1A1A","--ai-fg-secondary":"#4B4B4F","--ai-muted":"#67696E","--ai-muted-dim":"#9CA3AF","--ai-border":"#E5E5E5","--ai-border-subtle":"#EFEFEF","--ai-accent":"#856900","--ai-accent-fg":"#FFFFFF","--ai-accent-hover":"#6B5400","--ai-accent-subtle":"rgba(125, 98, 0, 0.10)","--ai-accent-on-subtle":"#7D6200","--ai-accent-on-subtle-strong":"#765D00","--ai-accent-border":"#A8944A","--ai-user-bubble":"#856900","--ai-user-bubble-fg":"#FFFFFF","--ai-assistant-bubble":"#F2F2F2","--ai-assistant-bubble-fg":"#1A1A1A","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.12)","--ai-scrollbar":"#D1D5DB","--ai-success":"#00672B","--ai-warning":"#9C5300","--ai-error":"#AD2C26","--ai-info":"#03669D","--es-color-surface":"#FFFFFF","--es-color-surface-elevated":"#F2F2F2","--es-color-surface-hover":"#EAEAEA","--es-color-on-surface":"#1A1A1A","--es-color-on-surface-muted":"#67696E","--es-color-primary":"#856900","--es-color-on-primary":"#FFFFFF","--es-color-primary-muted":"rgba(118, 93, 0, 0.10)","--es-color-primary-on-muted":"#765D00","--es-color-border":"#E5E5E5","--es-color-control-border":"#6B7280","--es-color-error":"#AD2C26","--es-color-success":"#00672B","--es-color-on-success":"#FFFFFF","--es-color-interactive":"#92400E"},L={slug:"ambient-signal-black",name:"Signal Black",version:"0.1.0",slots:["header","main","footer"],cssVariables:f,structure:{header:{id:"header",label:"Header",accepts:!0},main:{id:"main",label:"Main Content",accepts:!0},footer:{id:"footer",label:"Footer",accepts:!0}},defaultViews:[],requiredServices:["chat-bot"],description:"Bold monochrome theme with a #FFCC00 signal-gold accent, built for the AmbientSystem SupportChat widget.",author:"E-Commerce Studio",packageName:"@ecommerce-studio/theme-ambient-signal-black",options:[{id:"colorScheme",type:"select",label:"Appearance mode",default:"auto",group:"Appearance",options:[{label:"Auto (match visitor)",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}]}],supports:{customCss:!1,customJs:!1,darkMode:!0,rtl:!1,views:!1}},D=105,j=82,x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAABSCAYAAABXP/pUAAACiklEQVR42u2c23GDQAxFtyc3oGrShupINWogPTn+sCcewmMxSKtdzp3RX2CcPVxJaIFSUEvJM+wZ90coy+KzyLoQsnLcC8o00AlQdGWBl8LeoK0di4sOwtkL5pNAieHgog+lQXBe6XDtAkEzskBAUxfNuRclAUTHlzDF0VAMBIiGIjkgXNSwDuEiXDSesgIy0Py1vXecRKo7EgKivA0DKa+DegSkjiBdvi5J+dtBtcSpD63AMyDRAQJp4ogtV1jZfnikBSwbEcqZtUUXZmeRsHQ0OJ5XszYCpcA5tmARoIDzoaskaPbXrYuyzNo0ABTuOXn4qVd3UeZJtTgNaw1APosp5YLbFNkBXd5N1gkgbzcByMlNw6c87RDQ1E1Dp7xeAV0GUs+ApvVDR4V0B1JuSAqkOkhfADptMV0g3R7xs7HRBaT6WZt5nPcd0vQPhFq0G5LLfdISJO+prA4EyX3i8FUB6e6QDkd0kTqddxekM4GN5qLiCP9jSEfS4SipTiJcdBaktSdrRoXkuTNbPCHVpkPpHJQ4Nguza/btBKm2ndeOgNnM/xHyAEoEpNr6lRmYzmQDi1qbaEi19SsLsDn3aPDF2wxSdmC2kKItGlB5AvpJllbWfrQ4QrMS/1ZF1e1LNkh7W/p3aLbz3C8osnH+5q+23J5teA+vJu6dcshM1B5nDRuo3Xq/UjNBtBNniVJiX8EMf4xYSp6XhK38/+TzNFr/TikJlQlitla+G/U+IrrU52dGBDXk9+qU1AYo4JwMSoEDrKgNTmA1AiMgaTNc3UplgEkyzjGgtJty1DiP+pJAQAISAhKQ6OJaNxBHtkas1H1VEh2Aw01t4ukEWxKd1x5AIYQQQgihhvoFxm18xEWNaMwAAAAASUVORK5CYII=",M=j/D,_=.62;function C({size:a=64,className:o,registerEl:s}){const c=a*_,n=c*M;return e.jsx("div",{className:o,"aria-hidden":"true","data-bird":"badge",style:{position:"relative",width:a,height:a,borderRadius:"9999px",background:"var(--ai-accent, #FFCC00)",color:"var(--ai-accent-fg, #1A1A1A)",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"},children:e.jsxs("div",{ref:s,"data-bird":"root",style:{position:"relative",width:c,height:n,transformOrigin:"50% 50%"},children:[e.jsx("div",{"data-bird":"glow",style:{position:"absolute",inset:"-35%",borderRadius:"9999px",background:"radial-gradient(closest-side, currentColor, transparent 72%)",opacity:0,filter:"blur(6px)",pointerEvents:"none"}}),e.jsx("div",{"data-bird":"mark",style:{position:"relative",width:"100%",height:"100%",backgroundColor:"currentColor",WebkitMaskImage:`url("${x}")`,maskImage:`url("${x}")`,WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskSize:"contain",maskSize:"contain"}})]})})}const I=3200,R=2.5,z=4200,J=3,Q=Math.PI/3,P=5200,A=.12,V=.34;function p(a,o){const s=a.querySelector('[data-bird="glow"]');s&&(s.style.opacity=o.toFixed(3))}function X(a){const o=d.useRef(new Set),s=d.useRef(0),c=d.useCallback(n=>{const i=o.current;if(n)i.add(n);else for(const t of i)t.isConnected||i.delete(t)},[]);return d.useEffect(()=>{if(!a)return;if(typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){for(const t of o.current)t.style.transform="",p(t,A);return}const n=performance.now();function i(t){const r=t-n,h=Math.sin(r/I*Math.PI*2)*R,F=Math.sin(r/z*Math.PI*2+Q)*J,u=(Math.sin(r/P*Math.PI*2)+1)/2,l=A+(V-A)*u;for(const b of o.current)b.style.transform=`translateY(${h.toFixed(2)}px) rotate(${F.toFixed(2)}deg)`,p(b,l);s.current=requestAnimationFrame(i)}return s.current=requestAnimationFrame(i),()=>{cancelAnimationFrame(s.current);for(const t of o.current)t.style.transform="",p(t,0)}},[a]),{registerEl:c}}function O({brandName:a="AMBIENT",position:o="bottom-right",initialOpen:s=!1,children:c,cssVariables:n,t:i,colorScheme:t,builderMode:r=!1,owlIdleLife:h=!1,onOpenChange:F}){const u=N(t),[l,b]=d.useState(s||r),k=X(h),B=()=>b(g=>{const m=!g;return F?.(m),m}),w=()=>{b(!1),F?.(!1)},E=o==="bottom-left",v=d.useMemo(()=>{const g=Object.fromEntries(Object.entries(n??{}).filter(([m,y])=>f[m]!==y));return{...u==="light"?S:f,...g,...r?{width:"100%",height:"100%"}:{}}},[n,u,r]);return e.jsxs("div",{className:["ambient-shell",`ambient-shell--${u}`].join(" "),style:v,children:[!r&&e.jsx("button",{type:"button",className:["ambient-shell__button",E&&"ambient-shell__button--left",l&&"ambient-shell__button--hidden"].filter(Boolean).join(" "),onClick:B,"aria-label":i?.("floating.open_widget")??"Open chat widget",tabIndex:l?-1:0,"aria-hidden":l,children:e.jsx(C,{size:64,registerEl:k.registerEl})}),e.jsxs("div",{className:["ambient-shell__panel",E&&!r&&"ambient-shell__panel--left",(l||r)&&"ambient-shell__panel--open"].filter(Boolean).join(" "),role:"dialog","aria-label":i?.("chat.widget_aria")??"Chat widget","aria-hidden":r?!1:!l,children:[e.jsxs("header",{className:"ambient-shell__header",children:[e.jsxs("div",{className:"ambient-shell__header-brand",children:[e.jsx(C,{size:40,registerEl:k.registerEl}),e.jsxs("div",{className:"ambient-shell__header-info",children:[e.jsx("h1",{className:"ambient-shell__brand-name",children:a}),e.jsx("p",{className:"ambient-shell__brand-tagline",children:i?.("header.brand_tagline_support")??"Support"})]})]}),!r&&e.jsx("button",{type:"button",className:"ambient-shell__header-btn",onClick:w,"aria-label":i?.("header.close_widget")??"Close widget",children:e.jsx(T,{size:20})})]}),e.jsx("main",{className:"ambient-shell__content",style:{containerName:"es-slot",containerType:"inline-size"},children:c})]})]})}function T({size:a=20}){return e.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})}export{C as BirdIcon,O as ThemeShell,f as darkVariables,S as lightVariables,L as manifest,X as useBirdAnimation};
|
|
2
|
+
//# sourceMappingURL=index-Bd_8PmPr-CgO1smBF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as e,e as i}from"../nexly.js";const n={slug:"dashboard-overview",name:"Dashboard Overview",version:"1.0.0",category:"content",configSchema:{},defaultConfig:{},dataContract:{serviceSlug:null,inputSchema:{type:"object",properties:{}}},fields:[],sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function r({i18n:a}){const s=a?.t??(t=>t);return e.jsx(i,{blockType:"dashboard-overview",children:e.jsxs("div",{className:"es-widget__dash",children:[e.jsx("div",{className:"es-widget__panel-header",children:e.jsx("div",{className:"es-widget__panel-header-left",children:e.jsx("h2",{className:"es-widget__panel-header-title",children:s("dashboard.title")})})}),e.jsx("div",{className:"es-widget__dash-content",children:e.jsx("p",{className:"es-widget__dash-empty",children:s("dashboard.select_tab")})})]})})}export{r as Component,n as manifest};
|
|
2
|
+
//# sourceMappingURL=index-BjHXOMPQ-Bt7j8evJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as h,j as e,Q as g,o as M}from"../nexly.js";import{C as L}from"./block-rating-BgOeTm52-CoiP5C2K.js";const A={slug:"social-insights",name:"Social Insights",version:"1.0.0",category:"data",requiredService:"social-insights",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},proMode:{type:"boolean",default:!1},maxEvents:{type:"number",default:2},showCrmPlan:{type:"boolean",default:!0},showConversationTips:{type:"boolean",default:!1}}},defaultConfig:{readAloudEnabled:!1,proMode:!1,maxEvents:2,showCrmPlan:!0,showConversationTips:!1},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"social-insights",inputSchema:{type:"object",properties:{eventIntelligence:{type:"object",properties:{scoredEvents:{type:"array",items:{type:"object",properties:{eventName:{type:"string"},conversionScore:{type:"number"}}}},recommendedEvent:{type:"object",properties:{eventName:{type:"string"},missionGoal:{type:"string"}}}}},eventMissionBrief:{type:"object",properties:{conversationOpeners:{type:"array",items:{type:"string"}},qualificationQuestions:{type:"array",items:{type:"string"}},positioningStatement:{type:"string"}}},crmExecutionPlan:{type:"object",properties:{leadPipelineStructure:{type:"string"},recommendedDailyOutreachVolume:{type:"number"},messageTemplates:{type:"object",properties:{firstContact:{type:"string"},followup48h:{type:"string"}}}}},weeklySocialStrategy:{type:"object",properties:{mainObjectiveThisWeek:{type:"string"},numericTarget:{type:"string"}}}}},previewDataOverride:{eventIntelligence:{scoredEvents:[{eventName:"Seoul Tech & Crypto Meetup",category:"Networking",conversionScore:92,whyRelevant:"High density of crypto-curious professionals matching your target profile.",targetProfile:"Tech professionals aged 28–42",priorityLevel:"high"},{eventName:"Gangnam Business Luncheon",category:"Business Networking",conversionScore:74,whyRelevant:"Established entrepreneurs with disposable income open to investment opportunities.",targetProfile:"SME owners and executives",priorityLevel:"medium"},{eventName:"Online MLM Success Webinar",category:"Industry",conversionScore:61,whyRelevant:"Pre-qualified audience already interested in network marketing.",targetProfile:"MLM beginners and career changers",priorityLevel:"medium"}],recommendedEvent:{eventName:"Seoul Tech & Crypto Meetup",missionGoal:"Connect with 5 warm prospects and set 2 follow-up calls",contactsTarget:5,followupTarget:2}},eventMissionBrief:{conversationOpeners:["What brings you to the crypto/tech space?","Have you been following the recent Bitcoin surge?"],qualificationQuestions:["Are you currently looking for passive income opportunities?","What's your experience with network marketing?"],positioningStatement:"I help people build financial freedom through crypto-backed network marketing.",whatNotToSay:["Don't mention specific income figures in the first meeting."]},crmExecutionPlan:{leadPipelineStructure:"Prospect → First Contact → Follow-up (48h) → Meeting → Close",recommendedDailyOutreachVolume:8,followupIntervalsHours:48,messageTemplates:{firstContact:"Hi [Name], great meeting you at the Seoul meetup! I'd love to share something exciting with you — when's a good time for a 15-min call?",followup48h:"Hi [Name], just following up on my message. I have some insights about [topic we discussed] that I think you'll find valuable.",postEventMessage:"Thanks for connecting at [event]! Let me know if you're open to exploring what I mentioned."}},weeklySocialStrategy:{mainObjectiveThisWeek:"Qualify 10 new prospects from event pipeline",numericTarget:"10 new prospects, 3 follow-up calls",structureAlignmentGoal:"Focus on right leg to balance binary structure",riskMitigationFocus:"Avoid cap waste by ensuring team volume is distributed evenly"}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"proMode",type:"toggle",label:"Pro mode (full strategy details)",default:!1,group:"Display"},{id:"maxEvents",type:"range",label:"Max events shown",default:2,min:1,max:5,step:1,group:"Display"},{id:"showCrmPlan",type:"toggle",label:"Show CRM outreach plan",default:!0,group:"Display"},{id:"showConversationTips",type:"toggle",label:"Show conversation tips (pro)",default:!1,group:"Display"}],events:{emits:[{name:"social:eventSelected",description:"User selected an event to attend"},{name:"social:templateCopied",description:"User copied a message template"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"social:refresh",description:"Force refresh social insights"}]},supportedPlacements:["main","sidebar"]},j={high:0,medium:1,low:2};function v({text:s,prefix:a,onCopy:l,t:o}){const[t,d]=h.useState(!1),p=h.useRef(null),u=h.useCallback(()=>{l(s),d(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>d(!1),1200)},[l,s]);return h.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),e.jsxs("div",{className:`es-si__copyable${t?" es-si__copyable--copied":""}`,onClick:u,role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),u())},"aria-label":o(t?"social_insights.copied":"social_insights.tap_to_copy"),title:o("social_insights.tap_to_copy"),children:[a&&e.jsx("span",{className:"es-si__copyable-prefix",children:a}),e.jsx("span",{className:"es-si__copyable-text",children:s})]})}function P({total:s,high:a,medium:l,t:o}){return e.jsxs("div",{className:"es-si__stats",children:[e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n",children:s}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_events")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--high",children:a}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_high")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--medium",children:l}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_medium")})]})]})}function I({card:s,selected:a,onSelect:l,t:o}){return e.jsxs("div",{className:`es-si__row${a?" es-si__row--active":""}`,onClick:l,role:"button",tabIndex:0,"aria-pressed":a,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),l())},children:[e.jsx("span",{className:`es-si__dot es-si__dot--${s.priorityLevel}`,role:"img","aria-label":o(`social_insights.priority_${s.priorityLevel}`)}),e.jsxs("div",{className:"es-si__row-body",children:[e.jsx("div",{className:"es-si__row-name",children:s.eventName}),e.jsx("div",{className:"es-si__row-why",children:s.whyThisEventMatters})]}),e.jsx("span",{className:"es-si__row-go","aria-hidden":"true",children:o("social_insights.focus_cta")})]})}function D({card:s,onCopy:a,onTalkToGaio:l,hasChatView:o,t}){const d=s.conversationOpeners?.[0];return e.jsxs("div",{className:"es-si__focus",children:[e.jsxs("div",{className:"es-si__focus-tag",children:[e.jsx("span",{"aria-hidden":"true",children:"★"})," ",t("social_insights.focus_play")," ·"," ",e.jsx("span",{className:"es-si__focus-cat",children:s.category})]}),e.jsx("div",{className:"es-si__focus-name",children:s.eventName}),e.jsx("div",{className:"es-si__focus-profile",children:s.targetProfile}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"👁"})," ",t("social_insights.spot_them")]}),e.jsx("div",{className:"es-si__detail-text es-si__detail-text--muted",children:s.howToSpotThem}),d&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.best_opener")]}),e.jsx(v,{text:d,onCopy:a,t})]}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"🌉"})," ",t("social_insights.bridge")]}),e.jsx(v,{text:s.bridgeLine,onCopy:a,t}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"📩"})," ",t("social_insights.followup_48h")]}),e.jsx(v,{text:s.followUp48h,onCopy:a,t}),e.jsxs("div",{className:"es-si__focus-warn",children:[e.jsx("div",{className:"es-si__detail-label es-si__detail-label--warn",children:t("social_insights.do_not_say")}),e.jsx("div",{className:"es-si__detail-text",children:s.doNotSay})]}),o&&e.jsx("div",{className:"es-si__gaio-row",children:e.jsxs("button",{type:"button",className:"es-si__gaio-link","aria-label":t("social_insights.gaio.aria",{event:s.eventName}),onClick:()=>l(s),children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.talk_to_gaio")]})})]})}function F({data:s,actions:a,metadata:l,i18n:o,baseUrl:t,externalContext:d,auth:p,previewMode:u}){const i=o?.t??(n=>n),_=s,b=s.promptLogId,w=d?.apiKey??"",N=d?.hasChatView===!0,[y,k]=h.useState(0),C=h.useCallback(n=>{navigator.clipboard?.writeText(n).catch(()=>{}),a.emit("social:templateCopied",{text:n})},[a]),S=h.useCallback(n=>{const c=n.eventName;a.emit("chat:draft",{message:i("social_insights.gaio_draft",{event:c,why:n.whyThisEventMatters}),autoSend:!1,quickChips:[{label:i("social_insights.gaio.chip.plan"),message:i("social_insights.gaio.chip.plan_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.opener"),message:i("social_insights.gaio.chip.opener_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.target"),message:i("social_insights.gaio.chip.target_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.other"),message:"",autoSend:!1}]})},[a,i]);if(!_.events&&!s.error)return e.jsx(g,{blockType:"social-insights",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-si__loading",children:l?.dataQuality==="none"?i("social_insights.sign_in_prompt"):i("social_insights.gathering_events")})})});if(s.error)return e.jsx(g,{blockType:"social-insights",error:M(s.error)});const r=[..._.events??[]].sort((n,c)=>j[n.priorityLevel]-j[c.priorityLevel]),m=_.quietWeek,T=r.filter(n=>n.priorityLevel==="high").length,E=r.filter(n=>n.priorityLevel==="medium").length,x=y<r.length?y:0,f=r[x];return e.jsx(g,{blockType:"social-insights",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx(L,{promptLogId:b,baseUrl:t,apiKey:w,jwt:p?.jwt,previewMode:u,t:i}),r.length>0&&e.jsx(P,{total:r.length,high:T,medium:E,t:i}),r.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__section-head",children:[e.jsx("span",{className:"es-si__section-title",children:i("social_insights.ranked_events")}),e.jsx("span",{className:"es-si__section-hint",children:i("social_insights.tap_to_focus")})]}),e.jsx("div",{className:"es-si__list",role:"list","aria-label":i("social_insights.ranked_events"),children:r.map((n,c)=>e.jsx(I,{card:n,selected:c===x,onSelect:()=>k(c),t:i},`${n.eventName}-${c}`))}),f&&e.jsx(D,{card:f,onCopy:C,onTalkToGaio:S,hasChatView:N,t:i})]}),r.length===0&&m&&e.jsxs("div",{className:"es-si__quiet-week",children:[e.jsx("div",{className:"es-si__quiet-week-headline",children:m.headline}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.downline_focus")}),e.jsx("div",{className:"es-si__detail-text",children:m.downlineActivationTarget})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.warm_network_action")}),e.jsx("div",{className:"es-si__detail-text",children:m.warmNetworkAction})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.online_conversation")}),e.jsx("div",{className:"es-si__detail-text",children:m.onlineConversationPrompt})]})]}),_.complianceNote&&(r.length>0||m)&&e.jsxs("div",{className:"es-si__compliance",role:"note",children:[e.jsx("span",{className:"es-si__compliance-icon","aria-hidden":"true",children:"⚠"}),e.jsxs("span",{className:"es-si__compliance-text",children:[e.jsxs("span",{className:"es-si__compliance-label",children:[i("social_insights.compliance_label"),":"]})," ",_.complianceNote]})]})]})})}export{F as Component,A as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as h,j as e,e as g,l as M}from"../nexly.js";import{C as L}from"./block-rating-CAVRRYuG-CQMNokIy.js";const A={slug:"social-insights",name:"Social Insights",version:"1.0.0",category:"data",requiredService:"social-insights",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},proMode:{type:"boolean",default:!1},maxEvents:{type:"number",default:2},showCrmPlan:{type:"boolean",default:!0},showConversationTips:{type:"boolean",default:!1}}},defaultConfig:{readAloudEnabled:!1,proMode:!1,maxEvents:2,showCrmPlan:!0,showConversationTips:!1},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"social-insights",inputSchema:{type:"object",properties:{eventIntelligence:{type:"object",properties:{scoredEvents:{type:"array",items:{type:"object",properties:{eventName:{type:"string"},conversionScore:{type:"number"}}}},recommendedEvent:{type:"object",properties:{eventName:{type:"string"},missionGoal:{type:"string"}}}}},eventMissionBrief:{type:"object",properties:{conversationOpeners:{type:"array",items:{type:"string"}},qualificationQuestions:{type:"array",items:{type:"string"}},positioningStatement:{type:"string"}}},crmExecutionPlan:{type:"object",properties:{leadPipelineStructure:{type:"string"},recommendedDailyOutreachVolume:{type:"number"},messageTemplates:{type:"object",properties:{firstContact:{type:"string"},followup48h:{type:"string"}}}}},weeklySocialStrategy:{type:"object",properties:{mainObjectiveThisWeek:{type:"string"},numericTarget:{type:"string"}}}}},previewDataOverride:{eventIntelligence:{scoredEvents:[{eventName:"Seoul Tech & Crypto Meetup",category:"Networking",conversionScore:92,whyRelevant:"High density of crypto-curious professionals matching your target profile.",targetProfile:"Tech professionals aged 28–42",priorityLevel:"high"},{eventName:"Gangnam Business Luncheon",category:"Business Networking",conversionScore:74,whyRelevant:"Established entrepreneurs with disposable income open to investment opportunities.",targetProfile:"SME owners and executives",priorityLevel:"medium"},{eventName:"Online MLM Success Webinar",category:"Industry",conversionScore:61,whyRelevant:"Pre-qualified audience already interested in network marketing.",targetProfile:"MLM beginners and career changers",priorityLevel:"medium"}],recommendedEvent:{eventName:"Seoul Tech & Crypto Meetup",missionGoal:"Connect with 5 warm prospects and set 2 follow-up calls",contactsTarget:5,followupTarget:2}},eventMissionBrief:{conversationOpeners:["What brings you to the crypto/tech space?","Have you been following the recent Bitcoin surge?"],qualificationQuestions:["Are you currently looking for passive income opportunities?","What's your experience with network marketing?"],positioningStatement:"I help people build financial freedom through crypto-backed network marketing.",whatNotToSay:["Don't mention specific income figures in the first meeting."]},crmExecutionPlan:{leadPipelineStructure:"Prospect → First Contact → Follow-up (48h) → Meeting → Close",recommendedDailyOutreachVolume:8,followupIntervalsHours:48,messageTemplates:{firstContact:"Hi [Name], great meeting you at the Seoul meetup! I'd love to share something exciting with you — when's a good time for a 15-min call?",followup48h:"Hi [Name], just following up on my message. I have some insights about [topic we discussed] that I think you'll find valuable.",postEventMessage:"Thanks for connecting at [event]! Let me know if you're open to exploring what I mentioned."}},weeklySocialStrategy:{mainObjectiveThisWeek:"Qualify 10 new prospects from event pipeline",numericTarget:"10 new prospects, 3 follow-up calls",structureAlignmentGoal:"Focus on right leg to balance binary structure",riskMitigationFocus:"Avoid cap waste by ensuring team volume is distributed evenly"}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"proMode",type:"toggle",label:"Pro mode (full strategy details)",default:!1,group:"Display"},{id:"maxEvents",type:"range",label:"Max events shown",default:2,min:1,max:5,step:1,group:"Display"},{id:"showCrmPlan",type:"toggle",label:"Show CRM outreach plan",default:!0,group:"Display"},{id:"showConversationTips",type:"toggle",label:"Show conversation tips (pro)",default:!1,group:"Display"}],events:{emits:[{name:"social:eventSelected",description:"User selected an event to attend"},{name:"social:templateCopied",description:"User copied a message template"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"social:refresh",description:"Force refresh social insights"}]},supportedPlacements:["main","sidebar"]},j={high:0,medium:1,low:2};function v({text:s,prefix:a,onCopy:l,t:o}){const[t,d]=h.useState(!1),p=h.useRef(null),u=h.useCallback(()=>{l(s),d(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>d(!1),1200)},[l,s]);return h.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),e.jsxs("div",{className:`es-si__copyable${t?" es-si__copyable--copied":""}`,onClick:u,role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),u())},"aria-label":o(t?"social_insights.copied":"social_insights.tap_to_copy"),title:o("social_insights.tap_to_copy"),children:[a&&e.jsx("span",{className:"es-si__copyable-prefix",children:a}),e.jsx("span",{className:"es-si__copyable-text",children:s})]})}function P({total:s,high:a,medium:l,t:o}){return e.jsxs("div",{className:"es-si__stats",children:[e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n",children:s}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_events")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--high",children:a}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_high")})]}),e.jsxs("div",{className:"es-si__stat",children:[e.jsx("div",{className:"es-si__stat-n es-si__stat-n--medium",children:l}),e.jsx("div",{className:"es-si__stat-l",children:o("social_insights.stat_medium")})]})]})}function I({card:s,selected:a,onSelect:l,t:o}){return e.jsxs("div",{className:`es-si__row${a?" es-si__row--active":""}`,onClick:l,role:"button",tabIndex:0,"aria-pressed":a,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),l())},children:[e.jsx("span",{className:`es-si__dot es-si__dot--${s.priorityLevel}`,role:"img","aria-label":o(`social_insights.priority_${s.priorityLevel}`)}),e.jsxs("div",{className:"es-si__row-body",children:[e.jsx("div",{className:"es-si__row-name",children:s.eventName}),e.jsx("div",{className:"es-si__row-why",children:s.whyThisEventMatters})]}),e.jsx("span",{className:"es-si__row-go","aria-hidden":"true",children:o("social_insights.focus_cta")})]})}function D({card:s,onCopy:a,onTalkToGaio:l,hasChatView:o,t}){const d=s.conversationOpeners?.[0];return e.jsxs("div",{className:"es-si__focus",children:[e.jsxs("div",{className:"es-si__focus-tag",children:[e.jsx("span",{"aria-hidden":"true",children:"★"})," ",t("social_insights.focus_play")," ·"," ",e.jsx("span",{className:"es-si__focus-cat",children:s.category})]}),e.jsx("div",{className:"es-si__focus-name",children:s.eventName}),e.jsx("div",{className:"es-si__focus-profile",children:s.targetProfile}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"👁"})," ",t("social_insights.spot_them")]}),e.jsx("div",{className:"es-si__detail-text es-si__detail-text--muted",children:s.howToSpotThem}),d&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.best_opener")]}),e.jsx(v,{text:d,onCopy:a,t})]}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"🌉"})," ",t("social_insights.bridge")]}),e.jsx(v,{text:s.bridgeLine,onCopy:a,t}),e.jsxs("div",{className:"es-si__detail-label",children:[e.jsx("span",{"aria-hidden":"true",children:"📩"})," ",t("social_insights.followup_48h")]}),e.jsx(v,{text:s.followUp48h,onCopy:a,t}),e.jsxs("div",{className:"es-si__focus-warn",children:[e.jsx("div",{className:"es-si__detail-label es-si__detail-label--warn",children:t("social_insights.do_not_say")}),e.jsx("div",{className:"es-si__detail-text",children:s.doNotSay})]}),o&&e.jsx("div",{className:"es-si__gaio-row",children:e.jsxs("button",{type:"button",className:"es-si__gaio-link","aria-label":t("social_insights.gaio.aria",{event:s.eventName}),onClick:()=>l(s),children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",t("social_insights.talk_to_gaio")]})})]})}function F({data:s,actions:a,metadata:l,i18n:o,baseUrl:t,externalContext:d,auth:p,previewMode:u}){const i=o?.t??(n=>n),_=s,b=s.promptLogId,w=d?.apiKey??"",N=d?.hasChatView===!0,[y,k]=h.useState(0),C=h.useCallback(n=>{navigator.clipboard?.writeText(n).catch(()=>{}),a.emit("social:templateCopied",{text:n})},[a]),S=h.useCallback(n=>{const c=n.eventName;a.emit("chat:draft",{message:i("social_insights.gaio_draft",{event:c,why:n.whyThisEventMatters}),autoSend:!1,quickChips:[{label:i("social_insights.gaio.chip.plan"),message:i("social_insights.gaio.chip.plan_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.opener"),message:i("social_insights.gaio.chip.opener_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.target"),message:i("social_insights.gaio.chip.target_msg",{event:c}),autoSend:!0},{label:i("social_insights.gaio.chip.other"),message:"",autoSend:!1}]})},[a,i]);if(!_.events&&!s.error)return e.jsx(g,{blockType:"social-insights",children:e.jsx("div",{className:"es-block__body",children:e.jsx("div",{className:"es-si__loading",children:l?.dataQuality==="none"?i("social_insights.sign_in_prompt"):i("social_insights.gathering_events")})})});if(s.error)return e.jsx(g,{blockType:"social-insights",error:M(s.error)});const r=[..._.events??[]].sort((n,c)=>j[n.priorityLevel]-j[c.priorityLevel]),m=_.quietWeek,T=r.filter(n=>n.priorityLevel==="high").length,E=r.filter(n=>n.priorityLevel==="medium").length,x=y<r.length?y:0,f=r[x];return e.jsx(g,{blockType:"social-insights",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx(L,{promptLogId:b,baseUrl:t,apiKey:w,jwt:p?.jwt,previewMode:u,t:i}),r.length>0&&e.jsx(P,{total:r.length,high:T,medium:E,t:i}),r.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"es-si__section-head",children:[e.jsx("span",{className:"es-si__section-title",children:i("social_insights.ranked_events")}),e.jsx("span",{className:"es-si__section-hint",children:i("social_insights.tap_to_focus")})]}),e.jsx("div",{className:"es-si__list",role:"list","aria-label":i("social_insights.ranked_events"),children:r.map((n,c)=>e.jsx(I,{card:n,selected:c===x,onSelect:()=>k(c),t:i},`${n.eventName}-${c}`))}),f&&e.jsx(D,{card:f,onCopy:C,onTalkToGaio:S,hasChatView:N,t:i})]}),r.length===0&&m&&e.jsxs("div",{className:"es-si__quiet-week",children:[e.jsx("div",{className:"es-si__quiet-week-headline",children:m.headline}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.downline_focus")}),e.jsx("div",{className:"es-si__detail-text",children:m.downlineActivationTarget})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.warm_network_action")}),e.jsx("div",{className:"es-si__detail-text",children:m.warmNetworkAction})]}),e.jsxs("div",{className:"es-si__detail-section",children:[e.jsx("div",{className:"es-si__detail-label",children:i("social_insights.online_conversation")}),e.jsx("div",{className:"es-si__detail-text",children:m.onlineConversationPrompt})]})]}),_.complianceNote&&(r.length>0||m)&&e.jsxs("div",{className:"es-si__compliance",role:"note",children:[e.jsx("span",{className:"es-si__compliance-icon","aria-hidden":"true",children:"⚠"}),e.jsxs("span",{className:"es-si__compliance-text",children:[e.jsxs("span",{className:"es-si__compliance-label",children:[i("social_insights.compliance_label"),":"]})," ",_.complianceNote]})]})]})})}export{F as Component,A as manifest};
|
|
2
|
+
//# sourceMappingURL=index-BwnCq3yC-LScXPMbE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as u,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as u,j as e,e as c,l as j}from"../nexly.js";const f={slug:"recognition-milestone-hub",name:"Recognition & Milestone Hub",version:"1.0.0",category:"interactive",requiredService:"recognition-milestone-hub",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"recognition-milestone-hub",inputSchema:{type:"object",properties:{latestAchievement:{type:"object",properties:{badge:{type:"string"},label:{type:"string"},date:{type:"string"}}},nextMilestone:{type:"object",properties:{label:{type:"string"},progressPercent:{type:"number"}}},achievementHistory:{type:"array",items:{type:"object",properties:{badge:{type:"string"},label:{type:"string"},date:{type:"string"}}}},milestoneTimeline:{type:"array",items:{type:"object",properties:{label:{type:"string"},achieved:{type:"boolean"},date:{type:"string"}}}},celebrationMessage:{type:"string"},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",latestAchievement:{badge:"🥇",label:"First Sale Achieved",date:"2026-04-04"},nextMilestone:{label:"Silver Rank",progressPercent:68},celebrationMessage:"Amazing work hitting your first sale! You're already 68% of the way to Silver Rank. Focus on 2 more referrals this week to cross the threshold.",achievementHistory:[{badge:"🥇",label:"First Sale Achieved",date:"2026-04-04"},{badge:"🚀",label:"Team of 3 Built",date:"2026-03-28"},{badge:"⭐",label:"Profile Completed",date:"2026-03-20"}],milestoneTimeline:[{label:"Bronze Rank",achieved:!0,date:"2026-03-20"},{label:"Silver Rank",achieved:!1},{label:"Gold Rank",achieved:!1},{label:"Platinum Rank",achieved:!1}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — badge + next milestone card",value:"basic"},{label:"Pro — full history, timeline & AI celebration",value:"pro"}],group:"Display"}],events:{emits:[{name:"rmh:achievementCopied",description:"User copied an achievement to clipboard"}],listens:[{name:"rmh:refresh",description:"Force refresh recognition data"}]}};function k({data:i,config:g,actions:y,metadata:x,i18n:v}){const a=v?.t??(s=>s),o=g.mode??i.mode??"basic",r=i.latestAchievement,l=i.nextMilestone,m=i.achievementHistory??[],h=i.milestoneTimeline??[],d=i.celebrationMessage,[p,_]=u.useState("idle");if(!r&&!i.error)return e.jsx(c,{blockType:"recognition-milestone-hub",children:e.jsx("div",{className:"es-block__body es-rmh__body",children:e.jsxs("div",{className:"es-rmh__hero",style:{opacity:.5},children:[e.jsx("div",{className:"es-rmh__badge-circle","aria-hidden":"true",children:"🏆"}),e.jsxs("div",{className:"es-rmh__hero-info",children:[e.jsx("span",{className:"es-rmh__hero-eyebrow",children:a("recognition.title")}),e.jsx("span",{className:"es-rmh__hero-label",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:x?.dataQuality==="none"?a("recognition.signin_prompt"):a("recognition.empty")})]})]})})});if(i.error)return e.jsx(c,{blockType:"recognition-milestone-hub",error:j(i.error)});const n=Math.min(100,Math.max(0,l?.progressPercent??0));async function b(s){const t=`${s.badge} ${s.label} — ${s.date}`;try{await navigator.clipboard.writeText(t),_("copied"),y.emit("rmh:achievementCopied",{label:s.label}),setTimeout(()=>_("idle"),2e3)}catch{}}return e.jsx(c,{blockType:"recognition-milestone-hub",children:e.jsxs("div",{className:"es-block__body es-rmh__body",children:[r&&e.jsxs("div",{className:"es-rmh__hero",children:[e.jsx("div",{className:"es-rmh__badge-circle","aria-hidden":"true",children:r.badge}),e.jsxs("div",{className:"es-rmh__hero-info",children:[e.jsx("span",{className:"es-rmh__hero-eyebrow",children:a("recognition.latest_achievement")}),e.jsx("span",{className:"es-rmh__hero-label",children:r.label}),e.jsx("span",{className:"es-rmh__hero-date",children:r.date})]}),e.jsx("button",{className:`es-rmh__copy-btn${p==="copied"?" es-rmh__copy-btn--copied":""}`,onClick:()=>b(r),"aria-label":a("recognition.copy_achievement_aria"),title:a("common.copy_to_clipboard"),children:p==="copied"?"✓":"⎘"})]}),l&&e.jsxs("div",{className:"es-rmh__next-milestone",children:[e.jsxs("div",{className:"es-rmh__next-header",children:[e.jsx("span",{className:"es-rmh__next-eyebrow",children:a("recognition.next_milestone")}),e.jsxs("span",{className:"es-rmh__next-percent",children:[n,"%"]})]}),e.jsx("span",{className:"es-rmh__next-label",children:l.label}),e.jsx("div",{className:"es-rmh__progress-bar",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a("recognition.milestone_progress_aria",{percent:n,label:l.label}),children:e.jsx("div",{className:"es-rmh__progress-fill",style:{width:`${n}%`}})})]}),o==="pro"&&d&&e.jsxs("div",{className:"es-rmh__celebration",children:[e.jsx("span",{className:"es-rmh__celebration-label",children:a("recognition.ai_coach_label")}),e.jsx("p",{className:"es-rmh__celebration-text",children:d})]}),o==="pro"&&m.length>0&&e.jsxs("div",{className:"es-rmh__section",children:[e.jsx("h3",{className:"es-rmh__section-title",children:a("recognition.achievement_history")}),e.jsx("ul",{className:"es-rmh__history-list",role:"list",children:m.map((s,t)=>e.jsxs("li",{className:"es-rmh__history-item",children:[e.jsx("span",{className:"es-rmh__history-badge","aria-hidden":"true",children:s.badge}),e.jsx("span",{className:"es-rmh__history-label",children:s.label}),e.jsx("span",{className:"es-rmh__history-date",children:s.date}),e.jsx("button",{className:"es-rmh__history-copy",onClick:()=>b(s),"aria-label":a("recognition.copy_item_aria",{label:s.label}),title:a("common.copy_to_clipboard"),children:"⎘"})]},t))})]}),o==="pro"&&h.length>0&&e.jsxs("div",{className:"es-rmh__section",children:[e.jsx("h3",{className:"es-rmh__section-title",children:a("recognition.milestone_timeline")}),e.jsx("ol",{className:"es-rmh__timeline","aria-label":a("recognition.milestone_progression_aria"),children:h.map((s,t)=>e.jsxs("li",{className:`es-rmh__timeline-item${s.achieved?" es-rmh__timeline-item--achieved":""}`,children:[e.jsx("span",{className:"es-rmh__timeline-dot","aria-hidden":"true",children:s.achieved?"✓":"○"}),e.jsx("span",{className:"es-rmh__timeline-label",children:s.label}),s.date&&e.jsx("span",{className:"es-rmh__timeline-date",children:s.date})]},t))})]})]})})}export{k as Component,f as manifest};
|
|
2
|
+
//# sourceMappingURL=index-BzVJMW3i-Bhh8_8Oh.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,
|
|
1
|
+
import{r as o,K as T,j as e,e as R}from"../nexly.js";import{x as oe,s as me,c as de,a as ue}from"./allowed-elements-C0OfX2zF-DIBV8lKu.js";import{p as he,c as _e}from"./external-url-JbUnX7Da-rLiy7c9v.js";import{f as pe}from"./assistant-link-components-gMuMhmaU-rHpeX4O6.js";import{C as ge}from"./block-rating-CAVRRYuG-CQMNokIy.js";import"./_commonjsHelpers-C6fGbg64-BC8KDfbh.js";import"./assistant-link-policy-DlGAtyk7-By6jpR50.js";const Te={slug:"market-insights",name:"Market Insights",version:"2.3.0",category:"data",requiredService:"crypto-intel",configSchema:{properties:{proMode:{type:"boolean",default:!1},showFearGreed:{type:"boolean",default:!0},showNews:{type:"boolean",default:!0},showBtcPrice:{type:"boolean",default:!0},newsLimit:{type:"number",default:5},confirmExternalLinks:{type:"boolean",default:!0}}},defaultConfig:{proMode:!1,showFearGreed:!0,showNews:!0,showBtcPrice:!0,newsLimit:5,confirmExternalLinks:!0},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},dataContract:{serviceSlug:"crypto-intel",inputSchema:{type:"object",properties:{fearGreedIndex:{type:"number"},fearGreedLabel:{type:"string"},btcPrice:{type:"number"},btcChange24h:{type:"number"},dominance:{type:"number"},news:{type:"array",items:{type:"object",properties:{title:{type:"string"},source:{type:"string"},publishedAt:{type:"string"},url:{type:"string"},tagline:{type:"string"},articleSummary:{type:"string"}}}},summary:{type:"string"}},required:["summary"]},previewDataOverride:{fearGreedIndex:72,fearGreedLabel:"Greed",btcPrice:68900,btcChange24h:3.15,dominance:54.2,news:[{title:"Bitcoin surges past $68K on strong ETF inflows",source:"CoinDesk",publishedAt:"2026-04-03T08:00:00Z",url:"https://example.com/news/btc-surges"},{title:"Ethereum developers confirm next upgrade timeline",source:"The Block",publishedAt:"2026-04-03T06:30:00Z",url:"https://example.com/news/eth-upgrade"},{title:"DeFi total value locked hits new all-time high",source:"DeFiLlama",publishedAt:"2026-04-02T22:00:00Z",url:"https://example.com/news/defi-tvl"},{title:"South Korea advances crypto regulation framework",source:"Decrypt",publishedAt:"2026-04-02T18:00:00Z",url:"https://example.com/news/sk-crypto"},{title:"MicroStrategy adds 1,000 BTC to corporate treasury",source:"Bloomberg",publishedAt:"2026-04-02T14:00:00Z",url:"https://example.com/news/mstr-btc"}],summary:`Market Sentiment: 72 (Greed)
|
|
2
2
|
|
|
3
|
-
BTC: $68,900 | 24h: +3.15% | Dominance: 54.2%`}},fields:[{id:"proMode",type:"toggle",label:"Pro mode (full analysis with context)",default:!1,group:"Display"},{id:"showFearGreed",type:"toggle",label:"Show Fear & Greed index",default:!0,group:"Display"},{id:"showBtcPrice",type:"toggle",label:"Show BTC price",default:!0,group:"Display"},{id:"showNews",type:"toggle",label:"Show news feed",default:!0,group:"Display"},{id:"newsLimit",type:"range",label:"Max news items",default:5,min:1,max:15,step:1,group:"Display"},{id:"confirmExternalLinks",type:"toggle",label:"Confirm before opening external news links",default:!0,group:"Display"}],events:{emits:[{name:"market:newsClicked",description:"User clicked on a news headline"},{name:"market:sentimentViewed",description:"Fear & Greed index was viewed"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"market:refresh",description:"Force refresh market data"}]},supportedPlacements:["main","sidebar"]},xe=1e4,D={price:null,change24h:null,ts:null,live:!1};function ye({baseUrl:a,apiKey:n,enabled:l=!0,intervalMs:c=xe}){const[_,d]=o.useState(D),x=o.useRef(a),S=o.useRef(n);return x.current=a,S.current=n,o.useEffect(()=>{if(!l){d(D);return}let t=!1;const M=async()=>{if(typeof document<"u"&&document.hidden||typeof fetch!="function")return;const k=S.current,[$,y]=await T(fetch(`${x.current}/api/widget/market/btc-price`,{headers:k?{"X-API-Key":k}:void 0}));if(t)return;if(y||!$.ok){d(u=>u.live?D:u);return}const[g,b]=await T($.json());if(!t){if(b||g?.price==null){d(u=>u.live?D:u);return}d({price:g.price,change24h:g.change24h??null,ts:g.ts??null,live:!0})}};M();const v=setInterval(()=>{M()},c);return()=>{t=!0,clearInterval(v)}},[l,c]),_}function W(a){return _e(a)}function R(a){return he(a)}const be="var(--es-color-warning, #9C5300)";function we(a){return a<=25?"var(--es-color-error, #AD2C26)":a<=55?be:"var(--es-color-success, #00672B)"}function fe(a){return a==null?"--":`$${a.toLocaleString("en-US",{maximumFractionDigits:0})}`}function ve(a){if(a==null)return{text:"--",positive:!0};const n=a>=0;return{text:`${n?"+":""}${a.toFixed(1)}%`,positive:n}}function H(a){return a==null?"--":a>=1e12?`$${(a/1e12).toFixed(2)}T`:a>=1e9?`$${(a/1e9).toFixed(1)}B`:a>=1e6?`$${(a/1e6).toFixed(0)}M`:`$${a.toLocaleString()}`}function ke(a){if(!a)return"";const n=Date.now()-new Date(a).getTime(),l=Math.floor(n/6e4);if(l<60)return`${l}m`;const c=Math.floor(l/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function je(){return e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function Ge({data:a,config:n,i18n:l,actions:c,baseUrl:_,externalContext:d,auth:x,previewMode:S}){const t=l?.t??(s=>s),M=a.promptLogId,v=n.proMode??!1,k=n.showFearGreed??!0,$=v&&(n.showNews??!0),y=n.showBtcPrice??!0,g=n.confirmExternalLinks??!0,[b,u]=o.useState(null),X=n.newsLimit??5,j=d?.apiKey??"",J=d?.hasChatView===!0,[G,Y]=o.useState(()=>new Set),[B,L]=o.useState(()=>new Map),w=a.fearGreedIndex,ee=a.fearGreedLabel,P=(a.news??[]).slice(0,X),Z=a.btcPrice,se=a.btcChange24h,A=a.btcVolume,E=a.btcMarketCap,I=a.dominance,K=a.aiSummary,q=w!=null?we(w):void 0,F=ye({baseUrl:_,apiKey:j,enabled:y}),U=F.live&&F.price!=null,V=U?F.price:Z,ae=U?F.change24h:se,O=ve(ae),N=a._errors??[],te=w!=null||Z!=null||P.length>0,ie=typeof K=="string"&&K.trim().length>0,z=o.useCallback(async(s,i)=>{L(C=>{const p=new Map(C);return p.set(s,{status:"loading"}),p});const[m,h]=await T(fetch(`${_}/api/widget/crypto-intel/article-summary`,{method:"POST",headers:{"Content-Type":"application/json",...j?{"X-API-Key":j}:{}},body:JSON.stringify({title:i.title,url:i.url,source:i.source,publishedAt:i.publishedAt,tagline:i.tagline})})),r=()=>L(C=>{const p=new Map(C);return p.set(s,{status:"error"}),p});if(h||!m.ok)return r();const[f,ce]=await T(m.json());if(ce||!f?.summary)return r();L(C=>{const p=new Map(C);return p.set(s,{status:"ready",text:f.summary}),p})},[j,_]),re=o.useCallback((s,i)=>{if(Y(h=>{const r=new Set(h);return r.has(s)?(r.delete(s),r):(r.add(s),r)}),G.has(s)||B.has(s))return;const m=i.articleSummary?.trim();if(m){L(h=>{const r=new Map(h);return r.set(s,{status:"ready",text:m}),r});return}z(s,i)},[G,B,z]),ne=o.useCallback(s=>{c.emit("chat:draft",{message:t("market_insights.gaio_draft",{title:s.title,source:s.source??"",url:s.url??""}),autoSend:!1,quickChips:[{label:t("market_insights.chip.analyze"),message:t("market_insights.chip.analyze_msg",{url:s.url??""}),autoSend:!0},{label:t("market_insights.chip.summarize"),message:t("market_insights.chip.summarize_msg",{url:s.url??""}),autoSend:!0},{label:t("market_insights.chip.conclusions"),message:t("market_insights.chip.conclusions_msg",{url:s.url??""}),autoSend:!0},{label:t("market_insights.chip.other"),message:"",autoSend:!1}]})},[c,t]),le=o.useCallback(s=>{const i=R(s.url);if(!i)return;if(g){u({url:i,source:s.source||W(i)});return}const m=window.open(i,"_blank","noopener,noreferrer");m&&(m.opener=null)},[g]);return te?e.jsxs(Q,{blockType:"market-insights",children:[e.jsxs("div",{className:"es-block__body",children:[e.jsx(ge,{promptLogId:M,baseUrl:_,apiKey:j,jwt:x?.jwt,previewMode:S,t}),(y||k)&&e.jsxs("div",{className:"es-mi__header",children:[y&&V!=null&&e.jsxs("div",{className:"es-mi__card es-mi__card--btc",children:[e.jsx("span",{className:"es-mi__icon","aria-hidden":"true",children:"B"}),e.jsxs("div",{className:"es-mi__card-label",children:[t("market_insights.bitcoin_label"),U&&e.jsxs("span",{className:"es-mi__live",title:t("market_insights.live_aria"),children:[e.jsx("span",{className:"es-mi__live-dot","aria-hidden":"true"}),t("market_insights.live")]})]}),e.jsx("div",{className:"es-mi__card-value",children:fe(V)}),e.jsx("div",{className:`es-mi__delta ${O.positive?"es-mi__delta--up":"es-mi__delta--down"}`,children:O.text})]}),k&&w!=null&&e.jsxs("div",{className:"es-mi__card es-mi__card--fg",children:[e.jsx("span",{className:"es-mi__icon","aria-hidden":"true",children:"FG"}),e.jsx("div",{className:"es-mi__card-label",children:"Fear & Greed"}),e.jsx("div",{className:"es-mi__card-value es-mi__card-value--fg",style:{color:q},children:w}),e.jsx("div",{className:"es-mi__card-tag",style:{color:q},children:ee}),e.jsx("div",{className:"es-mi__card-bar",children:e.jsx("div",{className:"es-mi__card-bar-fill",style:{width:`${w}%`}})})]})]}),v&&y&&(A!=null||E!=null||I!=null)&&e.jsxs("div",{className:"es-mi__stats",children:[A!=null&&e.jsxs("div",{className:"es-mi__stat",children:[e.jsx("span",{className:"es-mi__stat-label",children:t("market_insights.vol_24h")}),e.jsx("span",{className:"es-mi__stat-value",children:H(A)})]}),E!=null&&e.jsxs("div",{className:"es-mi__stat",children:[e.jsx("span",{className:"es-mi__stat-label",children:t("market_insights.market_cap")}),e.jsx("span",{className:"es-mi__stat-value",children:H(E)})]}),I!=null&&e.jsxs("div",{className:"es-mi__stat",children:[e.jsx("span",{className:"es-mi__stat-label",children:t("market_insights.btc_dominance")}),e.jsxs("span",{className:"es-mi__stat-value",children:[I,"%"]})]})]}),v&&ie&&e.jsxs("div",{className:"es-mi__summary",children:[e.jsx("div",{className:"es-mi__summary-eyebrow",children:t("market_insights.summary_eyebrow")}),e.jsx("div",{className:"es-mi__summary-body es-mi__summary-markdown",children:e.jsx(oe,{remarkPlugins:[...de],allowedElements:[...me],transformLinkUri:s=>ue(s)??"",components:{...pe()},children:K})})]}),$&&P.length>0&&e.jsxs("div",{className:"es-mi__news",children:[e.jsx("div",{className:"es-mi__news-header",children:t("market_insights.news_header")}),e.jsx("ul",{className:"es-mi__news-list",children:P.map((s,i)=>{const m=R(s.url)!==null,h=G.has(i),r=B.get(i),f=r?.status==="loading";return e.jsxs("li",{className:"es-mi__news-item",children:[e.jsx("span",{className:"es-mi__news-stripe","aria-hidden":"true"}),e.jsxs("div",{className:"es-mi__news-body",children:[e.jsx("span",{className:"es-mi__news-title",children:s.title}),e.jsxs("div",{className:"es-mi__news-meta",children:[s.source&&e.jsx("span",{className:"es-mi__news-source",children:s.source}),s.publishedAt&&e.jsx("span",{className:"es-mi__news-time",children:ke(s.publishedAt)})]}),s.tagline&&s.tagline.trim().length>0&&e.jsx("div",{className:"es-mi__news-tagline",children:s.tagline}),e.jsxs("div",{className:"es-mi__news-actions",role:"group","aria-label":t("market_insights.actions_aria"),children:[e.jsxs("button",{type:"button",className:"es-mi__news-btn","aria-expanded":h,"aria-busy":f,disabled:f,onClick:()=>re(i,s),children:[t(f?"market_insights.summary_loading":h?"market_insights.hide":"market_insights.read_more"),e.jsx("span",{className:"es-mi__news-btn-caret","aria-hidden":"true",children:"▾"})]}),J&&e.jsx("button",{type:"button",className:"es-mi__news-btn es-mi__news-btn--gaio",onClick:()=>ne(s),children:t("market_insights.talk_to_gaio")}),m&&e.jsxs("button",{type:"button",className:"es-mi__news-btn",onClick:()=>le(s),children:[t("market_insights.open_link"),e.jsx(je,{})]})]}),e.jsx("div",{className:`es-mi__news-summary${h?" es-mi__news-summary--open":""}${r?.status==="error"?" es-mi__news-summary--error":""}`,children:e.jsx("div",{className:"es-mi__news-summary-inner",children:e.jsxs("div",{className:"es-mi__news-summary-panel",children:[r?.status==="loading"&&e.jsxs("div",{className:"es-mi__news-skeleton","aria-label":t("market_insights.summary_loading"),children:[e.jsx("span",{className:"es-mi__news-skeleton-line"}),e.jsx("span",{className:"es-mi__news-skeleton-line"}),e.jsx("span",{className:"es-mi__news-skeleton-line"})]}),r?.status==="ready"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"es-mi__news-summary-eyebrow",children:t("market_insights.summary_eyebrow")}),e.jsx("div",{className:"es-mi__news-summary-body",children:r.text})]}),r?.status==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"es-mi__news-summary-error-text",children:t("market_insights.summary_error")}),e.jsx("button",{type:"button",className:"es-mi__news-retry",onClick:()=>{z(i,s)},children:t("market_insights.summary_retry")})]})]})})})]})]},i)})})]})]}),b&&e.jsx(Ne,{url:b.url,source:b.source,t,onCancel:()=>u(null),onContinue:()=>{const s=window.open(b.url,"_blank","noopener,noreferrer");s&&(s.opener=null),u(null)}})]}):e.jsx(Q,{blockType:"market-insights",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx("div",{className:"es-block__empty",children:N.length>0?`Data sources unavailable (${N.length} error${N.length>1?"s":""})`:"No market data available"}),N.length>0&&e.jsx("ul",{className:"es-mi__errors",children:N.map((s,i)=>e.jsx("li",{className:"es-mi__error-item",children:s},i))})]})})}function Ne({url:a,source:n,t:l,onCancel:c,onContinue:_}){const d=W(a);return e.jsx("div",{className:"es-mi__leave-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"es-mi-leave-title",onClick:c,children:e.jsxs("div",{className:"es-mi__leave-card",onClick:x=>x.stopPropagation(),children:[e.jsx("div",{className:"es-mi__leave-icon","aria-hidden":"true",children:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),e.jsx("h2",{id:"es-mi-leave-title",className:"es-mi__leave-title",children:l("market_insights.external_link.title")}),e.jsx("p",{className:"es-mi__leave-body",children:l("market_insights.external_link.body")}),e.jsxs("div",{className:"es-mi__leave-source",title:a,children:[e.jsx("span",{className:"es-mi__leave-source-label",children:n}),e.jsx("span",{className:"es-mi__leave-source-host",children:d})]}),e.jsxs("div",{className:"es-mi__leave-actions",children:[e.jsx("button",{type:"button",className:"es-mi__leave-btn es-mi__leave-btn--cancel",onClick:c,children:l("market_insights.external_link.cancel")}),e.jsx("button",{type:"button",className:"es-mi__leave-btn es-mi__leave-btn--primary",onClick:_,autoFocus:!0,children:l("market_insights.external_link.continue")})]})]})})}export{Ge as Component,Te as manifest};
|
|
4
|
-
//# sourceMappingURL=index-
|
|
3
|
+
BTC: $68,900 | 24h: +3.15% | Dominance: 54.2%`}},fields:[{id:"proMode",type:"toggle",label:"Pro mode (full analysis with context)",default:!1,group:"Display"},{id:"showFearGreed",type:"toggle",label:"Show Fear & Greed index",default:!0,group:"Display"},{id:"showBtcPrice",type:"toggle",label:"Show BTC price",default:!0,group:"Display"},{id:"showNews",type:"toggle",label:"Show news feed",default:!0,group:"Display"},{id:"newsLimit",type:"range",label:"Max news items",default:5,min:1,max:15,step:1,group:"Display"},{id:"confirmExternalLinks",type:"toggle",label:"Confirm before opening external news links",default:!0,group:"Display"}],events:{emits:[{name:"market:newsClicked",description:"User clicked on a news headline"},{name:"market:sentimentViewed",description:"Fear & Greed index was viewed"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"market:refresh",description:"Force refresh market data"}]},supportedPlacements:["main","sidebar"]},xe=1e4,D={price:null,change24h:null,ts:null,live:!1};function ye({baseUrl:a,apiKey:n,enabled:l=!0,intervalMs:c=xe}){const[_,d]=o.useState(D),x=o.useRef(a),S=o.useRef(n);return x.current=a,S.current=n,o.useEffect(()=>{if(!l){d(D);return}let t=!1;const M=async()=>{if(typeof document<"u"&&document.hidden||typeof fetch!="function")return;const k=S.current,[$,y]=await T(fetch(`${x.current}/api/widget/market/btc-price`,{headers:k?{"X-API-Key":k}:void 0}));if(t)return;if(y||!$.ok){d(u=>u.live?D:u);return}const[g,b]=await T($.json());if(!t){if(b||g?.price==null){d(u=>u.live?D:u);return}d({price:g.price,change24h:g.change24h??null,ts:g.ts??null,live:!0})}};M();const v=setInterval(()=>{M()},c);return()=>{t=!0,clearInterval(v)}},[l,c]),_}function X(a){return _e(a)}function H(a){return he(a)}const be="var(--es-color-warning, #9C5300)";function we(a){return a<=25?"var(--es-color-error, #AD2C26)":a<=55?be:"var(--es-color-success, #00672B)"}function fe(a){return a==null?"--":`$${a.toLocaleString("en-US",{maximumFractionDigits:0})}`}function ve(a){if(a==null)return{text:"--",positive:!0};const n=a>=0;return{text:`${n?"+":""}${a.toFixed(1)}%`,positive:n}}function W(a){return a==null?"--":a>=1e12?`$${(a/1e12).toFixed(2)}T`:a>=1e9?`$${(a/1e9).toFixed(1)}B`:a>=1e6?`$${(a/1e6).toFixed(0)}M`:`$${a.toLocaleString()}`}function ke(a){if(!a)return"";const n=Date.now()-new Date(a).getTime(),l=Math.floor(n/6e4);if(l<60)return`${l}m`;const c=Math.floor(l/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function je(){return e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function Ge({data:a,config:n,i18n:l,actions:c,baseUrl:_,externalContext:d,auth:x,previewMode:S}){const t=l?.t??(s=>s),M=a.promptLogId,v=n.proMode??!1,k=n.showFearGreed??!0,$=v&&(n.showNews??!0),y=n.showBtcPrice??!0,g=n.confirmExternalLinks??!0,[b,u]=o.useState(null),J=n.newsLimit??5,j=d?.apiKey??"",Q=d?.hasChatView===!0,[G,Y]=o.useState(()=>new Set),[B,L]=o.useState(()=>new Map),w=a.fearGreedIndex,ee=a.fearGreedLabel,P=(a.news??[]).slice(0,J),Z=a.btcPrice,se=a.btcChange24h,A=a.btcVolume,E=a.btcMarketCap,I=a.dominance,K=a.aiSummary,q=w!=null?we(w):void 0,F=ye({baseUrl:_,apiKey:j,enabled:y}),U=F.live&&F.price!=null,V=U?F.price:Z,ae=U?F.change24h:se,O=ve(ae),N=a._errors??[],te=w!=null||Z!=null||P.length>0,ie=typeof K=="string"&&K.trim().length>0,z=o.useCallback(async(s,i)=>{L(C=>{const p=new Map(C);return p.set(s,{status:"loading"}),p});const[m,h]=await T(fetch(`${_}/api/widget/crypto-intel/article-summary`,{method:"POST",headers:{"Content-Type":"application/json",...j?{"X-API-Key":j}:{}},body:JSON.stringify({title:i.title,url:i.url,source:i.source,publishedAt:i.publishedAt,tagline:i.tagline})})),r=()=>L(C=>{const p=new Map(C);return p.set(s,{status:"error"}),p});if(h||!m.ok)return r();const[f,ce]=await T(m.json());if(ce||!f?.summary)return r();L(C=>{const p=new Map(C);return p.set(s,{status:"ready",text:f.summary}),p})},[j,_]),re=o.useCallback((s,i)=>{if(Y(h=>{const r=new Set(h);return r.has(s)?(r.delete(s),r):(r.add(s),r)}),G.has(s)||B.has(s))return;const m=i.articleSummary?.trim();if(m){L(h=>{const r=new Map(h);return r.set(s,{status:"ready",text:m}),r});return}z(s,i)},[G,B,z]),ne=o.useCallback(s=>{c.emit("chat:draft",{message:t("market_insights.gaio_draft",{title:s.title,source:s.source??"",url:s.url??""}),autoSend:!1,quickChips:[{label:t("market_insights.chip.analyze"),message:t("market_insights.chip.analyze_msg",{url:s.url??""}),autoSend:!0},{label:t("market_insights.chip.summarize"),message:t("market_insights.chip.summarize_msg",{url:s.url??""}),autoSend:!0},{label:t("market_insights.chip.conclusions"),message:t("market_insights.chip.conclusions_msg",{url:s.url??""}),autoSend:!0},{label:t("market_insights.chip.other"),message:"",autoSend:!1}]})},[c,t]),le=o.useCallback(s=>{const i=H(s.url);if(!i)return;if(g){u({url:i,source:s.source||X(i)});return}const m=window.open(i,"_blank","noopener,noreferrer");m&&(m.opener=null)},[g]);return te?e.jsxs(R,{blockType:"market-insights",children:[e.jsxs("div",{className:"es-block__body",children:[e.jsx(ge,{promptLogId:M,baseUrl:_,apiKey:j,jwt:x?.jwt,previewMode:S,t}),(y||k)&&e.jsxs("div",{className:"es-mi__header",children:[y&&V!=null&&e.jsxs("div",{className:"es-mi__card es-mi__card--btc",children:[e.jsx("span",{className:"es-mi__icon","aria-hidden":"true",children:"B"}),e.jsxs("div",{className:"es-mi__card-label",children:[t("market_insights.bitcoin_label"),U&&e.jsxs("span",{className:"es-mi__live",title:t("market_insights.live_aria"),children:[e.jsx("span",{className:"es-mi__live-dot","aria-hidden":"true"}),t("market_insights.live")]})]}),e.jsx("div",{className:"es-mi__card-value",children:fe(V)}),e.jsx("div",{className:`es-mi__delta ${O.positive?"es-mi__delta--up":"es-mi__delta--down"}`,children:O.text})]}),k&&w!=null&&e.jsxs("div",{className:"es-mi__card es-mi__card--fg",children:[e.jsx("span",{className:"es-mi__icon","aria-hidden":"true",children:"FG"}),e.jsx("div",{className:"es-mi__card-label",children:"Fear & Greed"}),e.jsx("div",{className:"es-mi__card-value es-mi__card-value--fg",style:{color:q},children:w}),e.jsx("div",{className:"es-mi__card-tag",style:{color:q},children:ee}),e.jsx("div",{className:"es-mi__card-bar",children:e.jsx("div",{className:"es-mi__card-bar-fill",style:{width:`${w}%`}})})]})]}),v&&y&&(A!=null||E!=null||I!=null)&&e.jsxs("div",{className:"es-mi__stats",children:[A!=null&&e.jsxs("div",{className:"es-mi__stat",children:[e.jsx("span",{className:"es-mi__stat-label",children:t("market_insights.vol_24h")}),e.jsx("span",{className:"es-mi__stat-value",children:W(A)})]}),E!=null&&e.jsxs("div",{className:"es-mi__stat",children:[e.jsx("span",{className:"es-mi__stat-label",children:t("market_insights.market_cap")}),e.jsx("span",{className:"es-mi__stat-value",children:W(E)})]}),I!=null&&e.jsxs("div",{className:"es-mi__stat",children:[e.jsx("span",{className:"es-mi__stat-label",children:t("market_insights.btc_dominance")}),e.jsxs("span",{className:"es-mi__stat-value",children:[I,"%"]})]})]}),v&&ie&&e.jsxs("div",{className:"es-mi__summary",children:[e.jsx("div",{className:"es-mi__summary-eyebrow",children:t("market_insights.summary_eyebrow")}),e.jsx("div",{className:"es-mi__summary-body es-mi__summary-markdown",children:e.jsx(oe,{remarkPlugins:[...de],allowedElements:[...me],transformLinkUri:s=>ue(s)??"",components:{...pe()},children:K})})]}),$&&P.length>0&&e.jsxs("div",{className:"es-mi__news",children:[e.jsx("div",{className:"es-mi__news-header",children:t("market_insights.news_header")}),e.jsx("ul",{className:"es-mi__news-list",children:P.map((s,i)=>{const m=H(s.url)!==null,h=G.has(i),r=B.get(i),f=r?.status==="loading";return e.jsxs("li",{className:"es-mi__news-item",children:[e.jsx("span",{className:"es-mi__news-stripe","aria-hidden":"true"}),e.jsxs("div",{className:"es-mi__news-body",children:[e.jsx("span",{className:"es-mi__news-title",children:s.title}),e.jsxs("div",{className:"es-mi__news-meta",children:[s.source&&e.jsx("span",{className:"es-mi__news-source",children:s.source}),s.publishedAt&&e.jsx("span",{className:"es-mi__news-time",children:ke(s.publishedAt)})]}),s.tagline&&s.tagline.trim().length>0&&e.jsx("div",{className:"es-mi__news-tagline",children:s.tagline}),e.jsxs("div",{className:"es-mi__news-actions",role:"group","aria-label":t("market_insights.actions_aria"),children:[e.jsxs("button",{type:"button",className:"es-mi__news-btn","aria-expanded":h,"aria-busy":f,disabled:f,onClick:()=>re(i,s),children:[t(f?"market_insights.summary_loading":h?"market_insights.hide":"market_insights.read_more"),e.jsx("span",{className:"es-mi__news-btn-caret","aria-hidden":"true",children:"▾"})]}),Q&&e.jsx("button",{type:"button",className:"es-mi__news-btn es-mi__news-btn--gaio",onClick:()=>ne(s),children:t("market_insights.talk_to_gaio")}),m&&e.jsxs("button",{type:"button",className:"es-mi__news-btn",onClick:()=>le(s),children:[t("market_insights.open_link"),e.jsx(je,{})]})]}),e.jsx("div",{className:`es-mi__news-summary${h?" es-mi__news-summary--open":""}${r?.status==="error"?" es-mi__news-summary--error":""}`,children:e.jsx("div",{className:"es-mi__news-summary-inner",children:e.jsxs("div",{className:"es-mi__news-summary-panel",children:[r?.status==="loading"&&e.jsxs("div",{className:"es-mi__news-skeleton","aria-label":t("market_insights.summary_loading"),children:[e.jsx("span",{className:"es-mi__news-skeleton-line"}),e.jsx("span",{className:"es-mi__news-skeleton-line"}),e.jsx("span",{className:"es-mi__news-skeleton-line"})]}),r?.status==="ready"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"es-mi__news-summary-eyebrow",children:t("market_insights.summary_eyebrow")}),e.jsx("div",{className:"es-mi__news-summary-body",children:r.text})]}),r?.status==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"es-mi__news-summary-error-text",children:t("market_insights.summary_error")}),e.jsx("button",{type:"button",className:"es-mi__news-retry",onClick:()=>{z(i,s)},children:t("market_insights.summary_retry")})]})]})})})]})]},i)})})]})]}),b&&e.jsx(Ne,{url:b.url,source:b.source,t,onCancel:()=>u(null),onContinue:()=>{const s=window.open(b.url,"_blank","noopener,noreferrer");s&&(s.opener=null),u(null)}})]}):e.jsx(R,{blockType:"market-insights",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx("div",{className:"es-block__empty",children:N.length>0?`Data sources unavailable (${N.length} error${N.length>1?"s":""})`:"No market data available"}),N.length>0&&e.jsx("ul",{className:"es-mi__errors",children:N.map((s,i)=>e.jsx("li",{className:"es-mi__error-item",children:s},i))})]})})}function Ne({url:a,source:n,t:l,onCancel:c,onContinue:_}){const d=X(a);return e.jsx("div",{className:"es-mi__leave-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"es-mi-leave-title",onClick:c,children:e.jsxs("div",{className:"es-mi__leave-card",onClick:x=>x.stopPropagation(),children:[e.jsx("div",{className:"es-mi__leave-icon","aria-hidden":"true",children:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),e.jsx("h2",{id:"es-mi-leave-title",className:"es-mi__leave-title",children:l("market_insights.external_link.title")}),e.jsx("p",{className:"es-mi__leave-body",children:l("market_insights.external_link.body")}),e.jsxs("div",{className:"es-mi__leave-source",title:a,children:[e.jsx("span",{className:"es-mi__leave-source-label",children:n}),e.jsx("span",{className:"es-mi__leave-source-host",children:d})]}),e.jsxs("div",{className:"es-mi__leave-actions",children:[e.jsx("button",{type:"button",className:"es-mi__leave-btn es-mi__leave-btn--cancel",onClick:c,children:l("market_insights.external_link.cancel")}),e.jsx("button",{type:"button",className:"es-mi__leave-btn es-mi__leave-btn--primary",onClick:_,autoFocus:!0,children:l("market_insights.external_link.continue")})]})]})})}export{Ge as Component,Te as manifest};
|
|
4
|
+
//# sourceMappingURL=index-CDlumsdH-BgpZz7kC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as l,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as l,j as e,e as d}from"../nexly.js";const b={slug:"demo-ticket-form",name:"DEMO — Report an issue",version:"0.1.0",category:"interactive",configSchema:{properties:{categories:{type:"array",items:{type:"string"},default:[]}}},defaultConfig:{categories:[]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function f(a){if(typeof a!="string")return null;const t=a.trim();if(!t||/\s/.test(t))return null;const s=t.indexOf("@");return s>0&&s<t.length-1?t:null}function g(a){return Array.isArray(a)?a.flatMap(t=>typeof t=="string"&&t.trim().length>0?[t.trim()]:[]):[]}function j({config:a,i18n:t}){const s=t?.t??(i=>i),o=g(a?.categories),n=f(a?.supportEmail),[m,u]=l.useState(o[0]??""),[c,r]=l.useState(""),[k,p]=l.useState(!1),h=c.trim().length>0,_=l.useCallback(()=>{c.trim().length!==0&&(p(!0),r(""))},[c]);return k?e.jsx(d,{blockType:"demo-ticket-form",children:e.jsx("div",{className:"es-block__body es-demoticket es-demoticket--done",children:e.jsxs("div",{className:"es-demoticket__done",children:[e.jsx("span",{className:"es-demoticket__done-mark","aria-hidden":"true",children:"✓"}),e.jsx("p",{className:"es-demoticket__done-text",children:n?s("demoTicket.sentTo",{email:n}):s("demoTicket.sent")})]})})}):e.jsx(d,{blockType:"demo-ticket-form",children:e.jsxs("div",{className:"es-block__body es-demoticket",children:[e.jsxs("div",{className:"es-demoticket__fields",children:[o.length>0&&e.jsxs("label",{className:"es-demoticket__field",children:[e.jsx("span",{className:"es-demoticket__label",children:s("demoTicket.category")}),e.jsx("select",{className:"es-demoticket__select",value:m,onChange:i=>u(i.target.value),children:o.map(i=>e.jsx("option",{value:i,children:i},i))})]}),e.jsxs("label",{className:"es-demoticket__field es-demoticket__field--grow",children:[e.jsx("span",{className:"es-demoticket__label",children:s("demoTicket.message")}),e.jsx("textarea",{className:"es-demoticket__textarea",value:c,onChange:i=>r(i.target.value),placeholder:s("demoTicket.placeholder")})]})]}),e.jsx("button",{type:"button",className:"es-demoticket__submit",onClick:_,disabled:!h,children:s("demoTicket.submit")})]})})}export{j as Component,b as manifest};
|
|
2
|
+
//# sourceMappingURL=index-CH-C6uk_-B-pT4hKt.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as j,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as j,j as e,e as _,l as w}from"../nexly.js";import{m as x}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const C={slug:"team-health",name:"Team Health Monitor",version:"1.0.0",category:"interactive",requiredService:"team-health",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic",readAloudEnabled:!1},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"team-health",inputSchema:{type:"object",properties:{summary:{type:"object",properties:{healthy:{type:"number"},at_risk:{type:"number"},critical:{type:"number"},total:{type:"number"}}},topAtRiskMember:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},rank:{type:"string"},healthStatus:{type:"string"},healthScore:{type:"number"},riskSignals:{type:"array",items:{type:"string"}}}},reactivationTip:{type:"string"},members:{type:"array",items:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},rank:{type:"string"},healthStatus:{type:"string"},healthScore:{type:"number"},riskSignals:{type:"array",items:{type:"string"}},teamSales:{type:"number"},personalPurchase:{type:"number"}}}},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",summary:{healthy:4,at_risk:3,critical:1,total:8},topAtRiskMember:{userId:"preview-1",userName:"Anna Kowalska",rank:"Manager",healthStatus:"critical",healthScore:25,riskSignals:["No personal purchase","No team sales","No team built"],teamSales:0,personalPurchase:0},reactivationTip:"Check in with Anna personally — ask how she's doing with the products first before talking business. A caring message goes a long way.",members:[{userId:"preview-1",userName:"Anna Kowalska",rank:"Manager",healthStatus:"critical",healthScore:25,riskSignals:["No purchase","No sales"]},{userId:"preview-2",userName:"Piotr Nowak",rank:"Senior Manager",healthStatus:"at_risk",healthScore:55,riskSignals:["No team built"]},{userId:"preview-3",userName:"Maria Wiśniewska",rank:"Manager",healthStatus:"healthy",healthScore:85,riskSignals:[]}]}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — traffic-light summary + top alert + AI tip",value:"basic"},{label:"Pro — full member list with health scores",value:"pro"}],group:"Display"}],events:{emits:[{name:"th:memberSelected",description:"User tapped on a team member"},{name:"th:tipCopied",description:"User copied the reactivation tip"}],listens:[{name:"th:refresh",description:"Force refresh team health data"}]}},i={healthy:"team_health.status.healthy",at_risk:"team_health.status.at_risk",critical:"team_health.status.critical"},c={healthy:"🟢",at_risk:"🟡",critical:"🔴"};function T({data:l,config:N,actions:m,metadata:k,i18n:S}){const t=S?.t??(a=>a),v=N.mode??l.mode??"basic",o=l.summary??{healthy:0,at_risk:0,critical:0,total:0},s=l.topAtRiskMember,n=l.reactivationTip,d=l.members??[],[p,u]=j.useState("idle"),[r,b]=j.useState(null);if(!o.total&&!l.error)return e.jsx(_,{blockType:"team-health",children:e.jsxs("div",{className:"es-block__body es-th__body",children:[e.jsx("div",{className:"es-th__traffic-light",role:"list","aria-label":t("team_health.summary_aria"),children:["critical","at_risk","healthy"].map(a=>e.jsxs("div",{role:"listitem",className:`es-th__tl-cell es-th__tl-cell--${a.replace("_","-")} es-th__tl-cell--empty`,children:[e.jsx("span",{className:"es-th__tl-emoji","aria-hidden":"true",children:c[a]}),e.jsx("span",{className:"es-th__tl-count",children:"0"}),e.jsx("span",{className:"es-th__tl-label",children:t(i[a])})]},a))}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0",textAlign:"center"},children:k?.dataQuality==="none"?t("team_health.signin_prompt"):t("team_health.empty")})]})});if(l.error)return e.jsx(_,{blockType:"team-health",error:w(l.error)});async function f(){if(n)try{await navigator.clipboard.writeText(n),u("copied"),m.emit("th:tipCopied",{}),setTimeout(()=>u("idle"),2e3)}catch{}}const y=r?d.filter(a=>a.healthStatus===r):d,g=[...y].sort((a,h)=>a.healthScore-h.healthScore);return e.jsx(_,{blockType:"team-health",children:e.jsxs("div",{className:"es-block__body es-th__body",children:[e.jsx("div",{className:"es-th__traffic-light",role:"list","aria-label":t("team_health.summary_aria"),children:["critical","at_risk","healthy"].map(a=>e.jsxs("button",{role:"listitem",className:`es-th__tl-cell es-th__tl-cell--${a.replace("_","-")} ${r===a?"es-th__tl-cell--active":""}`,onClick:()=>b(r===a?null:a),"aria-pressed":r===a,"aria-label":t("team_health.status_count_aria",{status:t(i[a]),count:o[a]}),children:[e.jsx("span",{className:"es-th__tl-emoji","aria-hidden":"true",children:c[a]}),e.jsx("span",{className:"es-th__tl-count",children:o[a]}),e.jsx("span",{className:"es-th__tl-label",children:t(i[a])})]},a))}),s&&e.jsxs("div",{className:"es-th__alert-card",children:[e.jsxs("div",{className:"es-th__alert-eyebrow",children:[e.jsx("span",{"aria-hidden":"true",children:c[s.healthStatus]})," ",t("team_health.needs_attention")]}),e.jsx("div",{className:"es-th__alert-name",children:s.userName}),e.jsxs("div",{className:"es-th__alert-meta",children:[e.jsx("span",{className:`es-th__badge es-th__badge--${s.healthStatus.replace("_","-")}`,children:t(i[s.healthStatus])}),e.jsx("span",{className:"es-th__rank",children:x(s.rank,t)})]}),s.riskSignals.length>0&&e.jsx("ul",{className:"es-th__risk-signals","aria-label":t("team_health.risk_signals_aria"),children:s.riskSignals.map(a=>e.jsxs("li",{className:"es-th__risk-signal",children:[e.jsx("span",{"aria-hidden":"true",children:"⚠"})," ",a]},a))}),e.jsx("div",{className:"es-th__health-bar-wrap","aria-label":t("team_health.health_score_aria",{score:s.healthScore}),children:e.jsx("div",{className:"es-th__health-bar",style:{width:`${s.healthScore}%`}})}),n&&e.jsxs("div",{className:"es-th__tip",children:[e.jsxs("div",{className:"es-th__tip-header",children:[e.jsxs("span",{className:"es-th__ai-label",children:[e.jsx("span",{"aria-hidden":"true",children:"✨"})," ",t("team_health.ai_tip_label")]}),e.jsx("button",{className:`es-th__copy-btn${p==="copied"?" es-th__copy-btn--copied":""}`,onClick:f,"aria-label":t("team_health.copy_tip_aria"),title:t("common.copy_to_clipboard"),children:p==="copied"?"✓":"⎘"})]}),e.jsx("p",{className:"es-th__tip-text",children:n})]})]}),v==="pro"&&e.jsxs("div",{className:"es-th__member-list",children:[e.jsxs("div",{className:"es-th__member-list-header",children:[e.jsx("span",{className:"es-th__section-title",children:r?t("team_health.status_filtered",{status:t(i[r]),count:y.length}):t("team_health.all_members",{count:d.length})}),r&&e.jsx("button",{className:"es-th__clear-filter",onClick:()=>b(null),children:t("team_health.clear_filter")})]}),g.length===0?e.jsx("p",{className:"es-th__empty",children:t("team_health.empty_status")}):e.jsx("ul",{className:"es-th__members","aria-label":t("team_health.members_aria"),children:g.map(a=>e.jsxs("li",{className:"es-th__member-item",onClick:()=>m.emit("th:memberSelected",{userId:a.userId}),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),m.emit("th:memberSelected",{userId:a.userId}))},tabIndex:0,role:"button",children:[e.jsxs("div",{className:"es-th__member-header",children:[e.jsx("span",{className:"es-th__member-emoji","aria-hidden":"true",children:c[a.healthStatus]}),e.jsx("span",{className:"es-th__member-name",children:a.userName}),e.jsxs("span",{className:"es-th__member-score",children:[a.healthScore,"%"]})]}),e.jsxs("div",{className:"es-th__member-meta",children:[e.jsx("span",{className:`es-th__badge es-th__badge--${a.healthStatus.replace("_","-")}`,children:t(i[a.healthStatus])}),e.jsx("span",{className:"es-th__rank",children:x(a.rank,t)})]}),e.jsx("div",{className:"es-th__health-bar-wrap",children:e.jsx("div",{className:"es-th__health-bar",style:{width:`${a.healthScore}%`}})}),a.riskSignals.length>0&&e.jsx("p",{className:"es-th__member-signals",children:a.riskSignals.join(" · ")})]},a.userId))})]})]})})}export{T as Component,C as manifest};
|
|
2
|
+
//# sourceMappingURL=index-CNP-4dFm-BlRhWcs1.js.map
|