PageSourceSearch

https://daydream.ai/_next/static/chunks/90279-08f98678f7f44628.js

js daydream.ai collected 2026-10-05 12:03:27 UTC 17,704 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[90279],{18578:(e,t,n)=>{n.d(t,{Z:()=>p});var i=n(95155),s=n(93728),r=n(12115),a=n(40980),o=n(89239),c=n(13146),l=n(17414),d=n(88221),h=n(7603);let u="[TeamSelector]";function p({value:e,onChange:t,entityType:n,placeholder:m="Select team...",disabled:f=!1,allowClear:g=!0,className:v}){let[y,x]=(0,r.useState)(!1),[k,b]=(0,r.useState)([]),[C,_]=(0,r.useState)(!1),[w,j]=(0,r.useState)("");(0,r.useEffect)(()=>{N()},[]);let N=async()=>{try{_(!0);let e=await d.c.getTeams({include_inactive:!1});b(e.teams),h.vF.debug(`${u} Loaded ${e.teams.length} teams`)}catch(e){h.vF.error(`${u} Error loading teams:`,e)}finally{_(!1)}},F=(0,r.useMemo)(()=>{let e=k.filter(e=>e.is_active);if(w){let t=w.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t))}return e},[k,w,n]),I=(0,r.useMemo)(()=>k.find(t=>t.id===e),[k,e]);return(0,i.jsxs)(l.AM,{open:y,onOpenChange:x,children:[(0,i.jsx)(l.Wv,{asChild:!0,children:(0,i.jsxs)(o.Button,{variant:"outline",role:"combobox","aria-expanded":y,disabled:f,className:(0,a.cn)("w-full justify-between font-normal",!e&&"text-muted-foreground",v),children:[(0,i.jsx)("div",{className:"flex items-center gap-2 truncate",children:I?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.zWC,{className:"h-4 w-4 text-neutral-400"}),(0,i.jsx)("span",{children:I.name})]}):(0,i.jsx)("span",{children:m})}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[g&&e&&(0,i.jsx)(s.X,{className:"h-4 w-4 text-neutral-400 hover:text-neutral-600",onClick:e=>{e.stopPropagation(),t(null)}}),(0,i.jsx)(s.Mls,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),(0,i.jsx)(l.hl,{className:"w-[300px] p-0",align:"start",children:(0,i.jsxs)(c.uB,{shouldFilter:!1,children:[(0,i.jsx)(c.G7,{placeholder:"Search teams...",value:w,onValueChange:j}),(0,i.jsx)(c.oI,{children:C?(0,i.jsx)(c.xL,{children:"Loading teams..."}):0===F.length?(0,i.jsx)(c.xL,{children:"No teams found."}):(0,i.jsx)(c.L$,{children:F.map(n=>(0,i.jsxs)(c.h_,{value:n.id,onSelect:()=>{t(n.id),x(!1),j("")},children:[(0,i.jsx)(s.Jlk,{className:(0,a.cn)("mr-2 h-4 w-4",e===n.id?"opacity-100":"opacity-0")}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(s.zWC,{className:"h-4 w-4 text-neutral-400"}),(0,i.jsx)("span",{children:n.name})]}),(0,i.jsxs)("div",{className:"text-xs text-muted-foreground",children:[n.member_count," member",1!==n.member_count?"s":""," \xb7 ",n.team_type]})]})]},n.id))})})]})})]})}},30656:(e,t,n)=>{n.d(t,{a:()=>s}),n(1021);var i=n(50892);async function s(e){return i.zc.launchWorkflowFromContext({workflow_definition_id:e.workflow_definition_id??("workflowDefinitionId"in e?e.workflowDefinitionId:""),context_type:e.context_type??("contextType"in e?e.contextType:""),context_reference_id:e.context_reference_id??("contextReferenceId"in e?e.contextReferenceId:""),input_data:e.input_data??("inputData"in e?e.inputData:void 0)??{},entrypoint:"entrypoint"in e?e.entrypoint:void 0})}},49512:(e,t,n)=>{n.d(t,{A:()=>i});function i(e){return"string"==typeof e&&e.trim().toLowerCase().startsWith("registry::")}},69859:(e,t,n)=>{n.d(t,{k:()=>m});var i=n(95155),s=n(93728),r=n(12115),a=n(26708),o=n(17058),c=n(4389),l=n(17414),d=n(40980),h=n(50892),u=n(7332),p=n(66759);function m(e){return e.override?(0,i.jsx)(v,{...e}):e.decisionRecorded?(0,i.jsx)(g,{...e}):(0,i.jsx)(f,{...e})}function f(e){let{entity:t,assessmentId:n,thirdPartyId:s}=e,r=(0,o.SX)(t,{assessmentId:n,thirdPartyId:s});return(0,i.jsx)(v,{...e,query:r})}function g(e){let{entity:t,assessmentId:n,thirdPartyId:s}=e,r=n?.trim()||(0,o.IU)(t),c=s?.trim()||(0,o.TS)(t),l=(0,o.SX)(t,{assessmentId:n,thirdPartyId:s}),d=(0,p._h)(r??"",c),u=(0,a.I)({queryKey:["case-assignment-strip","executions",d,r],queryFn:async()=>(0,p.uB)({assessmentId:r,fetchPage:async({limit:e,offset:t})=>{let n=await h.zc.getWorkflowExecutions({subject_id:d,view:"history",limit:e,offset:t});return{executions:Array.isArray(n?.executions)?n.executions:[],total:"number"==typeof n?.total?n.total:null}}}),enabled:!!d,staleTime:3e4}),m=(0,p.Hz)(u.data?.executions??[],{assessmentId:r});return(0,i.jsx)(v,{...e,query:l,listedRunStatus:m?String(m.status??""):void 0})}function v({entity:e,onActivate:t,onOpenFull:n,assessmentId:a,thirdPartyId:h,override:m,triggerVariant:f="chip",className:g,monitoringSetupAllowed:y=!1,decisionRecorded:x=!1,listedRunStatus:k=null,query:b}){let C=a?.trim()||(0,o.IU)(e),_=h?.trim()||(0,o.TS)(e),{data:w,isLoading:j=!1,isError:N=!1}=b??{},F=x?(0,p.N0)(k):null,I=F?({"In progress":"in_progress",Waiting:"waiting",Failed:"failed","Decision recorded":"decided"})[F]:null,$=w&&"decided"===w.outcome&&!x?w.decision_rollup.ready_for_decision?"ready":"not_ready":I??w?.outcome,S=null!=I&&"decided"!==I,[A,R]=(0,r.useState)(!1);if(!m&&(j||N||!w))return null;let L=m?m.tone:(0,o.hS)((0,o.Cp)(w.checks,w.decision_rollup.blocking_check_keys),w.decision_rollup.ready_for_decision,S?"ready":$??w.outcome);if("none"===L)return null;let P="unavailable"===L,z=m?m.label:(0,o.Rl)((0,o.Cp)(w.checks,w.decision_rollup.blocking_check_keys),w.decision_rollup.ready_for_decision,$??w.outcome),T=m?[]:(0,o.f7)(w.checks,w.decision_rollup.blocking_check_keys),U=m?null:new Map(w.checks.map(e=>[e.key,e])),O=m?null:w.checks.map(e=>(0,c.TO)(e,new Set(w.decision_rollup.blocking_check_keys))),E=n??t,D=m&&"number"==typeof m.totalRemainingChecks?Math.max(m.blockers.length,m.totalRemainingChecks):null,M=null===D?0:D-m.blockers.length,W=m?.checklist?`${m.blockers.length} ${1===m.blockers.length?"check blocks":"checks block"} decision`:null===D?z:`${m.blockers.length} ${1===m.blockers.length?"check blocks":"checks block"} decision`,q=m?.openFullLabel??(null===D?"Open full checks":1===D?"View the remaining check":`View all ${D} remaining checks`),H="function"==typeof t,J=m?H&&"blocking"===L&&m.blockers.length>0:H&&"blocking"===L&&T.length>0&&!!(C&&_),V="blocking"===L?(0,i.jsx)("span",{"aria-hidden":!0,
1className:"h-1.5 w-1.5 shrink-0 rounded-full bg-refresh-accent"}):"unavailable"===L?null:(0,i.jsx)("span",{"aria-hidden":!0,className:"text-[0.7rem] leading-none",children:"✓"}),B="decided"===L?m?.decision??"neutral":null,X=B?"rejected"===B?(0,i.jsx)(s.Jpz,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0"}):(0,i.jsx)(s.Jly,{"aria-hidden":!0,className:(0,d.cn)("h-3.5 w-3.5 shrink-0","approved"===B&&"text-refresh-status-approved")}):null,K="link"===f?(0,d.cn)("inline-flex items-center gap-1.5 border-0 bg-transparent p-0 text-sm font-medium",!P&&"cursor-pointer hover:underline underline-offset-2 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-refresh-accent focus-visible:ring-offset-1","blocking"===L?"text-refresh-status-critical":"ready"===L?"text-refresh-ink-2":"rejected"===B?"text-refresh-status-critical":"text-refresh-ink-2",g):(0,d.cn)("inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium tracking-wide transition-colors","blocking"===L?"border-refresh-accent/30 bg-refresh-accent/10 text-refresh-accent":"ready"===L?"border-refresh-status-approved/30 bg-refresh-status-approved/15 text-refresh-status-approved":"border-refresh-line bg-refresh-surface text-refresh-ink-2",H&&"cursor-pointer hover:opacity-90 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-refresh-accent focus-visible:ring-offset-1",g),Y=(0,i.jsxs)(i.Fragment,{children:["chip"===f?V:X,(0,i.jsx)("span",{children:z}),J&&"chip"===f?(0,i.jsx)(s.yQN,{"aria-hidden":!0,className:"h-3 w-3 shrink-0 opacity-70"}):null]});return P?(0,i.jsx)("span",{"aria-label":z,"data-testid":"casefile-gate-chip","data-tone":L,"data-decision":B??void 0,"data-variant":f,className:K,children:Y}):H?J?(0,i.jsxs)(l.AM,{open:A,onOpenChange:R,children:[(0,i.jsx)(l.Wv,{asChild:!0,children:(0,i.jsx)("button",{type:"button","aria-label":"link"===f?z:`${z}. Open the list of checks to clear.`,"data-testid":"casefile-gate-chip","data-tone":L,"data-decision":B??void 0,"data-variant":f,className:K,children:Y})}),(0,i.jsxs)(l.hl,{side:"bottom",align:"start",className:"w-[min(34rem,calc(100vw-2rem))] overflow-hidden p-0 border-refresh-line bg-refresh-surface text-refresh-ink","data-testid":"casefile-gate-chip-popover",children:[m?.checklist?null:(0,i.jsx)("p",{className:"border-b border-refresh-line px-3 py-2 text-[0.7rem] font-medium uppercase tracking-wide text-refresh-ink-2",children:W}),m?.checklist?(0,i.jsx)("div",{className:"max-h-[min(34rem,calc(100vh-10rem))] overflow-y-auto",children:(0,i.jsx)(u.f$,{hideHeader:!0,compactHeaderLabel:W,disableInternalScroll:!0,rowPresentation:"actionable",title:"Checks",subtitle:"",checks:m.checklist.checks,selectedCheckId:null,stageLabels:m.checklist.stageLabels,decisionInfo:m.checklist.decisionInfo,monitoringSetupAllowed:y,completedChecks:m.checklist.completedChecks??"collapsed",onSelectCheck:e=>{R(!1),m.checklist?.onSelectCheck(e)}})}):!m&&O?(0,i.jsx)("div",{className:"max-h-[min(34rem,calc(100vh-10rem))] overflow-y-auto",children:(0,i.jsx)(u.f$,{hideHeader:!0,compactHeaderLabel:W,disableInternalScroll:!0,rowPresentation:"actionable",title:"Checks",subtitle:"",checks:O,selectedCheckId:null,monitoringSetupAllowed:y,completedChecks:"collapsed",orderChecks:(e,t)=>{let n=U?.get(e.id),i=U?.get(t.id);return n&&i?(0,c.$8)(n,i):0},onSelectCheck:()=>{R(!1),E?.()}})}):(0,i.jsx)("ul",{className:"max-h-[min(34rem,calc(100vh-10rem))] divide-y divide-refresh-line overflow-y-auto",children:m?.blockers.map(e=>(0,i.jsx)("li",{children:(0,i.jsxs)("button",{type:"button","aria-label":"Open check"===e.cta?`Open check: ${e.name}`:e.cta,onClick:()=>{R(!1),e.onSelect()},className:"group flex w-full cursor-pointer flex-col items-start gap-2 px-3 py-3 text-left transition-colors hover:bg-refresh-canvas focus:outline-hidden focus-visible:bg-refresh-canvas",children:[(0,i.jsxs)("span",{className:"min-w-0",children:[(0,i.jsx)("span",{className:"block text-sm font-medium text-refresh-ink",children:e.name}),e.evidence?(0,i.jsx)("span",{className:"mt-1 block text-xs leading-snug text-refresh-ink-2",children:e.evidence}):null]}),(0,i.jsxs)("span",{className:"inline-flex w-fit items-center text-left text-xs font-medium leading-snug text-refresh-accent",children:[(0,i.jsx)("span",{className:"text-refresh-accent transition-colors group-hover:text-refresh-accent-hover group-hover:underline group-focus-visible:text-refresh-accent-hover group-focus-visible:underline underline-offset-2",children:e.cta}
1),(0,i.jsx)(s.c_$,{"aria-hidden":!0,className:"h-3.5 w-3.5"})]})]})},e.key))}),!m?.checklist&&M>0?(0,i.jsxs)("p",{className:"border-t border-refresh-line px-3 py-2 text-xs text-refresh-ink-2","data-testid":"casefile-gate-chip-remaining-context",children:[M," other ",1===M?"check still needs":"checks still need"," review"]}):null,(0,i.jsxs)("button",{type:"button",onClick:()=>{R(!1),E?.()},className:"flex w-full cursor-pointer items-center justify-between border-t border-refresh-line px-3 py-2 text-xs font-medium text-refresh-ink-2 transition-colors hover:bg-refresh-canvas hover:text-refresh-accent hover:underline focus:outline-hidden focus-visible:bg-refresh-canvas focus-visible:text-refresh-accent focus-visible:underline underline-offset-2",children:[q,(0,i.jsx)(s.c_$,{"aria-hidden":!0,className:"h-3.5 w-3.5"})]})]})]}):(0,i.jsx)("button",{type:"button","aria-label":"link"===f?z:`${z}. Open the assessment.`,onClick:t,"data-testid":"casefile-gate-chip","data-tone":L,"data-decision":B??void 0,"data-variant":f,className:K,children:Y}):(0,i.jsx)("span",{"data-testid":"casefile-gate-chip","data-tone":L,"data-decision":B??void 0,"data-variant":f,className:K,children:Y})}},99884:(e,t,n)=>{n.d(t,{HD:()=>a});var i=n(72012),s=n(7603);class r extends i.tJ{async getContentItems(e){s.vF.debug("[ContentApiClient] Fetching content items",{params:e});try{let t=await this.get("/api/v1/content-items",e);return s.vF.info("[ContentApiClient] Content items retrieved",{count:t.items?.length||0,totalCount:t.pagination?.total_count}),t}catch(t){throw s.vF.error("[ContentApiClient] Failed to get content items",{error:t,params:e}),t}}async createContentItem(e){s.vF.debug("[ContentApiClient] Creating content item",{title:e.title,contentType:e.content_type,source:e.source});try{let t=await this.post("/api/v1/content-items",e);return s.vF.info("[ContentApiClient] Content item created successfully",{contentId:t.id||t.content_id,title:t.title}),t}catch(t){throw s.vF.error("[ContentApiClient] Content item creation failed",{contentData:e,error:t}),t}}async getContentItem(e){s.vF.debug("[ContentApiClient] Fetching content item",{id:e});try{let t=await this.get(`/api/v1/content-items/${e}`);return s.vF.info("[ContentApiClient] Content item retrieved",{contentId:t.id||t.content_id,title:t.title}),t}catch(t){throw s.vF.error("[ContentApiClient] Failed to get content item",{id:e,error:t}),t}}async updateContentItem(e,t){s.vF.debug("[ContentApiClient] Updating content item",{id:e,updateKeys:Object.keys(t)});try{let n=await this.put(`/api/v1/content-items/${e}`,t);return s.vF.info("[ContentApiClient] Content item updated successfully",{contentId:n.id||n.content_id,title:n.title}),n}catch(n){throw s.vF.error("[ContentApiClient] Content item update failed",{id:e,updates:t,error:n}),n}}async uploadFile(e,t){s.vF.debug("[ContentApiClient] Uploading file",{fileName:e.name,fileSize:e.size,metadata:t});try{let n=new FormData;n.append("file",e),t&&Object.entries(t).forEach(([e,t])=>{null!=t&&n.append(e,"object"==typeof t?JSON.stringify(t):t.toString())});let i=await this.apiCall("/api/v1/uploads",{method:"POST",body:n,timeout:6e4,retries:0,headers:{}});return s.vF.info("[ContentApiClient] File uploaded successfully",{fileId:i.file_id,fileName:i.filename,hasContentItem:!!i.content_item}),i}catch(n){if(s.vF.error("[ContentApiClient] File upload failed",{fileName:e.name,metadata:t,error:n}),(0,i.gL)(n))throw Error("Upload timed out. Try again or use a smaller file.");throw n}}async getUploadedArtifact(e){let t=await this.get(`/api/v1/artifacts/${encodeURIComponent(e)}`),n=t.metadata&&"object"==typeof t.metadata?t.metadata:{};return{artifact_id:t.artifact_id,filename:n.original_filename||t.title,size_bytes:t.file_size??n.file_size??0,content_type:t.mime_type||t.content_type||n.file_type||"application/octet-stream",storage_url:t.url||t.external_url||void 0,uploaded_at:t.created_at}}async getUploadStatus(e){return this.get(`/api/v1/uploads/${encodeURIComponent(e)}`)}async getUploadedDocumentText(e){return this.get(`/api/v1/artifacts/${encodeURIComponent(e)}`)}async analyzeContent(e){s.vF.debug("[ContentApiClient] Analyzing content",{contentLength:e.content.length,analysisTypes:e.analysis_types});try{let t={content:e.content,content_type:e.content_type||e.contentType||"document",title:e.title,requirement_set_ids:e.requirement_set_ids||e.pack_ids,analysis_depth:e.analysis_depth||"standard",context:{...e.content_metadata||{},...e.analysis_types?{analysis_types:e.analysis_types}:{}}},n=await this.post("/api/v1/intelligence/analyze-content",t);return s.vF.info("[ContentApiClient] Content analysis completed",{analysisId:n.analysis_i
1d,riskLevel:n.overall_risk_level,authorityCount:n.authority_analyses?.length||0}),n}catch(t){throw s.vF.error("[ContentApiClient] Content analysis failed",{contentLength:e.content.length,error:t}),t}}async validateSemanticConfig(){s.vF.debug("[ContentApiClient] Validating semantic config");try{let e=await this.get("/api/v1/semantic/config");return s.vF.info("[ContentApiClient] Semantic config validated",{available:e.semantic_processing_available}),e}catch(e){throw s.vF.error("[ContentApiClient] Semantic config validation failed",{error:e}),e}}async getCommunicationsRegistry(e){let t=new URLSearchParams({space_id:e});return this.get(`/api/v1/content-items/revisions/registry?${t.toString()}`)}async getMatterCommunicationsRegistry(e,t){let n=new URLSearchParams({matter_id:e,regulatory_space_id:t});return this.get(`/api/v1/content-items/revisions/registry?${n.toString()}`)}async captureContentRevision(e){return this.post("/api/v1/content-items/revisions/capture",e)}async listContentRevisions(e){return this.get(`/api/v1/content-items/${e}/revisions`)}async getContentRevision(e,t){return this.get(`/api/v1/content-items/${e}/revisions/${t}`)}async reviewContentRevision(e,t,n){return this.post(`/api/v1/content-items/${e}/revisions/${t}/review`,n)}async verifyContentCorrection(e,t,n){return this.post(`/api/v1/content-items/${e}/revisions/${t}/verify-correction`,{verification_revision_id:n})}async compareContentRevisions(e,t,n){return this.get(`/api/v1/content-items/${e}/revisions/compare`,{from:t,to:n})}async submitPieceForReview(e){try{return await this.post("/api/v1/content-items/intake/submission",e,{timeout:3e5,retries:0})}catch(e){if((0,i.gL)(e))throw Error("Checks are taking longer than expected. Your file is still uploaded; retry checks.");throw e}}async submitPieceRevision(e,t){try{return await this.post(`/api/v1/entities/${e}/intake/revision`,t,{timeout:3e5,retries:0})}catch(e){if((0,i.gL)(e))throw Error("Checks are taking longer than expected. Your file is still uploaded; retry checks.");throw e}}async readPieceRevisionSuggestion(e,t,n){return this.get(`/api/v1/entities/${e}/line-verdicts/${t}/revision-suggestion`,{revision_id:n})}async suggestPieceRevision(e,t,n){return this.post(`/api/v1/entities/${e}/line-verdicts/${t}/revision-suggestion`,n,{timeout:3e5,retries:0})}async dispatchPieceForReview(e,t){return this.post(`/api/v1/entities/${e}/signoff-chain/dispatch`,t)}async intakePieceUrl(e){return this.post("/api/v1/content-items/intake",e)}async retireContentItem(e,t){return this.post(`/api/v1/content-items/${e}/retire`,t)}}let a=new r}}]);

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.