1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4646],{24753:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/apps/stock-out/create",function(){return n(85290)}])},89479:function(e,t,n){"use strict";n.d(t,{Tg:function(){return o},UW:function(){return r},jW:function(){return l}});var r=function(e){return e.stopPropagation()},o=function(e){return e.stopPropagation()},l=function(e){var t;e.ctrlKey&&"KeyA"===e.code&&(null===(t=e.target)||void 0===t||t.select()),e.stopPropagation()}},26640:function(e,t,n){"use strict";n.d(t,{JD:function(){return g},Lk:function(){return Z},Z9:function(){return x},ci:function(){return h},kw:function(){return v},rI:function(){return m}});var r=n(47568),o=n(26042),l=n(69396),i=n(70655),s=n(85893),a=n(20986),u=n(43085),c=n(23378),d=n(17575),f=n(86010),p=n(67294),h=function(e){var t=e.label,n=e.copy,l=e.color,d=e.chipProps,h=null!==n&&void 0!==n?n:null===t||void 0===t?void 0:t.toString(),m=(0,p.useCallback)(function(){var e=(0,r.Z)((function(e){var t;return(0,i.__generator)(this,(function(n){switch(n.label){case 0:if(!e)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(e)];case 2:return n.sent(),(0,u.x9)("Content copied.",{icon:(0,s.jsx)(a.Km,{})}),[3,4];case 3:return t=n.sent(),console.error("Failed to copy:",t),[3,4];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),[]);return(0,s.jsx)("div",{className:(0,f.Z)({"cursor-pointer":h}),children:(0,s.jsx)(c.Z,(0,o.Z)({size:"small",color:l,label:t,onClick:function(){return m(h)}},d))})},m=function(e){var t=e.label,n=e.copy,r=e.tooltipProps,i=e.maxWidth,a=void 0===i?"10rem":i,u=e.chipProps;return t?(0,s.jsx)(d.Z,(0,l.Z)((0,o.Z)({placement:"bottom-start",title:(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-bold uppercase",children:"Sku:"})," ",t]}),leaveDelay:0},r),{children:(0,s.jsx)("div",{children:(0,s.jsx)(h,{color:"info",label:(0,s.jsx)("div",{className:"truncate text-xs",style:{maxWidth:a},children:t}),chipProps:u,copy:null!==n&&void 0!==n?n:null===t||void 0===t?void 0:t.toString()})})})):null},v=function(e){var t=e.label,n=e.copy,r=e.tooltipProps,i=e.maxWidth,a=void 0===i?"10rem":i,u=e.chipProps;return t?(0,s.jsx)(d.Z,(0,l.Z)((0,o.Z)({placement:"bottom-start",title:(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-bold uppercase",children:"Barcode:"})," ",t]}),leaveDelay:0},r),{children:(0,s.jsx)("div",{children:(0,s.jsx)(h,{color:"secondary",label:(0,s.jsx)("div",{className:"truncate text-xs",style:{maxWidth:a},children:t}),copy:null!==n&&void 0!==n?n:null===t||void 0===t?void 0:t.toString(),chipProps:u})})})):null},x=function(e){var t=e.label,n=e.copy,r=e.tooltipProps,i=e.maxWidth,a=void 0===i?"10rem":i,u=e.chipProps;return t?(0,s.jsx)(d.Z,(0,l.Z)((0,o.Z)({placement:"bottom-start",title:(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-bold uppercase",children:"Item#:"})," ",t]}),leaveDelay:0},r),{children:(0,s.jsx)("div",{children:(0,s.jsx)(h,{color:"primary",label:(0,s.jsx)("div",{className:"truncate text-xs",style:{maxWidth:a},children:t}),copy:null!==n&&void 0!==n?n:null===t||void 0===t?void 0:t.toString(),chipProps:u})})})):null},Z=function(e){var t=e.label,n=e.copy,r=e.tooltipProps,i=e.maxWidth,a=void 0===i?"10rem":i,u=e.chipProps;return t?(0,s.jsx)(d.Z,(0,l.Z)((0,o.Z)({placement:"bottom-start",title:(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-bold uppercase",children:"Warehouse:"})," ",t]}),leaveDelay:0},r),{children:(0,s.jsx)("div",{children:(0,s.jsx)(h,{color:"warning",label:(0,s.jsx)("div",{className:"truncate text-xs",style:{maxWidth:a},children:t}),copy:null!==n&&void 0!==n?n:null===t||void 0===t?void 0:t.toString(),chipProps:u})})})):null},g=function(e){var t=e.label,n=e.title,r=e.copy,i=e.tooltipProps,a=e.maxWidth,u=void 0===a?"10rem":a,c=e.chipProps;return t?(0,s.jsx)(d.Z,(0,l.Z)((0,o.Z)({placement:"bottom-start",title:(0,s.jsx)("div",{children:n}),leaveDelay:0},i),{children:(0,s.jsx)("div",{children:(0,s.jsx)(h,{color:"secondary",label:(0,s.jsx)("div",{className:"truncate text-xs",style:{maxWidth:u},children:t}),copy:null!==r&&void 0!==r?r:null===t||void 0===t?void 0:t.toString(),chipProps:c})})})):null}},5952:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(26042),o=n(85893),l=n(96486),i=n(87536);function s(e){var t,n=e.methods,s=e.name,a=e.defaultValue,u=e.defaultValues,c=e.rules,d=e.controllerProps,f=n.control,p=(0,i.cl)({control:f}).errors,h=a||(0,l.get)(u,s),m=(0,l.get)(p,s);return(0,o.jsxs)("div",{children:[(0,o.jsx)(i.Qr,(0,r.Z)({control:f,name:s,defaultValue:h,rules:c,render:function(e){var t=e.field,n=t.value,r=t.onChange;return(0,o.jsx)("input",{value:n,onChange:r,type:"hidden",name:s})}},d)),m&&(0,o.jsx)("div",{className:"form-error",children:null===(t=m.message)||void 0===t?void 0:t.toString()})]})}},29715:function(e,t,n){"use strict";var r=n(26042),o=n(69396),l=n(85893),i=n(80778),s=n(55343),a=n(3695),u=n(53442),c=n(31538),d=n(32631),f=n(96486),p=n(67294),h=n(87536),m=n(6328);t.Z=function(e){var t,n=e.methods,v=e.name,x=e.label,Z=e.defaultValue,g=e.defaultValues,j=e.selectProps,b=e.controllerProps,P=e.formControlProps,y=void 0===P?m.f:P,C=e.selectedKeys,k=e.color,w=void 0===k?"primary":k,S=n.control,V=(0,h.cl)({control:S}).errors,T=(0,f.get)(V,v),W=(0,p.useMemo)((function(){return Z||(0,f.get)(g,v)}),[Z,g,v]),O=(0,m.V)(v,x),N=(0,p.useMemo)((function(){var e=(0,i.v9)();return W&&!e.find((function(e){return e.value===W}))&&e.push({label:"".concat(W," [Custom Value]"),value:W}),e}),[W]),F=(0,p.useMemo)((function(){var e;return null!==(e=null===C||void 0===C?void 0:C.filter((function(e){return e.country})).map((function(e){return e.country})))&&void 0!==e?e:[]}),[C]);return(0,l.jsxs)(s.Z,(0,o.Z)((0,r.Z)({},y),{children:[(0,l.jsx)(a.Z,{id:"stepper-linear-personal-country",error:Boolean(T),htmlFor:"stepper-linear-personal-country",color:w,children:O}),(0,l.jsx)(h.Qr,(0,r.Z)({name:v,control:S,defaultValue:W,rules:{required:!0},render:function(e){var t=e.field,n=t.value,i=t.onChange;
1return(0,l.jsx)(u.Z,(0,o.Z)((0,r.Z)({value:n,label:x,labelId:"stepper-linear-personal-country",onChange:i,error:Boolean(T),sx:{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"".concat(w,".main")}}},j),{children:(0,f.map)(N,(function(e,t){return(0,l.jsx)(c.Z,{value:e.value,hidden:F.includes(e.label),children:e.label},t)}))}))}},b)),T&&(0,l.jsx)(d.Z,{sx:{color:"error.main"},id:"stepper-linear-personal-country-helper",children:null===(t=(0,f.get)(T,"message"))||void 0===t?void 0:t.toString()})]}))}},52143:function(e,t,n){"use strict";var r=n(26042),o=n(69396),l=n(85893),i=n(80778),s=n(55343),a=n(3695),u=n(53442),c=n(31538),d=n(32631),f=n(96486),p=n(67294),h=n(87536),m=n(6328);t.Z=function(e){var t,n=e.methods,v=e.name,x=e.label,Z=e.defaultValue,g=e.defaultValues,j=e.countryFieldName,b=e.selectProps,P=e.controllerProps,y=e.formControlProps,C=void 0===y?m.f:y,k=e.color,w=void 0===k?"primary":k,S=n.control,V=n.setValue,T=(0,h.cl)({control:S}).errors,W=(0,f.get)(T,v),O=(0,h.qo)({control:S,name:j}),N=(0,h.qo)({control:S,name:v}),F=(0,p.useMemo)((function(){return Z||(0,f.get)(g,v)}),[Z,g,v]),I=(0,m.V)(v,x),z=(0,p.useMemo)((function(){var e=(0,i.y)(O),t=!e.some((function(e){return e.value===F})),n=(0,f.get)(g,j);return F&&t&&!(O!==n)&&e.push({label:"".concat(F," [Custom Value]"),value:F}),e}),[F,j,g,O]);return(0,p.useEffect)((function(){O&&(z.some((function(e){return e.value===N}))||V(v,(0,f.get)(z,"0.value")))}),[O]),(0,l.jsxs)(s.Z,(0,o.Z)((0,r.Z)({},C),{children:[(0,l.jsx)(a.Z,{id:"stepper-linear-personal-country",error:Boolean(W),htmlFor:"stepper-linear-personal-country",color:w,children:I}),(0,l.jsx)(h.Qr,(0,r.Z)({name:v,control:S,defaultValue:F,rules:{required:!0},render:function(e){var t=e.field,n=t.value,i=t.onChange,s=z.some((function(e){return e.value===n}));return(0,l.jsx)(u.Z,(0,o.Z)((0,r.Z)({value:s?n:"",label:x,onChange:i,error:Boolean(W),sx:{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"".concat(w,".main")}}},b),{children:(0,f.map)(z,(function(e,t){return(0,l.jsx)(c.Z,{value:e.value,children:e.label},t)}))}))}},P)),W&&(0,l.jsx)(d.Z,{sx:{color:"error.main"},id:"stepper-linear-personal-country-helper",children:null===(t=(0,f.get)(W,"message"))||void 0===t?void 0:t.toString()})]}))}},6328:function(e,t,n){"use strict";n.d(t,{V:function(){return l},f:function(){return o}});var r=n(96486),o={fullWidth:!0,size:"small"},l=function(e,t){return void 0!==t?t:e?e.includes(".")?(0,r.startCase)(e.split(".").pop()):(0,r.startCase)(e):""}},76366:function(e,t,n){"use strict";n.d(t,{e:function(){return d}});var r=n(26042),o=n(69396),l=n(85893),i=n(43085),s=n(63015),a=n(11767),u=n(67294),c=n(87536);function d(e){var t=e.defaultValues,n=e.methods,d=e.children,f=e.onSubmit,p=e.formProps,h=(0,s.T)({selector:a.TV}).isUploadingState;return(0,l.jsx)(c.RV,(0,o.Z)((0,r.Z)({},n),{children:(0,l.jsx)("form",(0,o.Z)((0,r.Z)({onSubmit:function(e){e.preventDefault(),h?(0,i.JT)("Please wait for any pending uploads to complete before submitting the form.",{icon:"\u26a0\ufe0f"}):f(e),e.stopPropagation()}},p),{children:u.Children.map(d,(function(e){return null===e?null:e.props.name?(0,u.createElement)(e.type,(0,r.Z)({},(0,o.Z)((0,r.Z)({},e.props),{defaultValues:t,key:e.props.name}))):e}))}))}))}},44656:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(85893),o=n(87536),l=n(82670),i=n(26042),s=n(69396),a=n(55343),u=n(67836),c=n(32631),d=n(96486),f=n(6328);var p=function(e){var t,n=e.methods,p=e.name,h=e.label,m=e.defaultValue,v=e.defaultValues,x=e.rules,Z=e.textFieldProps,g=e.textFieldInputProps,j=e.controllerProps,b=e.formControlProps,P=void 0===b?f.f:b,y=n.control,C=(0,o.cl)({control:y}).errors,k=(0,d.get)(C,p),w=m||(0,d.get)(v,p),S=(0,f.V)(p,h);return(0,r.jsxs)(a.Z,(0,s.Z)((0,i.Z)({},P),{children:[(0,r.jsx)(o.Qr,(0,i.Z)({name:p,control:y,defaultValue:w,rules:x,render:function(e){var t=e.field,n=t.value,o=t.onChange,s=t.onBlur;return(0,r.jsx)(u.Z,(0,i.Z)({value:null!==n&&void 0!==n?n:"",onBlur:s,onChange:o,error:Boolean(k),label:S,size:"small",type:"number",onFocus:function(e){e.target.select()},inputProps:g,onWheel:function(e){return(0,l.Z)(e.target,HTMLElement)&&e.target.blur()}},Z))}},j)),k&&(0,r.jsx)(c.Z,{sx:{color:"error.main"},children:null===(t=k.message)||void 0===t?void 0:t.toString()})]}))},h=function(e){var t=e.name,n=e.defaultValue,l=e.label,i=e.rules,s=e.defaultValues,a=e.controllerProps,u=e.formControlProps,c=e.textFieldProps,d=e.textFieldInputProps,f=(0,o.Gc)();return(0,r.jsx)(p,{name:t,label:l,rules:i,defaultValue:n,defaultValues:s,controllerProps:a,formControlProps:u,textFieldProps:c,textFieldInputProps:d,methods:f})}},59707:function(e,t,n){"use strict";var r=n(85893),o=n(29715),l=n(87536);t.Z=function(e){var t=e.name,n=e.defaultValue,i=e.label,s=e.defaultValues,a=e.controllerProps,u=e.formControlProps,c=e.selectProps,d=e.selectedKeys,f=e.color,p=(0,l.Gc)();return(0,r.jsx)(o.Z,{name:t,label:i,defaultValue:n,defaultValues:s,controllerProps:a,formControlProps:u,selectProps:c,methods:p,selectedKeys:d,color:f})}},95676:function(e,t,n){"use strict";var r=n(85893),o=n(52143),l=n(87536);t.Z=function(e){var t=e.name,n=e.countryFieldName,i=e.defaultValue,s=e.label,a=e.defaultValues,u=e.controllerProps,c=e.formControlProps,d=e.selectProps,f=e.color,p=(0,l.Gc)();return(0,r.jsx)(o.Z,{countryFieldName:n,name:t,label:s,defaultValue:i,defaultValues:a,controllerProps:u,formControlProps:c,selectProps:d,methods:p,color:f})}},96834:function(e,t,n){"use strict";var r=n(47568),o=n(26042),l=n(69396),i=n(70655),s=n(85893),a=n(6328),u=n(4451),c=n(23837),d=n(35966),f=n(67836),p=n(90233),h=n(67294),m=n(44993);t.Z=function(e){var t=e.name,n=e.label,v=(e.placeholder,e.value),x=e.multiple,Z=void 0!==x&&x,g=e.onChange,j=e.promiseFn,b=e.autocompleteProps,P=e.className,y=void 0===P?"w-full sm:w-auto":P,C=(0,h.useState)(!1),k=C[0],w=C[1],S=(0,h.useState)([]),V=S[0],T=S[1],W=(0,h.useState)(!1),O
1=W[0],N=W[1],F=(0,a.V)(t,n),I=(0,u.a)().user,z=(0,c.b)(I),_=null===z||void 0===z?void 0:z.company.id,A=(0,h.useRef)(j);A.current=j;var M=(0,h.useRef)(!1),q=(0,h.useCallback)((0,r.Z)((function(){var e;return(0,i.__generator)(this,(function(n){switch(n.label){case 0:if(M.current)return[2];n.label=1;case 1:return n.trys.push([1,,3,4]),M.current=!0,N(!0),[4,A.current()];case 2:return(e=n.sent()).length&&!e.some((function(e){return e.value===v}))&&g(t,null),T(e),[3,4];case 3:return M.current=!1,N(!1),[7];case 4:return[2]}}))})),[v,t,g]);(0,h.useEffect)((function(){T([])}),[_]),(0,h.useEffect)((function(){(k||v)&&q()}),[q,k,v]);var R=(0,h.useCallback)((function(e){return Z?e?V.filter((function(t){return e.includes(t.value)})):[]:e&&V.find((function(t){return t.value===e}))||null}),[Z,V]),B=(0,h.useCallback)((function(e,t){return Z?t?t.map((function(e){return e.value})):[]:t?t.value:null}),[Z]);return(0,s.jsx)(m.u,{size:"small",className:null!==y&&void 0!==y?y:"",children:(0,s.jsx)(d.Z,(0,o.Z)({id:"autocomplete-filter",open:k,size:"small",disableCloseOnSelect:Z,multiple:Z,value:R(v),onChange:function(e,n){g(t,B(e,n))},onOpen:function(){w(!0)},onClose:function(){w(!1)},filterOptions:function(e,t){var n=t.inputValue;return(0,p.Lu)(e,n,{keys:["label"]})},renderOption:function(e,t){return(0,s.jsx)("li",(0,l.Z)((0,o.Z)({},e),{children:t.label}))},options:V,loading:O,renderInput:function(e){return(0,s.jsx)(f.Z,(0,l.Z)((0,o.Z)({},e),{label:F,size:"small",inputProps:(0,l.Z)((0,o.Z)({},e.inputProps),{autoComplete:"new-password"})}))}},b))})}},44993:function(e,t,n){"use strict";n.d(t,{U:function(){return s},u:function(){return a}});var r=n(14924),o=n(67836),l=n(55343),i=n(13264),s=(0,i.Z)(o.Z)((function(e){var t=e.theme;return(0,r.Z)({marginRight:"1rem",marginBottom:"0.5rem"},t.breakpoints.down("md"),{marginRight:"0rem"})})),a=(0,i.Z)(l.Z)((function(e){var t=e.theme;return(0,r.Z)({marginRight:"1rem",marginBottom:"0.5rem"},t.breakpoints.down("md"),{marginRight:"0rem"})}))},53273:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(26042),o=n(85893),l=n(20986),i=n(9041),s=n(80562),a=n(96486),u=n(67294),c=n(47516),d=n(44993);var f=function(e){var t=e.name,n=(e.label,e.placeholder),f=e.value,p=e.trimValue,h=void 0!==p&&p,m=e.onChange,v=e.otherInputProps,x=e.prefix,Z=(void 0===x&&c.Goc,(0,u.useState)(f||void 0)),g=Z[0],j=Z[1],b=(0,u.useCallback)((0,a.debounce)((function(e){var n,r=(n=e)?n.replace(/^\s*|\s*$/g,""):n;m(t,r)}),300),[]),P=(0,u.useCallback)((0,a.debounce)(j,1e3),[]);return(0,u.useEffect)((function(){P.cancel(),b(g)}),[g]),(0,u.useEffect)((function(){P(f||void 0)}),[f]),(0,o.jsx)("div",{children:(0,o.jsx)(d.U,(0,r.Z)({size:"small",value:g||"",placeholder:n,onChange:function(e){var t=h?e.target.value.trim():e.target.value;j(t)},InputProps:{endAdornment:(0,o.jsx)(i.Z,{position:"end",children:(0,o.jsx)(s.Z,{size:"small",onClick:function(){j(void 0),b(void 0)},children:(0,o.jsx)(l.Tw,{})})})}},v))})}},25287:function(e,t,n){"use strict";var r=n(26042),o=n(69396),l=n(85893),i=n(6328),s=n(20986),a=n(87811),u=n(3695),c=n(53442),d=n(9041),f=n(80562),p=n(31538),h=n(96486),m=n(44993),v=function(e){return(0,l.jsx)("div",{className:"relative -mr-2",children:(0,l.jsx)("div",(0,o.Z)((0,r.Z)({},e),{children:(0,l.jsx)(a.G6,{})}))})};t.Z=function(e){var t=e.name,n=e.label,a=(e.placeholder,e.value),x=e.onChange,Z=e.selectProps,g=e.options,j=e.className,b=void 0===j?"w-full sm:w-auto":j,P=(0,i.V)(t,n);return(0,l.jsxs)(m.u,{size:"small",className:null!==b&&void 0!==b?b:"",children:[(0,l.jsx)(u.Z,{id:"".concat(t,"-select-label"),children:P}),(0,l.jsx)(c.Z,(0,o.Z)((0,r.Z)({id:"".concat(t,"-select"),value:a,label:P,onChange:function(e){x(t,e.target.value)},labelId:"".concat(t,"-select-label"),IconComponent:v,endAdornment:(0,l.jsx)(d.Z,{position:"end",children:(0,l.jsx)(f.Z,{size:"small",edge:"end",onMouseDown:function(e){return e.preventDefault()},onClick:function(){return x(t,null)},children:(0,l.jsx)(s.Tw,{})})})},Z),{children:(0,h.map)(g,(function(e,t){return(0,l.jsx)(p.Z,{value:e.value,children:e.label},t)}))}))]})}},53722:function(e,t,n){"use strict";var r=n(85893),o=n(58735),l=n(70754);n(67294);t.Z=function(e){var t=e.open;return(0,r.jsx)(o.Z,{sx:{color:"#fff",zIndex:function(e){return e.zIndex.drawer+1}},open:t,children:(0,r.jsx)(l.Z,{color:"inherit"})})}},5837:function(e,t,n){"use strict";n.d(t,{UP:function(){return s}});var r=n(26042),o=n(69396),l=n(81719),i=n(23378),s=(0,l.ZP)(i.Z)((function(e){e.theme;return{height:20,fontSize:"0.75rem",fontWeight:600,mr:1}})),a=function(e){return"colors"!==e&&"direction"!==e},u=(0,l.ZP)(i.Z,{shouldForwardProp:a})((function(e){var t=e.colors;return(0,r.Z)({color:"white"},(null===t||void 0===t?void 0:t.length)&&{backgroundColor:t[t.length-1]})}));(0,l.ZP)(u,{shouldForwardProp:a})((function(e){var t=e.colors;return(0,o.Z)((0,r.Z)({color:"white"},(null===t||void 0===t?void 0:t.length)&&{backgroundColor:t[t.length-1]}),{height:20,fontSize:"0.75rem",fontWeight:600,mr:1})}))}
1,94805:function(e,t,n){"use strict";var r=n(26042),o=n(69396),l=n(85893),i=n(9942),s=n(54225),a=n(29620),u=n(80562),c=n(95398),d=n(30120),f=n(29630),p=n(67294),h=n(20986),m=(0,p.forwardRef)((function(e,t){return(0,l.jsx)(i.Z,(0,r.Z)({ref:t},e))}));t.Z=function(e){var t,n=e.children,i=e.isOpen,v=e.setIsOpen,x=e.dialogProps,Z=e.button,g=e.buttonContent,j=void 0===g?"Open":g,b=e.title,P=e.description,y=e.maxWidth,C=void 0===y?"md":y,k=(0,p.useCallback)((function(e,t){v(!1)}),[]),w=(0,p.useCallback)((function(e){v(!0)}),[]);return(0,l.jsxs)(l.Fragment,{children:[Z||(0,l.jsx)(s.Z,{variant:"contained",sx:{mb:2.5,whiteSpace:"nowrap"},onClick:w,children:j}),(0,l.jsxs)(a.Z,(0,o.Z)((0,r.Z)({fullWidth:!0,maxWidth:C,scroll:"paper",onClose:k,TransitionComponent:m,open:i},x),{PaperProps:(0,o.Z)((0,r.Z)({},null===x||void 0===x?void 0:x.PaperProps),{sx:(0,r.Z)({position:"relative"},null===x||void 0===x||null===(t=x.PaperProps)||void 0===t?void 0:t.sx)}),children:[(0,l.jsx)(u.Z,{size:"small",onClick:function(){return v(!1)},sx:{position:"absolute",right:"1rem",top:"1rem",zIndex:1},children:(0,l.jsx)(h.Tw,{})}),(0,l.jsxs)(c.Z,{sx:{pb:6,px:[4,11],pt:[5,8.5]},children:[(b||P)&&(0,l.jsxs)(d.Z,{sx:{mb:8,textAlign:"center"},children:[b&&(0,l.jsx)(f.Z,{variant:"h6",sx:{mb:2,lineHeight:"2rem"},children:b}),P&&(0,l.jsx)(f.Z,{variant:"body2",children:P})]}),n]})]}))]})}},45209:function(e,t,n){"use strict";n.d(t,{u:function(){return v}});var r=n(26042),o=n(69396),l=n(99534),i=n(85893),s=n(9942),a=n(29620),u=n(77745),c=n(80562),d=n(54225),f=n(95398),p=n(13264),h=n(67294),m=n(20986),v=(0,h.forwardRef)((function(e,t){return(0,i.jsx)(s.Z,(0,r.Z)({ref:t},e))})),x=(0,p.Z)(a.Z)((function(e){var t=e.theme;return{"& .MuiDialogContent-root":{padding:t.spacing(2)},"& .MuiDialogActions-root":{padding:t.spacing(1)}}})),Z=function(e){var t=e.children,n=e.onClose,s=e.rightPlaceholder,a=(0,l.Z)(e,["children","onClose","rightPlaceholder"]);return(0,i.jsxs)(u.Z,(0,o.Z)((0,r.Z)({sx:{mx:2,p:2}},a),{children:[(0,i.jsxs)("div",{className:"mr-10 flex justify-between",children:[(0,i.jsx)("div",{children:t}),(0,i.jsx)("div",{children:s})]}),n?(0,i.jsx)(c.Z,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:4,color:function(e){return e.palette.grey[500]}},children:(0,i.jsx)(m.Tw,{})}):null]}))};t.Z=function(e){var t=e.children,n=e.isOpen,l=e.setIsOpen,s=e.dialogProps,a=e.button,u=e.buttonContent,c=void 0===u?"Open":u,p=e.title,m=e.description,g=e.hasTitle,j=void 0===g||g,b=e.disableClose,P=void 0!==b&&b,y=e.rightPlaceholder,C=(0,h.useCallback)((function(){P||l(!1)}),[]),k=(0,h.useCallback)((function(e){l(!0)}),[]);return(0,i.jsxs)(i.Fragment,{children:[a||(0,i.jsx)(d.Z,{variant:"contained",sx:{mb:2.5,whiteSpace:"nowrap"},onClick:k,children:c}),(0,i.jsxs)(x,(0,o.Z)((0,r.Z)({fullWidth:!0,maxWidth:"md",scroll:"paper",onClose:C,TransitionComponent:v,open:n},s),{children:[j&&(0,i.jsxs)(Z,{rightPlaceholder:y,onClose:C,children:[p&&(0,i.jsx)("div",{className:"text-[1.125rem] font-[600]",children:p}),m&&(0,i.jsx)("div",{className:"text-sm tracking-[0.1px] text-gray-500",children:m})]}),(0,i.jsx)(f.Z,{dividers:!0,children:t})]}))]})}},87811:function(e,t,n){"use strict";n.d(t,{AD:function(){return a},G6:function(){return i},HD:function(){return c},Ms:function(){return l},Ye:function(){return u},qg:function(){return s}});var r=n(80471),o=n(86893),l=o.rH8,i=o.bTu,s=o.YFh,a=o.Tfp,u=r.kEI,c=r.BM_},33132:function(e,t,n){"use strict";n.d(t,{A:function(){return c}});var r=n(26042),o=n(85893),l=n(16829),i=n(61225),s=n(51964),a=n.n(s),u=(0,l.Z)(a(),{shouldForwardProp:function(e){return"maxHeight"!==e}})((function(e){return(0,r.Z)({},{maxHeight:e.maxHeight,"& .MuiMenuItem-root:last-of-type":{border:0}})})),c=function(e){var t=e.children,n=e.maxHeight,r=void 0===n?"20vh":n;(0,i.Z)((function(e){return e.breakpoints.down("lg")}));return(0,o.jsx)(u,{maxHeight:r,options:{wheelPropagation:!1,suppressScrollX:!0},children:t})}},94062:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(85893),o=n(87811),l=n(30120),i=n(89125),s=n(54225),a=n(81719),u=n(20986),c=n(67836),d=n(96486),f=n(67294),p=(0,a.ZP)(s.Z,{name:"StyledButton",slot:"Wrapper"})((function(){return{margin:0,padding:0,paddingLeft:5,paddingRight:5,minWidth:"10px"}})),h=function(e){var t=e.onPageChange,n=(0,f.useState)(""),o=n[0],l=n[1],i=(0,f.useId)();return(0,r.jsx)("div",{children:(0,r.jsx)(c.Z,{id:"go-to-page-".concat(i),value:o,label:"Go To",
1size:"small",onChange:function(e){return function(e){var t=e.target.value.replace(/[^0-9]/g,"");l(t)}(e)},sx:{minWidth:"5.5rem"},InputProps:{autoComplete:"off",endAdornment:(0,r.jsx)(p,{onClick:function(e){return function(e){var n=(0,d.parseInt)(o);t(e,n>0?n-1:n),l("")}(e)},children:(0,r.jsx)(u.Ye,{size:28})})}})})},m=(0,a.ZP)(s.Z,{name:"StyledButton",slot:"Wrapper"})((function(){return{marginRight:"0.5rem",minWidth:"40px"}})),v=function(e){var t=e.count,n=e.page,i=e.onPageChange,a=e.rowsPerPage,u=e.showFirstButton,c=e.showLastButton,d=0===t?0:Math.ceil(t/a)-1;return(0,r.jsxs)(l.Z,{className:"mx-8 flex items-center",children:[u&&(0,r.jsx)(m,{size:"small",variant:"text",disabled:0===n,onClick:function(e){return i(e,0)},children:(0,r.jsx)(o.HD,{size:20})}),(0,r.jsx)(m,{size:"small",variant:"text",disabled:0===n,onClick:function(e){return i(e,n-1)},children:(0,r.jsx)(o.qg,{size:20})}),function(){var e=n>=3?n-3:0,r=Math.ceil(t/a),o=r<6?r:6,l=e+o,i=l>r?Math.abs(l-r):0;return Array.from({length:o},(function(t,n){return e-i+n}))}().map((function(e){return(0,r.jsx)(s.Z,{size:"small",sx:{mr:1,minWidth:"32px"},variant:n===e?"contained":"outlined",onClick:function(t){return i(t,e)},children:e+1},e)})),(0,r.jsx)(m,{size:"small",variant:"text",disabled:t<=a*(n+1),onClick:function(e){return i(e,n+1)},children:(0,r.jsx)(o.AD,{size:20})}),c&&(0,r.jsx)(m,{size:"small",variant:"text",disabled:n===d,onClick:function(e){i(e,d)},children:(0,r.jsx)(o.Ye,{size:20})}),(0,r.jsx)(h,{onPageChange:i})]})},x=function(e){var t=e.page,n=e.setPage,o=e.pageSize,l=e.setPageSize,s=e.rowsPerPageOption,a=void 0===s?[10,25,50]:s,u=e.showFirstButton,c=void 0===u||u,d=e.showLastButton,f=void 0===d||d,p=e.totalRows;return(0,r.jsx)(i.Z,{rowsPerPageOptions:a,component:"div",count:p,rowsPerPage:o,page:Math.min(p/o,t),onPageChange:function(e,t){n(t)},onRowsPerPageChange:function(e){l(+e.target.value),n(0)},labelRowsPerPage:"",ActionsComponent:v,showFirstButton:c,showLastButton:f})}},13267:function(e,t,n){"use strict";n.d(t,{$i:function(){return v},Af:function(){return C},Ai:function(){return g},Aj:function(){return y},As:function(){return m},BQ:function(){return d},CN:function(){return k},D0:function(){return x},Hj:function(){return P},OF:function(){return h},Po:function(){return a},R3:function(){return c},kJ:function(){return p},kb:function(){return j},m5:function(){return f},oJ:function(){return u},oi:function(){return b},u5:function(){return Z}});var r,o=n(14924),l=n(96277),i=n(19223),s=n(74231),a=/((https?):\/\/)?(www.)?[a-z0-9]+(\.[a-z]{2,}){1,3}(#?\/?[a-zA-Z0-9#]+)*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/,u=/^[a-zA-Z0-9]+$/i,c=/^[a-zA-Z]+$/i,d=/^[0-9]+$/i,f=/^[a-z0-9]+$/g,p=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,}$/,h=/^(?!.*(.)\1\1.*).*$/,m=/\d/g,v="Length (cm)",x="Width (cm)",Z="Height (cm)",g="Weight (kg)",j={address1:"",address2:"",city:"",country:"",postcode:"",state:""},b=(r={},(0,o.Z)(r,l.Au2.Deposit,l.Au2.Deposit),(0,o.Z)(r,l.Au2.Balance,l.Au2.Balance),r),P=s.Ry().shape({amount:s.Rx(),currency:s.Z_()}).nullable(),y=s.Ry().shape({companyName:s.Z_().nullable(),address1:s.Z_().required("Address is required"),address2:s.Z_().nullable(),city:s.Z_().required("City is required"),country:s.Z_().required("Country is required"),postcode:s.Z_().required("Postcode is required"),state:s.Z_().required("State is required")}),C=s.Ry().shape({address1:s.Z_().nullable(),address2:s.Z_().nullable(),city:s.Z_().nullable(),country:s.Z_().nullable(),postcode:s.Z_().nullable(),state:s.Z_().nullable(),companyName:s.Z_().nullable()}).nullable(),k=s.Ry().shape({length:(0,i.r)().required("Length is required"),width:(0,i.r)().required("Width is required"),height:(0,i.r)().required("Height is required"),weight:(0,i.r)().required("Weight is required")})},9887:function(e,t,n){"use strict";n.d(t,{CG:function(){return l},TL:function(){return o}});n(67294);var r=n(9473),o=function(){return(0,r.I0)()},l=r.v9},63015:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var r=n(9887),o=n(67294),l=n(11767),i=function(e){var t=e.selector,n=(0,r.TL)(),i=(0,r.CG)(t),s=(0,o.useCallback)((function(e){n((0,l.kP)(e))}),[n]);return(0,o.useEffect)((function(){return function(){s(!1)}}),[s]),{isUploadingState:i,setIsUploadingState:s}}},57891:function(e,t,n){"use strict";n.d(t,{Q:function(){return r}});var r=function(e){var t=!0;return!e||(Object.keys(e).forEach((function(n){var r=e[n];void 0!==r&&("number"===typeof r?Number.isNaN(r)||(t=!1):null!==r&&(t=!1))})),t)}},4232:function(e,t,n){"use strict";n.d(t,{E:function(){return i},W:function(){return l}});var r=n(26042),o=n(96486),l=function(e){var t=e.query;if(!(0,o.isEmpty)(t)){var n=t.page,r=t.pageSize,l=t.filters;return{page:(0,o.isString)(n)?Number(n):void 0,pageSize:(0,o.isString)(r)?Number(r):void 0,filters:l&&(0,o.isString)(l)?JSON.parse(l):void 0}}},i=function(e){var t=e.router,n=e.setFilters,i=e.setPage,s=e.setPageSize,a=e.redirect,u=(t.query,t.pathname),c=l(t);if(!(0,o.isNil)(c)){var d=c.page,f=c.pageSize,p=c.filters;d&&i(d),f&&s(f),p&&n((0,r.Z)({},p)),a&&u===a&&t.push(a,void 0,{shallow:!0})}}},19223:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(96486),o=n(74231),l=function(){return o.Rx().nullable().transform((function(e,t){return""===t||(0,r.isNil)(t)?null:e}))}},85290:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return z}});var r=n(85893),o=n(47568),l=n(26042),i=n(69396),s=n(828),a=n(70655),u=n(53722),c=n(96277),d=n(4451),f=n(43085),p=n(96486),h=n(11163),m=n(67294),v=n(59707),x=n(95676),Z=n(56302),g=n(1427),j=n(76366),b=n(79506),P=n(47533),y=n(49837),C=n(59742),k=n(44373),w=n(91359),S=n(79072),V=n(29630),T=n(54225),W=n(87536),O=n(45654),N=n(80907);var F=function(e){var t=e.onSubmit,n=e.existingData,l=((0,d.a)().user,(0,p.merge)({},O.Rv,n)),i=(0,W.cI)({defaultValues:l,resolver:(0,P.X)(O.y8)}),u=i.handleSubmit,f=(i.formState.errors,i.setValue),h=i.watch,F=i.reset,I=function(e,n){t(e,n)};(0,m.useEffect)((function(){var e=(0,p.merge)({},O.Rv,n);F(e)}),[n]);var z=h("fromWarehouse"),_=null===z||void 0===z?void 0:z.value,A=(0,s.Z)((0,c.dHl)(),1
1)[0];return(0,m.useEffect)((function(){var e=function(){var e=(0,o.Z)((function(){var e,t,n,r,o;return(0,a.__generator)(this,(function(l){switch(l.label){case 0:return[4,A({variables:{filter:{id:_}}})];case 1:return t=l.sent(),1===(null===(e=t.data)||void 0===e?void 0:e.allWarehouses.total)&&_&&(r=null===(n=t.data)||void 0===n?void 0:n.allWarehouses.warehouses[0],o=r?{address1:r.address.address1,address2:r.address.address2,city:r.address.city,country:r.address.country,postcode:r.address.postcode,state:r.address.state}:null,f("billTo",o),f("shipTo",o)),[2]}}))}));return function(){return e.apply(this,arguments)}}();_&&e()}),[_,f,A]),(0,r.jsx)("div",{children:(0,r.jsx)(y.Z,{children:(0,r.jsxs)(j.e,{methods:i,onSubmit:u((function(e){return I(e,!1)})),defaultValues:l,children:[(0,r.jsx)(C.Z,{title:(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsx)("div",{children:"Create Stock Out Order"})}),titleTypographyProps:{variant:"h6"}}),(0,r.jsx)(k.Z,{sx:{m:0}}),(0,r.jsx)(w.Z,{children:(0,r.jsxs)(S.ZP,{container:!0,spacing:6,sx:{pt:0},children:[(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(V.Z,{variant:"body2",sx:{fontWeight:600},children:"1. Stock Out Order Details"})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(b.Zu,{methods:i,name:"fromWarehouse",defaultValues:l,label:"Select Warehouse"})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{name:"remarks",defaultValues:l,textFieldProps:{fullWidth:!0,placeholder:"Mr Lee",autoFocus:!1}})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(Z.Z,{label:"Order Currency",defaultValues:l,name:"currency"})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(k.Z,{})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(V.Z,{variant:"body2",sx:{fontWeight:600},children:"2. Stock Out Order Items"})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(N.Z,{defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(k.Z,{})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(V.Z,{variant:"body2",sx:{fontWeight:600},children:"3. Bill To"})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"Address 1",name:"billTo.address1",textFieldProps:{fullWidth:!0,placeholder:"1, Infinite Road",autoFocus:!1},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"Address 2",name:"billTo.address2",textFieldProps:{fullWidth:!0,placeholder:"Apt. 1",autoFocus:!1},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"City",name:"billTo.city",textFieldProps:{fullWidth:!0,placeholder:"Melaka",autoFocus:!1},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"Postcode",name:"billTo.postcode",textFieldProps:{fullWidth:!0,placeholder:""},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(x.Z,{label:"State",countryFieldName:"billTo.country",name:"billTo.state",selectProps:{placeholder:"Melaka"},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(v.Z,{label:"Country",name:"billTo.country",selectProps:{placeholder:"Melaka"},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(k.Z,{})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,children:(0,r.jsx)(V.Z,{variant:"body2",sx:{fontWeight:600},children:"4. Ship To"})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"Address 1",name:"shipTo.address1",textFieldProps:{fullWidth:!0,placeholder:"1, Infinite Road",autoFocus:!1},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"Address 2",name:"shipTo.address2",textFieldProps:{fullWidth:!0,placeholder:"Apt. 1",autoFocus:!1},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"City",name:"shipTo.city",textFieldProps:{fullWidth:!0,placeholder:"Melaka",autoFocus:!1},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(g.Z,{label:"Postcode",name:"shipTo.postcode",textFieldProps:{fullWidth:!0,placeholder:""},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(x.Z,{label:"State",countryFieldName:"shipTo.country",name:"shipTo.state",selectProps:{placeholder:"Melaka"},defaultValues:l})}),(0,r.jsx)(S.ZP,{item:!0,xs:12,sm:6,children:(0,r.jsx)(v.Z,{label:"Country",name:"shipTo.country",selectProps:{placeholder:"Melaka"},defaultValues:l})}),(0,r.jsxs)(S.ZP,{className:"flex flex-wrap",item:!0,xs:12,sx:{pt:function(e){return"".concat(e.spacing(7)," !important")}},children:[(0,r.jsx)(T.Z,{type:"submit",variant:"contained",sx:{mr:4},children:"Submit"}),(0,r.jsx)(T.Z,{type:"submit",variant:"contained",color:"secondary",sx:{mr:4},onClick:u((function(e){return I(e,!0)})),children:"Save as Draft"})]})]})})]})})})};var I=function(e){var t=(0,d.a)().preferredCurrency,n=(0,h.useRouter)(),v=n.query.orderId,x=null===v||void 0===v?void 0:v.toString(),Z=(0,c.c34)(),g=Z.loading,j=(0,m.useMemo)((function(){var e;return null===(e=Z.data)||void 0===e?void 0:e.myCompany.defaultWarehouse}),[Z]),b=(0,s.Z)((0,c.kjt)(),2),P=b[0],y=b[1],C=y.loading,k=y.client,w=function(){var e=(0,o.Z)((function(e){var t,r,o,s,u,d,h,m,v,x,Z,g,j,b,y,C=arguments;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return t=C.length>1&&void 0!==C[1]&&C[1],j=(0,p.omit)(e,["fromWarehouse"]),[4,P({variables:{createStockOutOrderDto:(0,i.Z)((0,l.Z)({},j),{isDraft:t,fromWarehouseId:(null===(r=e.fromWarehouse)||void 0===r?void 0:r.value)||"",stockOutItems:e.stockOutItems.map((function(e){var t,n,r,o,s,a,u=(0,p.omit)(e,["details"]);return(0,i.Z)((0,l.Z)({},u),{price:{amount:(null===(t=e.price)||void 0===t?void 0:t.amount)||0,currency:(null===(n=e.price)||void 0===n?void 0:n.currency)||c.Fa6.Hkd},stockOutQuantity:{damaged:(null===(r=e.stockOutQuantity)||void 0===r?void 0:r.damaged)||0,fulfillable:(null===(o=e.stockOutQuantity)||void 0===o?void 0:o.fulfillable)||0,reserved:(null===(s=e.stockOutQuantity)||void 0===s?void 0:s.reserved)||0,used:(null===(a=e.stockOutQuantity)||void 0===a?void 0:a.used)||0},productVariantId:e.productVariantId||""})})),billTo:(0,i.Z)((0,l.Z)({}
1,e.billTo),{address1:(null===(o=e.billTo)||void 0===o?void 0:o.address1)||"",city:(null===(s=e.billTo)||void 0===s?void 0:s.city)||"",country:(null===(u=e.billTo)||void 0===u?void 0:u.country)||"",postcode:(null===(d=e.billTo)||void 0===d?void 0:d.postcode)||"",state:(null===(h=e.billTo)||void 0===h?void 0:h.state)||""}),shipTo:(0,i.Z)((0,l.Z)({},e.billTo),{address1:(null===(m=e.billTo)||void 0===m?void 0:m.address1)||"",city:(null===(v=e.billTo)||void 0===v?void 0:v.city)||"",country:(null===(x=e.billTo)||void 0===x?void 0:x.country)||"",postcode:(null===(Z=e.billTo)||void 0===Z?void 0:Z.postcode)||"",state:(null===(g=e.billTo)||void 0===g?void 0:g.state)||""})})}})];case 1:return b=a.sent(),(null===(y=b.data)||void 0===y?void 0:y.createStockOutOrder.id)?((0,f.x9)("Stock Out Order Created"),k.cache.evict({fieldName:"allStockOutOrders"}),n.push({pathname:"/apps/stock-out"})):(0,f._N)("Something went wrong."),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),S=(0,s.Z)((0,c.IBn)(),2),V=S[0],T=(S[1].loading,function(){var e=(0,o.Z)((function(){var e,n,r,o=arguments;return(0,a.__generator)(this,(function(l){switch(l.label){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:-1,n=o.length>1&&void 0!==o[1]?o[1]:0,x?[4,V({variables:{filter:{orderId:x},limit:e,offSet:n,convertCurrency:t||void 0}})]:[2,void 0];case 1:return(null===(r=l.sent().data)||void 0===r?void 0:r.allCacheOrderItems.length)?[2,null===r||void 0===r?void 0:r.allCacheOrderItems.map((function(e){var t=e.id,n=e.orderItemSnapshot,r=e.adjustedPrice2,o=e.checkOutQuantity,l=(n.images,n.productName),i=n.sku;return{orderItemId:t,productVariantId:"",details:{barcode:n.barcode||"",name:l,sku:i||""},price:{amount:(null===r||void 0===r?void 0:r.amount)||0,currency:(null===r||void 0===r?void 0:r.currency)||c.Fa6.Hkd},stockOutQuantity:{fulfillable:o||0,damaged:0,reserved:0,used:0}}}))]:[2,void 0]}}))}));return function(){return e.apply(this,arguments)}}()),W=(0,m.useState)(void 0),O=W[0],N=W[1];(0,m.useEffect)((function(){x&&T().then((function(e){N(e)}))}),[x]);var I=(0,m.useMemo)((function(){var e=j?{address1:j.address.address1,address2:j.address.address2,city:j.address.city,country:j.address.country,postcode:j.address.postcode,state:j.address.state}:null;return{fromWarehouse:j?{label:j.name,value:j.id}:null,billTo:e,shipTo:e,stockOutItems:O||[]}}),[j,O]),z=g||C;return(0,r.jsxs)("div",{children:[(0,r.jsx)(u.Z,{open:z}),(0,r.jsx)(F,{onSubmit:w,existingData:I})]})},z=function(){return(0,r.jsx)(I,{})}}},function(e){e.O(0,[2876,4980,7536,1524,4231,5428,1718,5836,5734,2268,5780,1280,2020,8507,7384,6690,1039,6446,5465,9774,2888,179],(function(){return t=24753,e(e.s=t);var t}));var t=e.O();_N_E=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.