1try{let 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]="ea7b2482-f320-4c5e-bf7e-7127e0b895be",e._sentryDebugIdIdentifier="sentry-dbid-ea7b2482-f320-4c5e-bf7e-7127e0b895be")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[124],{40124:(e,t,n)=>{"use strict";n.r(t),n.d(t,{POSTING_FROM_FILE_STEP:()=>h,default:()=>y});var l=n(37876),r=n(14232),a=n(89099),i=n(18847),o=n.n(i),s=n(67768),u=n(38248),d=n(43862),c=n(29182),_=n(16265),f=n(82761),v=n(15946),w=n(97458),g=n.n(w);let p=o()(()=>Promise.all([n.e(2267),n.e(389),n.e(9026)]).then(n.bind(n,19026)),{loadableGenerated:{webpack:()=>[19026]},ssr:!1}),E=o()(()=>Promise.all([n.e(2267),n.e(389),n.e(6462),n.e(2051),n.e(6201)]).then(n.bind(n,26201)),{loadableGenerated:{webpack:()=>[26201]},ssr:!1}),b=o()(()=>Promise.all([n.e(2267),n.e(389),n.e(5944),n.e(6199)]).then(n.bind(n,46199)),{loadableGenerated:{webpack:()=>[46199]},ssr:!1}),m=o()(()=>n.e(3615).then(n.bind(n,53615)),{loadableGenerated:{webpack:()=>[53615]},ssr:!1});var h=function(e){return e[e.ADD_FILE=0]="ADD_FILE",e[e.IMPORT_IN_PROGRESS=1]="IMPORT_IN_PROGRESS",e}({});let y=()=>{var e;let t=(0,a.useRouter)(),{redirectToUrl:n,redirectToBackUrl:i}=(0,f.A)(),o=(0,s.jE)(),{sendInternalAnalytics:w}=(0,v.A)(),h=(0,d.Oi)(),y=(0,d.Uo)(),[I,O]=(0,r.useState)(null),[F,S]=(0,r.useState)(!1),[T,A]=(0,r.useState)(0),{translations:P,isDesktopDevice:R}=(0,r.useContext)(c.q),{setActivePostingType:D,activePostingTypeAfterConfirm:k,setActivePostingTypeAfterConfirm:N,hasChangesData:W,setHasChangesData:C}=(0,r.useContext)(_.Q),L=()=>{window.zE&&(window.zE("webWidget","show"),window.zE("webWidget","open"))};return(0,r.useEffect)(()=>{let e="".concat(P.ARE_YOU_SURE_TO_LEAVE," ").concat(P.INFORMATION_WILL_NOT_BE_SAVED),l=t=>((t||window.event).returnValue=e,e),r=e=>{if(t.asPath!==e&&W)throw S(!0),O(e),window.history.replaceState(null,document.title,t.asPath),t.events.emit("routeChangeError"),'Route change to "'.concat(e,'" was aborted due to unsaved changes (this error can be safely ignored).')};if(W)window.addEventListener("beforeunload",l),t.events.on("routeChangeStart",r);else if(window.removeEventListener("beforeunload",l),t.events.off("routeChangeStart",r),I){let e=null==I?void 0:I.split("/")[1];n({path:/^(en|ru|ky|az|sr|el|pl|uk)$/.test(e)?I.replace("/".concat(e),""):I})}return window.zE&&window.zE("webWidget","hide"),()=>{window.removeEventListener("beforeunload",l),t.events.off("routeChangeStart",r)}},[W]),(0,r.useEffect)(()=>{null!==k&&S(!0)},[k]),(0,r.useEffect)(()=>{var e;let t=null==(e=h.data)?void 0:e.status;("full_importing"===t||"failed"===t)&&A(1)},[null==(e=h.data)?void 0:e.status]),(0,r.useEffect)(()=>{if(F){let e=(0,u.getCookie)("lastAnalyticsEvent"),t=null==e?void 0:e.split(":");
1w({eventParams:"posting:warning:post:popup:view",eventDetailsParams:{posting_flow:"file",last_screen:(null==t?void 0:t[0])||null,last_section:(null==t?void 0:t[1])||null,last_component:(null==t?void 0:t[2])||null,last_element:(null==t?void 0:t[3])||null,last_action:(null==t?void 0:t[4])||null,lastAnalyticsEvent:e}})}},[F]),(0,r.useEffect)(()=>(window.zE&&window.zE("webWidget:on","close",()=>{var e,t;null==(e=(t=window).zE)||e.call(t,"webWidget","hide")}),setTimeout(()=>{window.zE&&window.zE("webWidget","hide")},1e3),()=>{A(0)}),[]),(0,l.jsxs)("div",{className:g().postingContainer,children:[(e=>{switch(e){case 0:return(0,l.jsx)(E,{handleOpenSupport:L});case 1:var t;return(0,l.jsx)(b,{setActivePostingFromFileStep:A,handleOpenSupport:L,status:null==(t=h.data)?void 0:t.status});default:return null}})(T),F&&(0,l.jsx)(p,{cancelText:P.NO_KEEP_EDITING,confirmText:P.LEAVE_THIS_PAGE,descriptionText:P.YOUR_ADS_WONT_BE_SAVED_IF_YOU_LEAVE,isDesktopDevice:R,yesText:P.LEAVE_ANYWAY,onCloseRequest:e=>{let{confirm:t}=e,n=(0,u.getCookie)("lastAnalyticsEvent"),l=null==n?void 0:n.split(":");
1if(w({eventParams:"posting:warning:post:popup:tap",eventDetailsParams:{posting_flow:"file",button:t?"leave_anyway":"keep_editing",last_screen:(null==l?void 0:l[0])||null,last_section:(null==l?void 0:l[1])||null,last_component:(null==l?void 0:l[2])||null,last_element:(null==l?void 0:l[3])||null,last_action:(null==l?void 0:l[4])||null,lastAnalyticsEvent:n}}),t){var r;C(!1);let e=null==(r=o.getQueriesData({queryKey:["scanningFileStatus"]})[0])?void 0:r[1],t=null==e?void 0:e.status,n=null==e?void 0:e.id;n&&t&&["new","parsing","test_importing","waiting_user_confirm"].includes(t)&&y.mutate({id:n,status:"canceled_by_user"}),o.removeQueries({queryKey:["fileUserImportFirstAd"]}),o.removeQueries({queryKey:["importProgressStatus"]}),o.removeQueries({queryKey:["scanningFileStatus"]}),null!==k&&D(k)}S(!1),!t||R||k||i(),null!==k&&N(null)},isInverseActionButton:!0}),(0,l.jsx)(m,{})]})}},43862:(e,t,n)=>{"use strict";n.d(t,{H7:()=>s,Oi:()=>m,PP:()=>d,SF:()=>u,Tz:()=>f,Uo:()=>p,dE:()=>g,dk:()=>w,hH:()=>h});var l=n(74359),r=n(40097),a=n(94937),i=n(42149),o=n(93997);let s=e=>{let{adId:t,enabled:n}=e,r=(0,i._8)(),s=[a.es.SINGLE_AI_POSTING,t,null==r?void 0:r.countryId];return(0,l.I)({queryKey:s,queryFn:async()=>
1await (0,o.Yp)({adId:t,requestContext:r}),staleTime:5e3,gcTime:5e3,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,enabled:!!t&&n})},u=()=>{let e=(0,i._8)();return(0,r.n)({mutationFn:t=>{let{postingId:n,commentText:l}=t;return(0,o.AF)({postingId:n,commentText:l,requestContext:e})}})},d=()=>{let e=(0,i._8)();return(0,r.n)({mutationFn:t=>{let{importFileUrl:n}=t;return(0,o.pe)({importFileUrl:n,requestContext:e})}})},c=["waiting_user_confirm","failed"],_=e=>["scanningFileStatus",e.countryId,e.languageId],f=e=>{let t=(0,i._8)(),n=(0,i.vY)(),r=_(t);return(0,l.I)({queryKey:r,queryFn:()=>(0,o.S4)({requestContext:t}),staleTime:0,gcTime:5e3,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0,enabled:n&&(null==e?void 0:e.enabled),refetchInterval:e=>{var t;let n=null==(t=e.state.data)?void 0:t.status;return!(!n||c.includes(n))&&4e3}})},v=e=>["fileUserImportFirstAd",e.countryId,e.languageId],w=e=>{let t=(0,i._8)(),n=(0,i.vY)(),r=v(t);return(0,l.I)({queryKey:r,queryFn:()=>(0,o.QI)({requestContext:t}),staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,enabled:n&&(null==e?void 0:e.enabled)})},g=()=>{let e=(0,i._8)();return(0,r.n)({mutationFn:t=>(0,o.LY)({...t,requestContext:e})})},p=()=>{let e=(0,i._8)();return(0,r.n)({mutationFn:t=>(0,o.g8)({...t,requestContext:e})})},E=["completed","failed","waiting_user_confirm","canceled_by_user"],b=e=>{var t;let n=null==(t=e.state.data)?void 0:t.status;return!(!n||E.includes(n))&&5e3},m=e=>{var t;let n=(0,i._8)();return(0,l.I)({queryKey:["importProgressStatus",n.countryId,n.languageId],queryFn:()=>(0,o.S4)({requestContext:n}),staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!0,refetchOnReconnect:!0,enabled:!!(n.
1countryId&&n.languageId)&&(null==(t=null==e?void 0:e.enabled)||t),retry:!1,refetchInterval:b})},h=e=>{let{id:t,enabled:n=!0}=e,r=(0,i._8)(),a=(0,i.vY)();return(0,l.I)({queryKey:["userImportErrors",t,r.countryId,r.languageId],queryFn:()=>(0,o.EW)({id:t,requestContext:r}),staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,enabled:a&&!!t&&n})}},97458:e=>{e.exports={postingContainer:"PostingFromFile_postingContainer__o8D7v"}}}]); 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2d62b80e-9d58-5ffd-8904-2ee1f51fac48")}catch(e){}}(); 3//# debugId=2d62b80e-9d58-5ffd-8904-2ee1f51fac48
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.