PageSourceSearch

https://app.pollbolt.com/static/js/905.9a8fc643.chunk.js

js pollbolt.com collected 2026-09-25 21:05:46 UTC 16,869 bytes, 3 lines download raw bytes

1/*! For license information please see 905.9a8fc643.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[905],{99905:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var n=a(65043),l=a(27673),r=a(77784);const s=(0,r.A)("ListPlus",[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]]),i=(0,r.A)("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var o=a(70067);const d=(0,r.A)("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);var c=a(687),u=a(36210),h=a(56099),x=a(92382),m=a(8829),p=a(40614),g=a(22633),v=a(50795),f=a(81129),y=a(70579);const b=e=>{let{size:t=24}=e;return(0,y.jsx)("img",{src:"/images/pollBoltIconCyan.svg",alt:"",className:"rounded-full flex-shrink-0",style:{width:t,height:t}})},j="from-brand-primary to-brand-primary-hover",w={modify_design:{icon:l.A,label:"Updated the design",tint:j},add_questions:{icon:s,label:"Added questions",tint:j},translate:{icon:i,label:"Translated the survey",tint:j},add_image:{icon:o.A,label:"Added imagery",tint:j},generate_image:{icon:d,label:"Generated a custom image",tint:j},update_logic:{icon:c.A,label:"Updated the logic",tint:j}},k=e=>{let{metadata:t}=e;if(null===t||void 0===t||!t.action)return null;const a=w[t.action]||{icon:u.A,label:"Done",tint:"from-neutral-400 to-neutral-500"},n=a.icon,l=t.summary||a.label;return(0,y.jsxs)("div",{className:"inline-flex items-center gap-2 mt-1.5 pl-1.5 pr-3 py-1 rounded-full bg-white border border-neutral-200 shadow-sm",children:[(0,y.jsx)("span",{className:"w-5 h-5 rounded-full bg-gradient-to-br ".concat(a.tint," flex items-center justify-center flex-shrink-0"),children:(0,y.jsx)(n,{size:11,className:"text-white",strokeWidth:2.5})}),(0,y.jsx)("span",{className:"text-[12px] font-medium text-neutral-700",children:l})]})},N={en:["Imagining the composition\u2026","Sketching the scene\u2026","Painting in the details\u2026","Adding light & color\u2026","Polishing the final image\u2026"],he:["\u05de\u05d3\u05de\u05d9\u05d9\u05df \u05d0\u05ea \u05d4\u05d4\u05e8\u05db\u05d1\u2026","\u05de\u05e9\u05e8\u05d8\u05d8 \u05d0\u05ea \u05d4\u05e1\u05e6\u05e0\u05d4\u2026","\u05de\u05e6\u05d9\u05d9\u05e8 \u05d0\u05ea \u05d4\u05e4\u05e8\u
205d8\u05d9\u05dd\u2026","\u05de\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5\u05e8 \u05d5\u05e6\u05d1\u05e2\u2026","\u05de\u05dc\u05d8\u05e9 \u05d0\u05ea \u05d4\u05ea\u05de\u05d5\u05e0\u05d4 \u05d4\u05e1\u05d5\u05e4\u05d9\u05ea\u2026"]},A=e=>{let{hebrew:t}=e;const a=t?N.he:N.en,[l,r]=(0,n.useState)(0);(0,n.useEffect)((()=>{const e=setInterval((()=>{r((e=>(e+1)%a.length))}),2e3);return()=>clearInterval(e)}),[a.length]);const s=t?{fontFamily:"'Noto Sans Hebrew', sans-serif"}:void 0;return(0,y.jsxs)("div",{className:"mt-1 w-full max-w-[260px]",children:[(0,y.jsx)("div",{className:"relative h-28 w-full rounded-xl overflow-hidden bg-gradient-to-r from-neutral-100 via-neutral-200 to-neutral-100 bg-[length:200%_100%] animate-shimmer",children:(0,y.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,y.jsx)("span",{className:"w-10 h-10 rounded-full bg-white/70 backdrop-blur-sm flex items-center justify-center shadow-sm",children:(0,y.jsx)(d,{size:17,className:"text-brand-primary animate-pulse"})})})}),(0,y.jsxs)("div",{className:"flex items-center gap-2 mt-2",dir:"auto",style:s,children:[(0,y.jsx)(h.A,{size:13,className:"text-neutral-400 animate-pulse flex-shrink-0"}),(0,y.jsx)("span",{className:"text-[12.5px] text-neutral-500 animate-fadeIn",children:a[l]},l)]})]})},C=e=>{let{content:t,isStreaming:a}=e;const{displayedText:n,isTyping:l}=(0,f.d)(t,{enabled:a,granularity:"char",delayMs:8,maxBuffer:2e3});return(0,y.jsxs)(y.Fragment,{children:[a?n:t,l&&(0,y.jsx)("span",{className:"typewriter-cursor"})]})},z=e=>{let{steps:t=[],activeIndex:a=0}=e;return t.length?(0,y.jsxs)("div",{className:"flex items-start gap-2 py-1 mb-1",children:[(0,y.jsx)(h.A,{size:14,className:"flex-shrink-0 mt-0.5 text-neutral-400 animate-pulse"}),(0,y.jsx)("div",{className:"flex-1 min-w-0",children:t.map(((e,t)=>(0,y.jsx)("div",{className:"reasoning-bullet text-[12px] leading-relaxed transition-opacity duration-300 ".concat(t<=a?"text-neutral-500":"text-neutral-300"),style:{animationDelay:"".concat(150*t,"ms")},children:e},t)))})]}):null},S=[{id:"left",label:"Left side",icon:"\u25e7"},{id:"right",label:"Right side",icon:"\u25e8"},{id:"cover",label:"Full background",icon:"\u25a3"}],M=e=>/[\u0590-\u05FF]/.test(e||""),E=e=>M(e)?{fontFamily:"'Noto Sans Hebrew', sans-serif"}:void 0,T="#F2B600",I=['Try: "make the buttons rounder"','Try: "add a rating question"','Try: "change the background to navy"','Try: "translate to Hebrew"'],F=e=>{var t;let{messages:a=[],value:l="",onChange:r,onSubmit:s,isLoading:i=!1,isExpanded:o=!1,onExpandedChange:d,leftTools:c,placeholderCollapsed:u="Ask me anything...",placeholderExpanded:f="Type your message...",isMobile:j=!1,containerClassName:w="",reasoningSteps:N=[],images:F=[],onRemoveImage:L,onChipClick:U,onLayoutSelect:q,rotatingPlaceholders:D=I,editTargetLabel:R=null,onClearEditTarget:H,onUndoAction:B,canUndo:P=!1,mentionables:_=[]}=e;const O=(0,n.useRef)(null),V=(0,n.useRef)(null),[W,G]=(0,n.useState)(0),[K,$]=(0,n.useState)(0),[J,Q]=(0,n.useState)(null),X=e=>{var t;const a=V.current,n=null!==(t=null===a||void 0===a?void 0:a.selectionStart)&&void 0!==t?t:(l||"").length,s=(l||"").slice(0,n).replace(/@([\w\u0590-\u05ff]*)$/,"".concat(e.phrase," ")),i=(l||"").slice(n);null===r||void 0===r||r(s+i),Q(null),setTimeout((()=>{a&&(a.focus(),a.setSelectionRange(s.length,s.length))}),0)},Y=null===J?[]:_.filter((e=>e.label.toLowerCase().includes(J))).slice(0,6);(0,n.useEffect)((()=>{o&&O.current&&O.current.scrollIntoView({behavior:"smooth"})}),[a,o]),(0,n.useEffect)((()=>{o&&V.current&&V.current.focus()}),[o]),(0,n.useEffect)((()=>{if(!o)return;const e=e=>{"Escape"===e.key&&(null===d||void 0===d||d(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[o,d]),(0,n.useEffect)((()=>{if(!i||!N.length)return void G(0);const e=setInterval((()=>{G((e=>e<N.length-1?e+1:e))}),1500);return()=>clearInterval(e)}),[i,N]);const Z=a.length>0;(0,n.useEffect)((()=>{if(o||(l||"").trim()||!D.length)return;const e=setInterval((()=>{$((e=>(e+1)%D.length))}),3e3);return()=>clearInterval(e)}),[o,l,D.length]);const ee=D.length&&!(l||"").trim()?D[K%D.length]:u,te=R?"Tell AI what to change\u2026":o?f:ee;return(0,y.jsxs)("div",{className:"flex flex-col items-center ".concat(w),children:[o&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:"fixed inset-0 bg-black/10 z-[59]",onClick:()=>null===d||void 0===d?void 0:d(!1)}),(0,y.jsxs)("div",{className:"relative z-[60] w-full bg-white rounded-2xl shadow-2xl border border-neutral-200 mb-2 flex flex-col overflow-hidden ".concat(j?"max-h-[70vh]":"max-h-[50vh]"),style:{maxWidth:520},children:[(0,y.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-neutral-100 flex-shrink-0",children:[(0,y.jsxs)("div",{className:"flex items-center gap-2",children:[(0,y.jsx)(b,{size:22}),(0,y.jsx)("span",{className:"text-[14px] font-semibold text-neutral-800",children:"PollBolt AI"})]}),(0,y.jsx)("button",{onClick:()=>null===d||void 0===d?void 0:d(!1),className:"p-1.5 text-neutral-400 hover:text-neutral-600 hover:bg-neutral-100 rounded-full transition-colors",children:(0,y.jsx)(x.A,{size:16})})]}),(0,y.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-0",children:[0===a.length&&(0,y.jsx)("div",{className:"text-center py-8 text-neutral-400 text-[13px]",children:"No conversation yet. Send a message to get started."}),a.map(((e,t)=>{var n,l,r,s,i,o;return"user"===e.role?(0,y.jsx)("div",{className:"flex flex-col items-end",children:(0,y.jsx)("div",{className:"bg-neutral-100 rounded-2xl px-4 py-2.5 max-w-[80%]",children:(0,y.jsx)("p",{className:"text-[13px] text-neutral-900 leading-relaxed whitespace-pre-wrap",dir:"auto",style:E(e.content),children:e.content})})},e.id||"msg-".concat(t)):(0,y.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,y.jsx)("div",{className:"mt-0.5 flex-shrink-0",children:(0,y.jsx)(b,{size:24})}),(0,y.jsxs)("div",{className:"flex-1 min-w-0",children:[null!==(n=e.metadata)&&void 0!==n&&n.generating?(0,y.jsx)(A,{hebrew:M(e.content)}):(0,y.jsx)("p",{className:"text-[13px] text-neutral-800 leading-relaxed whitespace-pre-wrap",dir:"auto",style:E(e.content),children:(0,y.jsx)(C,{content:e.content,isStreaming:!!e.isStreaming})}),(null===(l=e.metadata)||void 0===l?void 0:l.imageUrl)&&(0,y.jsx)("div",{className:"mt-2 rounded-xl overflow-hidden border border-neutral-200 max-w-[220px]",children:(0,y.jsx)("img",{src:e.metadata.imageUrl,alt:"",className:"w-full h-28 object-cover"})}),e.metadata&&(0,y.jsx)(k,{metadata:e.metadata}),t===a.length-1&&P&&(null===(r=e.metadata)||void 0===r?void 0:r.action)&&!["clarify","generate_image"].includes(e.metadata.action)&&(0,y.jsxs)("button",{type:"button",onClick:()=>null===B||void 0===B?void 0:B(),className:"inline-flex items-center gap-1.5 mt-1.5 ml-2 px-2.5 py-1 rounded-full text-[12px] font-medium text-neutral-500 hover:text-neutral-800 hover:bg-neutral-100 transition-colors",title:"Undo this change",children:[(0,y.jsx)(m.A,{size:13}),"Undo"]}),Array.isArray(null===(s=e.metadata)||void 0===s?void 0:s.chips)&&e.metadata.chips.length>0&&(0,y.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:e.metadata.chips.map(((e,t)=>(0,y.jsx)("button",{onClick:()=>null===U||void 0===U?void 0:U(e),dir:"auto",style:E(e),className:"text-[12px] px-3 py-1.5 rounded-lg border border-neutral-200 text-neutral-600 hover:bg-neutral-50 active:bg-neutral-100 transition-colors",children:e},t)))}),(null===(i=e.metadata)||void 0===i?void 0:i.layoutPicker)&&(0,y.jsx)("div",{className:"flex gap-2 mt-2",children:(Array.isArray(null===(o=e.metadata)||void 0===o?void 0:o.layoutOptions)&&e.metadata.layoutOptions.length?e.metadata.layoutOptions:S).map((e=>(0,y.jsxs)("button",{onClick:()=>null===q||void 0===q?void 0:q(e.id),className:"flex flex-col items-center gap-1 px-4 py-3 rounded-xl border border-neutral-200 text-neutral-600 hover:bg-neutral-50 hover:border-neutral-300 active:bg-neutral-100 transition-colors flex-1",children:[(0,y.jsx)("span",{className:"text-xl",children:e.icon}),(0,y.jsx)("span",{className:"text-[11px] font-medium",style:E(e.label),children:e.label})]},e.id)))})]})]},e.id||"msg-".concat(t))})),i&&"assistant"!==(null===(t=a[a.length-1])||void 0===t?void 0:t.role)&&(0,y.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,y.jsx)(b,{size:24}),(0,y.jsx)("div",{className:"flex-1 min-w-0",children:N.length>0?(0,y.jsx)(z,{steps:N,activeIndex:W}):(0,y.jsx)("span",{className:"text-[13px] font-medium thinking-shimmer",children:"Thinking"})})]}),(0,y.jsx)("div",{ref:O})]})]})]}),(0,y.jsxs)("div",{className:"w-full relative bg-white shadow-2xl hover:shadow-xl rounded-2xl ".concat(o?"z-[60] border border-gray-200":"border-[1.5px]"," py-3"),style:o?void 0:{borderColor:T},children:[Y.length>0&&(0,y.jsx)("div",{className:"absolute bottom-full left-0 right-0 mb-2 bg-white border border-gray-200 rounded-xl shadow-lg overflow-hidden z-[70] max-h-56 overflow-y-auto",children:Y.map((e=>(0,y.jsxs)("button",{type:"button",onMouseDown:t=>{t.preventDefault(),X(e)},dir:"auto",className:"w-full text-left px-3 py-2 text-[13px] text-gray-700 hover:bg-gray-50 flex items-center gap-2",children:[(0,y.jsx)("span",{style:{color:T},children:"@"}),e.label]},e.id)))}),F.length>0&&(0,y.jsx)("div",{className:"flex items-center gap-2 flex-wrap px-4 pb-2",children:F.map(((e,t)=>{var a;return(0,y.jsxs)("div",{className:"flex items-center gap-1.5 bg-gray-50 border border-gray-200 rounded-lg pl-1 pr-2 py-1",children:[(0,y.jsx)("div",{className:"w-6 h-6 rounded overflow-hidden flex-shrink-0",children:(0,y.jsx)("img",{src:e.thumbnailUrl||e.imageUrl,alt:"",className:"w-full h-full object-cover"})}),(0,y.jsx)("span",{className:"text-xs text-gray-600 max-w-[100px] truncate",children:e.name||"image ".concat((null===(a=e.id)||void 0===a?void 0:a.slice(-4))||t+1)}),(0,y.jsx)("button",{onClick:()=>null===L||void 0===L?void 0:L(t),className:"w-4 h-4 flex items-center justify-center text-gray-400 hover:text-gray-600 rounded-full hover:bg-gray-200",children:(0,y.jsx)(p.A,{size:10})})]},e.id)}))}),(0,y.jsxs)("div",{className:"flex items-center gap-3 px-4",children:[!
2o&&(0,y.jsx)(h.A,{size:18,className:"flex-shrink-0",style:{color:T},"aria-hidden":"true"}),c,R&&(0,y.jsxs)("span",{className:"flex items-center gap-1 text-[12px] font-medium px-2.5 py-1 rounded-full flex-shrink-0",style:{background:"#FAEEDA",color:"#854F0B"},children:[R,(0,y.jsx)("button",{type:"button",onClick:H,className:"ml-0.5 hover:opacity-70","aria-label":"Clear edit target",children:(0,y.jsx)(p.A,{size:12})})]}),(0,y.jsx)("input",{ref:V,type:"text",value:l,onChange:e=>{var t;const a=e.target.value;null===r||void 0===r||r(a);const n=null!==(t=e.target.selectionStart)&&void 0!==t?t:a.length,l=a.slice(0,n).match(/(?:^|\s)@([\w\u0590-\u05ff]*)$/);Q(l&&_.length?l[1].toLowerCase():null)},onKeyDown:e=>{if("Escape"===e.key&&null!==J)return e.preventDefault(),e.stopPropagation(),void Q(null);if("Enter"===e.key&&!e.shiftKey&&!i){if(Y.length)return e.preventDefault(),void X(Y[0]);e.preventDefault(),null===s||void 0===s||s()}},onFocus:()=>{!o&&Z&&(null===d||void 0===d||d(!0))},placeholder:te,className:"flex-1 min-w-0 outline-none text-base md:text-sm text-gray-700 placeholder-gray-400 bg-transparent",dir:"auto",style:E(l),disabled:i}),(0,y.jsx)(v.A,{onTranscription:e=>{const t=l||"";null===r||void 0===r||r(t?"".concat(t," ").concat(e):e)},disabled:i,language:"en",size:"w-5 h-5",className:"p-2 text-gray-600 hover:text-gray-900 rounded-full hover:bg-gray-100 transition-colors"}),!o&&Z&&(0,y.jsx)("button",{onClick:()=>null===d||void 0===d?void 0:d(!0),className:"p-1.5 text-neutral-400 hover:text-neutral-600 hover:bg-neutral-100 rounded-full transition-colors",title:"View conversation",children:(0,y.jsx)(x.A,{size:16,className:"rotate-180"})}),i?(0,y.jsx)("div",{className:"p-2.5 bg-black rounded-full flex-shrink-0",children:(0,y.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"})}):(0,y.jsx)("button",{onClick:s,disabled:!l.trim(),className:"flex-shrink-0 p-2.5 bg-black text-white rounded-full hover:bg-gray-800 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",title:"Submit",children:(0,y.jsx)(g.A,{size:18})})]})]})]})}},81129:(e,t,a)=>{a.d(t,{d:()=>l});var n=a(65043);function l(e){let{delayMs:t=60,maxBuffer:a=80,enabled:l=!0,granularity:r="word"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[s,i]=(0,n.useState)(""),[o,d]=(0,n.useState)(!1),c=(0,n.useRef)(0),u=(0,n.useRef)(null),h=(0,n.useRef)(0),x=(0,n.useRef)(""),m=(0,n.useCallback)((e=>e?"char"===r?Array.from(e):e.match(/\S+|\s+/g)||[]:[]),[r]);return(0,n.useEffect)((()=>{const n=()=>{null!=u.current&&(cancelAnimationFrame(u.current),u.current=null)};if(e!==x.current&&m(e).length<c.current&&(c.current=0,h.current=0),x.current=e||"",!l){n(),h.current=0;const t=e||"";return i(t),d(!1),void(c.current=m(t).length)}const r=m(e).length;if(0===r)return n(),h.current=0,c.current=0,i(""),void d(!1);const s=r-c.current;if(s<=0)return void d(!1);if(s>a)return n(),h.current=0,c.current=r,i(e),void d(!1);d(!0),n(),h.current=0;const o=a=>{0===h.current&&(h.current=a);if(a-h.current>=t){h.current=a,c.current+=1;const t=m(e),n=Math.min(c.current,t.length);c.current=n;const l=t.slice(0,n).join("");if(i(l),n>=t.length)return void d(!1)}u.current=requestAnimationFrame(o)};return u.current=requestAnimationFrame(o),()=>{n()}}),[e,l,t,a,m]),{displayedText:l?s:e||"",isTyping:o}}},22633:(e,t,a)=>{a.d(t,{A:()=>n});const n=(0,a(77784).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},687:(e,t,a)=>{a.d(t,{A:()=>n});const n=(0,a(77784).A)("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]])}}]);
3//# sourceMappingURL=905.9a8fc643.chunk.js.map

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.