PageSourceSearch

https://rvroofworx.com/_next/static/chunks/1716.29d021b198455a55.js

js rvroofworx.com collected 2026-10-09 05:23:39 UTC 62,740 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d01e3dff-35b2-43ef-a819-e67680d90305",e._sentryDebugIdIdentifier="sentry-dbid-d01e3dff-35b2-43ef-a819-e67680d90305")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1716],{32866:function(e,t,i){i.d(t,{B:function(){return r}});var n=i(67294),l=i(87536),r=function(e){var t=e.as,i=e.errors,r=e.name,s=e.message,o=e.render,a=function(e,t){if(null==e)return{};var i,n,l={},r=Object.keys(e);for(n=0;n<r.length;n++)t.indexOf(i=r[n])>=0||(l[i]=e[i]);return l}(e,["as","errors","name","message","render"]),c=(0,l.Gc)(),d=(0,l.U2)(i||c.formState.errors,r);if(!d)return null;var u=d.message,f=d.types,h=Object.assign({},a,{children:u||s});return n.isValidElement(t)?n.cloneElement(t,h):o?o({message:u||s,messages:f}):n.createElement(t||n.Fragment,h)}},84327:function(e,t,i){i.d(t,{I9:function(){return o},R2:function(){return a},_7:function(){return d},g3:function(){return s},z6:function(){return c},zu:function(){return r}});var n=i(69322),l=i(66313);let r=e=>{let{path:t,fileName:i,fileType:r,isPrivate:s,signal:o}=e;return l.Z.get(n.Z.api.files.getUploadLink,{params:{path:t,fileName:i,fileType:r,isPrivate:s},signal:o}).then(e=>{let{data:t}=e;return t})},s=e=>{let{url:t,body:i,signal:n,onUploadProgress:r}=e;return l.Z.post(t,{body:i,onUploadProgress:r,signal:n}).then(e=>{let{data:t}=e;return t})},o=e=>{let{url:t,body:i,signal:n,onUploadProgress:r}=e;return l.Z.post(t,{body:i,onUploadProgress:r,signal:n}).then(e=>{let{data:t}=e;return t})},a=e=>l.Z.del(n.Z.api.files.root,{params:{path:e}}),c=e=>l.Z.del(n.Z.api.crm.files.root,{body:e}),d=(e,t)=>l.Z.post(n.Z.api.crm.files.getUploadLink,{body:e,signal:t}).then(e=>{let{data:t}=e;return t})},9804:function(e,t,i){i.d(t,{oS:function(){return o}});var n=i(37900);let l=n.Z.s3BucketName,r=n.Z.s3BucketNamePrivate,s=n.Z.s3Region,o="https://".concat(l,".s3.").concat(s,".amazonaws.com/");"https://".concat(r,".s3.").concat(s,".amazonaws.com/")},65619:function(e,t,i){var n,l;i.d(t,{n:function(){return n}}),(l=n||(n={})).QUEUED="queued",l.LOADING="loading",l.PROCESSING="processing",l.LOADED="loaded",l.DELETING="deleting",l.ERROR="error",l.DELETING_ERROR="deleting-error",l.MARKED_FOR_DELETION="marked-for-deletion"},62127:function(e,t,i){i.d(t,{Z:function(){return a},D:function(){return o}});var n=i(57632),l=i(61709),r=e=>{let t=e.split(".");return t.length>1?t[t.length-1]:""};let s=e=>"".concat((0,n.Z)(),".").concat(e),o=e=>s((0,l.z)(e)?"jpeg":r(e.name));var a=e=>s(r(e.name))},25578:function(e,t,i){i.d(t,{Z:function(){return p}});var n=i(6459),l=i(67294),r=e=>{let{action:t,onSuccess:i,onError:n,onIsLoadingChange:r}=e,[s,o]=(0,l.useState)(!1);return{fetch:async e=>{try{o(!0),null==r||r(!0);let n=await t(null!=e?e:{});null==i||i(n)}catch(e){null==n||n(e)}finally{o(!1),null==r||r(!1)}},isLoading:s}},s=i(6950),o=i(84327),a=i(65619),c=i(62127),d=i(46966),u=i(37900),f=i(9804),h=e=>e.replace(f.oS,"");let m=(e,t)=>{let i=e.flatMap(e=>e.status===a.n.LOADED&&e.image?[e.image]:[]);null==t||t(i)};var p={useFile:e=>{let{initImage:t,isPrivate:i,source:u,isFormSubmitted:f,onChange:h,onIsLoadingChange:m}=e,p=(0,n.p)(),{permissions:g}=(0,s.T)(),[E,b]=(0,l.useState)(t||null),[_,v]=(0,l.useState)(t?a.n.LOADED:null),[x,T]=(0,l.useState)(0),S=(0,l.useRef)(E),I=(0,l.useRef)(f);S.current=E,I.current=f;let z=async e=>{if(e){if("aws"===u){if(i&&"path"in e){if(!g.DELETE_PRIVATE_IMAGES)throw Error("You are not have permission to delete this file");return v(a.n.DELETING),await (0,o.R2)("".concat(e.path,"/").concat(e.imageId))}if("src"in e)return v(a.n.DELETING),await (0,o.R2)(e.src)}return await (0,o.z6)([{uuid:e.imageId}])}},{isLoading:A,fetch:y}=r({action:async e=>{let{file:t,path:n,width:l,height:r}=e;v(a.n.LOADING);let s=(0,c.Z)(t);if("aws"===u){if(!n)throw Error("Path is required for AWS source");return(0,d.f)({fileId:s,file:t,path:n,width:l,height:r,onUploadProgress:e=>{100===e&&v(a.n.PROCESSING),T(e)},isPrivate:i})}return(0,d.Q)({file:t,onUploadProgress:e=>{100===e&&v(a.n.PROCESSING),T(e)}})},onSuccess:e=>{b(e),null==h||h(e),v(a.n.LOADED),p({status:"success",title:"Success",description:"File uploaded"})},onError:e=>{v(a.n.ERROR),console.error(e),p({status:"error",title:"Error",description:"Something went wrong"})},onIsLoadingChange:m}),{isLoading:C,fetch:O}=r({action:async()=>{await z(E)},onSuccess:()=>{T(0),v(null),null==h||h(null),E&&(p({status:"success",title:"Success",description:"File deleted"}),b(null))},onError:e=>{T(0),v(null),null==h||h(null),b(null)}});return{image:E,isUploading:A,uploadFile:y,isDeleting:C,deleteFile:O,progress:x,status:_}},useFilesQueue:e=>{let{initialFiles:t=[],deleteImmediately:i=!1,maxFileSize:r=u.Z.maxFileSize,path:s,isFormSubmitted:f,source:p="aws",onChange:g,onIsLoadingChange:E}=e,[b,_]=(0,l.useState)(t),[v,x]=(0,l.useState)(!1),[T,S]=(0,l.useState)(!1),I=(0,n.p)(),z=(0,l.useRef)(f),A=(0,l.useRef)(b),y=(0,l.useRef)(v);A.current=b,z.current=f,y.current=v;let C=e=>{x(e),null==E||E(e)},O=e=>{let{fileId:t,image:i,status:n,progress:l=0,abortController:r}=e;return new Promise(e=>{_(s=>{let o=s.map(e=>e.fileId===t?{...e,image:null!=i?i:e.image,status:null!=n?n:e.status,progress:null!=l?l:e.progress,abortController:null!=r?r:e.abortController}:e);return e(o),o})})},R=async e=>{let{file:t,fileId:i}=e;O({fileId:i,status:a.n.LOADING});let n=e=>{O({fileId:i,status:100===e?a.n.PROCESSING:a.n.LOADING,progress:e})};if(!s&&"aws"===p)throw Error("Path is required for AWS source");try{let e=new AbortController;O({fileId:i,abortController:e});let l="aws"===p?await (0,d.f)({fileId:i,file:t,path:s,onUploadProgress:n},e.signal):await (0,d.Q)({file:t,onUploadProgress:n},e.signal);if("src"in l){let e={fileId:i,image:l,status:a.n.LOADED,progress:100},n=await O(e);m(n,g),I({title:"File uploaded",description:"File ".concat(null==t?void 0:t.name," uploaded"),status:"success"})}}catch(e){O({fileId:i,status:a.n.ERROR}),I({title:"Error",description:"File ".concat(null==t?void 0:t.name," failed to upload"),status:"error"})}},j=e=>!(e.size>r)||(I({title:"File too large",description:"File with name ".concat(e.name," is too large"),status:"info"}),!1),D=(e,t)=>!t.some(t=>{var i,n;return(null===(i=t.file)||void 0===i?void 0:i.name)===e.name&&(null===(n=t.file)||void 0===n?void 0:n.size)===e.size})||(I({title:"File already exist",description:"File with name ".concat(e.name," already exist"),status:"info"}),!1),N=async e=>{if("aws"===p){let t=e.map(e=>{let{image:t}=e;return h(null==t?void 0:t.src)});await (0,o.R2)(t)}else await (0,o.z6)(e.map(e=>{let{image:t}=e;return{uuid:null==t?void 0:t.imageId}}));_(t=>{let i=t.filter(t=>!e.some(e=>{let{fileId:i}=e;return t.fileId===i}));return m(i,g),i})},w=async e=>{var n,l;if(t.some(t=>t.fileId===e)&&!i){m(await O({fileId:e,status:a.n.MARKED_FOR_DELETION}),g);return}let r=b.find(t=>t.fileId===e);(null==r?void 0:r.status)===a.n.LOADING?(null==r||null===(l=r.abortController)||void 0===l||l.abort(),_(t=>t.filter(t=>t.fileId!==e))):O({fileId:e,status:a.n.DELETING}),(null==r?void 0:null===(n=r.image)||void 0===n?void 0:n.imageId)&&await N([r])};(0,l.useEffect)(()=>{let e=b.filter(e=>e.status===a.n.LOADING||e.status===a.n.PROCESSING);if(e.length<u.Z.maxParallelUploads){let t=b.find(e=>e.status===a.n.QUEUED);t?R(t):e.length||C(!1)}},[b]);let k=async e=>{let t=e.filter(e=>e.status===a.n.MARKED_FOR_DELETION);t.length&&await N(t)};return(0,l.useEffect)(()=>{f&&k(A.current)},[f]),{filesQueue:b,isLoading:v,isDirty:T,handleReload:R,handleAddFiles:e=>{_(t=>{S(!0);let i=e.flatMap(e=>{let i=(0,c.Z)(e),n=j(e),l=D(e,t);return n&&l?[{fileId:i,file:e,status:a.n.QUEUED,progress:0}]:[]});return i.length?(y.current||C(!0),[...t,...i]):t})},handleDelete:w}}}},46966:function(e,t,i){i.d(t,{Q:function(){return f},f:function(){return u}});var n=i(84327),l=(e,t)=>
1{if(!(e instanceof Blob))throw Error('Cannot upload "'.concat(t,'": the stored value is not a file (got ').concat(typeof e,")."));if(0===e.size){let i=e instanceof File?e.name:t;throw Error('Cannot upload "'.concat(i,'": the file is empty (0 bytes).'))}},r=i(9804),s=e=>{let{fileName:t,path:i}=e;return new URL("".concat(i,"/").concat(t),r.oS)};let o=[1e3,3e3],a=e=>e instanceof Error&&e.message.includes("RequestTimeout"),c=(e,t)=>new Promise((i,n)=>{let l=setTimeout(()=>{null==t||t.removeEventListener("abort",r),i()},e),r=()=>{clearTimeout(l),n(t.reason)};null==t||t.addEventListener("abort",r,{once:!0})}),d=async(e,t)=>{for(let i=0;;i++){null==t||t.throwIfAborted();try{await e();return}catch(e){if(!a(e)||i===o.length)throw e;await c(o[i],t)}}},u=async(e,t)=>{let{fileId:i,file:r,width:o,height:a,path:c,isPrivate:u,onUploadProgress:f}=e;l(r,i);let{fields:h,url:m}=await (0,n.zu)({fileName:i,fileType:r.type,path:c,isPrivate:u,signal:t}),p=new FormData;for(let e in h)p.append(e,h[e]);return(p.append("file",r,i),await d(()=>(0,n.g3)({url:m,body:p,onUploadProgress:f,signal:t}),t),u)?{imageId:i,fileName:r.name,path:c}:{imageId:i,src:s({fileName:i,path:c}).href,fileName:i,size:r.size,width:o||void 0,height:a||void 0}},f=async(e,t)=>{let{updateFileId:i,file:l,withPreview:r,onUploadProgress:s}=e,{upload_url:o,max_file_size:a,max_part_size:c}=await (0,n._7)({file_name:l.name,content_type:l.type,file_size:l.size,file_uuid:i,with_preview:r},t),d=0,u=null;for(;d<l.size;){let e=Math.min(d+c,l.size),i=l.slice(d,e);(u=await (0,n.I9)({url:o,body:i,onUploadProgress:s?t=>{s((d+t*(e-d)/100)/l.size*100)}:void 0,signal:t})).next_url&&(o=u.next_url),d=e}if(!(null==u?void 0:u.uuid))throw Error("Something went wrong with uploading file to CRM");return{imageId:u.uuid,src:u._links.download.href,fileName:l.name,size:l.size}}},60453:function(e,t,i){i.d(t,{Cv:function(){return E},H3:function(){return b},OU:function(){return z},QR:function(){return A},ah:function(){return y},eK:function(){return _},o4:function(){return u},v8:function(){return c},yB:function(){return f}});var n=i(1604),l=i(11187),r=i(15487);let s={TITLE:"title",TYPE:"type",DESCRIPTION:"description",CREATED_AT:"createdAt"},o=n.z.nativeEnum(s),a={INSPECTION:"inspection",BEFORE:"before",IN_PROGRESS:"in-progress",FINAL:"final"},c=n.z.nativeEnum(a),d=n.z.nativeEnum({INSPECTION:"inspection",IN_PROGRESS:"in-progress",FINAL:"final"}),u={IMAGES:"images",CHECKBOXES:"checkboxes",CHECKLIST:"checklist",TEXT:"text",SELECT:"select"},f=n.z.nativeEnum(u),h=n.z.object({_id:n.z.string(),label:n.z.string()}),m=n.z.object({_id:n.z.string(),label:n.z.string()}),p=n.z.object({_id:n.z.string(),type:f,isRequired:n.z.boolean().optional().default(!1),checkboxes:n.z.array(h).optional(),checklist:n.z.array(m).optional(),checklistTitle:n.z.string().optional(),checkboxesTitle:n.z.string().optional(),selectOptions:n.z.array(n.z.string()).optional(),selectTitle:n.z.string().optional()}),g=n.z.union([n.z.string(),n.z.date()]).transform(e=>e instanceof Date?e:new Date(e)).refine(e=>!Number.isNaN(e.getTime()),{message:"Invalid date"}),E=n.z.object({imageId:n.z.string(),fileName:n.z.string(),width:n.z.number().optional(),height:n.z.number().optional(),createdAt:g,registeredAt:g}),b=n.z.discriminatedUnion("type",[n.z.object({_id:n.z.string().optional(),type:n.z.literal(u.IMAGES),images:n.z.array(l.KA),pendingUploads:n.z.array(E).optional(),checkboxes:n.z.undefined(),checklist:n.z.undefined(),input:n.z.undefined(),selectedValue:n.z.undefined(),selectOptions:n.z.undefined()}),n.z.object({_id:n.z.string().optional(),type:n.z.literal(u.CHECKBOXES),checkboxes:n.z.array(n.z.object({label:n.z.string(),value:n.z.union([n.z.boolean(),n.z.literal("skipped")]).nullable().default(null),_id:n.z.string().optional()})),checkboxesTitle:n.z.string().optional(),checklist:n.z.undefined(),images:n.z.undefined(),pendingUploads:n.z.undefined(),input:n.z.undefined(),selectedValue:n.z.undefined(),selectOptions:n.z.undefined()}),n.z.object({_id:n.z.string().optional(),type:n.z.literal(u.CHECKLIST),checklist:n.z.array(n.z.object({label:n.z.string(),checked:n.z.boolean().default(!1),_id:n.z.string().optional()})),checklistTitle:n.z.string().optional(),checkboxes:n.z.undefined(),images:n.z.undefined(),pendingUploads:n.z.undefined(),input:n.z.undefined(),selectedValue:n.z.undefined(),selectOptions:n.z.undefined()}),n.z.object({_id:n.z.string().optional(),type:n.z.literal(u.TEXT),input:n.z.string(),checkboxes:n.z.undefined(),checklist:n.z.undefined(),images:n.z.undefined(),pendingUploads:n.z.undefined(),selectedValue:n.z.undefined(),selectOptions:n.z.undefined()}),n.z.object({_id:n.z.string().optional(),type:n.z.literal(u.SELECT),selectedValue:n.z.string(),selectOptions:n.z.array(n.z.string()),selectTitle:n.z.string().optional(),checkboxes:n.z.undefined(),checklist:n.z.undefined(),images:n.z.undefined(),pendingUploads:n.z.undefined(),input:n.z.undefined()})]),_=n.z.discriminatedUnion("type",[b.options[0].extend({images:n.z.array(l.KA.or(l.xZ)),isRequired:n.z.boolean()}),b.options[1].extend({isRequired:n.z.boolean()}),b.options[2].extend({isRequired:n.z.boolean()}),b.options[3].extend({isRequired:n.z.boolean()}),b.options[4].extend({isRequired:n.z.boolean()})]),v=n.z.object({_id:n.z.string(),type:c,title:n.z.string(),description:n.z.string().optional(),imageExample:l.KA.nullable(),fields:n.z.array(p).min(1),groupBy:n.z.string().nullable().optional(),ar
1chived:n.z.boolean(),createdAt:n.z.date(),updatedAt:n.z.date()}),x=r.T.and(n.z.object({ids:n.z.array(n.z.string()).optional(),type:c.optional(),title:n.z.string().optional(),groupBy:n.z.string().optional(),search:n.z.string().optional(),sortBy:o.optional(),sortDirection:n.z.enum(["asc","desc"]).optional()})),T=r.T.and(n.z.object({types:n.z.array(d).optional(),groupBy:n.z.string().optional(),search:n.z.string().optional(),sortBy:o.optional(),sortDirection:n.z.enum(["asc","desc"]).optional()})),S=v.omit({_id:!0,archived:!0,fields:!0,createdAt:!0,updatedAt:!0}).extend({imageExample:l.KA.nullable(),fields:n.z.array(p.omit({_id:!0,checkboxes:!0,checklist:!0,checklistTitle:!0,checkboxesTitle:!0,selectOptions:!0,selectTitle:!0}).extend({checkboxes:n.z.array(h.omit({_id:!0})).optional(),checklist:n.z.array(m.omit({_id:!0})).optional(),checklistTitle:n.z.string().optional(),checkboxesTitle:n.z.string().optional(),selectOptions:n.z.array(n.z.string()).optional(),selectTitle:n.z.string().optional()})).min(1)}),I=v.extend({imageExample:l.KA.nullable(),groupBy:n.z.string().nullable().optional(),fields:n.z.array(p.omit({_id:!0,checkboxes:!0,checklist:!0,checklistTitle:!0,checkboxesTitle:!0,selectOptions:!0,selectTitle:!0}).extend({_id:n.z.string().optional(),checkboxes:n.z.array(h.omit({_id:!0}).extend({_id:n.z.string().optional()})).optional(),checklist:n.z.array(m.omit({_id:!0}).extend({_id:n.z.string().optional()})).optional(),checklistTitle:n.z.string().optional(),checkboxesTitle:n.z.string().optional(),selectOptions:n.z.array(n.z.string()).optional(),selectTitle:n.z.string().optional()})).min(1)}).omit({_id:!0,type:!0,archived:!0,createdAt:!0,updatedAt:!0}),z=Object.values(a),A=Object.values(s),y=Object.values(u);t.ZP={jobProgressItemTemplate:v,getJobProgressItemTemplatesFilter:x,getJobProgressItemTemplatesGroupedFilter:T,createJobProgressItemTemplate:S,updateJobProgressItemTemplate:I,progressItemFieldSchema:p,progressItemFieldValueSchema:b}},66194:function(e,t){t.Z={ADMIN_LEVEL:"ADMIN_LEVEL",BASE_LEVEL:"BASE_LEVEL",VIEW_ALL_JOBS:"VIEW_ALL_JOBS",VIEW_OWN_JOBS:"VIEW_OWN_JOBS",UPDATE_ALL_JOBS:"UPDATE_ALL_JOBS",UPDATE_OWN_JOBS:"UPDATE_OWN_JOBS",DELETE_ALL_JOBS:"DELETE_ALL_JOBS",DELETE_OWN_JOBS:"DELETE_OWN_JOBS",VIEW_JOB_PRICE:"VIEW_JOB_PRICE",VIEW_ALL_INSPECTIONS:"VIEW_ALL_INSPECTIONS",VIEW_OWN_INSPECTIONS:"VIEW_OWN_INSPECTIONS",UPDATE_ALL_INSPECTIONS:"UPDATE_ALL_INSPECTIONS",UPDATE_OWN_INSPECTIONS:"UPDATE_OWN_INSPECTIONS",DELETE_ALL_INSPECTIONS:"DELETE_ALL_INSPECTIONS",DELETE_OWN_INSPECTIONS:"DELETE_OWN_INSPECTIONS",VIEW_INSPECTION_PRICE:"VIEW_INSPECTION_PRICE",CUD_OWN_JOB_EXTRA_COSTS:"CUD_OWN_JOB_EXTRA_COSTS",READ_OWN_JOB_EXTRA_COSTS:"READ_OWN_JOB_EXTRA_COSTS",CUD_ALL_JOB_EXTRA_COSTS:"CUD_ALL_JOB_EXTRA_COSTS",READ_ALL_JOB_EXTRA_COSTS:"READ_ALL_JOB_EXTRA_COSTS",VIEW_ALL_DEBT_TRANSACTIONS:"VIEW_ALL_DEBT_TRANSACTIONS",VIEW_OWN_DEBT_TRANSACTIONS:"VIEW_OWN_DEBT_TRANSACTIONS",CREATE_DEBT_CREDIT_TRANSACTION:"CREATE_DEBT_CREDIT_TRANSACTION",CREATE_DEBT_DEBIT_TRANSACTION:"CREATE_DEBT_DEBIT_TRANSACTION",UPDATE_DEBT_CREDIT_TRANSACTION:"UPDATE_DEBT_CREDIT_TRANSACTION",UPDATE_DEBT_DEBIT_TRANSACTION:"UPDATE_DEBT_DEBIT_TRANSACTION",DELETE_DEBT_CREDIT_TRANSACTION:"DELETE_DEBT_CREDIT_TRANSACTION",DELETE_DEBT_DEBIT_TRANSACTION:"DELETE_DEBT_DEBIT_TRANSACTION",VIEW_OWN_USER:"VIEW_OWN_USER",VIEW_ALL_USERS:"VIEW_ALL_USERS",UPDATE_ALL_USERS:"UPDATE_ALL_USERS",REGISTER_NEW_USERS:"REGISTER_NEW_USERS",CUD_EXTRA_COSTS_TYPE_OPTIONS:"CUD_EXTRA_COSTS_TYPE_OPTIONS",CUD_DEBT_MATERIALS:"CUD_DEBT_MATERIALS",CUD_UNITS:"CUD_UNITS",VIEW_OWN_STATS:"VIEW_OWN_STATS",VIEW_ALL_STATS:"VIEW_ALL_STATS",UPLOAD_IMAGES:"UPLOAD_IMAGES",DELETE_IMAGES:"DELETE_IMAGES",VIEW_PRIVATE_IMAGES:"VIEW_PRIVATE_IMAGES",UPLOAD_PRIVATE_IMAGES:"UPLOAD_PRIVATE_IMAGES",DELETE_PRIVATE_IMAGES:"DELETE_PRIVATE_IMAGES",SUBSCRIBE_TO_TELEGRAM_BOT:"SUBSCRIBE_TO_TELEGRAM_BOT",CRUD_JOB_PROGRESS_ITEMS:"CRUD_JOB_PROGRESS_ITEMS",CRUD_JOB_PROGRESS_RULES:"CRUD_JOB_PROGRESS_RULES",VIEW_OWN_DAY_OFF:"VIEW_OWN_DAY_OFF",MANAGE_OWN_DAY_OFF:"MANAGE_OWN_DAY_OFF",VIEW_ALL_DAY_OFFS:"VIEW_ALL_DAY_OFFS",MANAGE_ALL_DAY_OFFS:"MANAGE_ALL_DAY_OFFS",VIEW_CATALOG:"VIEW_CATALOG",CREATE_CATALOG_ITEMS:"CREATE_CATALOG_ITEMS",UPDATE_CATALOG_ITEMS:"UPDATE_CATALOG_ITEMS",DELETE_CATALOG_ITEMS:"DELETE_CATALOG_ITEMS",CRUD_SEO_METADATA:"CRUD_SEO_METADATA",TEST_FEATURE:"TEST_FEATURE",CREATE_TEST_JOBS:"CREATE_TEST_JOBS",CRUD_RECENT_WORKS:"CRUD_RECENT_WORKS",CRUD_VIDEO_TESTIMONIALS:"CRUD_VIDEO_TESTIMONIALS"}},84986:function(e,t,i){var n=i(85893),l=i(15582),r=i(86523),s=i(12519),o=i(65619);t.Z=e=>{let{handleDelete:t,handleReload:i,status:a,isDisabled:c}=e;return(0,n.jsxs)(n.Fragment,{children:[i&&a===o.n.ERROR&&(0,n.jsx)(s.h,{"aria-label":"Reload",colorScheme:"secondary",icon:(0,n.jsx)(l.n,{boxSize:4}),isDisabled:c,size:"xs",variant:"blur",onClick:i}),!!a&&(0,n.jsx)(s.h,{"aria-label":"Delete",colorScheme:"secondary",icon:(0,n.jsx)(r.T,{}),isDisabled:c,isLoading:a===o.n.DELETING,size:"xs",variant:"blur",onClick:t})]})}},69642:function(e,t,i){var n=i(85893),l=i(85330),r=i(12519);t.Z=e=>{let{ariaLabel:t="Upload image",...i}=e;return(0,n.jsx)(r.h,{"aria-label":t,aspectRatio:1,colorScheme:"gray",h:"auto",icon:(0,n.jsx)(l.d,{boxSize:7}),variant:"solid",w:{base:"4rem",md:"6rem"},...i})}},51443:function(e,t,i){var n=i(85893),l=i(84760),r=i(65619);t.Z=e=>{let{status:t,progress:i}=e;return t&&(t===r.n.LOADING||t===r.n.PROCESSING||t===r.n.DELETING)?(0,n.jsx)(l.E,{bottom:0,colorScheme:"primary",hasStripe:!0,isIndeterminate:t===r.n.PROCESSING||t===r.n.DELETING,position:"absolute",size:"sm",value:i,width:"full"}):null}},27370:function(e,t,i){i.d(t,{Z:function(){return I}});var n=i(85893),l=i(47670),r=i(15715),s=i(12553),o=i(67294),a=i(25578),c=i(97334),d=i(37900),u=i(69322),f=(e,t)=>{if(!t.VIEW_PRIVATE_IMAGES)return null;let{href:i}
1=new URL("".concat(u.Z.api.files.private,"?").concat((0,c.stringify)({path:e.path,imageId:e.imageId})),d.Z.baseUrl);return i},h=i(65619),m=i(96688),p=i(98868),g=i(6950),E=i(59266),b=i(86379),_=i(98420),v=i(90971),x=i(84986),T=i(69642),S=i(51443),I=e=>{let{path:t,source:i,size:c="10rem",imgSizes:d,defaultValue:u,isFormSubmitted:I,isDisabled:z,label:A,isPrivate:y,unoptimizeImage:C,UploadButton:O,compressImage:R=!1,compressOptions:j,onChange:D,onIsLoadingChange:N}=e,{permissions:w}=(0,g.T)(),{deleteFile:k,image:L,uploadFile:P,progress:Z,status:B}=a.Z.useFile({initImage:u,isFormSubmitted:I,isPrivate:y,source:i,onChange:D,onIsLoadingChange:N}),[U,F]=(0,o.useState)(!1),G=async e=>{var i;let n,l;let r=null===(i=e.target.files)||void 0===i?void 0:i[0];if(!r)return;let s=r;if(R){let e=await (0,m.Z)(r,j);s=e.file,n=e.width,l=e.height}P({file:s,path:t,width:n,height:l})},V=y&&!w.VIEW_PRIVATE_IMAGES&&!!L,W=!V&&!!L,M=W&&("src"in L?L.src:f(L,w)),J=!W&&B===h.n.ERROR;return W||B?(0,n.jsxs)(b.Z,{aspectRatio:1,borderRadius:"md",controls:(0,n.jsx)(x.Z,{handleDelete:k,isDisabled:z,status:B}),maxW:"full",overflow:"hidden",progress:(0,n.jsx)(S.Z,{progress:Z,status:B}),w:c,children:[J&&(0,n.jsx)(r.M,{bgColor:"red.300",height:"full",width:"full",children:(0,n.jsx)(s.J,{as:l.i,boxSize:{base:12},color:"gray.medium"})}),M&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.Z,{height:"full",imgSizes:d,src:M,unoptimized:y||C,width:"full",onClick:()=>F(!0)}),(0,n.jsx)(v.default,{images:[{src:M,imageId:L.imageId,fileName:L.fileName}],isOpen:U,unoptimizeImages:y||C,onClose:()=>F(!1)})]}),V&&(0,n.jsx)(s.J,{as:p.Z,color:"gray.medium",h:"full",w:"full"})]}):(0,n.jsx)(E.Z,{accept:"image/jpeg, image/png, image/webp",isDisabled:z,label:A,onChange:G,children:(0,n.jsx)(()=>O||(0,n.jsx)(T.Z,{maxW:"full",w:c}),{})})}},68621:function(e,t,i){var n=i(85893),l=i(54506),r=i(87536),s=i(68932),o=i(27370);t.Z=e=>{let{name:t,helperText:i,reservePlaceForError:a=!0,isDisabled:c,size:d,compressImage:u,compressOptions:f,containerProps:h,...m}=e,{fieldState:{invalid:p},field:{onBlur:g,onChange:E,value:b,disabled:_},formState:{isSubmitSuccessful:v}}=(0,r.bc)({name:t});return(0,n.jsxs)(l.NI,{display:"flex",flexDirection:"column",isInvalid:p,justifyContent:"center",w:d,...h,children:[(0,n.jsx)(o.Z,{compressImage:u,compressOptions:f,defaultValue:b,isDisabled:c||_,isFormSubmitted:v,size:d,source:"aws",onChange:e=>{E(e),g()},...m}),(0,n.jsx)(s.Z,{helperText:i,name:t,reservePlaceForError:a})]})}},72360:function(e,t,i){i.d(t,{F3:function(){return l},GN:function(){return m},J0:function(){return c},O1:function(){return s},Os:function(){return h},V0:function(){return r},W9:function(){return o},Y9:function(){return a},_e:function(){return d},k3:function(){return u},le:function(){return f},ls:function(){return p},oI:function(){return g}});var n=i(29829);let l="Mandatory",r="Should be a positive number",s="Invalid email",o="Invalid zip code",a="Should contain at least one uppercase letter",c="Should contain at least one lowercase letter",d="Should contain at least one number",u=e=>"Should contain at least ".concat(e," characters"),f=e=>"Should contain less than ".concat(e," characters"),h=(e,t)=>"Should be more than ".concat(t?(0,n.Z)({value:e,units:t}):e),m=(e,t)=>"Should be less than ".concat(t?(0,n.Z)({value:e,units:t}):e),p=e=>"At least one ".concat(e," is required"),g=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"item";return"Should contain at least ".concat(e," ").concat(t).concat(e>1?"s":"")}},83962:function(e,t,i){i.d(t,{A5:function(){return n},n0:function(){return r},rV:function(){return l},tT:function(){return s}});let n=e=>0===e.length?0:e.reduce((e,t)=>e+t,0)/e.length,l=e=>{if(0===e.length)return 0;let t=e.sort((e,t)=>e-t),i=Math.floor(t.length/2);return t.length%2==0?(t[i-1]+t[i])/2:t[i]};function r(e,t){if(0===e.length)return 0;if("object"!=typeof e[0])return e.reduce((e,t)=>e+Number(t),0);if(!t)throw Error("Field is required when passing an array of objects");return e.reduce((e,i)=>e+(Number(i[t])||0),0)}let s=e=>{if(void 0!==e)return Number((e/1024/1024).toFixed(2))}},29829:function(e,t){t.Z=e=>{let{value:t,units:i,unitsPosition:n,withSpace:l=!0}=e;if(!t&&0!==t)return"";let r=l?" ":"";return"before"===n?i+r+t:t+r+i}},96688:function(e,t,i){i.d(t,{Z:function(){return c}});var n=i(40221),l=i(83962),r=i(10282),s=i(61709);let o=async e=>new Promise(t=>{let i=new Image,n=URL.createObjectURL(e);i.onload=()=>{t({width:i.width,height:i.height}),URL.revokeObjectURL(n)},i.onerror=()=>{t({width:0,height:0}),URL.revokeObjectURL(n)},i.src=n}),a={sm:256};var c=async(e,t)=>{let i=await (0,s.Z)(e),{createThumbnails:c=!0,thumbnailSizes:d=["sm"],onProgress:u,maxWidthOrHeight:f=2048,useWebWorker:h=!0,...m}=t||{},p=f+(c?(0,l.n0)(d.map(e=>a[e])):0),g=0,E=(e,t)=>{if(!u)return;let i=e/100*t,n=i+g;100===e&&(g+=i),u(n/p*100)},b=(0,r.Z)(e=>{E(e,f)}),_=await (0,n.Z)(i,{maxWidthOrHeight:f,useWebWorker:h,...m,onProgress:u?b:void 0}),v=await o(_),x={},T=v.width/v.height;return c&&(x=(await Promise.all(d.map(async e=>{let t=a[e],l=(0,r.Z)(e=>{E(e,t)}),s=await (0,n.Z)(i,{useWebWorker:!0,maxWidthOrHeight:T>1?t*T:t/T,onProgress:u?l:void 0,...m}),c=await o(s);return{width:c.width,height:c.height,file:s}}
1))).reduce((e,t,i)=>{let n=d[i];return{...e,[n]:t}},{})),{file:_,...v,thumbnails:c?x:void 0}}},61709:function(e,t,i){i.d(t,{z:function(){return r}});let n=/\.(heic|heif)$/i,l=["image/heic","image/heif","image/heic-sequence","image/heif-sequence"],r=e=>l.includes(e.type.toLowerCase())||n.test(e.name),s=async e=>{if(!r(e))return e;try{let{default:t}=await i.e(4838).then(i.t.bind(i,1616,23)),l=await t({blob:e,toType:"image/jpeg",quality:.9}),r=Array.isArray(l)?l[0]:l;return new File([r],e.name.replace(n,".jpeg"),{type:"image/jpeg",lastModified:e.lastModified})}catch(t){throw Error('Could not convert the HEIC photo "'.concat(e.name,'". Please re-take or export it as JPEG and upload again.'),{cause:t})}};t.Z=s},79722:function(e,t){t.Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>String(e);return{label:t(e),value:e}}},84285:function(e,t,i){var n=i(85893),l=i(12553);t.Z=e=>(0,n.jsxs)(l.J,{fill:"none",height:"100%",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"auto",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsx)("path",{d:"M0 0h24v24H0z",fill:"none",stroke:"none"}),(0,n.jsx)("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),(0,n.jsx)("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),(0,n.jsx)("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),(0,n.jsx)("path",{d:"M11 6l9 0"}),(0,n.jsx)("path",{d:"M11 12l9 0"}),(0,n.jsx)("path",{d:"M11 18l9 0"})]})},98868:function(e,t,i){var n=i(85893),l=i(12553);t.Z=e=>(0,n.jsxs)(l.J,{viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{clipRule:"evenodd",d:"M15.663 3.77329C13.8902 2.9834 11.9096 2.78771 10.0166 3.21542C8.12351 3.64314 6.41942 4.67133 5.15845 6.14666C3.89749 7.62199 3.14721 9.4654 3.01951 11.402C2.89181 13.3386 3.39354 15.2645 4.44987 16.8927C5.50619 18.5208 7.06051 19.7638 8.88102 20.4364C10.7015 21.109 12.6907 21.1751 14.5518 20.6248C16.413 20.0745 18.0464 18.9374 19.2084 17.3829C20.3705 15.8285 20.9989 13.9401 21 11.9993V11.0799C21 10.5276 21.4477 10.0799 22 10.0799C22.5523 10.0799 23 10.5276 23 11.0799V11.9999C22.9986 14.3719 22.2306 16.6806 20.8103 18.5804C19.39 20.4803 17.3936 21.8702 15.1189 22.5427C12.8442 23.2153 10.413 23.1345 8.18792 22.3125C5.96285 21.4904 4.06312 19.9711 2.77206 17.9812C1.48099 15.9913 0.86777 13.6373 1.02384 11.2704C1.17992 8.90346 2.09693 6.6504 3.63811 4.84722C5.17929 3.04404 7.26206 1.78736 9.57581 1.2646C11.8896 0.741837 14.3103 0.981007 16.477 1.94644C16.9815 2.17122 17.2082 2.76239 16.9834 3.26687C16.7587 3.77134 16.1675 3.99807 15.663 3.77329Z",fill:"currentColor",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M22.7068 3.29254C23.0975 3.68287 23.0978 4.31603 22.7075 4.70675L12.7075 14.7168C12.52 14.9044 12.2656 15.0099 12.0002 15.01C11.7349 15.0101 11.4805 14.9047 11.2929 14.7171L8.29289 11.7171C7.90237 11.3266 7.90237 10.6934 8.29289 10.3029C8.68342 9.91237 9.31658 9.91237 9.70711 10.3029L11.9996 12.5954L21.2925 3.29325C21.6829 2.90253 22.316 2.90221 22.7068 3.29254Z",fill:"currentColor",fillRule:"evenodd"})]})},10755:function(e,t,i){var n=i(85893),l=i(12553);t.Z=e=>(0,n.jsx)(l.J,{fill:"none",height:"full",viewBox:"0 0 24 24",w:"auto",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M6 11.9998C6 11.6815 6.12643 11.3763 6.35147 11.1513C6.57652 10.9262 6.88174 10.7998 7.2 10.7998H16.8C17.1183 10.7998 17.4235 10.9262 17.6485 11.1513C17.8736 11.3763 18 11.6815 18 11.9998C18 12.3181 17.8736 12.6233 17.6485 12.8483C17.4235 13.0734 17.1183 13.1998 16.8 13.1998H7.2C6.88174 13.1998 6.57652 13.0734 6.35147 12.8483C6.12643 12.6233 6 12.3181 6 11.9998Z",fill:"currentColor",fillRule:"evenodd"})})},6950:function(e,t,i){i.d(t,{E:function(){return d},T:function(){return u}});var n=i(85893),l=i(33299),r=i(67294),s=i(66194),o=e=>{let t=Object.values(s.Z).reduce((e,t)=>(e[t]=!1,e),{});return null==e||e.forEach(e=>{t[e]=!0}),t};let a=o([]),c=(0,r.createContext)(null),d=e=>{let{children:t}=e,[i,s]=(0,r.useState)(a),d=(0,l.useSession)();return(0,r.useEffect)(()=>{var e;(null===(e=d.data)||void 0===e?void 0:e.user.permissions)&&s(o(d.data.user.permissions))},[d.data]),(0,n.jsx)(c.Provider,{value:{permissions:i},children:t})},u=()=>(0,r.useContext)(c)||(console.error("usePermissions must be used within a PermissionsProvider"),{permissions:a})},15487:function(e,t,i){i.d(t,{T:function(){return l},w:function(){return r}});var n=i(1604);let l=n.z.object({page:n.z.union([n.z.number(),n.z.string().transform(Number)]).optional(),size:n.z.union([n.z.number(),n.z.string().transform(Number)]).optional()}),r=n.z.object({lastId:n.z.string().optional(),limit:n.z.union([n.z.number(),n.z.string().transform(Number)]).optional()})},11187:function(e,t,i){i.d(t,{KA:function(){return a},vw:function(){return d},xZ:function(){return c}});var n=i(1604);let l=n.z.object({src:n.z.string(),width:n.z.number(),height:n.z.number()}),r=n.z.object({sm:l}),s=l.omit({src:!0}),o=n.z.object({sm:s}),a=n.z.object({imageId:n.z.string(),src:n.z.string(),fileName:n.z.string(),alt:n.z.string().optional(),size:n.z.number().optional(),width:n.z.number().optional(),height:n.z.number().optional(),thumbnails:r.optional(),createdAt:n.z.union([n.z.string(),n.z.date()]).transform(e=>e instanceof Date?e:new Date(e)).optional(),updatedAt:n.z.union([n.z.string(),n.z.date()]).transform(e=>e instanceof Date?e:new Date(e)).optional()}
1),c=a.omit({src:!0,thumbnails:!0}).extend({thumbnails:o.optional(),indexedDBIndex:n.z.number(),type:n.z.enum(["original","compressed","uploaded"])}),d=n.z.object({imageId:n.z.string(),path:n.z.string(),fileName:n.z.string(),size:n.z.number().optional()})},32401:function(e,t,i){var n=i(85893),l=i(54506),r=i(3712),s=i(30980),o=i(87536),a=i(68932);t.Z=e=>{let{name:t,isRequired:i=!1,helperText:c,label:d,reservePlaceForError:u=!0,containerProps:f={},formControlProps:h={},children:m}=e,{fieldState:{invalid:p}}=(0,o.bc)({name:t});return(0,n.jsxs)(l.NI,{isInvalid:p,isRequired:i,px:"1px",w:"full",...h,children:[(0,n.jsxs)(r.K,{direction:"column",justifyContent:"start",spacing:.5,w:"full",...f,children:[d&&(0,n.jsx)(s.l,{flexGrow:1,m:0,whiteSpace:"balance",children:d}),m]}),(0,n.jsx)(a.Z,{helperText:c,name:t,reservePlaceForError:u})]})}},59266:function(e,t,i){var n=i(85893),l=i(30980),r=i(38488),s=i(82206),o=i(67294);t.Z=e=>{let{label:t="Upload images",isDisabled:i,children:a,...c}=e,d=(0,o.useId)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.l,{htmlFor:d,m:0,w:"max",onClick:e=>{e.target!==e.currentTarget&&e.currentTarget.click()},children:a||(0,n.jsx)(r.z,{colorScheme:"secondary",isDisabled:i,variant:"outline",width:{base:"full",md:"max"},children:t})}),(0,n.jsx)(s.I,{display:"none",id:d,isDisabled:i,type:"file",...c})]})}},28069:function(e,t,i){i.d(t,{X:function(){return o}});var n=i(85893),l=i(8186),r=i(67294),s=i(87536);class o extends Error{constructor({name:e="root",message:t}){super(t),this.name="FormError",this.fieldNames=e}}t.Z=e=>{let{children:t,onSubmit:i,onError:a,childrenContainerProps:c={},onIsDirtyChange:d,...u}=e,f=(0,s.cI)(u),{handleSubmit:h,setError:m}=f,p=(0,r.useId)(),g=async(e,t)=>{try{await i(e,f,t),u.resetOnSubmit&&f.reset()}catch(e){if(e instanceof o){(Array.isArray(e.fieldNames)?e.fieldNames:[e.fieldNames]).forEach(t=>{m(t,{type:"submit",message:e.message})});return}m("root",{type:"submit",message:e instanceof Error?e.message:"Something went wrong"}),f.trigger()}};return(0,r.useEffect)(()=>{d&&d(f.formState.isDirty)},[f.formState.isDirty,d]),(0,n.jsx)(s.RV,{...f,children:(0,n.jsx)(l.g,{as:"form",id:p,noValidate:!0,position:"relative",width:"full",...c,onSubmit:h(g,a),children:t({...f,formId:p,onSubmit:h(g,a)})})})}},62584:function(e,t,i){var n=i(85893),l=i(58808),r=i(73636),s=i(12519),o=i(87536),a=i(72922),c=i(29307);t.Z=e=>{let{positiveText:t="Submit",negativeText:i="Cancel",onPositiveClick:d=()=>{},onNegativeClick:u,positiveVariant:f,isLoading:h,isPositiveDisabled:m,isNegativeDisabled:p,formId:g,positiveType:E="submit",hidePositive:b=!1,hideDelete:_=!1,containerProps:v={},positiveProps:x={},negativeProps:T={},deleteButtonProps:S,dataGtm:I,size:z,deleteAriaLabel:A,confirmText:y="Are you sure you want to delete this item?",confirmSecondText:C="This action cannot be undone",confirmButtonText:O="Delete",children:R,onDelete:j}=e,{isSubmitting:D,disabled:N}=(0,o.cl)(),{confirm:w}=(0,a.p)(),k=e=>(0,n.jsx)(c.default,{containerProps:e,dataGtm:I,hidePositive:b,isLoading:D||h,isNegativeDisabled:p,isPositiveDisabled:m||N,negativeProps:T,negativeText:i,positiveProps:{...x,form:g,type:E}
1,positiveText:t,positiveType:E,positiveVariant:f,size:z,onNegativeClick:u,onPositiveClick:d});return j&&!_?(0,n.jsxs)(r.U,{mt:"sm",w:"full",...v,children:[(0,n.jsx)(s.h,{"aria-label":A,colorScheme:"red",icon:(0,n.jsx)(l.p,{}),variant:"outline",...S,onClick:()=>{w({confirmText:y,confirmButtonText:O,onConfirm:j,secondText:C})}}),R,(0,n.jsx)(k,{})]}):R?(0,n.jsxs)(r.U,{mt:"sm",w:"full",...v,children:[R,(0,n.jsx)(k,{})]}):(0,n.jsx)(k,{...v})}},90652:function(e,t,i){var n=i(85893),l=i(87536),r=i(75235),s=i(32401);t.Z=e=>{let{name:t,isRequired:i,label:o,helperText:a,reservePlaceForError:c,fieldContainerProps:d,isDisabled:u=!1,onChange:f,onBlur:h,optionToValue:m=e=>e,valueToOption:p=e=>e,...g}=e,{field:{onBlur:E,onChange:b,value:_,disabled:v},fieldState:{invalid:x}}=(0,l.bc)({name:t});return(0,n.jsx)(s.Z,{containerProps:d,helperText:a,isRequired:i,label:o,name:t,reservePlaceForError:c,children:(0,n.jsx)(r.Z,{initialValue:p(_),isDisabled:u||v,isInvalid:x,name:t,onBlur:()=>{E(),null==h||h()},onChange:e=>{let t=m(e);b(t),null==f||f(t)},...g})})}},66426:function(e,t,i){var n=i(85893),l=i(51107),r=i(87536),s=i(32401);t.Z=e=>{let{name:t,isRequired:i=!1,helperText:o,label:a,reservePlaceForError:c=!0,containerProps:d,checkboxPosition:u="left",onChange:f,...h}=e,{field:{value:m,onChange:p,...g}}=(0,r.bc)({name:t});return(0,n.jsx)(s.Z,{containerProps:{direction:"left"===u?"row-reverse":"row",spacing:"2xs",...d},helperText:o,isRequired:i,name:t,reservePlaceForError:c,children:(0,n.jsx)(l.X,{...h,isChecked:m,...g,w:"full",onChange:e=>{p(e.target.checked),null==f||f(e.target.checked)},children:a})})}},9342:function(e,t,i){var n=i(85893),l=i(82206),r=i(87536),s=i(32401);t.Z=e=>{let{name:t,isRequired:i=!1,helperText:o,label:a,reservePlaceForError:c=!0,containerProps:d={},onChange:u,onBlur:f,...h}=e,{field:{onChange:m,onBlur:p,...g}}=(0,r.bc)({name:t});return(0,n.jsx)(s.Z,{containerProps:d,helperText:o,isRequired:i,label:a,name:t,reservePlaceForError:c,children:(0,n.jsx)(l.I,{...g,...h,onBlur:e=>{p(),null==f||f(e)},onChange:e=>{m(e.target.value),null==u||u(e)}})})}},15919:function(e,t,i){var n=i(85893),l=i(87536),r=i(60186),s=i(32401);t.Z=e=>{let{name:t,isRequired:i=!1,helperText:o,label:a,reservePlaceForError:c=!0,isDisabled:d,fieldContainerProps:u,formControlProps:f,optionToValue:h,valueToOption:m,onChange:p,onBlur:g,...E}=e,b=h||(e=>e),{fieldState:{invalid:_},field:{onBlur:v,onChange:x,value:T,disabled:S}}=(0,l.bc)({name:t});return(0,n.jsx)(s.Z,{containerProps:u,formControlProps:f,helperText:o,isRequired:i,label:a,name:t,reservePlaceForError:c,children:(0,n.jsx)(r.Z,{initialValue:(m||(e=>e))(T),isDisabled:d||S,isInvalid:_,name:t,onBlur:()=>
1{v(),null==g||g()},onChange:e=>{let t=b(e);x(t),null==p||p(t)},...E})})}},83988:function(e,t,i){var n=i(85893),l=i(73244),r=i(87536),s=i(32401);t.Z=e=>{let{name:t,isRequired:i=!1,helperText:o,label:a,containerProps:c={},reservePlaceForError:d=!0,isDisabled:u,...f}=e,{register:h}=(0,r.Gc)();return(0,n.jsx)(s.Z,{containerProps:c,helperText:o,isRequired:i,label:a,name:t,reservePlaceForError:d,children:(0,n.jsx)(l.g,{...h(t,{disabled:u}),...f})})}},68932:function(e,t,i){var n=i(85893),l=i(68029),r=i(54506),s=i(32866),o=i(87536);t.Z=e=>{let{name:t,helperText:i,reservePlaceForError:a=!0,...c}=e,{fieldState:{invalid:d},formState:{errors:u}}=(0,o.bc)({name:t});return(0,n.jsxs)(l.x,{...a?{minH:3,mt:.5,mb:1,w:"full"}:{},...c,children:[(0,n.jsx)(s.B,{as:l.x,color:"error.base",errors:u,fontSize:"sm",lineHeight:"100%",name:t}),!d&&!!i&&(0,n.jsx)(r.Q6,{mt:0,children:i})]})}},68559:function(e,t,i){i.r(t),i.d(t,{default:function(){return es}});var n=i(85893),l=i(6459),r=i(3712),s=i(8186),o=i(56312),a=i(67294),c=i(68621),d=i(9462),u=i(60453),f=i(52979),h=i(65847),m=i(7563),p=i(79722),g=i(28069),E=i(39871),b=i(9342),_=i(83988),v=i(15919),x=i(90652),T=i(62584);let S="Confirm the following:",I="Answer the following questions:",z="Select an option:",A=[{label:"Photo upload",value:"images",description:"Field for uploading a photo"},{label:"Text",value:"text",description:"Field for entering any text information"},{label:"Questions (Yes/No)",value:"checkboxes",description:"Questions with Yes/No answers"},{label:"Checklist",value:"checklist",description:"Simple confirmation checkboxes"},{label:"Dropdown",value:"select",description:"Select field with predefined options"}],y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;switch(null==e?void 0:e.value){case"checkboxes":return{type:e,checkboxes:[{label:""}],checkboxesTitle:I,isRequired:!1,checklist:void 0,checklistTitle:void 0,selectOptions:void 0,selectTitle:void 0,modifiable:!0};case"checklist":return{type:e,checklist:[{label:""}],checklistTitle:S,isRequired:!1,checkboxes:void 0,checkboxesTitle:void 0,selectOptions:void 0,selectTitle:void 0,modifiable:!0};case"select":return{type:e,selectOptions:[""],selectTitle:z,isRequired:!1,checkboxes:void 0,checklist:void 0,checklistTitle:void 0,checkboxesTitle:void 0,modifiable:!0};case"images":case"text":return{type:e,isRequired:!1,checkboxes:void 0,checklist:void 0,checklistTitle:void 0,checkboxesTitle:void 0,selectOptions:void 0,selectTitle:void 0,modifiable:!0};default:return{type:null,isRequired:!1,checkboxes:void 0,checklist:void 0,checklistTitle:void 0,checkboxesTitle:void 0,selectOptions:void 0,selectTitle:void 0,modifiable:!0}}},C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return{_id:e,title:(null==t?void 0:t.title)||"",description:(null==t?void 0:t.description)||"",type:(null==t?void 0:t.type)?{label:f.HC[t.type].title,value:t.type}:i?(0,p.Z)(i):null,imageExample:(null==t?void 0:t.imageExample)||null,groupBy:(null==t?void 0:t.groupBy)&&(null==n?void 0:n.find(e=>e.value===t.groupBy))||null,fields:(null==t?void 0:t.fields.map(e=>{let{_id:t,type:i,isRequired:n,checkboxes:l,checklist:r,checklistTitle:s,checkboxesTitle:o,selectOptions:a,selectTitle:c}=e;return{_id:t,type:i?A.find(e=>e.value===i):null,isRequired:n||!1,checkboxes:l||[],checklist:r||[],checklistTitle:s||S,checkboxesTitle:o||I,selectOptions:a||[],selectTitle:c||z,modifiable:!0}}))||[y()]}};var O=i(90092),R=i(52867),j=i(77370),D=i(5223),N=i(85690),w=i(91149),k=e=>{let{error:t,toast:i,ctx:l}=e;if(t instanceof N.Z&&t.response.data.code===D.Z.PROGRESS_ITEM_USED){let{jobsCount:e,jobs:r,inspectionsCount:o,inspections:a,removedFieldIds:c,modifiedFieldsIds:d}=t.response.data.data,u=[];if(c.length&&c.forEach(e=>{var t,i;let n=l.getValues(),r=-1,s=null===(i=l.formState.defaultValues)||void 0===i?void 0:null===(t=i.fields)||void 0===t?void 0:t.find((t,i)=>{let n=(null==t?void 0:t._id)===e;return n&&(r=i),n});if(!s)return;let o=n.fields.findIndex(e=>{var t,i;return(null===(t=e.type)||void 0===t?void 0:t.value)===(null==s?void 0:null===(i=s.type)||void 0===i?void 0:i.value)}),a=[...n.fields];o>-1&&(a=a.filter((e,t)=>
1t!==r)),a.push({...s,modifiable:!1}),l.setValue("fields",a),u.push(s)}),d.length){let e=l.getValues(),t=[];e.fields.forEach(e=>{var i,n;if(!e._id||!d.includes(e._id)){t.push(e);return}let r=null===(n=l.formState.defaultValues)||void 0===n?void 0:null===(i=n.fields)||void 0===i?void 0:i.find(t=>t._id===e._id);if(!r){t.push(e);return}u.push(r),t.push({...r,modifiable:!1})}),l.setValue("fields",t)}let f=r.slice(0,3),h=e-3,m=a.slice(0,3),p=o-3;i({title:"Progress item update failed",description:(0,n.jsxs)(s.g,{alignItems:"start",children:[(0,n.jsx)(O.x,{children:t.response.data.message}),e>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(O.x,{fontWeight:"semibold",children:"Jobs with this progress item:"}),(0,n.jsxs)(R.QI,{fontSize:"sm",children:[f.map(e=>{let{id:t,title:i}=e;return(0,n.jsx)(R.HC,{children:(0,n.jsx)(w.Z,{href:"/jm/jobs/".concat(t),isExternal:!0,children:i||t})},t)}),h>0&&(0,n.jsx)(R.HC,{children:"and ".concat(h," more...")})]})]}),o>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(O.x,{fontWeight:"semibold",children:"Inspections with this progress item:"}),(0,n.jsxs)(R.QI,{fontSize:"sm",children:[m.map(e=>{let{id:t,title:i}=e;return(0,n.jsx)(R.HC,{children:(0,n.jsx)(w.Z,{href:"/jm/inspections/".concat(t),isExternal:!0,children:i||t})},t)}),p>0&&(0,n.jsx)(R.HC,{children:"and ".concat(p," more...")})]})]}),(0,n.jsx)(O.x,{fontWeight:"semibold",children:"All not modifiable fields was restored:"}),(0,n.jsx)(R.QI,{fontSize:"sm",children:u.map(e=>{var t;return(0,n.jsx)(R.HC,{children:null===(t=e.type)||void 0===t?void 0:t.label},e._id)})})]}),status:"warning",isClosable:!0,duration:null})}else i({title:j.pO,description:j.y9,status:"error",isClosable:!0})},L=i(1604),P=i(72360),Z=i(11187);let B=u.ZP.jobProgressItemTemplate.omit({createdAt:!0,updatedAt:!0,archived:!0}).extend({_id:L.z.string().optional(),title:L.z.string().min(1,{message:P.F3}).min(10,{message:(0,P.k3)(10)}),type:m.ZP.optionSchema.omit({_id:!0}).extend({value:u.v8}).nullable(),imageExample:Z.KA.nullable(),groupBy:m.ZP.optionSchema.omit({_id:!0}).extend({value:L.z.string()}).nullable(),fields:L.z.array(u.ZP.progressItemFieldSchema.omit({_id:!0,type:!0,checkboxes:!0,checklist:!0,checklistTitle:!0,selectOptions:!0,selectTitle:!0}).extend({_id:L.z.string().optional(),checkboxes:L.z.array(L.z.object({_id:L.z.string().optional(),label:L.z.string().min(1,{message:P.F3})})).optional(),checkboxesTitle:L.z.string().optional(),checklist:L.z.array(L.z.object({_id:L.z.string().optional(),label:L.z.string().min(1,{message:P.F3})})).optional(),checklistTitle:L.z.string().optional(),selectOptions:L.z.array(L.z.string().min(1,{message:P.F3})).optional(),selectTitle:L.z.string().optional(),type:m.ZP.optionSchema.omit({_id:!0}).extend({value:u.yB}).nullable(),modifiable:L.z.boolean().default(!0)}).superRefine((e,t)=>{if(!e.type){t.addIssue({code:L.z.ZodIssueCode.custom,message:P.F3,path:["type"]});return}switch(e.type.value){case"checkboxes":var i;e.checkboxes&&e.checkboxes.length||t.addIssue({code:L.z.ZodIssueCode.custom,message:(0,P.ls)("Checkbox"),path:["checkboxes.root"]}),(null===(i=e.checkboxesTitle)||void 0===i?void 0:i.trim().length)===0&&t.addIssue({code:L.z.ZodIssueCode.custom,message:P.F3,path:["checkboxesTitle"]});break;case"checklist":e.checklist&&e.checklist.length||t.addIssue({code:L.z.ZodIssueCode.custom,message:(0,P.ls)("Checklist item"),path:["checklist.root"]}),e.checklistTitle&&0!==e.checklistTitle.trim().length||t.addIssue({code:L.z.ZodIssueCode.custom,message:P.F3,path:["checklistTitle"]});break;case"select":(!e.selectOptions||e.selectOptions.length<2)&&t.addIssue({code:L.z.ZodIssueCode.custom,message:(0,P.oI)(2,"Option"),path:["selectOptions.root"]}),e.selectTitle&&0!==e.selectTitle.trim().length||t.addIssue({code:L.z.ZodIssueCode.custom,message:P.F3,path:["selectTitle"]})}})).superRefine((e,t)=>{if(!e.length){t.addIssue({code:L.z.ZodIssueCode.custom,message:(0,P.ls)("element"),path:["fields"]});return}let i={};e.forEach((e,t)=>{var n;let l=null===(n=e.type)||void 0===n?void 0:n.value;l&&(i[l]||(i[l]=[]),i[l].push(t))}),Object.entries(i).forEach(e=>{let[i,n]=e;n.length>
11&&n.forEach(e=>{t.addIssue({code:L.z.ZodIssueCode.custom,message:'Only one content of type "'.concat(i,'" is allowed'),path:["fields",e,"type"]})})})})}).superRefine((e,t)=>{e.type||t.addIssue({code:L.z.ZodIssueCode.custom,message:P.F3,path:["type"]})});var U=i(90952),F=i(16610),G=i(59099),V=i(12519),W=i(87536),M=i(10755),J=i(66426),q=i(85330),H=i(38488),K=e=>{let{fieldsCount:t,onClick:i}=e;return t===u.ah.length?null:(0,n.jsx)(H.z,{leftIcon:(0,n.jsx)(q.d,{}),size:"sm",variant:"ghost",onClick:i,children:"Add field"})},X=i(73636),Q=i(98868),Y=i(3384),$=i(68932),ee=e=>{let{type:t,index:i,isModifiable:l}=e,{trigger:r,getFieldState:o}=(0,W.Gc)(),a="fields.".concat(i,".checkboxes"),{fields:c,remove:d,insert:u}=(0,W.Dq)({name:a});if((null==t?void 0:t.value)!=="checkboxes")return null;let f=()=>{u(c.length,(0,p.Z)("")),1===c.length&&r("".concat(a,".root"))};return(0,n.jsxs)(s.g,{pb:"md",px:"xs",w:"full",children:[(0,n.jsx)(b.Z,{label:"Section title",name:"fields.".concat(i,".checkboxesTitle"),placeholder:"e.g. Answer the following questions:",size:"sm"}),c.map((e,t,i)=>{let{invalid:r}=o("".concat(a,".").concat(t)),s=t===i.length-1,c=1===i.length;return(0,n.jsxs)(X.U,{align:"start",w:"full",children:[(0,n.jsx)(Q.Z,{boxSize:"1.25rem",color:"success.base",mt:"0.4rem"}),(0,n.jsx)(b.Z,{isDisabled:!l,name:"".concat(a,".").concat(t,".label"),placeholder:"Enter checkbox label",reservePlaceForError:!1,size:"sm"}),(0,n.jsx)(V.h,{"aria-label":"Delete checkbox",colorScheme:"gray",icon:(0,n.jsx)(M.Z,{}),isDisabled:!l||c,isRound:!0,mt:"0.25rem",size:"xs",variant:"outline",onClick:()=>d(t)}),(0,n.jsx)(V.h,{"aria-label":"Add checkbox",colorScheme:"gray",icon:(0,n.jsx)(Y.Z,{}),isDisabled:!l||s&&r,isRound:!0,mt:"0.25rem",size:"xs",variant:"outline",visibility:s?"visible":"hidden",onClick:f})]},e.id)}),(0,n.jsx)($.Z,{name:"".concat(a,".root")})]})},et=i(84285),ei=e=>{let{type:t,index:i,isModifiable:l}=e,{trigger:r,getFieldState:o}=(0,W.Gc)(),a="fields.".concat(i,".checklist"),{fields:c,remove:d,insert:u}
1=(0,W.Dq)({name:a});if((null==t?void 0:t.value)!=="checklist")return null;let f=()=>{u(c.length,(0,p.Z)("")),1===c.length&&r("".concat(a,".root"))};return(0,n.jsxs)(s.g,{pb:"md",px:"xs",w:"full",children:[(0,n.jsx)(b.Z,{label:"Section title",name:"fields.".concat(i,".checklistTitle"),placeholder:"e.g. Confirm the following:",size:"sm"}),c.map((e,t,i)=>{let{invalid:r}=o("".concat(a,".").concat(t)),s=t===i.length-1,c=1===i.length;return(0,n.jsxs)(X.U,{align:"start",w:"full",children:[(0,n.jsx)(et.Z,{boxSize:"1.25rem",color:"success.base",mt:"0.4rem"}),(0,n.jsx)(b.Z,{isDisabled:!l,name:"".concat(a,".").concat(t,".label"),placeholder:"Enter checklist item",reservePlaceForError:!1,size:"sm"}),(0,n.jsx)(V.h,{"aria-label":"Delete checklist item",colorScheme:"gray",icon:(0,n.jsx)(M.Z,{}),isDisabled:!l||c,isRound:!0,mt:"0.25rem",size:"xs",variant:"outline",onClick:()=>d(t)}),(0,n.jsx)(V.h,{"aria-label":"Add checklist item",colorScheme:"gray",icon:(0,n.jsx)(Y.Z,{}),isDisabled:!l||s&&r,isRound:!0,mt:"0.25rem",size:"xs",variant:"outline",visibility:s?"visible":"hidden",onClick:f})]},e.id)}),(0,n.jsx)($.Z,{name:"".concat(a,".root")})]})},en=e=>{let{type:t,index:i,isModifiable:l}=e,{trigger:r,getFieldState:o}=(0,W.Gc)(),a="fields.".concat(i,".selectOptions"),{fields:c,remove:d,insert:u}
1=(0,W.Dq)({name:a});if((null==t?void 0:t.value)!=="select")return null;let f=()=>{u(c.length,""),1===c.length&&r("".concat(a,".root"))};return(0,n.jsxs)(s.g,{pb:"md",px:"xs",w:"full",children:[(0,n.jsx)(b.Z,{label:"Field Title",name:"fields.".concat(i,".selectTitle"),placeholder:"e.g. Select an option:",size:"sm"}),c.map((e,t,i)=>{let{invalid:r}=o("".concat(a,".").concat(t)),s=t===i.length-1,c=1===i.length;return(0,n.jsxs)(X.U,{align:"start",w:"full",children:[(0,n.jsx)(Q.Z,{boxSize:"1.25rem",color:"info.base",mt:"0.4rem"}),(0,n.jsx)(b.Z,{isDisabled:!l,name:"".concat(a,".").concat(t),placeholder:"Enter option value",reservePlaceForError:!1,size:"sm"}),(0,n.jsx)(V.h,{"aria-label":"Delete option",colorScheme:"gray",icon:(0,n.jsx)(M.Z,{}),isDisabled:!l||c,isRound:!0,mt:"0.25rem",size:"xs",variant:"outline",onClick:()=>d(t)}),(0,n.jsx)(V.h,{"aria-label":"Add option",colorScheme:"gray",icon:(0,n.jsx)(Y.Z,{}),isDisabled:!l||s&&r,isRound:!0,mt:"0.25rem",size:"xs",variant:"outline",visibility:s?"visible":"hidden",onClick:f})]},e.id)}),(0,n.jsx)($.Z,{name:"".concat(a,".root")})]})},el=e=>{let{index:t}=e,{setValue:i,watch:l,clearErrors:r}=(0,W.Gc)(),[o,a]=l(["fields","fields.".concat(t,".type")]),c=o[t].modifiable,d=A.filter(e=>!o.some((i,n)=>{var l;return n!==t&&(null===(l=i.type)||void 0===l?void 0:l.value)===e.value}));return(0,n.jsxs)(s.g,{w:"full",children:[(0,n.jsx)(v.Z,{isDisabled:!c,name:"fields.".concat(t,".type"),options:d,onChange:e=>{r("fields.".concat(t)),Object.entries(y(e)).forEach(e=>{let[n,l]=e;i("fields.".concat(t,".").concat(n),l,{shouldValidate:!0})})}}),(0,n.jsx)(ee,{index:t,isModifiable:c,type:a}),(0,n.jsx)(ei,{index:t,isModifiable:c,type:a}),(0,n.jsx)(en,{index:t,isModifiable:c,type:a})]})},er=()=>{let{fields:e,remove:t,replace:i,append:l}
1=(0,W.Dq)({name:"fields"}),r=n=>{if(1===e.length){i(y());return}t(n)};return(0,n.jsxs)(s.g,{w:"full",children:[(0,n.jsx)(U.X,{size:"sm",children:"Fields"}),(0,n.jsxs)(F.r,{columnGap:"xs",maxW:"full",rowGap:"2xs",templateColumns:"1fr 4rem 2rem",width:"full",children:[(0,n.jsx)(U.X,{color:"secondary.medium",isTruncated:!0,pl:"sm",size:"sm",children:"Field type"}),(0,n.jsx)(G.P,{colSpan:2,color:"secondary.medium",children:(0,n.jsx)(U.X,{color:"secondary.medium",size:"sm",children:"Required"})}),e.map((t,i)=>(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)(el,{index:i}),(0,n.jsx)(G.P,{justifySelf:"center",children:(0,n.jsx)(J.Z,{isDisabled:!t.modifiable,mt:"0.75rem",name:"fields.".concat(i,".isRequired")})}),(0,n.jsx)(V.h,{"aria-label":"Delete field",colorScheme:"gray",icon:(0,n.jsx)(M.Z,{}),isDisabled:!t.modifiable||1===e.length,isRound:!0,mt:"0.25rem",size:"sm",variant:"outline",onClick:()=>r(i)})]},t.id))]}),(0,n.jsx)(K,{fieldsCount:e.length,onClick:()=>{l(y())}})]})},es=e=>{let{id:t,forceType:i,onClose:S,onDirtyChange:I}=e,z=(0,l.p)(),A=(0,a.useRef)(!0),y=!!t,{jobProgressItem:O,isPending:R}=d.rD(t,{pause:!y}),{options:j,updateOptions:D,isPending:N}=h.Z.useOptions(m.xj.JobProgressItemTemplateGroupBy),w=R||N,{createJobProgressItem:L}=d.RO(),{updateJobProgressItem:P}=d.PQ(),{deleteJobProgressItem:Z}=d.R2(),U=(0,a.useMemo)(()=>C(t,O,i,j),[t,O,j,i]),F=async(e,t)=>{try{var i,n;if(y)await P({_id:e._id,title:e.title,description:e.description,imageExample:e.imageExample||null,groupBy:(null===(i=e.groupBy)||void 0===i?void 0:i.value)||null,fields:e.fields.map(e=>{let{_id:t,type:i,isRequired:n,checkboxes:l,checklist:r,checklistTitle:s,checkboxesTitle:o,selectOptions:a,selectTitle:c}=e,d={_id:t,type:i.value,isRequired:n};return(null==i?void 0:i.value)==="checkboxes"?{...d,checkboxesTitle:o,checkboxes:null==l?void 0:l.map(e=>{let{_id:t,label:i}=e;return{_id:t,label:i}})}:(null==i?void 0:i.value)==="checklist"?{...d,checklistTitle:s,checklist:null==r?void 0:r.map(e=>{let{_id:t,label:i}=e;return{_id:t,label:i}})}:(null==i?void 0:i.value)==="select"?{...d,selectTitle:c,selectOptions:null==a?void 0:a.filter(Boolean)}:d})});else{let t={title:e.title,description:e.description,type:e.type.value,imageExample:e.imageExample||null,groupBy:null===(n=e.groupBy)||void 0===n?void 0:n.value,fields:e.fields.map(e=>{let{type:t,isRequired:i,checkboxes:n,checklist:l,checklistTitle:r,checkboxesTitle:s,selectOptions:o,selectTitle:a}=e,c={type:t.value,isRequired:i};return(null==t?void 0:t.value)==="checkboxes"?{...c,checkboxesTitle:s,checkboxes:null==n?void 0:n.map(e=>{let{label:t}=e;return{label:t}})}:(null==t?void 0:t.value)==="checklist"?{...c,checklistTitle:r,checklist:null==l?void 0:l.map(e=>{let{label:t}=e;return{label:t}})}:(null==t?void 0:t.value)==="select"?{...c,selectTitle:a,selectOptions:null==o?void 0:o.filter(Boolean)}:c})};await L(t)}null==S||S(!0)}catch(e){k({error:e,toast:z,ctx:t})}},G=async e=>{let t=e.trim(),i=(0,p.Z)(t);return(await D([...j,i])).options.find(e=>e.value===i.value)},V=async e=>{let t=j.filter(t=>t.value!==e);await D(t)},W=async()=>{try{await Z(t),null==S||S(!0)}catch(e){A.current=!1}};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(g.Z,{childrenContainerProps:{maxH:"full",position:"relative",alignItems:"center"},defaultValues:U,mode:"onBlur",resolver:(0,o.F)(B),shouldUseNativeValidation:!1,onIsDirtyChange:I,onSubmit:F,children:e=>{let{formId:t,formState:{isValid:i,isDirty:l,isSubmitted:o}}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E.Z,{isLoading:y&&w}),(0,n.jsxs)(r.K,{align:{base:"center",md:"start"},direction:{base:"column",md:"row"},justifyContent:"space-between",spacing:"xl",w:"full",children:[(0,n.jsx)(c.Z,{imgSizes:"14rem",label:"Image Example",name:"imageExample",path:"jobProgressItemTemplates",size:"14rem"}),(0,n.jsxs)(s.g,{w:"full",children:[(0,n.jsx)(b.Z,{label:"Title",name:"title",placeholder:"Title"}),(0,n.jsx)(_.Z,{height:"6.5rem",label:"Description",name:"description",placeholder:"Description"})]})]}),(0,n.jsx)(v.Z,{hideClearButton:!0,isDisabled:y,label:"Type",name:"type",options:u.OU.filter(e=>"before"!==e).map(e=>({label:f.HC[e].title,value:e})),placeholder:"Type"}),(0,n.jsx)(x.Z,{helperText:"Grouped items will all be skipped together in the job progress if any one of them is marked as skipped.",label:"Group By",name:"groupBy",options:j,placeholder:"Group By",onAddOption:G,onDeleteOption:V}),(0,n.jsx)(er,{}),(0,n.jsx)(T.Z,{containerProps:{position:"sticky",bottom:0,bg:"white",py:"md",zIndex:1},deleteAriaLabel:"delete job progress item",deleteButtonProps:y?{isDisabled:!A.current}:void 0,formId:t,isPositiveDisabled:!l,positiveText:"Save",onDelete:y?W:void 0,onNegativeClick:S})]})}},"".concat(t||"creating form"," ").concat(w?"is loading":"is loaded"))})}},89939:function(e,t,i){i.d(t,{B:function(){return l}});var n=i(67294);function l(e){let t=(0,n.useRef)(null);return null===t.current&&(t.current="function"==typeof e?e():e),t.current}},46941:function(e,t,i){i.d(t,{w:function(){return n}});let n=(0,i(24278).I)({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",dis
1playName:"ChevronLeftIcon"})},85105:function(e,t,i){i.d(t,{X:function(){return n}});let n=(0,i(24278).I)({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"})},15582:function(e,t,i){i.d(t,{n:function(){return l}});var n=i(85893);let l=(0,i(24278).I)({displayName:"RepeatIcon",path:(0,n.jsxs)("g",{fill:"currentColor",children:[(0,n.jsx)("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),(0,n.jsx)("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})})},47670:function(e,t,i){i.d(t,{i:function(){return n}});let n=(0,i(24278).I)({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"})},30980:function(e,t,i){i.d(t,{l:function(){return d}});var n=i(85893),l=i(65544),r=i(34926),s=i(54506),o=i(49381),a=i(73035),c=i(37430);let d=(0,o.G)(function(e,t){let i=(0,a.m)("FormLabel",e),o=(0,l.L)(e),{className:d,children:f,requiredIndicator:h=(0,n.jsx)(u,{}),optionalIndicator:m=null,...p}=o,g=(0,s.NJ)(),E=g?.getLabelProps(p,t)??{ref:t,...p};return(0,n.jsxs)(c.m.label,{...E,className:(0,r.cx)("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...i},children:[f,g?.isRequired?h:m]})});d.displayName="FormLabel";let u=(0,o.G)(function(e,t){let i=(0,s.NJ)(),l=(0,s.e)();if(!i?.isRequired)return null;let o=(0,r.cx)("chakra-form__required-indicator",e.className);return(0,n.jsx)(c.m.span,{...i?.getRequiredIndicatorProps(e,t),__css:l.requiredIndicator,className:o})});u.displayName="RequiredIndicator"},16610:function(e,t,i){i.d(t,{r:function(){return s}});var n=i(85893),l=i(49381),r=i(37430);let s=(0,l.G)(function(e,t){let{templateAreas:i,gap:l,rowGap:s,columnGap:o,column:a,row:c,autoFlow:d,autoRows:u,templateRows:f,autoColumns:h,templateColumns:m,...p}=e;return(0,n.jsx)(r.m.div,{ref:t,__css:{display:"grid",gridTemplateAreas:i,gridGap:l,gridRowGap:s,gridColumnGap:o,gridAutoColumns:h,gridColumn:a,gridRow:c,gridAutoFlow:d,gridAutoRows:u,gridTemplateRows:f,gridTemplateColumns:m},...p})});s.displayName="Grid"},57879:function(e,t,i){i.d(t,{r:function(){return c}});var n=i(85893),l=i(65544),r=i(34926),s=i(49381),o=i(73035),a=i(37430);let c=(0,s.G)(function(e,t){let i=(0,o.m)("Link",e),{className:s,isExternal:c,...d}=(0,l.L)(e);return(0,n.jsx)(a.m.a,{target:c?"_blank":void 0,rel:c?"noopener":void 0,ref:t,className:(0,r.cx)("chakra-link",s),...d,__css:i})});c.displayName="Link"},84760:function(e,t,i){i.d(t,{E:function(){return p}});var n=i(85893),l=i(65544),r=i(52110),s=i(70917);(0,s.F4)({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),(0,s.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});let o=(0,s.F4)({"0%":{left:"-40%"},"100%":{left:"100%"}}),a=(0,s.F4)({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});var c=i(49381),d=i(37430),u=i(73035);let[f,h]=(0,r.k)({name:"ProgressStylesContext",errorMessage:"useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Progress />\" "}),m=(0,c.G)((e,t)=>{let{min:i,max:l,value:r,isIndeterminate:s,role:o,...a}=e,c=function(e){let{value:t=0,min:i,max:n,valueText:l,getValueText:r,isIndeterminate:s,role:o="progressbar"}=e,a=(t-i)*100/(n-i);return{bind:{"data-indeterminate":s?"":void 0,"aria-valuemax":n,"aria-valuemin":i,"aria-valuenow":s?void 0:t,"aria-valuetext":(()=>
1{if(null!=t)return"function"==typeof r?r(t,a):l})(),role:o},percent:a,value:t}}({value:r,min:i,max:l,isIndeterminate:s,role:o}),u={height:"100%",...h().filledTrack};return(0,n.jsx)(d.m.div,{ref:t,style:{width:`${c.percent}%`,...a.style},...c.bind,...a,__css:u})}),p=(0,c.G)((e,t)=>{let{value:i,min:r=0,max:s=100,hasStripe:c,isAnimated:h,children:p,borderRadius:g,isIndeterminate:E,"aria-label":b,"aria-labelledby":_,"aria-valuetext":v,title:x,role:T,...S}=(0,l.L)(e),I=(0,u.j)("Progress",e),z=g??I.track?.borderRadius,A={animation:`${a} 1s linear infinite`},y={...!E&&c&&h&&A,...E&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${o} 1s ease infinite normal none running`}},C={overflow:"hidden",position:"relative",...I.track};return(0,n.jsx)(d.m.div,{ref:t,borderRadius:z,__css:C,...S,children:(0,n.jsxs)(f,{value:I,children:[(0,n.jsx)(m,{"aria-label":b,"aria-labelledby":_,"aria-valuetext":v,min:r,max:s,value:i,isIndeterminate:E,css:y,borderRadius:z,title:x,role:T}),p]})})});p.displayName="Progress"},73244:function(e,t,i){i.d(t,{g:function(){return f}});var n=i(85893),l=i(65544),r=i(8297),s=i(34926),o=i(16013),a=i(49381),c=i(73035),d=i(37430);let u=["h","minH","height","minHeight"],f=(0,a.G)((e,t)=>{let i=(0,c.m)("Textarea",e),{className:a,rows:f,...h}=(0,l.L)(e),m=(0,o.Y)(h),p=f?(0,r.C)(i,u):i;return(0,n.jsx)(d.m.textarea,{ref:t,rows:f,...m,className:(0,s.cx)("chakra-textarea",a),__css:p})});f.displayName="Textarea"},56312:function(e,t,i){i.d(t,{F:function(){return c}});var n=i(87536);let l=(e,t,i)=>{if(e&&"reportValidity"in e){let l=(0,n.U2)(i,t);e.setCustomValidity(l&&l.message||""),e.reportValidity()}},r=(e,t)=>{for(let i in t.fields){let n=t.fields[i];n&&n.ref&&"reportValidity"in n.ref?l(n.ref,i,e):n.refs&&n.refs.forEach(t=>l(t,i,e))}},s=(e,t)=>{t.shouldUseNativeValidation&&r(e,t);let i={};for(let l in e){let r=(0,n.U2)(t.fields,l),s=Object.assign(e[l]||{},{ref:r&&r.ref});if(o(t.names||Object.keys(e),l)){let e=Object.assign({},(0,n.U2)(i,l));(0,n.t8)(e,"root",s),(0,n.t8)(i,l,e)}else(0,n.t8)(i,l,s)}return i},o=(e,t)=>e.some(e=>e.startsWith(t+"."));var a=function(e,t){for(var i={};e.length;){var l=e[0],r=l.code,s=l.message,o=l.path.join(".");if(!i[o]){if("unionErrors"in l){var a=l.unionErrors[0].errors[0];i[o]={message:a.message,type:a.code}}else i[o]={message:s,type:r}}if("unionErrors"in l&&l.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=i[o].types,d=c&&c[l.code];i[o]=(0,n.KN)(o,t,i,r,d?[].concat(d,l.message):l.message)}e.shift()}return i},c=function(e,t,i){return void 0===i&&(i={}),function(n,l,o){try{return Promise.resolve(function(l,s){try{var a=Promise.resolve(e["sync"===i.mode?"parse":"parseAsync"](n,t)).then(function(e){return o.shouldUseNativeValidation&&r({},o),{errors:{},values:i.raw?n:e}})}catch(e){return s(e)}return a&&a.then?a.then(void 0,s):a}(0,function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:s(a(e.errors,!o.shouldUseNativeValidation&&"all"===o.criteriaMode),o)};throw e}))}catch(e){return Promise.reject(e)}}}},29726:function(e,t,i){i.d(t,{N:function(){return o}});var n=i(72536),l=i(54948),r=class extends n.z{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,l.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,l.Gm)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:i}=e,n=super.createResult(e,t),{isFetching:r,isRefetching:s,isError:o,isRefetchError:a}=n,c=i.fetchMeta?.fetchMore?.direction,d=o&&"forward"===c,u=r&&"forward"===c,f=o&&"backward"===c,h=r&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,l.Qy)(t,i.data),hasPreviousPage:(0,l.ZF)(t,i.data),isFetchNextPageError:d,isFetchingNextPage:u,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:a&&!d&&!f,isRefetching:s&&!u&&!h}}},s=i(20364);function o(e,t){return(0,s.r)(e,r,t)}}}]);

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.