PageSourceSearch

https://app.katalyz.co/_next/static/chunks/329.7d7b6d0b35cab6b9.js

js katalyz.co collected 2026-10-05 20:21:35 UTC 15,698 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bab5c242-5827-4733-8e80-914b1942459e",e._sentryDebugIdIdentifier="sentry-dbid-bab5c242-5827-4733-8e80-914b1942459e")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{37569:e=>{e.exports={"modal-create-template":"modal-create-template_modal-create-template__GjRbM","template-room":"modal-create-template_template-room__FTiOu","room-optional-label":"modal-create-template_room-optional-label__oRtSY","room-method-list":"modal-create-template_room-method-list__V8LVa","room-method-option":"modal-create-template_room-method-option__rDdFq","is-selected":"modal-create-template_is-selected___G4cK","is-disabled":"modal-create-template_is-disabled__lYMDv","room-method-badge":"modal-create-template_room-method-badge__XL2a9","room-method-option-top":"modal-create-template_room-method-option-top__uYITt","room-method-option-icon":"modal-create-template_room-method-option-icon__Kkghx","is-blank":"modal-create-template_is-blank__LsBJC","is-ai":"modal-create-template_is-ai__1KE09","room-method-option-label":"modal-create-template_room-method-option-label__qMNd0","room-method-option-title":"modal-create-template_room-method-option-title__lf5vq","room-method-option-description":"modal-create-template_room-method-option-description__Xyse9","room-method-radio":"modal-create-template_room-method-radio__6aDKq","room-ai-fields":"modal-create-template_room-ai-fields__eJG1n","room-settings-row":"modal-create-template_room-settings-row__Cf0s_","room-context-message":"modal-create-template_room-context-message__77Va8","is-error":"modal-create-template_is-error__fr1yj","room-prompt":"modal-create-template_room-prompt__eygHH","room-add-row":"modal-create-template_room-add-row__PK91h","room-add-chip":"modal-create-template_room-add-chip__Is4Q5","is-active":"modal-create-template_is-active__VPSdr","room-file-list":"modal-create-template_room-file-list__i19fg","room-file-item":"modal-create-template_room-file-item___567s","room-file-icon":"modal-create-template_room-file-icon__tBSov",files:"modal-create-template_files__AxJp1",audios:"modal-create-template_audios__Mg0y2",images:"modal-create-template_images__TADpM",videos:"modal-create-template_videos__tSKMi",documents:"modal-create-template_documents__fy2DB",presentations:"modal-create-template_presentations__HGdZe",spreadsheets:"modal-create-template_spreadsheets__ghk73",links:"modal-create-template_links__AXdFH","room-file-name":"modal-create-template_room-file-name__zEr08","room-file-remove":"modal-create-template_room-file-remove__4ziKi","room-actions":"modal-create-template_room-actions__PzuDM"}},60329:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>V});var l=a(88437),o=a(37876),i=a(14232),s=a(34906),r=a.n(s),n=a(95062),m=a.n(n),d=a(64667),c=a(97448),p=a(31665),u=a(50512),h=a(68208),_=a(79742),f=a(11270),g=a(47466),b=a(89099),x=a(36298),v=a(83835),y=a(74288),T=a(99998),j=a(48694),E=a(61258),N=a(8003),I=a(67994),A=a(84786),C=a(69345);let M="HIGH",O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e].filter(e=>{var t;return"USER"===e.role&&(null==(t=e.data)?void 0:t.microtemplateCreation)}).sort((e,t)=>Number(t.sequence)-Number(e.sequence))[0]||null},R=(e,t)=>["ROOM","SECTION"].includes(e)&&t?"ai":"blank",S={children:m().func.isRequired,modalID:m().string,activeID:m().string,handleClose:m().func,kind:m().oneOf(["ROOM","SECTION"]),retryTemplate:m().shape({id:m().string.isRequired,title:m().string,kind:m().oneOf(["ROOM","SECTION"]),aiGeneration:m().shape({conversationId:m().string,status:m().string})}),onAiTemplateCreated:m().func},w=e=>{var t;let{children:a,kind:l="ROOM",retryTemplate:o=null,onAiTemplateCreated:s,...r}=e,n=(0,b.useRouter)(),{t:m}=(0,p.u)(),{user:d}=(0,T.J)(),{modalID:c,activeID:u,handleClose:h}=r,{hasAIAccess:_}=(0,j.A)(),{registerTemplateGenerations:f}=(0,y.x8)(),S=(0,x.AN)(d),w=(null==o?void 0:o.kind)||l,[D,k]=(0,i.useState)(()=>R(w,_)),[L,P]=(0,i.useState)(M),[F,V]=(0,i.useState)([]),[q,z]=(0,i.useState)(""),[G,K]=(0,i.useState)([]),[Y,H]=(0,i.useState)(""),[J,B]=(0,i.useState)(!1),{callCreateOneTemplate:U,callCreateAiDealroomTemplate:X,callCreateAiMicrotemplate:W,callUpdateOneTemplate:Z}=(()=>{let{executeMutation:e}=(0,A.iY)({type:C.t4.CREATE_PROJECT_TEMPLATE}),{executeMutation:t}=(0,A.iY)({type:C.t4.CREATE_AI_DEALROOM_TEMPLATE}),{executeMutation:a}=(0,A.iY)({type:C.t4.CREATE_AI_MICROTEMPLATE}),{executeMutation:l}=(0,A.iY)({type:C.t4.UPDATE_TEMPLATE});return{callCreateOneTemplate:e,callCreateAiDealroomTemplate:t,callCreateAiMicrotemplate:a,callUpdateOneTemplate:l}})(),{fetchAiConversation:$,fetchAiMicrotemplateCalendarEvent:Q}=(()=>{let e=(0,I.m)();return{fetchAiConversation:(0,i.useCallback)(t=>e.query({query:C.b1.AI_CONVERSATION,variables:{input:t},fetchPolicy:"no-cache"}),[e]),fetchAiMicrotemplateCalendarEvent:(0,i.useCallback)(t=>e.query({query:C.b1.AI_MICROTEMPLATE_CALENDAR_EVENT,variables:{id:t},fetchPolicy:"no-cache"}),[e])}})(),{createTemplate:ee}=(0,E.u)(),et=(0,g.mN)({initialValues:{title:"",description:"",prompt:"",language:S}});(0,i.useEffect)(()=>{k(o?"ai":R(w,_))},[w,_,o]),(0,i.useEffect)(()=>{o&&"SECTION"!==w&&et.setFieldValue("title",o.title||"")},[w,o,et.setFieldValue]);let[ea,el]=(0,i.useState)(!1),[eo,ei]=(0,i.useState)(!1),es=c===u;(0,i.useEffect)(()=>
1{if(!es||!o||"SECTION"!==w){el(!1),ei(!1);return}let e=!1;return(async()=>{el(!0),ei(!1);try{var t,a;let{data:l}=await $({type:"AI_MICROTEMPLATE",microtemplateId:o.id,...(null==(t=o.aiGeneration)?void 0:t.conversationId)?{conversationId:o.aiGeneration.conversationId}:{}}),i=O(null==l||null==(a=l.aiConversation)?void 0:a.messages);if(!i)throw Error("Missing creation context");let s=(null==i?void 0:i.data)||{},r=Array.from(new Set(s.calendarEventIds||[])).slice(0,5),n=await Promise.allSettled(r.map(e=>Q(e)));if(e)return;et.setValues({title:o.title||"",prompt:s.prompt||""}),V(Array.from(new Map((s.resources||[]).filter(e=>null==e?void 0:e.id).map(e=>[e.id,e])).values()).slice(0,20)),K(n.map(e=>{var t;return"fulfilled"===e.status?null==(t=e.value.data)?void 0:t.calendarEvent:null}).filter(Boolean))}catch(t){e||ei(!0)}finally{e||el(!1)}})(),()=>{e=!0}},[es,w,o,$,Q,et.setValues]);let er=()=>{h&&h(),et.resetForm({title:"",description:"",prompt:"",language:S}),k(R(w,_)),P(M),V([]),K([])},en=et.values.title||"",em=et.values.description||"",ed=et.values.prompt||"",ec=(0,x.Ts)(et.values.language),ep=_&&"ai"===D,eu="SECTION"===w&&ep,eh=!o||(null==(t=o.aiGeneration)?void 0:t.status)==="FAILED",e_=eu?ed.trim().length>0&&!ea&&eh:en.trim().length>0&&(!ep||ed.trim().length>0)&&!ea&&eh,ef=async e=>{let t=em.trim();if(!t)return t;try{await Z({id:e,update:{description:t}})}catch(e){}return t},eg=async()=>{if(e_&&!J){B(!0);try{var e,t;if("SECTION"===w){if(ep){let t=en.trim(),{data:a}=await W({input:{prompt:ed.trim(),...t?{title:t}:{},...ec?{language:ec}:{},generationPower:L,resourceIds:F.slice(0,20).map(e=>e.id),calendarEventIds:G.slice(0,5).map(e=>e.id),...o?{microtemplateId:o.id}:{}}}),l=null==a||null==(e=a.createAiMicrotemplate)?void 0:e.microtemplate;if(!l)return;f([{...l,type:y.dF.SECTION,isReady:!1,isFailed:!1}]),N.sr.getState().setSelectedPageId(l.id),N.sr.getState().setCurrentPageData(l),null==s||s(l,a.createAiMicrotemplate.message,{isRetry:!!o,kind:"SECTION"}),er();let i="/microtemplates/".concat(l.id);n.asPath.split("?")[0].endsWith(i)||await n.push(i);return}let t=await ee({title:en.trim()});if(!t)return;er(),n.push("/microtemplates/".concat(t.id));return}if(ep){let{data:e}=await X({input:{prompt:ed.trim(),title:en.trim(),...ec?{language:ec}:{},generationPower:L,resourceIds:F.slice(0,20).map(e=>e.id),calendarEventIds:G.slice(0,5).map(e=>e.id),...o?{templateId:o.id}:{}}});if(!(null==e||null==(t=e.createAiDealroomTemplate)?void 0:t.template))return;let a=e.createAiDealroomTemplate.template,l=await ef(a.id);f([{...a,type:y.dF.TEMPLATE,isReady:!1,isFailed:!1}]),null==s||s({...a,description:l},e.createAiDealroomTemplate.message,{isRetry:!!o}),er();return}let{data:a}=await U({input:{projectTemplate:{title:en.trim(),kind:v.r.CANVAS}}});if(!a)return;await ef(a.createOneProjectTemplate.id),er(),n.push("/templates/".concat(a.createOneProjectTemplate.id))}finally{B(!1)}}};return a({kind:w,handleModalClose:er,isRetry:!!o,roomForm:et,method:D,setMethod:k,isAiMethodAvailable:_,generationPower:L,setGenerationPower:P,languageOptions:(0,x.dX)(m),resources:F,handleAddResource:e=>{let t=(Array.isArray(e)?e:[e]).filter(e=>null==e?void 0:e.id);0!==t.length&&V(e=>{let a=new Set(e.map(e=>e.id)),l=[];return t.forEach(t=>{a.has(t.id)||e.length+l.length>=20||(a.add(t.id),l.push(t))}),[...e,...l]})},handleRemoveResource:e=>{V(t=>t.filter(t=>t.id!==e))},resourcesModalID:q,setResourcesModalID:z,meetings:G,handleAddMeeting:e=>{(null==e?void 0:e.id)&&K(t=>t.some(t=>t.id===e.id)?t.filter(t=>t.id!==e.id):t.length<5?[...t,e]:t)},handleRemoveMeeting:e=>{K(t=>t.filter(t=>t.id!==e))},meetingsModalID:Y,setMeetingsModalID:H,maxResources:20,maxMeetings:5,isRetryContextLoading:ea,hasRetryContextError:eo,canSubmitRoom:e_,isSubmittingRoom:J,handleCreateRoomTemplate:eg})};w.propTypes=S;var D=a(37569),k=a.n(D);let L=r().bind(k()),P={modalID:m().string,activeID:m().string,handleClose:m().func,kind:m().oneOf(["ROOM","SECTION"]),retryTemplate:m().shape({id:m().string.isRequired,title:m().string,kind:m().oneOf(["ROOM","SECTION"]),aiGeneration:m().shape({conversationId:m().string,
1status:m().string})}),onAiTemplateCreated:m().func},F=e=>{let{modalID:t,activeID:a}=e,{t:l}=(0,p.u)();return(0,o.jsx)(w,{...e,children:e=>{let{kind:i,isRetry:s,roomForm:r,method:n,setMethod:m,isAiMethodAvailable:p,generationPower:b,setGenerationPower:x,languageOptions:v,resources:y,handleAddResource:T,handleRemoveResource:j,resourcesModalID:E,setResourcesModalID:N,meetings:I,handleAddMeeting:A,handleRemoveMeeting:C,meetingsModalID:M,setMeetingsModalID:O,maxResources:R,maxMeetings:S,isRetryContextLoading:w,hasRetryContextError:D,canSubmitRoom:k,isSubmittingRoom:P,handleCreateRoomTemplate:F,handleModalClose:V}=e,q=p&&"ai"===n,z="SECTION"===i,G=s?l.templates.retryWithAi:z?l.templates.newSectionTemplate:l.templates.newRoomTemplate,K=z?l.templates.newSectionTemplateSubtitle:l.templates.newRoomTemplateSubtitle;return(0,o.jsx)(u.aF,{modalID:t,activeID:a,handleClose:V,title:G,subtitle:K,classname:L("modal-create-template"),children:(0,o.jsxs)("div",{className:L("template-room"),children:[(0,o.jsxs)(g.lV,{form:r,children:[(0,o.jsx)(g.D0,{name:"title",type:"textfield",label:z&&q?(0,o.jsxs)(o.Fragment,{children:[l.templates.aiTitleLabel," ",(0,o.jsx)("span",{className:L("room-optional-label"),children:l.templates.aiOptionalLabel})]}):l.templates.aiTitleLabel,placeholder:z?l.templates.aiSectionTitlePlaceholder:l.templates.aiTitlePlaceholder,margin:0}),!z&&(0,o.jsx)(g.D0,{name:"description",type:"textfield",label:(0,o.jsxs)(o.Fragment,{children:[l.templates.aiDescriptionLabel," ",(0,o.jsx)("span",{className:L("room-optional-label"),children:l.templates.aiOptionalLabel})]}),placeholder:l.templates.aiDescriptionPlaceholder,margin:16})]}),(0,o.jsxs)("div",{className:L("room-method-list"),children:[(0,o.jsxs)("button",{type:"button",disabled:!p,onClick:()=>p&&m("ai"),className:L("room-method-option",{"is-selected":q,"is-disabled":!p}),children:[(0,o.jsxs)("span",{className:L("room-method-option-top"),children:[(0,o.jsx)("span",{className:L("room-method-option-icon","is-ai"),children:(0,o.jsx)(u.p2,{name:"icon-ai-funky-outline",size:17})}),p?(0,o.jsx)("span",{className:L("room-method-radio",{"is-selected":q})}):(0,o.jsx)("span",{className:L("room-method-badge"),children:l.templates.aiComingSoon})]}),(0,o.jsxs)("span",{className:L("room-method-option-label"),children:[(0,o.jsx)("span",{className:L("room-method-option-title"),children:l.templates.aiMethodTitle}),(0,o.jsx)("span",{className:L("room-method-option-description"),children:z?l.templates.aiSectionMethodDescription:l.templates.aiMethodDescription})]})]}),(0,o.jsxs)("button",{type:"button",onClick:()=>m("blank"),className:L("room-method-option",{"is-selected":!q}),children:[(0,o.jsxs)("span",{className:L("room-method-option-top"),children:[(0,o.jsx)("span",{className:L("room-method-option-icon","is-blank"),children:(0,o.jsx)(u.p2,{name:"icon-empty-document",size:17})}),(0,o.jsx)("span",{className:L("room-method-radio",{"is-selected":!q})})]}),(0,o.jsxs)("span",{className:L("room-method-option-label"),children:[(0,o.jsx)("span",{className:L("room-method-option-title"),children:l.templates.blankMethodTitle}),(0,o.jsx)("span",{className:L("room-method-option-description"),children:l.templates.blankMethodDescription})]})]})]}),q&&(0,o.jsxs)("div",{className:L("room-ai-fields"),children:[(0,o.jsxs)("div",{className:L("room-settings-row"),children:[(0,o.jsx)(g.lV,{form:r,children:(0,o.jsx)(g.D0,{name:"language",type:"select",label:l.templates.aiLanguageLabel,options:v,margin:0})}),(0,o.jsx)(h.A,{value:b,onChange:x})]}),(0,o.jsx)(g.lV,{form:r,children:(0,o.jsx)(g.D0,{name:"prompt",type:"textarea",className:L("room-prompt"),label:l.templates.aiPromptLabel,placeholder:l.templates.aiPromptPlaceholder,margin:0,rows:6,maxLength:d.nV,showCharacterCount:!0})}),w&&(0,o.jsx)("p",{className:L("room-context-message"),children:l.templates.aiRetryContextLoading}),D&&(0,o.jsx)("p",{className:L("room-context-message","is-error"),children:l.templates.aiRetryContextError}),(0,o.jsxs)("div",{className:L("room-add-row"),children:[(0,o.jsxs)("button",{type:"button",disabled:y.length>=R,onClick:()=>N("modal-upload-resources"),className:L("room-add-chip",{"is-active":y.length>0}),children:[(0,o.jsx)(u.p2,{name:"icon-upload",size:15}),l.templates.aiAddResource]}),(0,o.jsxs)("button",{type:"button",disabled:I.length>=S,onClick:()=>O("modal-attach-meetings"),className:L("room-add-chip",{"is-active":I.length>0}),children:[(0,o.jsx)(u.p2,{name:"icon-calendar",size:15}),l.templates.aiAttachMeetings]})]}),y.length>0&&(0,o.jsx)("ul",{className:L("room-file-list"),children:y.map(e=>{let t=(c.mZ[e.type]||"FILES").toLowerCase();return(0,o.jsxs)("li",{className:L("room-file-item"),children:[(0,o.jsx)(u.p2,{name:t,size:16,classname:L("room-file-icon",t)}),(0,o.jsx)("span",{className:L("room-file-name"),children:e.title}),(0,o.jsx)("button",{type:"button",onClick:()=>j(e.id),className:L("room-file-remove"),"aria-label":"Remove ".concat(e.title),children:(0,o.jsx)(u.p2,{name:"icon-close",size:14})})]},e.id)})}),I.length>0&&(0,o.jsx)("ul",{className:L("room-file-list"),children:I.map(e=>(0,o.jsx)("li",{children:(0,o.jsx)(_.A,{title:e.title,startTime:e.startTime,endTime:e.endTime,participants:e.participants,trailing:(0,o.jsx)("button",{type:"button",onClick:()=>C(e.id),className:L("room-file-remove"),"aria-label":"Remove ".concat(e.title),children:(0,o.jsx)(u.p2,{name:"icon-close",size:14})})})},e.id))}),(0,o.jsx)(u.Wc,{modalID:E,handleClose:()=>N(""),handleFileUpload:T,isTemporary:!0,title:l.templates.aiAddResource,hasLibraryResources:!0,allowMultiple:!0,allowMultipleExistingResources:!0,selectionLimit:Math.max(R-y.length,0)}),(0,o.jsx)(u.aF,{modalID:M,activeID:"modal-attach-meetings",handleClose:()=>O(""),title:l.templates.aiAttachMeetings,children:(0,o.jsx)(f.A,{onSelectEvent:A,selectedIds:I.map(e=>e.id),selectionLimit:S})})]}),(0,o.jsxs)("div",{className:L("room-actions"),children:[(0,o.jsx)(u.$
1n,{label:l.buttons.cancel,callback:V,small:!0,type:"OUTLINE"}),(0,o.jsx)(u.$n,{label:q?l.templates.generateTemplate:l.buttons.create,callback:F,disabled:!k||P,small:!0})]})]})})}})};F.propTypes=P;let V=(0,l.A)(F)}}]);

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.