import{jasN,Ias$t,Basqn,akasdt,aJasHn,HasBe,aBas$n,_asUn}from"./mui-vendor-CkIVaoQP.js";import{rasS,uasGn,gasbe,easfe,basC,daszn}from"./react-vendor-CmFgShSM.js";import{LasQn,jasVn,hasvt,Aaspt,a9asNe,a1asje,pasde,Nasht,Gasz,Sasse,Wasbt,izasYn}from"./index-Vwb3Bce5.js";import{aasKn,uasUt,fasGt,_asXn}from"./redux-vendor-B7uoacJt.js";import{dasJn}from"./Delete-DHYHiC8G.js";import{CasZn}from"./CityNewKillRequest-ByfLtRM3.js";import{Raser}from"./ResponsiveTable-DugzNG82.js";import{Aastr}from"./AdvancedTable-B0ObjV8k.js";import{dasnr}from"./Plagiarism-B6PD3EJO.js";import{_asrr}from"./chart-vendor-sE2SUVPW.js";import{aasor,sasB}from"./styled-components.browser.esm-gS9mh05b.js";constur=Kn("ARCHIVE_DELETE_KILL_REQUEST_SERVICE",async(e,{dispatch:t})=>{t(Qn());try{const{data:n,status:r}=awaitVn.delete("Poultry_Request/"+e);returnt(vt()),{data:n,status:r}}catch(n){returnt(vt()),{error:n.response.data.result}}}),Bu=()=>{const[e,t]=S.useState([]),n=Ut(),[r]=S.useContext(pt),{avicultureRequests:o}=Gt(l=>l.avicultureSlice),[,,u,a,i,c]=S.useContext(pt);returnS.useEffect(()=>{constl=Ne(newDate).format("YYYY-MM-DD");a(l),c(l)},[]),S.useEffect(()=>{n(je({selectedDate1:u,selectedDate2:i}))},[u,i]),S.useEffect(()=>{constl=Array.isArray(o)&&(o==null?void0:o.filter((s,v)=>(s.stateProcess==="accepted"||s.stateProcess==="pending")&&s.finalState!=="archive"));letf;l&&(f=l==null?void0:l.map((s,v)=>{varp,m,w,h,y,b,k,E,x,A,I,T,W,L,M,Q,_,$;letg="";returns.directBuying?g="خرید مستقیم":s.union?g="خرید خارج از استان":g="اتحادیه",[v+1,s.orderCode,g,s!=null&&s.freezing?"انجماد":s!=null&&s.export?"صادرات":"عادی",s!=null&&s.directBuyingBuyerInfo?`${(p=s==null?void0:s.directBuyingBuyerInfo)==null?void0:p.buyerFullname} (${(m=s==null?void0:s.directBuyingBuyerInfo)==null?void0:m.buyerMobile})`:"-",s.directBuyingKillPlace?s.directBuyingKillPlace:"-",s!=null&&s.createDate?de(s==null?void0:s.createDate):"",s!=null&&s.sendDate?de(s==null?void0:s.sendDate):"",`${(h=(w=s.process)==null?void0:w.poultry)==null?void0:h.poultryName} (${(b=(y=s.process)==null?void0:y.poultry)==null?void0:b.poultryMobile})`,`${(E=(k=s.process)==null?void0:k.poultry)==null?void0:E.poultryProvince}/${(A=(x=s.process)==null?void0:x.poultry)==null?void0:A.poultryCity}`,de((T=(I=s.process)==null?void0:I.poultryHatching)==null?void0:T.date),(L=(W=s.process)==null?void0:W.poultry)==null?void0:L.age,s.IndexWeight,(Q=(M=s.process)==null?void0:M.poultry)==null?void0:Q.poultryQuantity.toLocaleString(),(s.IndexWeight*(($=(_=s.process)==null?void0:_.poultry)==null?void0:$.poultryQuantity)).toLocaleString(),N.jsx($t,{disabled:s==null?void0:s.directBuyingKillPlace,"aria-label":"delete",color:"error",className:"avicultureActiveRequestsBtn",onClick:()=>{varO,V;n(ur((V=(O=s==null?void0:s.process)==null?void0:O.poultry)==null?void0:V.poultryRequestId)).then(U=>{U.payload.error?r({vertical:"top",horizontal:"center",msg:U.payload.error,severity:"error"}):(n(je()),n(ht({right:!1,bottom:!1,content:null})),r({vertical:"top",horizontal:"center",msg:"عملیات با موفقیت انجام شد.",severity:"success"}))})},children:N.jsx(Jn,{})},s==null?void0:s.orderCode)]})),t(f)},[o]),N.jsx(N.Fragment,{children:N.jsx(z,{container:!0,gap:se.MEDIUM,direction:"column",xs:12,children:N.jsx(z,{container:!0,gap:se.SMALL,justifyContent:{xs:"center",lg:"space-between"},alignSelf:"center",alignItems:"center",xs:12,direction:{xs:"column",lg:"row"},width:"100%",children:N.jsxs(z,{container:!0,gap:se.SMALL,alignItems:"start",direction:"column",width:"100%",children:[N.jsx(z,{container:!0,width:"100%",gap:se.SMALL,children:N.jsx(qn,{className:"avicultureNewRequestBtn",variant:"contained",onClick:()=>{n(ht({right:!(window.innerWidth<=600),bottom:window.innerWidth<=600,title:"ثبت درخواست کشتار",content:N.jsx(Zn,{isAviculture:!0})}))},children:"ثبت درخواست کشتار"})}),N.jsxs(z,{width:"100%",className:"avicultureActiveRequestsView",child
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var u,a=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){i=!0,u=c},f:function(){try{a||n.return==null||n.return()}finally{if(i)throw u}}}}function R(e,t,n){return(t=In(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(e)}function ru(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}function _n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_n=function(){return!!e})()}function ou(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,u,a,i=[],c=!0,l=!1;try{if(u=(n=n.call(e)).next,t!==0)for(;!(c=(r=u.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function uu(){throw new TypeError(`Invalidattempttodestructurenon-iterableinstance.
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?It(Object(n),!0).forEach(function(r){R(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function au(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jo(e)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ye(e,t)}function iu(e,t){return Xo(e)||ou(e,t)||Fn(e,t)||uu()}function P(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function cu(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function In(e){var t=cu(e,"string");return typeof t=="symbol"?t:t+""}function Fn(e,t){if(e){if(typeof e=="string")return _t(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}}var Ft,su=or(Ft||(Ft=P([`