@e-llm-studio/citation 0.0.170 → 0.0.171

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react");exports.default=function(o){var r,s=o.children,a=o.uploadListTopContent,d=o.defaultHeight,l=void 0===d?300:d,u=o.minHeight,c=void 0===u?150:u,p=o.maxHeight,f=o.isExpanded,g=void 0!==f&&f,x=o.onToggle,h=o.onHeightChange,v=o.styles,m=void 0===v?{}:v,_=n.useState(!1),y=_[0],b=_[1],w=n.useState(l),j=w[0],C=w[1],H=n.useRef(0),R=n.useRef(l),S=n.useRef(null),E=n.useRef(0),k="string"==typeof p?parseFloat(p)/100*window.innerHeight:null!=p?p:.4*window.innerHeight;n.useEffect(function(){!g&&S.current&&(E.current=S.current.getBoundingClientRect().height)},[g]);return n.useEffect(function(){if(y){var e=function(e){e.preventDefault();var t=e.clientY-H.current,n=Math.max(c,Math.min(k,R.current+t));C(n),null==h||h(n)},t=function(){b(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[y]),t.jsxs("div",e.__assign({ref:S,style:{position:"relative",width:"100%",minHeight:g?E.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:g?"absolute":"relative",zIndex:g?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:g?"".concat(j,"px"):"auto",minHeight:g?"".concat(c,"px"):"auto",maxHeight:g?"".concat(j,"px"):"auto",overflow:"hidden",width:"100%"},m.container)},{children:[t.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},m.header)},{children:t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},m.title)},{children:(null==a?void 0:a.trim())?a:"Data uploaded for your context"}))})),g&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},m.body)},{children:s})),g&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),b(!0),H.current=e.clientY,R.current=j,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:t.jsx("div",{style:e.__assign({width:48,height:4,borderRadius:4,background:y?"#a78bfa":"#d1d5db"},m.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:g?"absolute":"relative",top:g?"".concat(j,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:g?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:x,"aria-label":g?"Collapse":"Expand",style:e.__assign({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},m.notch)},{children:t.jsx(i.ChevronDown,{size:14,color:null!==(r=m.notchArrowColor)&&void 0!==r?r:"#6d28d9",style:{transform:g?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react");exports.default=function(o){var r,s,a=o.children,l=o.uploadListTopContent,d=o.defaultHeight,u=void 0===d?300:d,c=o.minHeight,p=void 0===c?150:c,g=o.maxHeight,f=o.isExpanded,x=void 0!==f&&f,h=o.onToggle,v=o.onHeightChange,m=o.styles,_=void 0===m?{}:m,y=n.useState(!1),b=y[0],w=y[1],j=n.useState(u),C=j[0],H=j[1],R=n.useRef(0),S=n.useRef(u),E=n.useRef(null),k=n.useRef(0),D="string"==typeof g?parseFloat(g)/100*window.innerHeight:null!=g?g:.4*window.innerHeight;n.useEffect(function(){!x&&E.current&&(k.current=E.current.getBoundingClientRect().height)},[x]);return n.useEffect(function(){if(b){var e=function(e){e.preventDefault();var t=e.clientY-R.current,n=Math.max(p,Math.min(D,S.current+t));H(n),null==v||v(n)},t=function(){w(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[b]),t.jsxs("div",e.__assign({ref:E,style:{position:"relative",width:"100%",minHeight:x?k.current:"auto"}},{children:[t.jsxs("div",e.__assign({style:e.__assign({position:x?"absolute":"relative",zIndex:x?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:x?"".concat(C,"px"):"auto",minHeight:x?"".concat(p,"px"):"auto",maxHeight:x?"".concat(C,"px"):"auto",overflow:"hidden",width:"100%"},_.container)},{children:[t.jsx("div",e.__assign({style:e.__assign({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},_.header)},{children:t.jsx("span",e.__assign({style:e.__assign({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},_.title)},{children:(null==l?void 0:l.trim())?l:"Data uploaded for your context"}))})),x&&t.jsx("div",e.__assign({style:e.__assign({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},_.body)},{children:a})),x&&t.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),w(!0),R.current=e.clientY,S.current=C,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:t.jsx("div",{style:e.__assign({width:48,height:4,borderRadius:4,background:b?null!==(r=_.dragPillActiveColor)&&void 0!==r?r:"#a78bfa":"#d1d5db"},_.dragPill)})}))]})),t.jsx("div",e.__assign({style:{position:x?"absolute":"relative",top:x?"".concat(C,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:x?10:"auto"}},{children:t.jsx("button",e.__assign({onClick:h,"aria-label":x?"Collapse":"Expand",style:e.__assign({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},_.notch)},{children:t.jsx(i.ChevronDown,{size:14,color:null!==(s=_.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};
2
2
  //# sourceMappingURL=ChatDrawer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("@mui/material/Tooltip"),a=require("@mui/material/styles");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(t),n=a.styled(function(t){var a=t.className,s=e.__rest(t,["className"]);return r.jsx(i.default,e.__assign({},s,{classes:{popper:a}}))})(function(){var e;return(e={})["& .".concat(t.tooltipClasses.tooltip)]={fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"#555",color:"#fff",fontSize:12,padding:"5px 8px",borderRadius:6,maxWidth:250,textAlign:"center",whiteSpace:"normal",wordBreak:"break-word",lineHeight:1.4},e["& .".concat(t.tooltipClasses.arrow)]={color:"#555"},e});exports.default=function(t){var a=t.description,s=t.children;return r.jsx(n,e.__assign({title:r.jsx("span",{children:a}),arrow:!0,placement:"top"},{children:r.jsx("span",e.__assign({style:{display:"inline-block"}},{children:s}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("@mui/material/Tooltip"),a=require("@mui/material/styles");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(t),n=a.styled(function(t){var a=t.className,s=e.__rest(t,["className"]);return r.jsx(i.default,e.__assign({},s,{classes:{popper:a},arrow:!0,placement:"top"}))})(function(){var e;return(e={})["& .".concat(t.tooltipClasses.tooltip)]={fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"#555",color:"#fff",fontSize:12,padding:"5px 8px",borderRadius:6,maxWidth:250,textAlign:"center",whiteSpace:"normal",wordBreak:"break-word",lineHeight:1.4},e["& .".concat(t.tooltipClasses.arrow)]={color:"#555"},e});exports.default=function(t){var a=t.description,s=t.children;return r.jsx(n,e.__assign({title:r.jsx("span",{children:a})},{children:r.jsx("span",e.__assign({style:{display:"inline-block"}},{children:s}))}))};
2
2
  //# sourceMappingURL=TooltipComponent.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("react"),a=require("./CognitiveNonWebSearchReasoning.module.css.js"),t=require("lucide-react");exports.default=function(i){var l=i.item,c=i.index,r=i.iconsConfig,d=i.headerTitle,o=void 0===d?"GPT - Gemini 2.5 Flash":d,u=i.previewCallback,h=i.DocumentTitle,f=null==r?void 0:r.ChevronDownIcon,g=null==r?void 0:r.ChevronUpIcon,_=null==r?void 0:r.MaximizeIcon,m=null==r?void 0:r.CloseIcon,x=s.useState(!1),v=x[0],p=x[1],j=s.useState(0),N=j[0],I=j[1],C=s.useRef(null),b=s.useRef(null),T=s.useRef(null),H=s.useRef([]),k=s.useRef([]),S=s.useMemo(function(){return l.dataSource?l.dataSource.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):""},[l.dataSource]),L=s.useMemo(function(){var e=S.split(/(<highlight>[\s\S]*?<\/highlight>)/g)||[],n=e.filter(function(e){return e.startsWith("<highlight>")}).length,s=0;return{parts:e.map(function(e,n){var a=e.startsWith("<highlight>"),t={text:a?e.replace(/<\/?highlight>/g,""):e,isHighlight:a,highlightIndex:a?s:-1,idx:n};return a&&s++,t}),totalHighlights:n}},[S]),B=L.parts,D=L.totalHighlights,R=function(e,n){void 0===n&&(n=!1);var s=n?k.current[e]:H.current[e],a=n?b.current:C.current;s&&a&&s.scrollIntoView({behavior:"smooth",block:"center"})},y=function(e){if(void 0===e&&(e=!1),D){var n=N>0?N-1:D-1;I(n),setTimeout(function(){return R(n,e)},50)}},W=function(e){if(void 0===e&&(e=!1),D){var n=N<D-1?N+1:0;I(n),setTimeout(function(){return R(n,e)},50)}};s.useEffect(function(){H.current=H.current.slice(0,D),k.current=k.current.slice(0,D)},[D]),s.useEffect(function(){var e;return v&&D>0&&(I(0),e=setTimeout(function(){return R(0)},50)),function(){e&&clearTimeout(e)}},[v,D]);var w=function(s){return s.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(s,t){return s.startsWith("**")&&s.endsWith("**")||s.startsWith("__")&&s.endsWith("__")?n.jsx("strong",e.__assign({className:a.default.boldText},{children:s.slice(2,-2)}),t):s})},A=s.useMemo(function(){var n=[],s=[];return B.forEach(function(a){var t=a.text,i=a.isHighlight,l=a.highlightIndex;t.split("\n").forEach(function(a,t){t>0&&((s.length>0||n.length>0)&&n.push({segments:e.__spreadArray([],s,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),s=[]),a&&s.push({text:a,isHighlight:i,highlightIndex:l})})}),s.length>0&&n.push({segments:e.__spreadArray([],s,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),n.map(function(n){var s=n.segments.map(function(e){return e.text}).join(""),a=s.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/),t=s.match(/^(Title|Description|Training-basis):\s*(.*)$/i);return e.__assign(e.__assign({},n),{isListItem:!!a,isHeader:!!t,indent:(null==a?void 0:a[1])||"",content:(null==a?void 0:a[3])||s})})},[B]),M=function(s){void 0===s&&(s=!1);var t=0;return A.map(function(i,l){i.isHeader&&(t=0),i.isListItem&&(t+=1);var c=function(){return i.segments.map(function(t,l){var c=t.isHighlight&&t.highlightIndex===N,r=t.text;return i.isListItem&&0===l&&(r=t.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),t.isHighlight?n.jsx("span",e.__assign({ref:function(e){e&&(s?k.current[t.highlightIndex]=e:H.current[t.highlightIndex]=e)},className:"".concat(a.default.highlight).concat(c?" ".concat(a.default.highlightActive):"")},{children:w(r)}),l):n.jsx("span",{children:w(r)},l)})};return i.isHeader?n.jsx("span",e.__assign({className:a.default.headerLine},{children:c()}),l):i.isListItem?n.jsxs("span",e.__assign({className:a.default.listItemLine,style:{paddingLeft:i.indent?"1rem":"0"}},{children:[n.jsxs("span",e.__assign({className:a.default.listCounter},{children:[t,"."]})),n.jsx("span",{children:c()})]}),l):n.jsx("span",e.__assign({className:a.default.blockLine},{children:c()}),l)})};return n.jsxs("div",e.__assign({className:a.default.container},{children:[n.jsxs("div",e.__assign({className:a.default.itemRow},{children:["number"==typeof c&&n.jsxs("span",e.__assign({className:a.default.indexNumber},{children:[c+1,"."]})),n.jsxs("div",e.__assign({className:a.default.textContent},{children:[n.jsx("span",{children:null==l?void 0:l.text}),(null==l?void 0:l.paraphrase)&&n.jsxs("button",e.__assign({type:"button",onClick:function(){return p(!v)},className:a.default.paraphraseButton},{children:[n.jsxs("span",e.__assign({className:a.default.paraphraseText},{children:[n.jsx("span",e.__assign({className:a.default.paraphraseStar},{children:"✦"})),l.paraphrase]})),f&&n.jsx(f,{className:"".concat(a.default.chevronIcon).concat(v?" ".concat(a.default.chevronIconRotated):"")})]}))]}))]})),v&&n.jsxs("div",e.__assign({className:a.default.expandedContainer},{children:[n.jsxs("div",e.__assign({className:a.default.expandedHeader},{children:[n.jsx("span",e.__assign({className:a.default.headerTitle},{children:o})),n.jsxs("div",e.__assign({className:a.default.headerActions},{children:[D>1&&n.jsxs("div",e.__assign({className:a.default.navigationContainer},{children:[g&&n.jsx("button",e.__assign({onClick:function(){return y(!1)},className:a.default.navButton},{children:n.jsx(g,{className:a.default.navIcon})})),n.jsxs("span",e.__assign({className:a.default.navCounter},{children:[N+1,"/",D]})),f&&n.jsx("button",e.__assign({onClick:function(){return W(!1)},className:a.default.navButton},{children:n.jsx(f,{className:a.default.navIcon})}))]})),null!=(null==l?void 0:l.confidence_score)&&n.jsxs("span",e.__assign({className:a.default.confidenceBadge},{children:[n.jsx("span",e.__assign({className:a.default.confidenceStar},{children:"✦"})),n.jsxs("span",e.__assign({className:a.default.confidenceScore},{children:[null==l?void 0:l.confidence_score,"%"]}))]})),_&&n.jsx("button",e.__assign({onClick:function(){var e;null===(e=T.current)||void 0===e||e.showModal()},className:a.default.maximizeButton,title:"View fullscreen"},{children:n.jsx(_,{className:a.default.maximizeIcon})}))]}))]})),n.jsx("div",e.__assign({ref:C,className:a.default.contentArea},{children:n.jsx("div",e.__assign({className:a.default.contentInner},{children:M(!1)}))})),l.trainingDataTitle&&n.jsx("div",e.__assign({className:a.default.footer},{children:n.jsx("span",e.__assign({className:a.default.trainingTitle},{children:l.trainingDataTitle}))}))]})),n.jsx("dialog",e.__assign({ref:T,className:a.default.modalDialog,onClick:function(e){var n;e.target===T.current&&(null===(n=T.current)||void 0===n||n.close())}},{children:n.jsxs("div",e.__assign({className:a.default.modalContainer},{children:[n.jsxs("div",e.__assign({className:a.default.modalHeader},{children:[n.jsx("span",e.__assign({className:a.default.modalHeaderTitle},{children:o})),n.jsxs("div",e.__assign({className:a.default.modalHeaderActions},{children:[D>1&&n.jsxs("div",e.__assign({className:a.default.modalNavContainer},{children:[g&&n.jsx("button",e.__assign({onClick:function(){return y(!0)},className:a.default.modalNavButton},{children:n.jsx(g,{className:a.default.navIcon})})),n.jsxs("span",e.__assign({className:a.default.navCounter},{children:[N+1,"/",D]})),f&&n.jsx("button",e.__assign({onClick:function(){return W(!0)},className:a.default.modalNavButton},{children:n.jsx(f,{className:a.default.navIcon})}))]})),null!=(null==l?void 0:l.confidence_score)&&n.jsxs("span",e.__assign({className:a.default.confidenceBadge},{children:[n.jsx("span",e.__assign({className:a.default.confidenceStar},{children:"✦"})),n.jsxs("span",e.__assign({className:a.default.confidenceScore},{children:[null==l?void 0:l.confidence_score,"%"]}))]})),m&&n.jsx("button",e.__assign({onClick:function(){var e;null===(e=T.current)||void 0===e||e.close()},className:a.default.closeButton,title:"Close"},{children:n.jsx(m,{className:a.default.closeIcon})}))]}))]})),n.jsx("div",e.__assign({ref:b,className:a.default.modalContent},{children:n.jsx("div",e.__assign({className:a.default.modalContentInner},{children:M(!0)}))})),l.trainingDataTitle&&n.jsx("div",e.__assign({className:a.default.modalFooter},{children:n.jsx("span",e.__assign({className:a.default.trainingTitle},{children:l.trainingDataTitle}))})),h&&n.jsx("div",e.__assign({className:a.default.modalFooterSource},{children:n.jsxs("button",e.__assign({type:"button",onClick:function(){var e;null==u||u(),null===(e=T.current)||void 0===e||e.close()},className:a.default.trainingTitleLink},{children:[h,n.jsx(t.ExternalLink,{size:16,color:"#2563eb"})]}))}))]}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("react"),a=require("./CognitiveNonWebSearchReasoning.module.css.js"),t=require("lucide-react");exports.default=function(i){var l=i.item,c=i.index,r=i.iconsConfig,d=i.headerTitle,o=void 0===d?"GPT - Gemini 2.5 Flash":d,u=i.previewCallback,h=i.DocumentTitle,f=null==r?void 0:r.ChevronDownIcon,g=null==r?void 0:r.ChevronUpIcon,_=null==r?void 0:r.MaximizeIcon,m=null==r?void 0:r.CloseIcon,x=s.useState(!1),v=x[0],j=x[1],p=s.useState(0),N=p[0],I=p[1],C=s.useRef(null),b=s.useRef(null),T=s.useRef(null),k=s.useRef([]),H=s.useRef([]),L=s.useMemo(function(){return l.dataSource?l.dataSource.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):""},[l.dataSource]),S=s.useMemo(function(){var e=L.split(/(<highlight>[\s\S]*?<\/highlight>)/g)||[],n=e.filter(function(e){return e.startsWith("<highlight>")}).length,s=0;return{parts:e.map(function(e,n){var a=e.startsWith("<highlight>"),t={text:a?e.replace(/<\/?highlight>/g,""):e,isHighlight:a,highlightIndex:a?s:-1,idx:n};return a&&s++,t}),totalHighlights:n}},[L]),B=S.parts,y=S.totalHighlights,D=function(e,n){void 0===n&&(n=!1);var s=n?H.current[e]:k.current[e],a=n?b.current:C.current;s&&a&&s.scrollIntoView({behavior:"smooth",block:"center"})},R=function(e){if(void 0===e&&(e=!1),y){var n=N>0?N-1:y-1;I(n),setTimeout(function(){return D(n,e)},50)}},W=function(e){if(void 0===e&&(e=!1),y){var n=N<y-1?N+1:0;I(n),setTimeout(function(){return D(n,e)},50)}};s.useEffect(function(){k.current=k.current.slice(0,y),H.current=H.current.slice(0,y)},[y]),s.useEffect(function(){var e;return v&&y>0&&(I(0),e=setTimeout(function(){return D(0)},50)),function(){e&&clearTimeout(e)}},[v,y]);var w=function(s){return s.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(s,t){return s.startsWith("**")&&s.endsWith("**")||s.startsWith("__")&&s.endsWith("__")?n.jsx("strong",e.__assign({className:a.default.boldText},{children:s.slice(2,-2)}),t):s})},A=s.useMemo(function(){var n=[],s=[];return B.forEach(function(a){var t=a.text,i=a.isHighlight,l=a.highlightIndex;t.split("\n").forEach(function(a,t){t>0&&((s.length>0||n.length>0)&&n.push({segments:e.__spreadArray([],s,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),s=[]),a&&s.push({text:a,isHighlight:i,highlightIndex:l})})}),s.length>0&&n.push({segments:e.__spreadArray([],s,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),n.map(function(n){var s=n.segments.map(function(e){return e.text}).join(""),a=s.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/),t=s.match(/^(Title|Description|Training-basis):\s*(.*)$/i);return e.__assign(e.__assign({},n),{isListItem:!!a,isHeader:!!t,indent:(null==a?void 0:a[1])||"",content:(null==a?void 0:a[3])||s})})},[B]),E=function(s){void 0===s&&(s=!1);var t=0;return A.map(function(i,l){i.isHeader&&(t=0),i.isListItem&&(t+=1);var c=function(){return i.segments.map(function(t,l){var c=t.isHighlight&&t.highlightIndex===N,r=t.text;return i.isListItem&&0===l&&(r=t.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),t.isHighlight?n.jsx("span",e.__assign({ref:function(e){e&&(s?H.current[t.highlightIndex]=e:k.current[t.highlightIndex]=e)},className:"".concat(a.default.highlight).concat(c?" ".concat(a.default.highlightActive):"")},{children:w(r)}),l):n.jsx("span",{children:w(r)},l)})};return i.isHeader?n.jsx("span",e.__assign({className:a.default.headerLine},{children:c()}),l):i.isListItem?n.jsxs("span",e.__assign({className:a.default.listItemLine,style:{paddingLeft:i.indent?"1rem":"0"}},{children:[n.jsxs("span",e.__assign({className:a.default.listCounter},{children:[t,"."]})),n.jsx("span",{children:c()})]}),l):n.jsx("span",e.__assign({className:a.default.blockLine},{children:c()}),l)})};return n.jsxs("div",e.__assign({className:a.default.container},{children:[n.jsxs("div",e.__assign({className:a.default.itemRow},{children:["number"==typeof c&&n.jsxs("span",e.__assign({className:a.default.indexNumber},{children:[c+1,"."]})),n.jsxs("div",e.__assign({className:a.default.textContent},{children:[n.jsx("span",{children:null==l?void 0:l.text}),(null==l?void 0:l.paraphrase)&&n.jsxs("button",e.__assign({type:"button",onClick:function(){return j(!v)},className:a.default.paraphraseButton},{children:[n.jsxs("span",e.__assign({className:a.default.paraphraseText},{children:[n.jsx("span",e.__assign({className:a.default.paraphraseStar},{children:"✦"})),l.paraphrase]})),f&&n.jsx(f,{className:"".concat(a.default.chevronIcon).concat(v?" ".concat(a.default.chevronIconRotated):"")})]}))]}))]})),v&&n.jsxs("div",e.__assign({className:a.default.expandedContainer},{children:[n.jsxs("div",e.__assign({className:a.default.expandedHeader},{children:[n.jsx("span",e.__assign({className:a.default.headerTitle},{children:o})),n.jsxs("div",e.__assign({className:a.default.headerActions},{children:[y>1&&n.jsxs("div",e.__assign({className:a.default.navigationContainer},{children:[g&&n.jsx("button",e.__assign({onClick:function(){return R(!1)},className:a.default.navButton},{children:n.jsx(g,{className:a.default.navIcon})})),n.jsxs("span",e.__assign({className:a.default.navCounter},{children:[N+1,"/",y]})),f&&n.jsx("button",e.__assign({onClick:function(){return W(!1)},className:a.default.navButton},{children:n.jsx(f,{className:a.default.navIcon})}))]})),null!=(null==l?void 0:l.confidence_score)&&n.jsxs("span",e.__assign({className:a.default.confidenceBadge},{children:[n.jsx("span",e.__assign({className:a.default.confidenceStar},{children:"✦"})),n.jsxs("span",e.__assign({className:a.default.confidenceScore},{children:[null==l?void 0:l.confidence_score,"%"]}))]})),_&&n.jsx("button",e.__assign({onClick:function(){var e;null===(e=T.current)||void 0===e||e.showModal()},className:a.default.maximizeButton,title:"View fullscreen"},{children:n.jsx(_,{className:a.default.maximizeIcon})}))]}))]})),n.jsx("div",e.__assign({ref:C,className:a.default.contentArea},{children:n.jsx("div",e.__assign({className:a.default.contentInner},{children:E(!1)}))})),l.trainingDataTitle&&n.jsx("div",e.__assign({className:a.default.footer},{children:n.jsx("span",e.__assign({className:a.default.trainingTitle},{children:l.trainingDataTitle}))})),h&&n.jsx("div",e.__assign({className:a.default.modalFooterSource},{children:n.jsxs("button",e.__assign({type:"button",onClick:function(){null==u||u()},className:a.default.trainingTitleLink},{children:[h,n.jsx(t.ExternalLink,{size:16,color:"#2563eb"})]}))}))]})),n.jsx("dialog",e.__assign({ref:T,className:a.default.modalDialog,onClick:function(e){var n;e.target===T.current&&(null===(n=T.current)||void 0===n||n.close())}},{children:n.jsxs("div",e.__assign({className:a.default.modalContainer},{children:[n.jsxs("div",e.__assign({className:a.default.modalHeader},{children:[n.jsx("span",e.__assign({className:a.default.modalHeaderTitle},{children:o})),n.jsxs("div",e.__assign({className:a.default.modalHeaderActions},{children:[y>1&&n.jsxs("div",e.__assign({className:a.default.modalNavContainer},{children:[g&&n.jsx("button",e.__assign({onClick:function(){return R(!0)},className:a.default.modalNavButton},{children:n.jsx(g,{className:a.default.navIcon})})),n.jsxs("span",e.__assign({className:a.default.navCounter},{children:[N+1,"/",y]})),f&&n.jsx("button",e.__assign({onClick:function(){return W(!0)},className:a.default.modalNavButton},{children:n.jsx(f,{className:a.default.navIcon})}))]})),null!=(null==l?void 0:l.confidence_score)&&n.jsxs("span",e.__assign({className:a.default.confidenceBadge},{children:[n.jsx("span",e.__assign({className:a.default.confidenceStar},{children:"✦"})),n.jsxs("span",e.__assign({className:a.default.confidenceScore},{children:[null==l?void 0:l.confidence_score,"%"]}))]})),m&&n.jsx("button",e.__assign({onClick:function(){var e;null===(e=T.current)||void 0===e||e.close()},className:a.default.closeButton,title:"Close"},{children:n.jsx(m,{className:a.default.closeIcon})}))]}))]})),n.jsx("div",e.__assign({ref:b,className:a.default.modalContent},{children:n.jsx("div",e.__assign({className:a.default.modalContentInner},{children:E(!0)}))})),l.trainingDataTitle&&n.jsx("div",e.__assign({className:a.default.modalFooter},{children:n.jsx("span",e.__assign({className:a.default.trainingTitle},{children:l.trainingDataTitle}))})),h&&n.jsx("div",e.__assign({className:a.default.modalFooterSource},{children:n.jsxs("button",e.__assign({type:"button",onClick:function(){var e;null==u||u(),null===(e=T.current)||void 0===e||e.close()},className:a.default.trainingTitleLink},{children:[h,n.jsx(t.ExternalLink,{size:16,color:"#2563eb"})]}))}))]}))}))]}))};
2
2
  //# sourceMappingURL=CognitiveInternalgptReasoningComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{ChevronDown as d}from"lucide-react";var l=function(l){var a,s=l.children,u=l.uploadListTopContent,c=l.defaultHeight,p=void 0===c?300:c,h=l.minHeight,f=void 0===h?150:h,x=l.maxHeight,m=l.isExpanded,g=void 0!==m&&m,v=l.onToggle,y=l.onHeightChange,b=l.styles,w=void 0===b?{}:b,C=o(!1),H=C[0],S=C[1],k=o(p),E=k[0],B=k[1],D=i(0),I=i(p),L=i(null),R=i(0),z="string"==typeof x?parseFloat(x)/100*window.innerHeight:null!=x?x:.4*window.innerHeight;r(function(){!g&&L.current&&(R.current=L.current.getBoundingClientRect().height)},[g]);return r(function(){if(H){var e=function(e){e.preventDefault();var t=e.clientY-D.current,n=Math.max(f,Math.min(z,I.current+t));B(n),null==y||y(n)},t=function(){S(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[H]),t("div",e({ref:L,style:{position:"relative",width:"100%",minHeight:g?R.current:"auto"}},{children:[t("div",e({style:e({position:g?"absolute":"relative",zIndex:g?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:g?"".concat(E,"px"):"auto",minHeight:g?"".concat(f,"px"):"auto",maxHeight:g?"".concat(E,"px"):"auto",overflow:"hidden",width:"100%"},w.container)},{children:[n("div",e({style:e({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},w.header)},{children:n("span",e({style:e({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},w.title)},{children:(null==u?void 0:u.trim())?u:"Data uploaded for your context"}))})),g&&n("div",e({style:e({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},w.body)},{children:s})),g&&n("div",e({onMouseDown:function(e){e.preventDefault(),S(!0),D.current=e.clientY,I.current=E,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:n("div",{style:e({width:48,height:4,borderRadius:4,background:H?"#a78bfa":"#d1d5db"},w.dragPill)})}))]})),n("div",e({style:{position:g?"absolute":"relative",top:g?"".concat(E,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:g?10:"auto"}},{children:n("button",e({onClick:v,"aria-label":g?"Collapse":"Expand",style:e({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},w.notch)},{children:n(d,{size:14,color:null!==(a=w.notchArrowColor)&&void 0!==a?a:"#6d28d9",style:{transform:g?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};export{l as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as n,useRef as i,useEffect as r}from"react";import{ChevronDown as l}from"lucide-react";var d=function(d){var a,s,u=d.children,c=d.uploadListTopContent,p=d.defaultHeight,h=void 0===p?300:p,f=d.minHeight,x=void 0===f?150:f,m=d.maxHeight,g=d.isExpanded,v=void 0!==g&&g,y=d.onToggle,b=d.onHeightChange,w=d.styles,C=void 0===w?{}:w,H=n(!1),S=H[0],k=H[1],E=n(h),B=E[0],D=E[1],I=i(0),L=i(h),R=i(null),z=i(0),j="string"==typeof m?parseFloat(m)/100*window.innerHeight:null!=m?m:.4*window.innerHeight;r(function(){!v&&R.current&&(z.current=R.current.getBoundingClientRect().height)},[v]);return r(function(){if(S){var e=function(e){e.preventDefault();var t=e.clientY-I.current,o=Math.max(x,Math.min(j,L.current+t));D(o),null==b||b(o)},t=function(){k(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[S]),t("div",e({ref:R,style:{position:"relative",width:"100%",minHeight:v?z.current:"auto"}},{children:[t("div",e({style:e({position:v?"absolute":"relative",zIndex:v?10:"auto",left:0,right:0,top:0,display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:v?"".concat(B,"px"):"auto",minHeight:v?"".concat(x,"px"):"auto",maxHeight:v?"".concat(B,"px"):"auto",overflow:"hidden",width:"100%"},C.container)},{children:[o("div",e({style:e({display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"},C.header)},{children:o("span",e({style:e({display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"},C.title)},{children:(null==c?void 0:c.trim())?c:"Data uploaded for your context"}))})),v&&o("div",e({style:e({flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"},C.body)},{children:u})),v&&o("div",e({onMouseDown:function(e){e.preventDefault(),k(!0),I.current=e.clientY,L.current=B,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:o("div",{style:e({width:48,height:4,borderRadius:4,background:S?null!==(a=C.dragPillActiveColor)&&void 0!==a?a:"#a78bfa":"#d1d5db"},C.dragPill)})}))]})),o("div",e({style:{position:v?"absolute":"relative",top:v?"".concat(B,"px"):"auto",width:"100%",display:"flex",justifyContent:"center",height:18,zIndex:v?10:"auto"}},{children:o("button",e({onClick:y,"aria-label":v?"Collapse":"Expand",style:e({position:"absolute",width:"52px",height:"18px",borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",border:"1px solid rgb(189, 180, 254)",borderTop:"none",backgroundColor:"#fff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0},C.notch)},{children:o(l,{size:14,color:null!==(s=C.notchArrowColor)&&void 0!==s?s:"#6d28d9",style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})}))}))]}))};export{d as default};
2
2
  //# sourceMappingURL=ChatDrawer.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as r,__assign as a}from"tslib";import{jsx as t}from"react/jsx-runtime";import o,{tooltipClasses as e}from"@mui/material/Tooltip";import{styled as i}from"@mui/material/styles";var n=i(function(e){var i=e.className,n=r(e,["className"]);return t(o,a({},n,{classes:{popper:i}}))})(function(){var r;return(r={})["& .".concat(e.tooltip)]={fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"#555",color:"#fff",fontSize:12,padding:"5px 8px",borderRadius:6,maxWidth:250,textAlign:"center",whiteSpace:"normal",wordBreak:"break-word",lineHeight:1.4},r["& .".concat(e.arrow)]={color:"#555"},r}),l=function(r){var o=r.description,e=r.children;return t(n,a({title:t("span",{children:o}),arrow:!0,placement:"top"},{children:t("span",a({style:{display:"inline-block"}},{children:e}))}))};export{l as default};
1
+ import{__rest as r,__assign as a}from"tslib";import{jsx as t}from"react/jsx-runtime";import o,{tooltipClasses as e}from"@mui/material/Tooltip";import{styled as i}from"@mui/material/styles";var n=i(function(e){var i=e.className,n=r(e,["className"]);return t(o,a({},n,{classes:{popper:i},arrow:!0,placement:"top"}))})(function(){var r;return(r={})["& .".concat(e.tooltip)]={fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"#555",color:"#fff",fontSize:12,padding:"5px 8px",borderRadius:6,maxWidth:250,textAlign:"center",whiteSpace:"normal",wordBreak:"break-word",lineHeight:1.4},r["& .".concat(e.arrow)]={color:"#555"},r}),l=function(r){var o=r.description,e=r.children;return t(n,a({title:t("span",{children:o})},{children:t("span",a({style:{display:"inline-block"}},{children:e}))}))};export{l as default};
2
2
  //# sourceMappingURL=TooltipComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__spreadArray as n,__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as a,useRef as c,useMemo as r,useEffect as l}from"react";import s from"./CognitiveNonWebSearchReasoning.module.css.js";import{ExternalLink as o}from"lucide-react";var d=function(d){var h=d.item,u=d.index,m=d.iconsConfig,v=d.headerTitle,g=void 0===v?"GPT - Gemini 2.5 Flash":v,p=d.previewCallback,f=d.DocumentTitle,N=null==m?void 0:m.ChevronDownIcon,I=null==m?void 0:m.ChevronUpIcon,x=null==m?void 0:m.MaximizeIcon,C=null==m?void 0:m.CloseIcon,b=a(!1),T=b[0],H=b[1],k=a(0),_=k[0],L=k[1],S=c(null),B=c(null),D=c(null),W=c([]),w=c([]),y=r(function(){return h.dataSource?h.dataSource.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):""},[h.dataSource]),z=r(function(){var n=y.split(/(<highlight>[\s\S]*?<\/highlight>)/g)||[],e=n.filter(function(n){return n.startsWith("<highlight>")}).length,i=0;return{parts:n.map(function(n,e){var t=n.startsWith("<highlight>"),a={text:t?n.replace(/<\/?highlight>/g,""):n,isHighlight:t,highlightIndex:t?i:-1,idx:e};return t&&i++,a}),totalHighlights:e}},[y]),A=z.parts,j=z.totalHighlights,F=function(n,e){void 0===e&&(e=!1);var i=e?w.current[n]:W.current[n],t=e?B.current:S.current;i&&t&&i.scrollIntoView({behavior:"smooth",block:"center"})},R=function(n){if(void 0===n&&(n=!1),j){var e=_>0?_-1:j-1;L(e),setTimeout(function(){return F(e,n)},50)}},E=function(n){if(void 0===n&&(n=!1),j){var e=_<j-1?_+1:0;L(e),setTimeout(function(){return F(e,n)},50)}};l(function(){W.current=W.current.slice(0,j),w.current=w.current.slice(0,j)},[j]),l(function(){var n;return T&&j>0&&(L(0),n=setTimeout(function(){return F(0)},50)),function(){n&&clearTimeout(n)}},[T,j]);var G=function(n){return n.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(n,i){return n.startsWith("**")&&n.endsWith("**")||n.startsWith("__")&&n.endsWith("__")?t("strong",e({className:s.boldText},{children:n.slice(2,-2)}),i):n})},M=r(function(){var i=[],t=[];return A.forEach(function(e){var a=e.text,c=e.isHighlight,r=e.highlightIndex;a.split("\n").forEach(function(e,a){a>0&&((t.length>0||i.length>0)&&i.push({segments:n([],t,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),t=[]),e&&t.push({text:e,isHighlight:c,highlightIndex:r})})}),t.length>0&&i.push({segments:n([],t,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),i.map(function(n){var i=n.segments.map(function(n){return n.text}).join(""),t=i.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/),a=i.match(/^(Title|Description|Training-basis):\s*(.*)$/i);return e(e({},n),{isListItem:!!t,isHeader:!!a,indent:(null==t?void 0:t[1])||"",content:(null==t?void 0:t[3])||i})})},[A]),V=function(n){void 0===n&&(n=!1);var a=0;return M.map(function(c,r){c.isHeader&&(a=0),c.isListItem&&(a+=1);var l=function(){return c.segments.map(function(i,a){var r=i.isHighlight&&i.highlightIndex===_,l=i.text;return c.isListItem&&0===a&&(l=i.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),i.isHighlight?t("span",e({ref:function(e){e&&(n?w.current[i.highlightIndex]=e:W.current[i.highlightIndex]=e)},className:"".concat(s.highlight).concat(r?" ".concat(s.highlightActive):"")},{children:G(l)}),a):t("span",{children:G(l)},a)})};return c.isHeader?t("span",e({className:s.headerLine},{children:l()}),r):c.isListItem?i("span",e({className:s.listItemLine,style:{paddingLeft:c.indent?"1rem":"0"}},{children:[i("span",e({className:s.listCounter},{children:[a,"."]})),t("span",{children:l()})]}),r):t("span",e({className:s.blockLine},{children:l()}),r)})};return i("div",e({className:s.container},{children:[i("div",e({className:s.itemRow},{children:["number"==typeof u&&i("span",e({className:s.indexNumber},{children:[u+1,"."]})),i("div",e({className:s.textContent},{children:[t("span",{children:null==h?void 0:h.text}),(null==h?void 0:h.paraphrase)&&i("button",e({type:"button",onClick:function(){return H(!T)},className:s.paraphraseButton},{children:[i("span",e({className:s.paraphraseText},{children:[t("span",e({className:s.paraphraseStar},{children:"✦"})),h.paraphrase]})),N&&t(N,{className:"".concat(s.chevronIcon).concat(T?" ".concat(s.chevronIconRotated):"")})]}))]}))]})),T&&i("div",e({className:s.expandedContainer},{children:[i("div",e({className:s.expandedHeader},{children:[t("span",e({className:s.headerTitle},{children:g})),i("div",e({className:s.headerActions},{children:[j>1&&i("div",e({className:s.navigationContainer},{children:[I&&t("button",e({onClick:function(){return R(!1)},className:s.navButton},{children:t(I,{className:s.navIcon})})),i("span",e({className:s.navCounter},{children:[_+1,"/",j]})),N&&t("button",e({onClick:function(){return E(!1)},className:s.navButton},{children:t(N,{className:s.navIcon})}))]})),null!=(null==h?void 0:h.confidence_score)&&i("span",e({className:s.confidenceBadge},{children:[t("span",e({className:s.confidenceStar},{children:"✦"})),i("span",e({className:s.confidenceScore},{children:[null==h?void 0:h.confidence_score,"%"]}))]})),x&&t("button",e({onClick:function(){var n;null===(n=D.current)||void 0===n||n.showModal()},className:s.maximizeButton,title:"View fullscreen"},{children:t(x,{className:s.maximizeIcon})}))]}))]})),t("div",e({ref:S,className:s.contentArea},{children:t("div",e({className:s.contentInner},{children:V(!1)}))})),h.trainingDataTitle&&t("div",e({className:s.footer},{children:t("span",e({className:s.trainingTitle},{children:h.trainingDataTitle}))}))]})),t("dialog",e({ref:D,className:s.modalDialog,onClick:function(n){var e;n.target===D.current&&(null===(e=D.current)||void 0===e||e.close())}},{children:i("div",e({className:s.modalContainer},{children:[i("div",e({className:s.modalHeader},{children:[t("span",e({className:s.modalHeaderTitle},{children:g})),i("div",e({className:s.modalHeaderActions},{children:[j>1&&i("div",e({className:s.modalNavContainer},{children:[I&&t("button",e({onClick:function(){return R(!0)},className:s.modalNavButton},{children:t(I,{className:s.navIcon})})),i("span",e({className:s.navCounter},{children:[_+1,"/",j]})),N&&t("button",e({onClick:function(){return E(!0)},className:s.modalNavButton},{children:t(N,{className:s.navIcon})}))]})),null!=(null==h?void 0:h.confidence_score)&&i("span",e({className:s.confidenceBadge},{children:[t("span",e({className:s.confidenceStar},{children:"✦"})),i("span",e({className:s.confidenceScore},{children:[null==h?void 0:h.confidence_score,"%"]}))]})),C&&t("button",e({onClick:function(){var n;null===(n=D.current)||void 0===n||n.close()},className:s.closeButton,title:"Close"},{children:t(C,{className:s.closeIcon})}))]}))]})),t("div",e({ref:B,className:s.modalContent},{children:t("div",e({className:s.modalContentInner},{children:V(!0)}))})),h.trainingDataTitle&&t("div",e({className:s.modalFooter},{children:t("span",e({className:s.trainingTitle},{children:h.trainingDataTitle}))})),f&&t("div",e({className:s.modalFooterSource},{children:i("button",e({type:"button",onClick:function(){var n;null==p||p(),null===(n=D.current)||void 0===n||n.close()},className:s.trainingTitleLink},{children:[f,t(o,{size:16,color:"#2563eb"})]}))}))]}))}))]}))};export{d as default};
1
+ import{__spreadArray as n,__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as a,useRef as c,useMemo as l,useEffect as r}from"react";import s from"./CognitiveNonWebSearchReasoning.module.css.js";import{ExternalLink as o}from"lucide-react";var d=function(d){var h=d.item,u=d.index,m=d.iconsConfig,v=d.headerTitle,g=void 0===v?"GPT - Gemini 2.5 Flash":v,p=d.previewCallback,f=d.DocumentTitle,N=null==m?void 0:m.ChevronDownIcon,I=null==m?void 0:m.ChevronUpIcon,C=null==m?void 0:m.MaximizeIcon,x=null==m?void 0:m.CloseIcon,b=a(!1),T=b[0],H=b[1],k=a(0),L=k[0],S=k[1],_=c(null),B=c(null),D=c(null),W=c([]),w=c([]),y=l(function(){return h.dataSource?h.dataSource.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):""},[h.dataSource]),z=l(function(){var n=y.split(/(<highlight>[\s\S]*?<\/highlight>)/g)||[],e=n.filter(function(n){return n.startsWith("<highlight>")}).length,i=0;return{parts:n.map(function(n,e){var t=n.startsWith("<highlight>"),a={text:t?n.replace(/<\/?highlight>/g,""):n,isHighlight:t,highlightIndex:t?i:-1,idx:e};return t&&i++,a}),totalHighlights:e}},[y]),A=z.parts,F=z.totalHighlights,j=function(n,e){void 0===e&&(e=!1);var i=e?w.current[n]:W.current[n],t=e?B.current:_.current;i&&t&&i.scrollIntoView({behavior:"smooth",block:"center"})},R=function(n){if(void 0===n&&(n=!1),F){var e=L>0?L-1:F-1;S(e),setTimeout(function(){return j(e,n)},50)}},E=function(n){if(void 0===n&&(n=!1),F){var e=L<F-1?L+1:0;S(e),setTimeout(function(){return j(e,n)},50)}};r(function(){W.current=W.current.slice(0,F),w.current=w.current.slice(0,F)},[F]),r(function(){var n;return T&&F>0&&(S(0),n=setTimeout(function(){return j(0)},50)),function(){n&&clearTimeout(n)}},[T,F]);var G=function(n){return n.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(n,i){return n.startsWith("**")&&n.endsWith("**")||n.startsWith("__")&&n.endsWith("__")?t("strong",e({className:s.boldText},{children:n.slice(2,-2)}),i):n})},M=l(function(){var i=[],t=[];return A.forEach(function(e){var a=e.text,c=e.isHighlight,l=e.highlightIndex;a.split("\n").forEach(function(e,a){a>0&&((t.length>0||i.length>0)&&i.push({segments:n([],t,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),t=[]),e&&t.push({text:e,isHighlight:c,highlightIndex:l})})}),t.length>0&&i.push({segments:n([],t,!0),isListItem:!1,isHeader:!1,indent:"",content:""}),i.map(function(n){var i=n.segments.map(function(n){return n.text}).join(""),t=i.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/),a=i.match(/^(Title|Description|Training-basis):\s*(.*)$/i);return e(e({},n),{isListItem:!!t,isHeader:!!a,indent:(null==t?void 0:t[1])||"",content:(null==t?void 0:t[3])||i})})},[A]),V=function(n){void 0===n&&(n=!1);var a=0;return M.map(function(c,l){c.isHeader&&(a=0),c.isListItem&&(a+=1);var r=function(){return c.segments.map(function(i,a){var l=i.isHighlight&&i.highlightIndex===L,r=i.text;return c.isListItem&&0===a&&(r=i.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),i.isHighlight?t("span",e({ref:function(e){e&&(n?w.current[i.highlightIndex]=e:W.current[i.highlightIndex]=e)},className:"".concat(s.highlight).concat(l?" ".concat(s.highlightActive):"")},{children:G(r)}),a):t("span",{children:G(r)},a)})};return c.isHeader?t("span",e({className:s.headerLine},{children:r()}),l):c.isListItem?i("span",e({className:s.listItemLine,style:{paddingLeft:c.indent?"1rem":"0"}},{children:[i("span",e({className:s.listCounter},{children:[a,"."]})),t("span",{children:r()})]}),l):t("span",e({className:s.blockLine},{children:r()}),l)})};return i("div",e({className:s.container},{children:[i("div",e({className:s.itemRow},{children:["number"==typeof u&&i("span",e({className:s.indexNumber},{children:[u+1,"."]})),i("div",e({className:s.textContent},{children:[t("span",{children:null==h?void 0:h.text}),(null==h?void 0:h.paraphrase)&&i("button",e({type:"button",onClick:function(){return H(!T)},className:s.paraphraseButton},{children:[i("span",e({className:s.paraphraseText},{children:[t("span",e({className:s.paraphraseStar},{children:"✦"})),h.paraphrase]})),N&&t(N,{className:"".concat(s.chevronIcon).concat(T?" ".concat(s.chevronIconRotated):"")})]}))]}))]})),T&&i("div",e({className:s.expandedContainer},{children:[i("div",e({className:s.expandedHeader},{children:[t("span",e({className:s.headerTitle},{children:g})),i("div",e({className:s.headerActions},{children:[F>1&&i("div",e({className:s.navigationContainer},{children:[I&&t("button",e({onClick:function(){return R(!1)},className:s.navButton},{children:t(I,{className:s.navIcon})})),i("span",e({className:s.navCounter},{children:[L+1,"/",F]})),N&&t("button",e({onClick:function(){return E(!1)},className:s.navButton},{children:t(N,{className:s.navIcon})}))]})),null!=(null==h?void 0:h.confidence_score)&&i("span",e({className:s.confidenceBadge},{children:[t("span",e({className:s.confidenceStar},{children:"✦"})),i("span",e({className:s.confidenceScore},{children:[null==h?void 0:h.confidence_score,"%"]}))]})),C&&t("button",e({onClick:function(){var n;null===(n=D.current)||void 0===n||n.showModal()},className:s.maximizeButton,title:"View fullscreen"},{children:t(C,{className:s.maximizeIcon})}))]}))]})),t("div",e({ref:_,className:s.contentArea},{children:t("div",e({className:s.contentInner},{children:V(!1)}))})),h.trainingDataTitle&&t("div",e({className:s.footer},{children:t("span",e({className:s.trainingTitle},{children:h.trainingDataTitle}))})),f&&t("div",e({className:s.modalFooterSource},{children:i("button",e({type:"button",onClick:function(){null==p||p()},className:s.trainingTitleLink},{children:[f,t(o,{size:16,color:"#2563eb"})]}))}))]})),t("dialog",e({ref:D,className:s.modalDialog,onClick:function(n){var e;n.target===D.current&&(null===(e=D.current)||void 0===e||e.close())}},{children:i("div",e({className:s.modalContainer},{children:[i("div",e({className:s.modalHeader},{children:[t("span",e({className:s.modalHeaderTitle},{children:g})),i("div",e({className:s.modalHeaderActions},{children:[F>1&&i("div",e({className:s.modalNavContainer},{children:[I&&t("button",e({onClick:function(){return R(!0)},className:s.modalNavButton},{children:t(I,{className:s.navIcon})})),i("span",e({className:s.navCounter},{children:[L+1,"/",F]})),N&&t("button",e({onClick:function(){return E(!0)},className:s.modalNavButton},{children:t(N,{className:s.navIcon})}))]})),null!=(null==h?void 0:h.confidence_score)&&i("span",e({className:s.confidenceBadge},{children:[t("span",e({className:s.confidenceStar},{children:"✦"})),i("span",e({className:s.confidenceScore},{children:[null==h?void 0:h.confidence_score,"%"]}))]})),x&&t("button",e({onClick:function(){var n;null===(n=D.current)||void 0===n||n.close()},className:s.closeButton,title:"Close"},{children:t(x,{className:s.closeIcon})}))]}))]})),t("div",e({ref:B,className:s.modalContent},{children:t("div",e({className:s.modalContentInner},{children:V(!0)}))})),h.trainingDataTitle&&t("div",e({className:s.modalFooter},{children:t("span",e({className:s.trainingTitle},{children:h.trainingDataTitle}))})),f&&t("div",e({className:s.modalFooterSource},{children:i("button",e({type:"button",onClick:function(){var n;null==p||p(),null===(n=D.current)||void 0===n||n.close()},className:s.trainingTitleLink},{children:[f,t(o,{size:16,color:"#2563eb"})]}))}))]}))}))]}))};export{d as default};
2
2
  //# sourceMappingURL=CognitiveInternalgptReasoningComponent.js.map
@@ -41,6 +41,8 @@ export interface ChatDrawerProps {
41
41
  notch?: CSSProperties;
42
42
  /** Arrow/chevron color inside the notch. Default: #6d28d9 */
43
43
  notchArrowColor?: string;
44
+ /** Drag pill color while actively dragging. Default: #a78bfa */
45
+ dragPillActiveColor?: string;
44
46
  };
45
47
  }
46
48
  //# sourceMappingURL=ChatDrawer.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDrawer.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/types/ChatDrawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iEAAiE;IACjE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE;QACP,oEAAoE;QACpE,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,sDAAsD;QACtD,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,sDAAsD;QACtD,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,oDAAoD;QACpD,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,0CAA0C;QAC1C,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,qEAAqE;QACrE,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,6DAA6D;QAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH"}
1
+ {"version":3,"file":"ChatDrawer.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/types/ChatDrawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iEAAiE;IACjE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE;QACP,oEAAoE;QACpE,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,sDAAsD;QACtD,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,sDAAsD;QACtD,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,oDAAoD;QACpD,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,0CAA0C;QAC1C,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,qEAAqE;QACrE,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,6DAA6D;QAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gEAAgE;QAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CodeCitation/_components/TooltipComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAyB1B,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAYrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"TooltipComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CodeCitation/_components/TooltipComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAMrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveInternalgptReasoningComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.tsx"],"names":[],"mappings":";AAKA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACpC,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0cjE,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
1
+ {"version":3,"file":"CognitiveInternalgptReasoningComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.tsx"],"names":[],"mappings":";AAKA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,eAAe,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACpC,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsdjE,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/citation",
3
- "version": "0.0.170",
3
+ "version": "0.0.171",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",