1"use strict";(self.webpackChunkcourtcorrect_platform=self.webpackChunkcourtcorrect_platform||[]).push([[4718],{53669(e,s,n){n.d(s,{d:()=>r});var t=n(96540);function r(e,s){const n=(0,t.useRef)();return(0,t.useCallback)((...t)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...t)},s)},[e,s])}},66237(e,s,n){n.d(s,{d:()=>l});var t=n(96540),r=n(34164),i=n(74665),o=n(18539);var a=n(74848);const l=e=>{const{popoverTrigger:s,popoverProps:n,popoverClassName:l,triggerClassName:c,beforeContent:d,afterContent:u,placeholder:g="Search",value:h,options:p,onSelect:f,noOptionsMessage:m,dropdownIsLoading:C,dropdownIsSearchable:w=!0,dropdownIsOptionDisabled:b,dropdownFilterOption:v}=e,j=(0,o.f)({isAdaptive:!1,side:"bottom",align:"end"}),x=n??j,A=(0,t.useCallback)((e,s)=>{f&&f(e,s),x.onOpenChange(!1)},[f,x]);return(0,a.jsxs)(o.A,{...x,className:(0,r.$)("U4Hi0ySg",l),triggerClassName:c,showArrow:!1,trigger:s,children:[d,(0,a.jsx)(i.m,{isOpen:!0,isInline:!0,isLoading:C,isSearchable:w,isOptionDisabled:b,filterOption:v,menuClassName:"OiAQn9eK",controlClassName:(0,r.$)("uuVJjGzp",!w&&"Kv7m2rSb"),placeholder:g,noOptionsMessage:()=>m??"No options",controlShouldRenderValue:!1,value:h,onSelect:A,options:p,renderSettings:{showChevron:!1}}),u]})}},18539(e,s,n){n.d(s,{A:()=>d,f:()=>o});var t=n(96540),r=n(53669);const i=200;function o(e){const{isAdaptive:s=!0,isDisabled:n=!1,side:o="left",align:a="start"}=e,l=(0,t.useRef)(null),c=(0,t.useRef)(null),[d,u]=(0,t.useState)(!1),[g,h]=(0,t.useState)(o),[p,f]=(0,t.useState)(a),[m,C]=(0,t.useState)(!1),w=(0,t.useCallback)((e,s)=>{const n=window.innerHeight-e.bottom,t=e.top,r=window.innerWidth-e.right,i=e.left;if("bottom"===o||"top"===o){const e="bottom"===o?n:t;if(e<s&&("bottom"===o?t:n)>e)return"bottom"===o?"top":"bottom"}else{const e="right"===o?r:i;if(e<s&&("right"===o?i:r)>e)return"right"===o?"left":"right"}return o},[o]);(0,t.useLayoutEffect)(()=>{if(s&&c.current)if(d){const e=c.current.getBoundingClientRect(),s=l.current?.getBoundingClientRect();h(w(e,"bottom"===o||"top"===o?s?.height??i:s?.width??i)),f(a)}else h(o),f(a)},[d,s,o,a,w]);const b=(0,t.useCallback)(()=>{if(!s||!d||!c.current)return;const e=c.current.getBoundingClientRect(),n=l.current?.getBoundingClientRect(),t=w(e,"bottom"===o||"top"===o?n?.height??i:n?.width??i);t!==g&&(C(!0),h(t),f(a),requestAnimationFrame(()=>C(!1)))},[s,d,o,w,a,g]),v=(0,r.d)(b,50);return(0,t.useEffect)(()=>{if(s)return window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[v,s]),{ref:l,triggerRef:c,isOpen:d,onOpenChange:u,isDisabled:n,side:g,align:p,isRecalculating:m,avoidCollisions:s}}var a=n(31127),l=n(34164);var c=n(74848);const d=(0,t.forwardRef)(function(e,s){const{className:n,triggerClassName:t,isOpen:r,onOpenChange:i,side:o,align:d,trigger:u,children:g,showArrow:h=!0,isDisabled:p=!1,avoidCollisions:f,triggerRef:m}=e,C=!p&&r;return(0,c.jsxs)(a.bL,{open:C,onOpenChange:e=>{p&&e||i?.(e)},children:[(0,c.jsx)(a.l9,{asChild:!0,children:(0,c.jsx)("div",{ref:m,className:(0,l.$)("haTtcILP",t,p?"QCRXMj9e":void 0),children:u})}),(0,c.jsx)(a.ZL,{children:(0,c.jsxs)(a.UC,{ref:s,className:(0,l.$)("gWy5uj9M",n),side:o,align:d,sideOffset:5,avoidCollisions:f,children:[g,h?(0,c.jsx)(a.i3,{className:"cVDoQBYh"}):null]})})]})})},71498(e,s,n){n.r(s),n.d(s,{default:()=>f});var t=n(96540),r=n(61225),i=n(49612),o=n(11646),a=n(98114),l=n(52934),c=n(81342),d=n(41092),u=n(86928),g=n(53275),h=n(12181),p=n(74848);const f=({dashboard:e,taskTemplate:s,onSuccess:n,onClose:f,managers:m})=>{const C=(0,r.wA)(),w=(0,o.J)(),b=(0,d.G)(e=>e.caseFile.caseDetailsData),v=(0,i.A)(),j=!e,x=(0,g.e)({dashboard:e,taskTemplate:s,user:w,caseId:b?.case_id,taskId:v}),[A,S]=(0,t.useState)(x),[O,k]=(0,t.useState)(!1),[R,N]=(0,t.useState)(!1),y=()=>{S(null),f()},D=()=>{JSON.stringify(A)===JSON.stringify(x)?y():N(!0)};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(l.A.Container,{isOpen:!R,onClose:D,children:[(0,p.jsx)(l.A.Header,{children:"Add Task"}),(0,p.jsx)(l.A.Content,{children:(0,p.jsx)(h.A,{data:A,updateData:e=>{S({...A,...e})},managers:m,isShowRedBorders:O,isAssigneeRequired:j})}),(0,p.jsxs)(l.A.Footer,{children:[(0,p.jsx)(a.$,{variant:"clean",size:"s",onClick:D,children:"Cancel"}),(0,p.jsx)(a.$,{size:"s",onClick:async()=>
1{if(!(0,g.I)(A,{isAssigneeRequired:j}))return C((0,c.nm)({message:"Please complete all required fields"})),k(!0);var s;e?(s=A,(0,u.A)({method:"POST",url:"cases/tasks/new",data:s}).then(()=>{C((0,c.nm)({message:"New task was added successfully!",style:"success"})),n()}).catch(()=>{C((0,c.nm)({message:"Error when creating new task"}))})):n(A),y()},children:"Add"})]})]}),(0,p.jsxs)(l.A.Container,{isOpen:R,onClose:()=>N(!1),children:[(0,p.jsx)(l.A.Header,{children:"Warning"}),(0,p.jsx)(l.A.Content,{children:(0,p.jsx)("p",{style:{fontSize:"14px",fontWeight:"400",color:"#6F7170",marginBottom:"0"},children:"If you continue without saving your progress, your changes will be lost."})}),(0,p.jsxs)(l.A.Footer,{children:[(0,p.jsx)(a.$,{variant:"clean",size:"s",onClick:()=>N(!1),children:"Cancel"}),(0,p.jsx)(a.$,{size:"s",onClick:()=>{y(),N(!1)},children:"Ok"})]})]})]})}}}]);
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.