1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="bbb4ce7c-0224-2c6b-e31a-6dba04f91afa")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,273911,e=>{"use strict";var t=e.i(619273);e.s(["isServer",0,()=>t.isServer])},175555,e=>{"use strict";var t=e.i(915823);let r=new class extends t.Subscribable{#e;#t;#r;constructor(){super(),this.#r=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,r])},540143,e=>{"use strict";let t,r,n,i,s,o,a=e.i(180166).systemSetTimeoutZero,l=(t=[],r=0,n=e=>{e()},i=e=>{e()},s=a,{batch:e=>{let o;r++;try{o=e()}finally{let e;--r||(e=t,t=[],e.length&&s(()=>{i(()=>{e.forEach(e=>{n(e)})})}))}return o},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o=e=>{r?t.push(e):s(()=>{n(e)})},setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{s=e}});e.s(["notifyManager",0,l])},814448,e=>{"use strict";var t=e.i(915823);let r=new class extends t.Subscribable{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};e.s(["onlineManager",0,r])},936553,88587,e=>{"use strict";var t=e.i(619273),r=e.i(273911),n=e.i(175555),i=e.i(814448);function s(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||i.onlineManager.isOnline()}var a=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};e.s(["CancelledError",0,a,"canFetch",0,o,"createRetryer",0,function(e){let l,c,u,d=!1,h=0,f="pending",p=new Promise((e,t)=>{c=e,u=t});p.catch(t.noop);let m=()=>n.focusManager.isFocused()&&("always"===e.networkMode||i.onlineManager.isOnline())&&e.canRun(),y=()=>o(e.networkMode)&&e.canRun(),v=e=>{"pending"===f&&(l?.(),f="resolved",c(e))},g=e=>{"pending"===f&&(l?.(),f="rejected",u(e))},w=()=>new Promise(t=>{l=e=>{("pending"!==f||m())&&t(e)},e.onPause?.()}).then(()=>{l=void 0,"pending"===f&&e.onContinue?.()}),b=()=>{let n;if("pending"!==f)return;let i=0===h?e.initialPromise:void 0;try{n=i??e.fn()}catch(e){n=Promise.reject(e)}Promise.resolve(n).then(v).catch(n=>{if("pending"!==f)return;let i=e.retry??3*!(0,r.isServer)(),o=e.retryDelay??s,a="function"==typeof o?o(h,n):o,l=!0===i||"number"==typeof i&&h<i||"function"==typeof i&&i(h,n);d||!l?g(n):(h++,e.onFail?.(h,n),(0,t.sleep)(a).then(()=>m()?void 0:w()).then(()=>{d?g(n):b()}))})};return{promise:p,status:()=>f,cancel:t=>{if("pending"===f){let r=new a(t);g(r),e.onCancel?.(r)}},continue:()=>(l?.(),p),cancelRetry:()=>{d=!0},continueRetry:()=>{d=!1},canStart:y,start:()=>(y()?b():w().then(b),p)}}],936553);var l=e.i(180166),c=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#i=l.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??((0,r.isServer)()?1/0:3e5))}clearGcTimeout(){void 0!==this.#i&&(l.timeoutManager.clearTimeout(this.#i),this.#i=void 0)}};e.s(["Removable",0,c],88587)},915823,e=>{"use strict";e.s(["Subscribable",0,class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}])},619273,180166,e=>{"use strict";let t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#s=t;#o=!1;setTimeoutProvider(e){this.#s=e}setTimeout(e,t){return this.#s.setTimeout(e,t)}clearTimeout(e){this.#s.clearTimeout(e)}setInterval(e,t){return this.#s.setInterval(e,t)}clearInterval(e){this.#s.clearInterval(e)}};e.s(["systemSetTimeoutZero",0,function(e){setTimeout(e,0)},"timeoutManager",0,r],180166);let n="u"<typeof window||"Deno"in globalThis;function i(e,t){return(t?.queryKeyHashFn||s)(e)}function s(e){return JSON.stringify(e,(e,t)=>c(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function o(e,t){if(e===t)return!0;
2if(typeof e!=typeof t)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(Array.isArray(e)&&Array.isArray(t)){for(let r=0;r<t.length;r++)if(!o(e[r],t[r]))return!1;return!0}for(let r of Object.keys(t))if(!o(e[r],t[r]))return!1;return!0}return!1}let a=Object.prototype.hasOwnProperty;function l(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function c(e){if(!u(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!u(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}let d=Symbol();e.s(["addConsumeAwareSignal",0,function(e,t,r){let n,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),i||(i=!0,n.aborted?r():n.addEventListener("abort",r,{once:!0})),n)}),e},"addToEnd",0,function(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n},"addToStart",0,function(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==d?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,s,"hashQueryKeyByOptions",0,i,"isServer",0,n,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"matchMutation",0,function(e,t){let{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(s(t.options.mutationKey)!==s(a))return!1}else if(!o(t.options.mutationKey,a))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))},"matchQuery",0,function(e,t){let{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:l,stale:c}=e;if(l){if(n){if(t.queryHash!==i(l,t.options))return!1}else if(!o(t.queryKey,l))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof c||t.isStale()===c)&&(!s||s===t.state.fetchStatus)&&(!a||!!a(t))},"noop",0,function(){},"partialMatchKey",0,o,"replaceData",0,function(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r,n=0){if(t===r)return t;if(n>500)return r;let i=l(t)&&l(r);if(!i&&!(c(t)&&c(r)))return r;let s=(i?t:Object.keys(t)).length,o=i?r:Object.keys(r),u=o.length,d=i?Array(u):{},h=0;for(let l=0;l<u;l++){let c=i?l:o[l],u=t[c],f=r[c];if(u===f){d[c]=u,(i?l<s:a.call(t,c))&&h++;continue}if(null===u||null===f||"object"!=typeof u||"object"!=typeof f){d[c]=f;continue}let p=e(u,f,n+1);d[c]=p,p===u&&h++}return s===u&&h===s?t:d}(e,t):t},"resolveQueryValue",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e},"skipToken",0,d,"sleep",0,function(e){return new Promise(t=>{r.setTimeout(t,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}],619273)},912598,e=>{"use strict";var t=e.i(271645),r=e.i(843476);let n=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:i})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(n.Provider,{value:e,children:i})),"useQueryClient",0,e=>{let r=t.useContext(n);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},526732,e=>{"use strict";var t=e.i(247167),r=e.i(843476),n=e.i(271645);class i extends Error{constructor(e,t){e instanceof Error?super(void 0,{cause:{err:e,...e.cause,...t}}):"string"==typeof e?(t instanceof Error&&(t={err:t,...t.cause}),super(e,t)):super(void 0,e),this.name=this.constructor.name,this.type=this.constructor.type??"AuthError",this.kind=this.constructor.kind??"error",Error.captureStackTrace?.(this,this.constructor);const r=`https://errors.authjs.dev#${this.type.toLowerCase()}`;this.message+=`${this.message?". ":""}Read more at ${r}`}}class s extends i{}class o extends i{}async function a(e,t,r,n={}){let i=`${l(t)}/${e}`;try{let e={headers:{"Content-Type":"application/json",...n?.headers?.cookie?{cookie
2:n.headers.cookie}:{}}};n?.body&&(e.body=JSON.stringify(n.body),e.method="POST");let t=await fetch(i,e),r=await t.json();if(!t.ok)throw r;return r}catch(e){return r.error(new s(e.message,e)),null}}function l(e){return"u"<typeof window?`${e.baseUrlServer}${e.basePathServer}`:e.basePath}function c(){return Math.floor(Date.now()/1e3)}function u(e){let t=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let r=new URL(e||t),n=("/"===r.pathname?t.pathname:r.pathname).replace(/\/$/,""),i=`${r.origin}${n}`;return{origin:r.origin,host:r.host,path:n,base:i,toString:()=>i}}let d={baseUrl:u(t.default.env.NEXTAUTH_URL??t.default.env.VERCEL_URL).origin,basePath:u(t.default.env.NEXTAUTH_URL).path,baseUrlServer:u(t.default.env.NEXTAUTH_URL_INTERNAL??t.default.env.NEXTAUTH_URL??t.default.env.VERCEL_URL).origin,basePathServer:u(t.default.env.NEXTAUTH_URL_INTERNAL??t.default.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:()=>{}},h=null;function f(){return"u"<typeof BroadcastChannel?{postMessage:()=>{},addEventListener:()=>{},removeEventListener:()=>{},name:"next-auth",onmessage:null,onmessageerror:null,close:()=>{},dispatchEvent:()=>!1}:new BroadcastChannel("next-auth")}function p(){return null===h&&(h=f()),h}let m={debug:console.debug,error:console.error,warn:console.warn},y=n.createContext?.(void 0);async function v(e){let t=await a("session",d,m,e);return(e?.broadcast??!0)&&f().postMessage({event:"session",data:{trigger:"getSession"}}),t}async function g(){let e=await a("csrf",d,m);return e?.csrfToken??""}async function w(){return a("providers",d,m)}async function b(e,t,r){let{callbackUrl:n,...i}=t??{},{redirect:s=!0,redirectTo:o=n??window.location.href,...a}=i,c=l(d),u=await w();if(!u){let e=`${c}/error`;window.location.href=e;return}if(!e||!u[e]){let e=`${c}/signin?${new URLSearchParams({callbackUrl:o})}`;window.location.href=e;return}let h=u[e].type;if("webauthn"===h)throw TypeError(`Provider id "${e}" refers to a WebAuthn provider. 3Please use \`import { signIn } from "next-auth/webauthn"\` instead.`);let f=`${c}/${"credentials"===h?"callback":"signin"}/${e}`,p=await g(),m=await fetch(`${f}?${new URLSearchParams(r)}`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({...a,csrfToken:p,callbackUrl:o})}),y=await m.json();if(s){let e=y.url??o;window.location.href=e,e.includes("#")&&window.location.reload();return}let v=new URL(y.url).searchParams.get("error")??void 0,b=new URL(y.url).searchParams.get("code")??void 0;return m.ok&&await d._getSession({event:"storage"}),{error:v,code:b,status:m.status,ok:m.ok,url:v?null:y.url}}async function E(e){let{redirect:t=!0,redirectTo:r=e?.callbackUrl??window.location.href}=e??{},n=l(d),i=await g(),s=await fetch(`${n}/signout`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({csrfToken:i,callbackUrl:r})}),o=await s.json();if(p().postMessage({event:"session",data:{trigger:"signout"}}),t){let e=o.url??r;window.location.href=e,e.includes("#")&&window.location.reload();return}return await d._getSession({event:"storage"}),o}e.s(["SessionContext",0,y,"SessionProvider",0,function(e){if(!y)throw Error("React Context is unavailable in Server Components");let{children:t,basePath:i,refetchInterval:s,refetchWhenOffline:l}=e;i&&(d.basePath=i);let u=void 0!==e.session;d._lastSync=u?c():0;let[h,f]=n.useState(()=>(u&&(d._session=e.session),e.session)),[w,b]=n.useState(!u);n.useEffect(()=>(d._getSession=async({event:e}={})=>{try{let t="storage"===e;if(t||void 0===d._session){d._lastSync=c(),d._session=await v({broadcast:!t}),f(d._session);return}if(!e||null===d._session||c()<d._lastSync)return;d._lastSync=c(),d._session=await v(),f(d._session)}catch(e){m.error(new o(e.message,e))}finally{b(!1)}},d._getSession(),()=>{d._lastSync=0,d._session=void 0,d._getSession=()=>{}}),[]),n.useEffect(()=>{let e=()=>d._getSession({event:"storage"});return p().addEventListener("message",e),()=>p().removeEventListener("message",e)},[]),n.useEffect(()=>{let{refetchOnWindowFocus:t=!0}=e,r=()=>{t&&"visible"===document.visibilityState&&d._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",r,!1),()=>document.removeEventListener("visibilitychange",r,!1)},[e.refetchOnWindowFocus]);let E=function(){let[e,t]=n.useState("u">typeof navigator&&navigator.onLine),r=()=>t(!0),i=()=>t(!1);return n.useEffect(()=>(window.addEventListener("online",r),window.addEventListener("offline",i),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}),[]),e}(),T=!1!==l||E;n.useEffect(()=>{if(s&&T){let e=setInterval(()=>{d._session&&d._getSession({event:"poll"})},1e3*s);return()=>clearInterval(e)}},[s,T]);let L=n.useMemo(()=>({data:h,status:w?"loading":h?"authenticated":"unauthenticated",async update(e){if(w)return;b(!0);let t=await a("session",d,m,void 0===e?void 0:{body:{csrfToken:await g(),data:e}});return b(!1),t&&(f(t),p().postMessage({event:"session",data:{trigger:"getSession"}})),t}}),[h,w]);return(0,r.jsx)(y.Provider,{value:L,children:t})},"__NEXTAUTH",0,d,"getCsrfToken",0,g,"getProviders",0,w,"getSession",0,v,"signIn",0,b,"signOut",0,E,"useSession",0,function(e){if(!y)throw Error("React Context is unavailable in Server Components");let t=n.useContext(y),{required:r,onUnauthenticated:i}=e??{},s=r&&"unauthenticated"===t.status;return(n.useEffect(()=>{if(s){let e=`${d.basePath}/signin?${new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href})}`;i?i():window.location.href=e}},[s,i]),s)?{data:t.data,update:t.update,status:"loading"}:t}],526732)},948148,e=>{"use strict";var t=e.i(861745);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let n=r(0,t.useTranslations);r(0,t.useFormatter),e.s(["useTranslations",0,n])},360319,e=>{"use strict";var t=e.i(843476),r=e.i(479086),n=e.i(861745);function i(){return(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("div",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-current"}),(0,t.jsx)("div",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:0.15s]"}),(0,t.jsx)("div",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:0.3s]"})]})}e.s(["default",0,function({children:e,size:s="md",variant:o="primary",color:a="main",startIcon:l,endIcon:c,loading:u,disabled:d,className:h,onClick:f,...p}){let m=u||d;(0,n.useLocale)();let y={main:{primary:"bg-primary-500 text-white hover:bg-primary-400",outline:"border border-primary-500 bg-transparent text-primary-500 hover:text-primary-400 ",text:"bg-transparent text-primary-500 hover:text-primary-400 border-none px-0"},secondary:{primary:"bg-secondary-500 text-black hover:bg-secondary-400",outline:"border border-secondary-500 bg-transparent text-secondary-500 hover:text-secondary-400",text:"bg-transparent text-secondary-500 hover:text-secondary-400 border-none px-0"},transparent:{primary:"bg-[#FFFFFF05] backdrop-blur-[2px] text-white hover:bg-white/10",outline:"border border-white text-white hover:text-neutral-100 hover:bg-white/10",text:"bg-transparent text-white hover:text-neutral-100 border-none px-0"}}[a][o],v=m&&"text"!==o&&!u?"bg-neutral-400 text-white border-neutral-400 hover:none cursor-not-allowed":m&&"text"===o?"text-neutral-400 cursor-not-allowed":"";return(0,t.jsxs)("button",{onClick:f,disabled:m,className:(0,r.cn)("font-regular font-content relative inline-flex cursor-pointer items-center justify-center gap-1 transition-all duration-150","text"!==o&&"whitespace-nowrap",{sm:"rounded-md px-3 h-6 !text-caption",md:"rounded-lg px-4 h-8 !text-body3",lg:"rounded-xl px-5 h-10 !text-body2",xl:"rounded-2xl px-5 h-12 !text-body2"}[s],y,v,h),...p,children:[!u&&l&&(0,t.jsx)("span",{className:"flex h-5 w-5 items-center justify-center",children:l}),(0,t.jsx)("span",{className:(0,r.cn)(u?"invisible":"visible"),children:e}),u&&(0,t.jsx)("span",{className:"absolute flex items-center",children:(0,t.jsx)(i,{})}),!u&&c&&(0,t.jsx)("span",{className:(0,r.cn)("flex h-5 w-5 items-center justify-center ltr:rotate-180"),children:c})]})}])}
3,956591,e=>{"use strict";let t=e.i(247167).default.env.NEXT_PUBLIC_SOCKET_URL,r="https://tractor-club.com/";e.s(["BASE_URL_PRIVATE",0,"https://api-tv.tractor-club.com/api/v1/user/","BASE_URL_PUBLIC",0,"https://api-tv.tractor-club.com/api/v1/public/","EN_LANDING_PROFILE",0,r+"en/profile","EXCLUSIVE_CATEGORY",0,"/categories/9db106f7-9494-4493-b341-657e34158ee8","FA_LANDING_PROFILE",0,r+"fa/profile","FIREBASE_REGISTER_URL",0,"fcm/tokens/register","FULLMATCH_CATEGORY",0,"/categories/69f1644c-f354-4011-8fd0-6c73d8b51821","GET_ALL_PLAYLISTS",0,"vod/playlists","GET_ALL_VIDEOS",0,"vod/videos","GET_VAST_AD",0,"vod/ads/vast","PLAYLISTS_CATEGORY",0,"/playlist","SOCKET_BASE_URL",0,t,"SUMMARY_CATEGORY",0,"/categories/69110d53-dd49-42f1-bf14-9cbfc8f71bde","TRACTOR_LANDING_EXTERNAL_URL",0,"https://tractor-club.com/","TRACTOR_STREAMING_EXTERNAL_URL",0,"https://tv.tractor-club.com/","TRACTOR_TICKETING_EXTERNAL_URL",0,"https://ticket.tractor-club.com/"],956591)},817454,506924,e=>{"use strict";e.s(["DESKTOP_SIZE",0,1440,"LARGE_TABLET_SIZE",0,1024,"SMALL_DESKTOP_SIZE",0,1280,"TABLET_SIZE",0,800],506924);var t=e.i(271645);
3e.s(["useBreakpoint",0,function(){let[e,r]=(0,t.useState)({device:"desktop",width:1440,height:900,isBreakpointReady:!1});return(0,t.useEffect)(()=>{let e=()=>{let e=window.innerWidth;r({device:e<800?"mobile":e<1024?"tablet":e<1280?"largeTablet":e<1440?"smallDesktop":"desktop",width:e,height:window.innerHeight,isBreakpointReady:!0})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}],817454)},614537,e=>{"use strict";var t=e.i(843476),r=e.i(618566),n=e.i(271645),i=e.i(861745),s=n["use".trim()],o=e.i(549092),a=e.i(77105),l=e.i(489790),c=e.i(33165);let{Link:u,redirect:d,usePathname:h,useRouter:f,getPathname:p}=function(e){let{Link:u,config:d,getPathname:h,...f}=function(e,i){var c,u,d;let h={...c=i||{},localePrefix:"object"==typeof(d=c.localePrefix)?d:{mode:d||"always"},localeCookie:!!((u=c.localeCookie)??1)&&{name:"NEXT_LOCALE",sameSite:"lax",..."object"==typeof u&&u},localeDetection:c.localeDetection??!0,alternateLinks:c.alternateLinks??!0},f=h.pathnames,p=(0,n.forwardRef)(function({href:r,locale:n,...i},l){let c,u;"object"==typeof r?(c=r.pathname,u=r.params):c=r;let d=(0,o.isLocalizableHref)(r),p=e(),y=(0,o.isPromise)(p)?s(p):p,v=d?m({locale:n||y,href:null==f?c:{pathname:c,params:u},forcePrefix:null!=n||void 0}):c;return(0,t.jsx)(a.default,{ref:l,href:"object"==typeof r?{...r,pathname:v}:v,locale:n,localeCookie:h.localeCookie,...i})});function m(e){let t,{forcePrefix:r,href:n,locale:i}=e;return null==f?"object"==typeof n?(t=n.pathname,n.query&&(t+=(0,l.serializeSearchParams)(n.query))):t=n:t=(0,l.compileLocalizedPathname)({locale:i,...(0,l.normalizeNameOrNameWithParams)(n),pathnames:h.pathnames}),(0,l.applyPathnamePrefix)(t,i,h,r)}function y(e){return function(t,...r){return e(m(t),...r)}}return{config:h,Link:p,redirect:y(r.redirect),permanentRedirect:y(r.permanentRedirect),getPathname:m}}(i.useLocale,e);return{...f,Link:u,usePathname:function(){let e,t,s=(e=(0,r.usePathname)(),t=(0,i.useLocale)(),(0,n.useMemo)(()=>{if(!e)return e;let r=e,n=(0,o.getLocalePrefix)(t,d.localePrefix);if((0,o.hasPathnamePrefixed)(n,e))r=(0,o.unprefixPathname)(e,n);else if("never"!==d.localePrefix.mode&&d.localePrefix.prefixes){let n=(0,o.getLocaleAsPrefix)(t);(0,o.hasPathnamePrefixed)(n,e)&&(r=(0,o.unprefixPathname)(e,n))}return r},[d.localePrefix,t,e])),a=(0,i.useLocale)();return(0,n.useMemo)(()=>s&&d.pathnames?(0,l.getRoute)(a,s,d.pathnames):s,[a,s])},useRouter:function(){let e=(0,r.useRouter)(),t=(0,i.useLocale)(),s=(0,r.usePathname)();return(0,n.useMemo)(()=>{function r(e){return function(r,n){let{locale:i,...o}=n||{},a=[h({href:r,locale:i||t,forcePrefix:null!=i||void 0})];Object.keys(o).length>0&&a.push(o),(0,c.default)(d.localeCookie,s,t,i),e(...a)}}return{...e,push:r(e.push),replace:r(e.replace),prefetch:r(e.prefetch)}},[t,s,e])},getPathname:h}}({locales:["en","fa"],defaultLocale:"fa",localePrefix:"always"});e.s(["Link",0,({prefetch:e=!1,...r})=>(0,t.jsx)(u,{prefetch:e,...r}),"usePathname",0,h,"useRouter",0,f],614537)},403471,e=>{"use strict";var t=e.i(526732);let r=!1;async function n({idToken:e,callbackUrl:i,reason:s="user"}={}){if(!r){r=!0;try{sessionStorage.setItem("logout_reason",s),sessionStorage.setItem("just_logged_out","true");let r=i||window.location.origin;try{await (0,t.signOut)({redirect:!1})}catch(e){console.warn("NextAuth signOut failed:",e)}let n=new URL("https://sso.tractor-club.com/realms/user/protocol/openid-connect/logout");n.searchParams.set("post_logout_redirect_uri",r),e&&n.searchParams.set("id_token_hint",e),window.location.replace(n.toString())}catch(e){console.error("Logout error:",e),window.location.replace(i||window.location.origin)}finally{setTimeout(()=>{r=!1},1500)}}}e.s(["logout",0,n])},588693,494558,e=>{"use strict";var t=e.i(271645),r=e.i(526732),n=e.i(956591),i=e.i(403471);class s extends Error{constructor(e="Authentication failed"){super(e),this.name="ApiAuthError"}}e.s(["ApiAuthError",0,s],494558);let o=null;async function a(e){return 204===e.status?void 0:(e.headers.get("content-type")??"").includes("application/json")?e.json():e.text()}e.s(["useSsoClientFetcher",0,function(){let{data:e,status:l,update:c}=(0,r.useSession)();return{fetcher:(0,t.useCallback)(async function(t){let{path:r,params:u,baseUrl:d,isPrivate:h=!1,body:f,headers:p={},cache:m="no-store",...y}=t,v=d??(h?n.BASE_URL_PRIVATE:n.BASE_URL_PUBLIC),g=new URL(r.startsWith("/")?r.slice(1):r,v);u&&Object.entries(u).forEach(([e,t])=>{null!=t&&g.searchParams.append(e,String(t))});let w=new Headers(p);w.has("accept-language")||w.has("Accept-Language")||w.set("Accept-Language","u">typeof document&&document.documentElement.lang||"fa");let b=null!=f;!b||f instanceof FormData||w.set("Content-Type","application/json");let E=f instanceof FormData?f:b?JSON.stringify(f):void 0,T=async e=>{let t=new Headers(w);if(h){if(!e)throw new s("No access token");t.set("Authorization",`Bearer ${e}`)}return fetch(g.toString(),{...y,method:y.method??"GET",headers:t,body:E,cache:m})};if(h&&"loading"===l)throw new s("Session is still loading");let L=await T(e?.accessToken);if(L.ok)return a(L);if(401===L.status&&h)try{o||(o=c({forceRefresh:!0}).finally(()=>{o=null}));let t=await o;
3if(!t?.accessToken||"RefreshAccessTokenError"===t.error)throw await (0,i.logout)({idToken:t?.idToken??e?.idToken,reason:"refresh-failed"}),new s("Refresh failed");let r=t.accessToken;if((L=await T(r)).ok)return a(L);if(401===L.status)throw await (0,i.logout)({idToken:t.idToken,reason:"unauthorized-after-refresh"}),new s("Unauthorized after refresh")}catch(e){throw console.error("[auth] refresh failed",e),e instanceof s?e:new s("Authentication error")}if(401===L.status)throw new s("Unauthorized");let S=null,x=L.headers.get("content-type")??"";try{S=x.includes("application/json")?await L.json():await L.text()}catch{S="Unknown error"}let _=Error("object"==typeof S&&S?.message||("string"==typeof S?S:"Request failed"));throw _.status=L.status,_.errorKey=S?.errorKey,_.data=S,_},[e?.accessToken,e?.idToken,l,c]),session:e,status:l}}],588693)}]); 4 5//# debugId=bbb4ce7c-0224-2c6b-e31a-6dba04f91afa
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.