PageSourceSearch

https://supercarl.ai/_expo/c1/static/cc1ea755ba225173cc836e0f0d402…owledge-3146d2c01c5744c96b039b980c714eba.js

js supercarl.ai collected 2026-10-05 14:02:33 UTC 8,745 bytes, 2 lines download raw bytes

1__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}}),r(d[0]);var e,t=r(d[1]),l=r(d[2]),n=(e=l)&&e.__esModule?e:{default:e},u=r(d[3]);var o=()=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(t.PageTitle,{detail:"Admin \u2022 Carl Product Knowledge"}),(0,u.jsx)(n.default,{})]})},5197,[19,5010,5198,2]);
2__d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return w}});var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2])),a=e(r(d[3])),n=e(r(d[4])),s=e(r(d[5])),c=e(r(d[6])),f=r(d[7]),u=e(r(d[8])),h=r(d[9]),b=r(d[10]),x=e(r(d[11])),p=r(d[12]);function y(e){if(!e)return!0;const t=new Date(e).getTime();return!!Number.isNaN(t)||Date.now()-t>2592e6}const k=a.default.create({container:{flex:1,backgroundColor:"#FFFFFF"},contentContainer:{padding:20,gap:16},headerRow:{flexDirection:"row",alignItems:"flex-start",gap:12,flexWrap:"wrap"},backButton:{flexDirection:"row",alignItems:"center",gap:4,paddingVertical:6,paddingHorizontal:8},backLabel:{fontSize:14,color:"#0F172A",fontWeight:"500"},titleBlock:{flex:1,minWidth:280,gap:4},titleRow:{flexDirection:"row",alignItems:"center",gap:8},title:{fontSize:18,fontWeight:"700",color:"#0F172A"},subtitle:{fontSize:13,color:"#475569",lineHeight:18},refreshButton:{flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"#EEF2FF",paddingHorizontal:10,paddingVertical:6,borderRadius:6},refreshLabel:{fontSize:13,color:"#4f46e5",fontWeight:"600"},errorBanner:{backgroundColor:"#FEF2F2",borderColor:"#FECACA",borderWidth:1,padding:10,borderRadius:8},errorText:{color:"#B91C1C",fontSize:13},gridRow:{flexDirection:"row",gap:16,flexWrap:"wrap"},list:{flexBasis:280,flexGrow:1,gap:6,minWidth:240},listItem:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,backgroundColor:"#F8FAFC",borderRadius:8,gap:8,borderWidth:1,borderColor:"#E2E8F0"},listItemSelected:{borderColor:"#4f46e5",backgroundColor:"#EEF2FF"},listItemTitle:{fontSize:14,fontWeight:"600",color:"#0F172A"},listItemTitleSelected:{color:"#3730A3"},listItemMeta:{fontSize:12,color:"#64748B",marginTop:2},listItemBadges:{flexDirection:"row",gap:6,marginTop:6,flexWrap:"wrap"},badge:{paddingHorizontal:6,paddingVertical:2,borderRadius:999},badgeText:{fontSize:11,fontWeight:"600"},badgeOk:{backgroundColor:"#DCFCE7"},badgeOkText:{color:"#166534"},badgeWarning:{backgroundColor:"#FEF3C7"},badgeWarningText:{color:"#92400E"},badgeDocs:{backgroundColor:"#E0F2FE"},badgeDocsText:{color:"#0369A1"},badgeActions:{backgroundColor:"#EDE9FE"},badgeActionsText:{color:"#5B21B6"},emptyText:{color:"#64748B",fontSize:13,padding:12},detailPane:{flexBasis:480,flexGrow:2,minWidth:320,backgroundColor:"#F8FAFC",borderRadius:8,padding:16,borderWidth:1,borderColor:"#E2E8F0"},detailPlaceholder:{color:"#64748B",fontSize:13},detailTitle:{fontSize:18,fontWeight:"700",color:"#0F172A",marginBottom:4},detailMeta:{fontSize:12,color:"#64748B",marginBottom:4},detailDocsUrl:{fontSize:12,color:"#0369A1",marginBottom:4},detailFile:{fontSize:11,color:"#94a3b8",fontFamily:"Menlo",marginBottom:12},markdownContainer:{marginTop:12,backgroundColor:"#FFFFFF",padding:12,borderRadius:8},markdownBody:{color:"#0F172A",fontSize:14,lineHeight:22},markdownH1:{fontSize:20,fontWeight:"700",marginTop:12,marginBottom:6},markdownH2:{fontSize:17,fontWeight:"700",marginTop:12,marginBottom:6},markdownH3:{fontSize:15,fontWeight:"700",marginTop:8,marginBottom:4},markdownParagraph:{marginBottom:8,lineHeight:22},markdownCodeInline:{backgroundColor:"#F1F5F9",paddingHorizontal:4,paddingVertical:2,borderRadius:4,fontFamily:"Menlo",fontSize:13},markdownList:{paddingLeft:12},markdownListItem:{marginVertical:2},markdownLink:{color:"#0369A1"}});var w=()=>{const e=(0,f.useRouter)(),[a,w]=(0,t.useState)([]),[F,j]=(0,t.useState)(!0),[C,T]=(0,t.useState)(null),[B,S]=(0,t.useState)(null),[z,A]=(0,t.useState)({}),[E,W]=(0,t.useState)(null),[I,R]=(0,t.useState)(null),D=(0,t.useCallback)(async()=>{j(!0),T(null);try{const e=await(0,b.fetchWithAuth)(`${x.default.apiBaseUrl}/admin/system/product-knowledge`);if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=await e.json(),o=Array.isArray(t?.topics)?t.topics:[];o.sort((e,t)=>
2e.id.localeCompare(t.id)),w(o)}catch(e){const t=e instanceof Error?e.message:"Failed to load topics";T(t)}finally{j(!1)}},[]),H=(0,t.useCallback)(async e=>{W(e),R(null);try{const t=await(0,b.fetchWithAuth)(`${x.default.apiBaseUrl}/admin/system/product-knowledge/${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`HTTP ${t.status}`);const o=await t.json();A(t=>({...t,[e]:o}))}catch(e){const t=e instanceof Error?e.message:"Failed to load topic";R(t)}finally{W(t=>t===e?null:t)}},[]);(0,t.useEffect)(()=>{D()},[D]),(0,t.useEffect)(()=>{B&&!z[B]&&H(B)},[B,z,H]);const v=(0,t.useMemo)(()=>B&&z[B]||null,[B,z]);return(0,p.jsxs)(l.default,{style:k.container,contentContainerStyle:k.contentContainer,children:[(0,p.jsxs)(c.default,{style:k.headerRow,children:[(0,p.jsxs)(s.default,{accessibilityRole:"button",onPress:()=>e.back(),style:k.backButton,children:[(0,p.jsx)(h.ChevronLeft,{size:16,color:"#0F172A"}),(0,p.jsx)(n.default,{style:k.backLabel,children:"Back"})]}),(0,p.jsxs)(c.default,{style:k.titleBlock,children:[(0,p.jsxs)(c.default,{style:k.titleRow,children:[(0,p.jsx)(h.BookOpen,{size:18,color:"#4f46e5"}),(0,p.jsx)(n.default,{style:k.title,children:"Carl product knowledge"})]}),(0,p.jsx)(n.default,{style:k.subtitle,children:"Repo-versioned topic markdown that Carl loads via get_product_help. Edit topics under social-connector/src/services/productKnowledge/topics/ and bump last_verified_at after verifying against the live UI."})]}),(0,p.jsxs)(s.default,{onPress:D,style:k.refreshButton,accessibilityRole:"button",children:[(0,p.jsx)(h.RefreshCcw,{size:14,color:"#4f46e5"}),(0,p.jsx)(n.default,{style:k.refreshLabel,children:"Refresh"})]})]}),C?(0,p.jsx)(c.default,{style:k.errorBanner,children:(0,p.jsxs)(n.default,{style:k.errorText,children:["Failed to load topics: ",C]})}):null,F?(0,p.jsx)(o.default,{size:"small",color:"#4f46e5",style:{marginTop:24}}):(0,p.jsxs)(c.default,{style:k.gridRow,children:[(0,p.jsxs)(c.default,{style:k.list,children:[a.map(e=>{const t=z[e.id],o=y(t?.lastVerifiedAt),l=B===e.id;return(0,p.jsxs)(s.default,{style:[k.listItem,l&&k.listItemSelected],onPress:()=>S(e.id),accessibilityRole:"button",children:[(0,p.jsxs)(c.default,{style:{flex:1},children:[(0,p.jsx)(n.default,{style:[k.listItemTitle,l&&k.listItemTitleSelected],children:e.title}),(0,p.jsxs)(n.default,{style:k.listItemMeta,children:[e.id,e.route?` \xb7 ${e.route}`:""]}),(0,p.jsxs)(c.default,{style:k.listItemBadges,children:[t?.lastVerifiedAt?(0,p.jsx)(c.default,{style:[k.badge,o?k.badgeWarning:k.badgeOk],children:(0,p.jsx)(n.default,{style:[k.badgeText,o?k.badgeWarningText:k.badgeOkText],children:o?"stale":"verified"})}):null,e.docsUrl?(0,p.jsx)(c.default,{style:[k.badge,k.badgeDocs],children:(0,p.jsx)(n.default,{style:[k.badgeText,k.badgeDocsText],children:"docs"})}):null,e.actions&&e.actions.length>0?(0,p.jsx)(c.default,{style:[k.badge,k.badgeActions],children:(0,p.jsx)(n.default,{style:[k.badgeText,k.badgeActionsText],children:"actions"})}):null]})]}),(0,p.jsx)(h.ChevronRight,{size:14,color:"#94a3b8"})]},e.id)}),0!==a.length||F?null:(0,p.jsx)(n.default,{style:k.emptyText,children:"No topics found."})]}),(0,p.jsx)(c.default,{style:k.detailPane,children:B?E!==B||v?I&&!v?(0,p.jsxs)(n.default,{style:k.errorText,children:["Failed to load topic: ",I]}):v?(0,p.jsxs)(c.default,{children:[(0,p.jsx)(n.default,{style:k.detailTitle,children:v.title}),(0,p.jsxs)(n.default,{style:k.detailMeta,children:[v.id,v.route?` \xb7 ${v.route}`:"",v.lastVerifiedAt?` \xb7 last verified ${v.lastVerifiedAt}`:""]}),v.docsUrl?(0,p.jsxs)(n.default,{style:k.detailDocsUrl,children:["Docs URL: ",v.docsUrl]}):null,v.actions&&v.actions.length>0?(0,p.jsxs)(n.default,{style:k.detailMeta,children:["Actions: ",v.actions.join(", ")]}):null,v.file?(0,p.jsx)(n.default,{style:k.detailFile,children:v.file}):null,(0,p.jsx)(c.default,{style:k.markdownContainer,children:(0,p.jsx)(u.default,{style:{body:k.markdownBody,heading1:k.markdownH1,heading2:k.markdownH2,heading3:k.markdownH3,paragraph:k.markdownParagraph,code_inline:k.markdownCodeInline,bullet_list:k.markdownList,list_item:k.markdownListItem,link:k.markdownLink},children:v.body||"(empty topic)"})})]}):null:(0,p.jsx)(o.default,{size:"small",color:"#4f46e5"}):(0,p.jsx)(n.default,{style:k.detailPlaceholder,children:"Select a topic to read its markdown."})})]})]})}},5198,[19,399,314,133,120,401,307,474,4481,6134,447,453,2]);

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