PageSourceSearch

https://faradars.org/_next/static/chunks/pages/my-account/tickets/create-184b30bff4cdf12c.js

js faradars.org collected 2026-09-24 19:22:26 UTC 23,029 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3873],{8736:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/tickets/create",function(){return t(96826)}])},33733:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(37876);let a=e=>(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16.2759 13.358C16.054 13.5798 15.7068 13.6 15.4621 13.4185L15.392 13.358L10.0007 7.96685L4.60926 13.358C4.38737 13.5798 4.04015 13.6 3.79547 13.4185L3.72538 13.358C3.50349 13.1361 3.48331 12.7888 3.66486 12.5442L3.72538 12.4741L9.55871 6.64074C9.7806 6.41885 10.1278 6.39868 10.3725 6.58022L10.4426 6.64074L16.2759 12.4741C16.52 12.7182 16.52 13.1139 16.2759 13.358Z",fill:e.fill||"currentColor"})})},37346:(e,s,t)=>{"use strict";t.d(s,{i:()=>a});var l,a=((l={}).INFO="info",l.ERROR="error",l.WARNING="warning",l.SUCCESS="success",l.PRIMARY="primary",l)},43312:(e,s,t)=>{"use strict";t.d(s,{A:()=>u});var l=t(37876),a=t(37346),i=t(67931),r=t(23088),n=t(95375);let d={[a.i.INFO]:n.A,[a.i.ERROR]:e=>(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM8.96963 8.96965C9.26252 8.67676 9.73739 8.67676 10.0303 8.96965L12 10.9393L13.9696 8.96967C14.2625 8.67678 14.7374 8.67678 15.0303 8.96967C15.3232 9.26256 15.3232 9.73744 15.0303 10.0303L13.0606 12L15.0303 13.9696C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0303 15.0303C9.73742 15.3232 9.26254 15.3232 8.96965 15.0303C8.67676 14.7374 8.67676 14.2625 8.96965 13.9697L10.9393 12L8.96963 10.0303C8.67673 9.73742 8.67673 9.26254 8.96963 8.96965Z",fill:e.fill||"currentColor"})}),[a.i.WARNING]:r.A,[a.i.SUCCESS]:i.A,[a.i.PRIMARY]:n.A},c={[a.i.INFO]:"bg-fds-info-light text-fds-on-info-light",[a.i.ERROR]:"bg-fds-danger-light text-fds-on-danger-light",[a.i.WARNING]:"bg-fds-warning-light text-fds-on-warning-light",[a.i.SUCCESS]:"bg-fds-success-light text-fds-on-success-light",[a.i.PRIMARY]:"bg-fds-brand  text-fds-on-brand"};var o=t(15039),m=t.n(o);let u=({alert:e,title:s,description:t,showIcon:a,className:i})=>{let r=d[e];return(0,l.jsxs)("div",{className:m()("p-4     rounded-8  flex gap-x-2",c[e],i),children:[a&&(0,l.jsx)(r,{}),(0,l.jsxs)("div",{className:"flex flex-col gap-y-2",children:[s?(0,l.jsx)("p",{className:"body-md ",children:s}):null,t?(0,l.jsx)("p",{className:"body-sm",children:t}):null]})]})}},47709:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var l=t(37146),a=t(54215);let i={tickets:(e,s)=>l.A.get({client:a.A,params:{page:e,limit:s},url:"/user/profile/tickets"}),ticketsSubmit:e=>l.A.file({client:a.A,url:"/user/profile/tickets",data:e,headers:{"Content-Type":"multipart/form-data"}}),ticketsShow:e=>l.A.get({client:a.A,url:`/user/profile/tickets/${e}`,params:{showHtml:!0}}),answer:(e,s)=>l.A.file({client:a.A,url:`user/profile/tickets/${e}/answer`,data:s,headers:{"Content-Type":"multipart/form-data"}}),rate:(e,s)=>l.A.post({client:a.A,url:`user/profile/ticket-answers/${e}/rate`,data:s})}},52047:(e,s,t)=>{"use strict";t.d(s,{Ay:()=>m,Tv:()=>c,qp:()=>o});var l=t(37876),a=t(72552),i=t(89099),r=t.n(i),n=t(14232),d=t(69571);let c=(e,s)=>{if(e){let e=(0,d._g)(r().pathname)?(0,d.dn)(s):s;r().replace(e)}return!e},o=(e,s)=>(e||r().replace(s),e),m=({children:e,redirectUrl:s,redirectHandler:t,noLayoutMode:i=!1})=>{let{user:{isLoggedIn:r,isLayoutLoaded:d}}=(0,a.U)(),[c,o]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{(d||i)&&o(t(r,s))},[r,d]),c)?(0,l.jsx)(l.Fragment,{children:e}):(0,l.jsx)(l.Fragment,{})}},71576:function(e){e.exports=function(){"use strict";var e="minute",s=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(l,a,i){var r=a.prototype;i.utc=function(e){var s={date:e,utc:!0,args:arguments};return new a(s)},r.utc=function(s){var t=i(this.toDate(),{locale:this.$L,utc:!0});return s?t.add(this.utcOffset(),e):t},r.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var n=r.parse;r.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),n.call(this,e)};var d=r.init;r.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else d.call(this)};var c=r.utcOffset;r.utcOffset=function(l,a){var i=this.$utils().u;if(i(l))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof l&&null===(l=function(e){void 0===e&&(e="");var l=e.match(s);if(!l)return null;var a=(""+l[0]).match(t)||["-",0,0],i=a[0],r=60*a[1]+ +a[2];return 0===r?0:"+"===i?r:-r}(l)))return this;var r=16>=Math.abs(l)?60*l:l;if(0===r)return this.utc(a);var n=this.clone();if(a)return n.$offset=r,n.$u=!1,n;var d=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(r+d,e)).$offset=r,n.$x.$localOffset=d,n};var o=r.format;r.format=function(e){var s=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return o.call(this,s)},r.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var m=r.toDate;r.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var u=r.diff;r.diff=function(e,s,t){if(e&&this.$u===e.$u)return u.call(this,e,s,t);var l=this.local(),a=i(e).local();return u.call(l,a,s,t)}}}()},77347:(e,s,t)=>{"use strict";t.d(s,{A:()=>m});
1var l=t(37876),a=t(34666),i=t(33415),r=t(36452),n=t(23088),d=t(15039),c=t.n(d);let o={large:{titleClassName:"title-lg mb-2",buttonClassName:"h-12 body-md rounded-8  p-2.5   w-full",iconClassName:"w-6  h-6",itemClassName:"fds-l:title-lg fds-md:title-md-medium title-sm  p-4     ",hintClassName:"body-sm",listClassName:"rounded-8 mt-2"},medium:{titleClassName:"title-md-medium mb-1.5",buttonClassName:"h-10 body-sm rounded-6  p-2  w-full",iconClassName:"w-5    h-5",itemClassName:"title-md-medium fds-md:title-md-medium title-sm  px-3  py-3.5",hintClassName:"body-xsm",listClassName:"rounded-6  mt-1.5"},small:{titleClassName:"title-sm mb-1",buttonClassName:"h-8   body-xsm rounded-4  px-2  py-1.5  w-full",iconClassName:"w-4     h-4    ",itemClassName:"title-sm py-3  px-2.5   ",hintClassName:"body-xxsm",listClassName:"rounded-4 mt-1"}},m=({list:e,selected:s,handleChange:t,name:d,className:m,showArrow:u,startIcon:f,title:h,isRequired:x,size:p,hintMessage:g,error:j,disabled:b,placeholder:v,ParentclassName:N,withTickOption:C,btnClassName:y,onClick:w})=>{let A=s?"string"==typeof s?s:s?.id||s?.key||null:null;return(0,l.jsxs)("div",{className:c()("w-full",N),children:[h?(0,l.jsxs)("div",{className:"flex items-center ",children:[x&&(0,l.jsx)("span",{className:"title-lg",children:"*"}),(0,l.jsx)("p",{className:c()(" text-fds-primary",o[p].titleClassName,b&&"text-fds-disable"),children:h})]}):null,(0,l.jsx)(a.W,{value:s,onChange:t,name:d,disabled:!e?.length||b,children:({open:t})=>(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsxs)(a.W.Button,{className:c()(o[p].buttonClassName,"border-size-1 border-fds-default flex justify-between items-center hover:border-fds-hover",t&&"border-fds-select",j?"border-fds-danger":"",b&&"border-fds-disable   hover:!border-fds-disable",y),children:[(0,l.jsxs)("div",{className:"flex items-center gap-x-1.5",children:[f,s?.title||s?.name||v?(0,l.jsx)("p",{className:c()("text-right body-md ",s?.title||s?.name?"text-fds-primary":"text-fds-placeholder"),children:s?.title||s?.name||v}):""]}),u&&!b&&(0,l.jsx)(i.A,{fill:"#747981",className:c()(o[p].iconClassName,"transform min-w-8  ease-linear duration-300 text-fds-icon-tertiary   scale-[.45]",t?"":"-rotate-180")})]}),(0,l.jsxs)("div",{className:"w-full flex justify-between",children:[!!g&&(0,l.jsx)("p",{className:c()(o[p].hintClassName,"text-fds-tertiary",b&&"text-fds-disable"),children:g}),!!j&&(0,l.jsxs)("div",{className:"flex gap-x-1",children:[(0,l.jsx)(n.A,{className:c()(o[p].iconClassName)}),(0,l.jsx)("p",{className:c()(o[p].hintClassName,"text-fds-danger"),children:j})]})]}),(0,l.jsx)(a.W.Options,{className:c()("absolute w-full z-10 outline-[#747981] cursor-pointer overflow-hidden bg-white outline outline-1 ",o[p].listClassName,m),children:e.map(e=>{let s="string"==typeof e?e:e.id||e.key;return(0,l.jsxs)(a.W.Option,{value:e,className:c()(o[p].itemClassName,"text-fds-secondary flex items-center justify-between",A===s?"bg-fds-brand !text-fds-on-brand":"hover:bg-fds-brand-light"),children:["string"==typeof e?e:e.title||e.name||e.label||"",C&&A===s&&(0,l.jsx)(r.A,{className:"w-5 h-5 text-fds-on-brand"})]},s)})})]})})]})}},80632:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(89099);let a=e=>{let s=(0,l.useRouter)();return()=>{if(window.history.length>1){let t=window.location.pathname;(document.referrer?new URL(document.referrer).pathname:null)===t?s.push(e||"/"):s.back()}else s.push(e||"/")}}},85791:(e,s,t)=>{"use strict";t.d(s,{A:()=>g});var l=t(37876),a=t(51504);let i=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"24",viewBox:"0 0 21 24",...e,fill:"none",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3057 0.33371C13.3559 0.33371 13.4051 0.337946 13.453 0.346079L13.6106 0.34701C13.8486 0.34701 14.0761 0.443843 14.2418 0.615343L20.1521 6.77184C20.3073 6.93401 20.3949 7.15218 20.3949 7.37734V18.099C20.4135 21.0262 18.1315 23.405 15.1996 23.51H5.70295C2.85602 23.4488 0.572774 21.1483 0.50238 18.3303L0.501953 5.57251C0.570786 2.67801 2.96012 0.34701 5.83245 0.34701L13.1583 0.346079C13.2062 0.337946 13.2554 0.33371 13.3057 0.33371ZM12.43 2.09654L5.83595 2.09701C3.90279 2.09701 2.29745 3.66268 2.25195 5.59351V18.099C2.20995 20.0835 3.77329 21.7168 5.73912 21.76H15.1693C1
17.1165 21.69 18.6576 20.0835 18.6449 18.1048L18.6448 8.48054L16.3017 8.48171C14.1655 8.47588 12.4307 6.73521 12.4307 4.60254L12.43 2.09654ZM9.99909 8.68576C10.2406 8.68576 10.4593 8.78376 10.6177 8.94214L10.6189 8.94289L13.3559 11.6916C13.6966 12.0346 13.6954 12.5876 13.3536 12.9282C13.0106 13.2689 12.4564 13.2689 12.1158 12.9259L10.8736 11.6784L10.8741 16.6086C10.8741 17.0916 10.4821 17.4836 9.99909 17.4836C9.51609 17.4836 9.12409 17.0916 9.12409 16.6086L9.12362 11.6784L7.8831 12.9259C7.71277 13.0986 7.4876 13.1837 7.2636 13.1837C7.04077 13.1837 6.81677 13.0986 6.64644 12.9282C6.3046 12.5876 6.30227 12.0346 6.6441 11.6916L9.37877 8.94289L9.4178 8.90691C9.43467 8.8919 9.45213 8.87753 9.47014 8.86383L9.37877 8.94289C9.41131 8.91024 9.44633 8.88082 9.48336 8.85462C9.62744 8.74841 9.80599 8.68576 9.99909 8.68576ZM14.18 3.07771L14.1807 4.60254C14.1807 5.77388 15.1327 6.72821 16.304 6.73171L17.6858 6.73054L14.18 3.07771Z",fill:e.fill||"currentColor"})});var r=t(14232),n=t(81027),d=t(60351),c=t(27912),o=t(15039),m=t.n(o),u=t(17695),f=t(43412),h=t(2094),x=t(57073);let p=["image/jpeg","image/png","application/pdf"],g=({onChange:e,value:s,readOnly:t,className:o,multiple:g=!1,maxFiles:j=5,error:b})=>{let v=(0,r.useRef)(null);if(t&&!s)return null;let N=Array.isArray(s)?s.length>0:!!s,C=Array.isArray(s)?s:s?[s]:[],y=t=>{let l=Array.from(t).filter(e=>p.includes(e.type));g?e(l=[...Array.isArray(s)?s:[],...l].slice(-j)):e(g?l:l[0])};return(0,l.jsxs)("div",{children:[(0,l.jsx)("input",{ref:v,type:"file",multiple:g,accept:".jpg,.jpeg,.png,.pdf",hidden:!0,onChange:e=>e.target.files&&y(e.target.files)}),N||t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"space-y-2",children:C.map((i,r)=>(0,l.jsxs)("div",{className:m()("w-full border-size-1 p-4     rounded-8 bg-fds-canvas-secondary flex justify-between",b?"border-fds-danger":"border-fds-brand"),children:[(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[b?(0,l.jsx)(x.A,{className:"w-6  h-6  p-0.5 text-fds-icon-danger"}):(0,l.jsx)(a.A,{className:"w-6  h-6  text-fds-icon-brand"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:m()("title-md-medium",b?"text-fds-danger":"text-fds-primary"),hidden:t,children:b||"فایل با موفقیت بارگذاری شد."}),(0,l.jsx)("p",{className:m()("body-sm",b?"text-fds-danger":"text-fds-secondary"),children:i instanceof File?i.name:i})]})]}),(0,l.jsx)(n.K,{icon:(0,l.jsx)(d.A,{}),size:c.Ev.MEDIUM,iconClassName:b?"text-fds-icon-danger w-5    h-5":"text-fds-icon-secondary w-5    h-5",onClick:()=>(l=>{if(!t)if(void 0!==l&&Array.isArray(s)){let t=s.filter((e,s)=>s!==l);e(t.length?t:null)}else e(null)})(g?r:void 0),className:"-mt-2  -ml-2",hidden:t,"aria-label":"حذف فایل"})]},r))}),(0,l.jsx)(u.default,{size:f.Vp.MEDIUM,color:f.jL.PRIMARY,variant:f.Vt.GHOST,endIcon:(0,l.jsx)(h.A,{className:"mr-1"}),onClick:()=>v.current?.click(),className:"lg:mr-auto mt-3 w-full lg:w-fit",hidden:t,children:"افزودن فایل جدید"})]}):(0,l.jsx)("div",{...{onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),y(e.dataTransfer.files)},onClick:()=>v.current?.click()},className:m()("w-full border-size-1 bg-fds-canvas-secondary border-dashed rounded-8 px-6  py-4     cursor-pointer",o),children:(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)(i,{className:"text-fds-icon-tertiary"}),(0,l.jsxs)("p",{className:"body-sm text-center text-fds-secondary mt-3  mb-1 hidden md:block",children:[(0,l.jsx)("span",{className:"text-fds-brand font-medium body-md",children:"بارگذاری کنید"}),"\xa0 یا فایل را بکشید و اینجا رها کنید."]}),(0,l.jsx)("p",{className:"md:hidden button-sm text-fds-brand py-1.5  mt-3",children:"برای بارگذاری کلیک کنید"}),(0,l.jsx)("p",{className:"body-xsm text-fds-tertiary text-center max-w-[80%]",children:"حداکثر ۵ فایل، فرمت jpg, jpeg, png, pdf"})]})})]})}},96826:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>F,default:()=>Y});var l=t(37876),a=t(47952),i=t(96851),r=t(11653),n=t(52047),d=t(17695),c=t(53693),o=t(74569),m=t(47709),u=t(14232),f=t(89099),h=t(90726),x=t(91408),p=t(652),g=t(89759),j=t(72552),b=t(18395),v=t(80632),N=t(77347),C=t(60443),y=t(46372),w=t(79142),A=t(23088),L=t(15039),S=t.n(L);let k=e=>{let{title:s,name:t,size:a=y.x.LARGE,className:i,value:r,touched:n,error:d,inputClassName:c,showErrorIcon:o,hintMessage:m,required:u=!0,successMessage:f,showSuccessIcon:h,disabled:x,placeholder:p,onChange:g}=e;return(0,l.jsxs)("div",{className:S()("group flex flex-col justify-between relative",i),children:[s&&(0,l.jsxs)("label",{className:S()("text-fds-primary",C.Ci[a],x?"text-fds-disable":""),htmlFor:t,children:[u&&(0,l.jsx)("span",{className:"text-fds-danger text-sm pl-1.5",children:"*"}),s]}),(0,l.jsx)("div",{className:S()("flex w-full border resize-none rounded-6 p-2",n&&d?"!border-fds-danger":f?"border-fds-icon-success":String(r)?.length?"border-fds-select hover:!border-fds-brand":"border-fds-default"),children:(0,l.jsx)("textarea",{value:r,onChange:g,className:S()("w-full grow shrink-0 placeholder:text-right placeholder:font-normal placeholder:text-xs !outline-none border-none appearance-none resize-none",c),placeholder:p,name:t,rows:3})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[d?(0,l.jsxs)("div",{className:"flex self-start ",children:[o&&(0,l.jsx)(A.A,{}),(0,l.jsx)("span",{className:S()(C.l1[a],"text-fds-danger "),children:d})]}):null,f?(0,l.jsxs)("div",{className:"flex self-start ",children:[h&&(0,l.jsx)(w.A,{}),(0,l.jsx)("span",{className:S()(C.l1[a],"text-fds-success "),children:f})]}):null,m?(0,l.jsx)("span",{className:S()(C.l1[a],"text-fds-tertiary self-end"),children:m}):null]})]})};var $=t(85791),M=t(43312),R=t(37346),I=t(83239),O=t(33733),D=t(81027),E=t(87684),U=t(27912);let _=()=>{let e=(0,v.A)("/my-account/tickets"),{formError:s,values:t,errors:a,handleChange:i,isSubmitting:r,changePriority:n,changeSubject:C,handleSubmit:w,setFileTicket:A,openSubjectModal:L,openPriorityModal:S}=(()=>{let{openAlert:e,setAlertView:s,alertView:t}=(0,b.mL)(),{setHideBottomNavigation:l}=(0,j.U)(),[a,i]=(0,u.useState)({show:!1,message:"",success:!1}),r={subject:{name:"select",title:"انتخاب",id:"select"},priority:{name:o.F.LOW,title:"کم",id:o.F.LOW},subject_value:"",attachment:void 0,message:""},n=(0,f.useRouter)(),{TicketsSchema:d}={TicketsSchema:x.Ik().shape({subject:x.Ik().required("required").test((e,{createError:s,path:t})=>e?.id!=="select"||s({message:"لطفا موضوع را تکمیل نمائید.",path:t})),message:x.Yj().required("لطفا متن را تکمیل نمائید."),attachment:x.gl().nullable().notRequired().test("fileSize","کاربر گرامی، اندازه فایل ارسالی نباید بیشتر از ۴ مگابایت باشد.",e=>{let s=!0;return e&&(s=e?.every(e=>e&&e.size/1024/1024<=4)),s}).test("fileType","کاربر گرامی، فرمت فایل ارسالی صحیح نمی‌باشد.",e=>{let s=!0;return e&&(s=e?.every(e=>h.SP.includes(e.type))),s})})};(0,u.useEffect)(()=>(l(!0),()=>{l(!1)}),[]);let v=async(l,a)=>{let r={platform:"web",subject:l.subject.name,...l.priority.id&&{priority:l.priority.name},...l.subject_value&&{subject_value:l.subject_value},...l.attachment&&{"attachment[]":l.attachment?.filter(Boolean)},message:l.message};a.setSubmitting(!0),m.A.ticketsSubmit(r).fetch().then(l=>{a.resetForm(),t.alertContent.push({mode:l.status?"warning":"danger",textBody:l.message}),s("SNACKBAR",t.alertContent),e(),n.replace("/my-account/tickets","/my-account/tickets",{shallow:!1})}).catch(e=>{i({show:!0,message:e?.error?.message||"خطایی رخ داده است",success:!1})}).finally(()=>{a.setSubmitting(!1)})},{values:N,setValues:C,setFieldValue:y,handleChange:w,errors:A,isSubmitting:L,touched:S,handleSubmit:k}=(0,c.Wx)({initialValues:r,validationSchema:()=>d,onSubmit:(e,s)=>{v(e,s)}}),$=e=>{y("priority",h.Ay.find(s=>s.id===e.id))},M=e=>{y("subject","string"==typeof e?h.E3.find(s=>
1s.id===e):e)};return{formError:a,ticketsValues:r,setValues:C,handleChange:w,values:N,errors:A,touched:S,isSubmitting:L,changePriority:$,changeSubject:M,handleSubmit:k,setFileTicket:e=>{y("attachment",(e||[]).filter(Boolean)||[])},openSubjectModal:()=>{p.f.addModal(g.e.SUBJECT_MODAL,{selectedSubject:N.subject.id,handleSelectSubject:M,hideCloseIcon:!0,modalClassName:"overflow-scroll max-h-lvh"})},openPriorityModal:()=>{p.f.addModal(g.e.PRIORITY_MODAL,{selectedPeriority:N.priority.id,handleSelectPeriority:$,hideCloseIcon:!0,modalClassName:"overflow-scroll max-h-lvh"})}}})(),_=(0,u.useRef)(!1),T=!!_?.current,z=r||!t.message||!t.subject||!t.priority||"others"===t.subject.id&&!t.subject_value;return(0,l.jsxs)("div",{className:"py-5 px-6",children:[(0,l.jsxs)("div",{className:" items-center min-h-10 mb-4 hidden md:flex gap-1",children:[(0,l.jsx)(D.K,{iconClassName:"text-fds-secondary h-5 w-5",icon:(0,l.jsx)(E.A,{}),onClick:()=>e(),size:U.Ev.SMALL,"aria-label":"بازگشت"}),(0,l.jsx)("p",{className:"title-lg text-fds-primary",children:"ثبت درخواست"})]}),s.show&&(0,l.jsx)(M.A,{alert:s.success?R.i.SUCCESS:R.i.ERROR,description:s.message,className:"mb-3"}),(0,l.jsxs)("form",{className:"w-full",onSubmit:e=>e.preventDefault(),children:[(0,l.jsxs)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 pb-fds-72 md:pb-0",children:[(0,l.jsxs)("div",{className:"col-span-1",children:[(0,l.jsxs)("p",{className:"title-md-medium mb-1.5",children:[(0,l.jsx)("span",{className:"text-fds-danger font-medium",children:"*"})," موضوع"," "]}),(0,l.jsx)("div",{className:"md:block hidden",children:(0,l.jsx)(N.A,{list:h.E3,selected:t.subject,handleChange:C,error:T?a.subject:"",name:"subject",size:y.x.MEDIUM})}),(0,l.jsx)("div",{className:"md:hidden block",children:(0,l.jsx)(I.A,{endIcon:O.A,endIconClassName:"rotate-180 h-5 w-5",size:y.x.MEDIUM,name:"subject",required:!1,onClick:L,className:"w-full",value:t.subject.title||""})})]}),t?.subject?.id==="others"&&(0,l.jsxs)("div",{className:"col-span-1",children:[(0,l.jsxs)("p",{className:"title-md-medium",children:[(0,l.jsx)("span",{className:"text-fds-danger font-medium",children:"*"})," موضوع درخواست"," "]}),(0,l.jsx)(I.A,{required:!1,size:y.x.MEDIUM,name:"subject_value",error:T?a.subject_value:"",onChange:i,value:t.subject_value})]}),(0,l.jsxs)("div",{className:"col-span-1",children:[(0,l.jsxs)("p",{className:"title-md-medium mb-1.5",children:[(0,l.jsx)("span",{className:"text-fds-danger font-medium",children:"*"})," اولویت"," "]}),(0,l.jsx)("div",{className:"md:block hidden",children:(0,l.jsx)(N.A,{list:h.Ay,selected:t.priority,handleChange:n,error:T?a.priority:"",name:"priority",size:y.x.MEDIUM})}),(0,l.jsx)("div",{className:"md:hidden block",children:(0,l.jsx)(I.A,{endIcon:O.A,endIconClassName:"rotate-180 h-5 w-5",size:y.x.MEDIUM,name:"periority",required:!1,onClick:S,className:"w-full",value:t.priority.title||""})})]}),(0,l.jsxs)("div",{className:"col-span-1 lg:col-span-2",children:[(0,l.jsxs)("p",{className:"title-md-medium mb-1.5",children:[(0,l.jsx)("span",{className:"text-fds-danger font-medium",children:"*"})," متن درخواست"," "]}),(0,l.jsx)(k,{name:"message",error:T?a.message:"",value:t.message,onChange:i,placeholder:"توضیحات تکمیلی خود را وارد کنید..."})]}),(0,l.jsxs)("div",{className:"col-span-1 lg:col-span-2",children:[(0,l.jsxs)("p",{className:"title-md-medium md:mb-3 mb-2",children:["فایل ضمیمه"," ",(0,l.jsx)("span",{className:"text-fds-secondary font-medium",children:"(اختیاری)"})," "]}),(0,l.jsx)($.A,{onChange:e=>{A(Array.isArray(e)?e:e?[e]:[])},value:t.attachment||[],multiple:!0,error:a.attachment,maxFiles:5,className:"!bg-fds-canvas-primary"})]})]}),(0,l.jsx)(d.default,{type:"submit",className:"w-full md:flex hidden sm:w-[200px] self-end mr-auto mt-10",disabled:z,onClick:()=>{_.current=!0,w()},children:r?"در حال ارسال...":"ارسال درخواست"}),(0,l.jsx)("div",{className:"fixed bottom-0 inset-x-0 bg-fds-primary flex md:hidden py-3 px-4 shadow-primary-lg",children:(0,l.jsx)(d.default,{type:"submit",className:"w-full",disabled:z,onClick:()=>{_.current=!0,w()},children:"ارسال درخواست"})})]})]})};var T=t(24221);let z=()=>{let e=(0,i.c)("ticketsCreate"),s={title:e("title"),description:e("desc")};return(0,l.jsx)(a.A,{meta:s,children:(0,l.jsx)(n.Ay,{redirectUrl:"/register?next=/my-account",redirectHandler:n.qp,children:(0,l.jsx)(T.A,{defaultSelected:"support",backButton:{label:"ثبت درخواست",href:"/my-account/tickets"},hideBottomNavigation:!0,children:(0,l.jsx)(_,{})})})})};z.translationFile="user",z.getLayout=(e,s)=>(0,r.bP)(e,{...s},{});var F=!0;let Y=z}},e=>{e.O(0,[7494,4666,7952,4221,636,6593,8792],()=>e(e.s=8736)),_N_E=e.O()}]);
2//# sourceMappingURL=create-184b30bff4cdf12c.js.map

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.