PageSourceSearch

https://cdn.litres.ru/_next/static/chunks/2wgbh2qy0hdeh.js

js litres.ru collected 2026-09-24 08:24:14 UTC 21,701 bytes, 4 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309450,585223,e=>{"use strict";e.i(454110);var t=e.i(829608);e.s(["TrackerManager",()=>t.default],585223);var t=t,r=e.i(682195);e.i(607422);var s=e.i(110831);let i=r.hasWindow&&window.TM?window.TM:t.default.getInstance(),n=(e,t,r)=>{i.sendEvent(["LITRES_TRACKER"],{eventType:e,params:{genre_id:t,genre_name:r,source_internal:"catalog"}})};e.s(["TM",0,i,"getABdata",0,e=>e.reduce((e,t)=>(e[t.id]=t.group,e),{}),"getArtLabels",0,function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[e.labels.is_audio_series?"series":"",e.labels.is_litres_exclusive?"exclusive":"",e.labels.is_sales_hit?"hit":"",e.labels.is_new?"new":""].filter(e=>e);return t?r[0]||"":r.join(",")},"getArtType",0,(e,t)=>"number"==typeof e&&[s.EArtType.text,s.EArtType.pdf,s.EArtType.olesiejukAudio,s.EArtType.epub,s.EArtType.webtoon].includes(e)?t?"draft":"text":e===s.EArtType.audio?t?"audiodraft":"audio":e===s.EArtType.audioSeries?"audio_serial":"podcast","getArtTypeForAnalytics",0,e=>{switch(e){case s.EArtType.text:case s.EArtType.pdf:case s.EArtType.epub:return"text_book";case s.EArtType.audio:return"audiobook";case s.EArtType.podcast:return"podcast";case s.EArtType.podcastEpisode:return"podcast_episode";case s.EArtType.webtoon:return"webtoon";case s.EArtType.webtoonChapter:return"webtoon_chapter";case s.EArtType.audioSeries:return"audio_serial";default:return`unknown type - ${e} `}},"getUserAbonementStatus",0,e=>e.is_active&&e.grace_period_start?"grace":e.is_active?"active":"inactive","getUserSubscriptionStatus",0,e=>e.is_active&&e.grace_period_start?"grace":e.is_active?"active":"inactive","trackerSendAllGenresClick",0,()=>{i.sendEvent(["LITRES_TRACKER"],{eventType:"genre_list_all_genres_click",params:{source_internal:"catalog"}})},"trackerSendGenreItemClick",0,(e,t)=>{n("genre_list_click",e,t)},"trackerSendGenreListExpandClick",0,(e,t)=>{n("genre_list_expand_click",e,t)},"trackerSendHeaderClick",0,(e,t)=>{i.sendEvent(["LITRES_TRACKER"],{eventType:"header_click",params:{name:e,ref_url:t}})}],309450)},673620,e=>{"use strict";e.i(202336).default.env.NEXT_PUBLIC_YANDEX_METRIKA_ID,e.s(["ANDROID_GLOBAL_STORE_LINK",0,"https://play.google.com/store/apps/details?id=litres.android.global","ANDROID_RU_STORE_LINK",0,"https://play.google.com/store/apps/details?id=ru.litres.android","APPLE_STORE_LINK",0,"https://apps.apple.com/app/id438441429","BASE_DOMAIN",0,"www.litres.ru","HOURS_IN_DAY",0,24,"LITRES_AB_TESTS_COOKIE_NAME",0,"litres_ab_tests","MINUTES_IN_HOUR",0,60,"SECONDS_IN_DAY",0,86400,"SECONDS_IN_HOUR",0,3600,"SECONDS_IN_MINUTE",0,60])},6942,e=>{"use strict";var t=e.i(673620),r=e.i(54223);let s=e=>{let r=Math.floor(e/t.SECONDS_IN_DAY)*t.HOURS_IN_DAY+Math.floor(e/t.SECONDS_IN_HOUR%t.HOURS_IN_DAY),s=Math.floor(e/t.SECONDS_IN_MINUTE%t.MINUTES_IN_HOUR),i=Math.floor(e%t.SECONDS_IN_MINUTE);return{hours:r<10?`0${r}`:`${r}`,minutes:s<10?`0${s}`:`${s}`,seconds:i<10?`0${i}`:`${i}`}},i=e=>e?"https://"+window.location.host:"https://"+r.BASE_DOMAIN;e.s(["artTypeForArtsGridFiltersToString",0,e=>{switch(e){case 0:case 4:case 24:return"text_book";case 1:return"audiobook";case 22:return"podcast";case 25:return"webtoon";default:return""}},"artTypeToString",0,e=>{switch(e){case 0:case 4:case 24:return"text_book";case 1:return"audio_book";case 22:return"podcast";default:return"unknown art type"}},"createUrlWithBaseUrl",0,e=>e?.charAt(0)==="/"?`${r.BASE_URL}${e}`:`${r.BASE_URL}/${e||""}`,"getAnalyticsAdvArtsParam",0,e=>e?e.map(e=>e.is_advertising?"1":"0").join(","):"","getArtIdFromUrl",0,e=>{let t=e&&e.match(/https?:\/\/(www\.)?([a-z]*)\.?litres\.[a-z]{2,3}\/(book|audiobook|podcast|webtoon)\/(.*)\/(.*)-(\d+)\//);return t&&t[6]||null},"getAudioArtTypeDownloadUrl",0,(e,t,r,s)=>`${i(s)}/download_book/${e}/${t}/${r}`,"getDate",0,(e,t)=>{if(e)try{return new Date(e).toLocaleDateString(t??"ru",{day:"numeric",month:"long"})}catch(e){}},"getEpubArtTypeDownloadUrl",0,(e,t,r,s)=>`${i(s)}/download_book/${e}/${t}/${r}.epub`,"getFileUrl",0,(e,t,r,s,n)=>`${i(s)}/${"download_book"+(n?"_subscr":"")}/${e}/${t}/${r}`,"getFormattedNumber",0,e=>String(e).length<=5?String(e):new Intl.NumberFormat("ru-RU").format(e),"getFullDateDayMonthYear",0,(e,t)=>{let r=new Date(e).toLocaleDateString("ru-Ru",{year:"numeric",month:"long",day:"numeric"});return t?r:r.slice(0,-3)},"getHoursMinutesSeconds",0,s,"getInstanceIds",0,e=>e?e.map(e=>e.id).join(","):e,"getLangCode",0,e=>{switch(e){case"litres.com":return"en-US";case"litres.az":return"az-AZ";case"litres.uz":return"uz-UZ";case"litres-tr.com":return"tr-TR";case"litres.pl":return"pl-PL";case"litres.de":return"de-DE";default:return"ru-RU"}},"getPdfArtTypeDownloadUrl",0,(e,t,r,s)=>`${i(s)}/download_book/${e}/${t}/${r}.pdf`,"getTextArtTypeDownloadUrl",0,(e,t,r,s,n)=>`${i(n)}/download_book/${e}/${t}/${r}.${s}`,"getTimeFrom",0,e=>s((e-new Date().getTime())/1e3),"getTimestamp",0,e=>{let t=new Date().getTime();if(!e)return t;try{return new Date(e).getTime()}catch(e){return t}}
1,"getTrialMp3",0,e=>`https://www.litres.ru/get_mp3_trial/${e}.mp3`,"getUserFullName",0,e=>{let{firstName:t,lastName:r,middleName:s}=e;return[t,r,s].filter(Boolean).join(" ")||null},"isBookPageRoute",0,e=>!!e.match(/((\/book\/)|(\/audiobook\/))|(\/podcast\/)/),"isMainDomain",0,e=>e===t.BASE_DOMAIN,"makeId",0,function(e){let t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*r.length));return t},"removeQueryParameters",0,(e,t)=>{if(!e)return e;let r=new URL(e,"https://litres.ru"),s=r.searchParams;return t&&(Array.isArray(t)?t.forEach(e=>{s.delete(e)}):s.delete(t)),r.pathname+(s.toString()?`?${s.toString()}`:"")}])},54223,e=>{"use strict";var t=e.i(465596);let r="https://www.litres.ru";e.s(["BASE_DOMAIN",0,"litres.ru","BASE_URL",0,r,"CDN_URL",0,"https://cdn.litres.ru","useHomePageLinkCanonicalHref",0,()=>{let e=(0,t.useAppSelector)(e=>e.browser.clientHost);switch(e){case"litres.uz":case"litres.az":case"litres-tr.com":case"litres.com":case"litres.pl":case"litres.de":case"litres.ua":return`https://${e}`;default:return r}}])},503144,e=>{"use strict";let t="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);for(var r,s=new Uint8Array(16),i=[],n=0;n<256;++n)i.push((n+256).toString(16).slice(1));e.s(["v4",0,function(e,n,a){if(t&&!n&&!e)return t();var o=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,n){a=a||0;for(var u=0;u<16;++u)n[a+u]=o[u];return n}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(o)}],503144)},454110,829608,e=>{"use strict";var t=e.i(591565),r=e.i(682195),s=e.i(499808),i=e.i(707326);e.i(607422);var n=e.i(777101),a=e.i(55910),o=e.i(503144);let u="https://api.litres.ru",l={[n.DeviceTypeHeader.MOBILE]:"mobile",[n.DeviceTypeHeader.TABLET]:"tablet",[n.DeviceTypeHeader.DESKTOP]:"desktop",[n.DeviceTypeHeader.TV]:"tv",[n.DeviceTypeHeader.EINK]:"eink",[n.DeviceTypeHeader.VOICE_SPEAKER]:"voice_speaker",[n.DeviceTypeHeader.WATCH]:"watch"},c=null,d=e=>{let t=function(){if(r.hasWindow&&"u">typeof crypto&&crypto.randomUUID)try{return crypto.randomUUID()}catch{}return(0,o.v4)()}(),s=function(){if(r.hasWindow)return"string"==typeof window.customReferrer&&""!==window.customReferrer?window.customReferrer:(null===c&&(c=document.referrer||null),c||void 0)}();return{eventUUID:t,eventTime:`${Date.now()}`,retryCounter:0,eventType:e.eventType,params:{...e.params,...!("ref_url"in e.params)&&s&&{ref_url:s}}}},h=null,p=(e,s)=>{let{userID:i,isAutoreg:n,host:a,subscriptionUserStatus:o,deviceModel:u,abVariants:c,registrationDate:d,varioqubAbVariants:p,varioqubUserId:v,trisigmaAbVariants:g,debug:m,deviceTypeHeader:f,appId:w}=s;return{ab_variants:c,device_model:u,event_date:e.eventTime,event_id:e.eventUUID,event_parameters:e.params,event_type:e.eventType,registration_date:d,host:e.host??a,host_region:(()=>{if(r.hasWindow){if(null==h)switch(new URLSearchParams(window.location.search).get("clientHost")||window.location.host){case"www.litres.ru":h="ru";break;case"litres.uz":h="uz";break;case"litres.az":h="az";break;case"litres.de":h="de";break;case"litres-tr.com":h="tr";break;case"litres.com":h="com";break;case"litres.pl":h="pl";break;case"litres.ua":h="ua";break;default:h=void 0}return h||void 0}})(),sid:(0,t.getCookie)("SID")||"",supersid:(0,t.getCookie)("supersid")||"",subscription_user_status:o,user_id:i,is_autoreg:n,varioqube_uid:v,varioqube_ab_variants:p,trisigma_ab_variants:g,yametrika_id:(0,t.getCookie)("_ym_uid"),debug:m,app_id:w??115,device_type:l[f]}},v=(e,r)=>{let{preparedData:s}=e;return s?{...s,app_id:s.app_id??r.appId??115,device_type:s.device_type??l[r.deviceTypeHeader],sid:s.sid||(0,t.getCookie)("SID")||"",supersid:s.supersid||(0,t.getCookie)("supersid")||"",yametrika_id:s.yametrika_id||(0,t.getCookie)("_ym_uid")}:p(e,r)},g=new Set(["www.litres.ru","litres.uz","litres.az","litres-tr.com","litres.de","litres.com","litres.pl","litres.ua","www.ltstage.ru","ltstage.ru"]),m=["ssr.b.litres","local.litres","localhost:","stage.litres.io"];class f{constructor(e=2e3,t=2){this.endpoint=(()=>
1{if(r.hasWindow&&window.location.hostname.includes("ltstage.ru"))return"https://api.ltstage.ru/tracker/api/event/";if(r.hasWindow){var e;let t,r,s,i;return`${r=(t=(e=window.location.hostname).split(".")).pop(),s=t.join("."),i=u.replace(/\.[^/.]+$/,""),e.endsWith("litres-tr.com")?`${i}-tr.com`:r&&(s.includes("litres")||s.includes("fbhub"))?`${i}.${r}`:u}/tracker/api/event/`}return"https://api.litres.ru/tracker/api/event/"})(),this.configuration={abVariants:{},deviceModel:"Unknown user agent",host:"web",userID:0,isTester:!1,subscriptionUserStatus:{subscription:"inactive",abonement:"inactive"},registrationDate:void 0,debug:!1,deviceTypeHeader:n.DeviceTypeHeader.DESKTOP,appId:115},this.queue=[],this.isConfigured=!1,this.isSendingEventsFromQueue=!1,this.sendingEventsInterval=e,this.maxRetries=t,this.proceedingEventUUIDs=new Set,this.sentEventUUIDs=new Set,this.knownEventUUIDs=new Set,this.isTrackedHost=r.hasWindow&&g.has(window.location.host),this.debug=r.hasWindow&&m.some(e=>window.location.host.includes(e))||!1}endpoint;configuration;isConfigured;static instance;queue;sendingEventsInterval;timer;maxRetries;isSendingEventsFromQueue;STORAGE_KEY="tracker_events";onUnloadCaller;proceedingEventUUIDs;sentEventUUIDs;knownEventUUIDs;static MAX_TRACKED_UUIDS=500;isTrackedHost;debug;static getInstance(){return f.isInstanceOnWindow()&&(f.instance=window.TM),!f.instance&&(f.instance=new f,r.hasWindow&&(window.TM=f.instance,"complete"===document.readyState?f.instance.startSendEventsTimer():window.addEventListener("load",f.instance.startSendEventsTimer.bind(f.instance)),f.instance&&f.instance.setupUnloadHandler())),f.instance}setupUnloadHandler(){this.onUnloadCaller=new i.OnUnloadCaller(()=>{this.sendEventsFromQueueSync()}),this.onUnloadCaller.subscribe()}static isInstanceOnWindow(){return r.hasWindow&&!!window.TM}isSendingEventsAvailable(){if(!r.hasWindow)return!1;let e=!!(0,t.getCookie)("tracker");return(!this.configuration.isTester||!!e)&&(this.isTrackedHost||e||!!this.configuration.unittest)}isDebugOutputEnabled(){return this.configuration.isTester||!!(0,t.getCookie)("tracker")}setConfiguration(e){this.configuration={...this.configuration,...e,debug:this.debug},this.isConfigured=!0}getConfiguration(){return this.configuration}sendEventToGTM(e,t){window.dataLayer=window.dataLayer||[],Array.isArray(window.dataLayer)&&window.dataLayer.push({event:`litres_${e}`,event_parameters:t.event_parameters,subscription_user_status:t.subscription_user_status,supersid:t.supersid,user_id:t.user_id})}sendEvent(e,t){if(this.isSendingEventsAvailable()){let e=d(t);e.host=this.configuration.host;let r=p(e,this.configuration);this.isConfigured&&(e.preparedData=r),this.queue.push(e),this.knownEventUUIDs.add(e.eventUUID),f.trimUUIDs(this.knownEventUUIDs),this.saveQueueToStorage(),this.sendEventToGTM(t.eventType,r)}if(this.isDebugOutputEnabled()){let e=p(d(t),this.configuration);this.printAnalyticsEventToConsole(e)}}sendEventTyped(e,t){this.sendEvent(null,{eventType:e,params:t})}sendEventSync(e){if(this.isSendingEventsAvailable()){let t=p(d(e),this.configuration),r=new Blob([JSON.stringify(t)],{type:"application/json"});try{navigator.sendBeacon(this.endpoint,r)}catch(e){console.log(e)}this.sendEventToGTM(e.eventType,t)}if(this.isDebugOutputEnabled()){let t=p(d(e),this.configuration);this.printAnalyticsEventToConsole(t)}}async sendEventsFromQueue(){if(0===this.queue.length||this.isSendingEventsFromQueue)return;this.isSendingEventsFromQueue=!0;let e=new Set;try{await this.processQueueEvents(e)}finally{e.forEach(e=>this.proceedingEventUUIDs.delete(e)),this.saveQueueToStorage(),this.isSendingEventsFromQueue=!1}}async processQueueEvents(e){for(let r=0;r<this.queue.length;r++){let s=this.queue[r];if(this.proceedingEventUUIDs.has(s.eventUUID))continue;this.proceedingEventUUIDs.add(s.eventUUID),e.add(s.eventUUID);let i=0,n=!1;for(;i<this.maxRetries&&!n;)try{await a.default.post(this.endpoint,v(s,this.configuration),{headers:{"Session-Id":(0,t.getCookie)("SID")||"","App-id":String(this.configuration.appId??115),"Device-Type":this.configuration.deviceTypeHeader,supersid:(0,t.getCookie)("supersid")||""}}),n=!0}catch(e){console.error(`Analytics send failed for event '${s.eventType}' (attempt ${i+1})`,e),i++}if(n){this.rememberSentEvent(s.eventUUID);let e=this.queue.indexOf(s);-1!==e&&(this.queue.splice(e,1),r=e-1),this.saveQueueToStorage()}else console.error(`Max retries reached for event '${s.eventType}' (ID: ${s.eventUUID}), keeping event in queue.`)}}static hasSameOriginParent(e){let t=e??(r.hasWindow?window:void 0);
1if(!t||t.self===t.top)return!1;try{return t.parent.location.origin===t.location.origin}catch{return!1}}startSendEventsTimer(){this.isSendingEventsFromQueue=!1,f.hasSameOriginParent()||this.loadQueueFromStorage(),this.timer=setInterval(()=>this.sendEventsFromQueue(),this.sendingEventsInterval)}stop(){this.timer&&clearInterval(this.timer),this.sendEventsFromQueue()}sendEventsFromQueueSync(){if(0===this.queue.length)return;let e=this.queue.filter(e=>!this.proceedingEventUUIDs.has(e.eventUUID));if(0===e.length)return;let t=new Set(e.map(e=>e.eventUUID));this.queue=this.queue.filter(e=>!t.has(e.eventUUID)),t.forEach(e=>{this.rememberSentEvent(e)}),this.saveQueueToStorage();let r=[];e.forEach(e=>{let t=this.serializeEvent(e);if(!t)return;let s=!1;try{s=navigator.sendBeacon(this.endpoint,t)}catch(e){console.log(e)}s||r.push(e)}),this.returnRejectedEventsToQueue(r)}serializeEvent(e){try{return new Blob([JSON.stringify(v(e,this.configuration))],{type:"application/json"})}catch(e){return console.error("Analytics: событие не сериализуется",e),null}}returnRejectedEventsToQueue(e){0!==e.length&&(e.forEach(e=>{this.sentEventUUIDs.delete(e.eventUUID)}),this.queue=f.dedupeEvents(e.concat(this.queue)),this.saveQueueToStorage())}static trimUUIDs(e){if(e.size<=f.MAX_TRACKED_UUIDS)return;let t=e.size-f.MAX_TRACKED_UUIDS,r=e.values();for(let s=0;s<t;s++)e.delete(r.next().value)}rememberSentEvent(e){this.sentEventUUIDs.add(e),this.knownEventUUIDs.add(e),f.trimUUIDs(this.sentEventUUIDs),f.trimUUIDs(this.knownEventUUIDs)}static dedupeEvents(e){let t=new Set;return e.filter(e=>!(!e?.eventUUID||t.has(e.eventUUID))&&(t.add(e.eventUUID),!0))}loadQueueFromStorage(){let e=(0,s.getFromSessionStorage)(this.STORAGE_KEY);if(Array.isArray(e)){let t=f.dedupeEvents(e.concat(this.queue));this.queue=t.filter(e=>!this.sentEventUUIDs.has(e.eventUUID)),this.queue.forEach(e=>this.knownEventUUIDs.add(e.eventUUID)),f.trimUUIDs(this.knownEventUUIDs)}}saveQueueToStorage(){try{let e=(0,s.getFromSessionStorage)(this.STORAGE_KEY),t=Array.isArray(e)?e:[],r=t.filter(e=>e?.eventUUID&&!this.knownEventUUIDs.has(e.eventUUID)&&!this.sentEventUUIDs.has(e.eventUUID)),i=t.filter(e=>!e?.eventUUID);(0,s.saveToSessionStorage)({[this.STORAGE_KEY]:f.dedupeEvents(this.queue.concat(r)).concat(i)})}catch(e){console.error("Analytics: не удалось сохранить очередь событий",e)}}printAnalyticsEventToConsole(e){console.debug(`ANALYTICS: %c${e.event_type}
2`,"font-weight: bold; color: #ff4c00;",e)}}let w=f.getInstance();e.s(["TM",0,w,"default",0,f],829608),e.s(["default",0,f],454110)},449097,596363,e=>{"use strict";function t(){let e=new Map;return{on(t,r){let s=e.get(t);s||(s=new Set,e.set(t,s)),s.add(r)},off(t,r){e.get(t)?.delete(r)},emit(t){for(var r=arguments.length,s=Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];let n=e.get(t);n&&0!==n.size&&Array.from(n).forEach(e=>{e(...s)})}}}e.s(["createEventEmitter",0,t],596363);let r=t();e.s(["globalEvents",0,r],449097)},213907,950436,e=>{"use strict";var t=e.i(150417),r=e.i(753620),s=e.i(650021);let i="__litresRouterMode";function n(e){return i in e}function a(e,t){return Object.defineProperty(e,i,{value:t,enumerable:!1,configurable:!0,writable:!1}),e}function o(e,t){let r=t??e;return"string"==typeof r?r:function(e){let t=e.pathname??"",r="";if("string"==typeof e.query)r=e.query?`?${e.query}`:"";else if(e.query){let t=new URLSearchParams;for(let[r,s]of Object.entries(e.query))if(null!=s)if(Array.isArray(s))for(let e of s)t.append(r,String(e));else t.append(r,String(s));let s=t.toString();r=s?`?${s}`:""}let s=e.hash?`#${e.hash.replace(/^#/,"")}`:"";return`${t}${r}${s}`}(r)}e.s(["isLitresShim",0,n,"markAsLitresShim",0,a],950436);var u=e.i(596363),l=e.i(449097);e.s(["useRouter",0,function(){let e=(0,t.useContext)(r.RouterContext),i=function(){let e=(0,s.useRouter)(),r=(0,s.usePathname)()??"",i=(0,s.useSearchParams)(),n=(0,s.useParams)()??{},c=i?.toString()??"",{state:d,sync:h}=function(e){let[r,s]=(0,t.useState)(e),i=(0,t.useRef)(r);return i.current=r,(0,t.useEffect)(()=>{let t=i.current;(e.pathname!==t.pathname||e.search!==t.search||e.hash!==t.hash)&&s(e)},[e.pathname,e.search,e.hash]),{state:r,sync:(0,t.useCallback)(e=>{let t,r,i,n,a;s((r=(t=e.indexOf("#"))>=0?e.slice(t+1):"",a=(n=(i=t>
2=0?e.slice(0,t):e).indexOf("?"))>=0?i.slice(n+1):"",{pathname:n>=0?i.slice(0,n):i,search:a,hash:r}))},[])}}((0,t.useMemo)(()=>({pathname:r,search:c,hash:""}),[r,c])),p=(0,t.useRef)(null);p.current||(p.current=(0,u.createEventEmitter)());let v=(0,t.useRef)(`${d.pathname}${d.search?"?"+d.search:""}${d.hash?"#"+d.hash:""}`),g=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=()=>{let e=g.current;e&&!1===e(window.history.state)&&window.history.pushState(window.history.state,"",v.current)};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[]);let m=(e,t)=>{let r=v.current;if(r===e)return;let s=e=>{let t=e.indexOf("#");return t>=0?e.slice(0,t):e},i=s(r)===s(e);v.current=e;let n=p.current;n.emit("routeChangeStart",e,t),l.globalEvents.emit("routeChangeStart",e,t),i&&(n.emit("hashChangeStart",e,t),l.globalEvents.emit("hashChangeStart",e,t)),n.emit("beforeHistoryChange",e,t),l.globalEvents.emit("beforeHistoryChange",e,t),n.emit("routeChangeComplete",e,t),l.globalEvents.emit("routeChangeComplete",e,t),i&&(n.emit("hashChangeComplete",e,t),l.globalEvents.emit("hashChangeComplete",e,t))},f=`${d.pathname}${d.search?"?"+d.search:""}${d.hash?"#"+d.hash:""}`;return(0,t.useEffect)(()=>{m(f,{shallow:!1})},[f]),(0,t.useMemo)(()=>{var t;let r,s,i=`${d.pathname}${d.search?"?"+d.search:""}${d.hash?"#"+d.hash:""}`;return a({route:d.pathname,pathname:d.pathname,query:(t=new URLSearchParams(d.search),r={...n??{}},s=new Set,t.forEach((e,t)=>s.add(t)),Array.from(s).forEach(e=>{let s=t.getAll(e);r[e]=s.length>1?s:s[0]}),r),asPath:i,basePath:"",isLocaleDomain:!1,locale:void 0,locales:void 0,defaultLocale:void 0,domainLocales:void 0,isReady:!0,isFallback:!1,isPreview:!1,push:(t,r,s)=>{let i=o(t,r);if(s?.shallow){{let e={...window.history.state,as:i,url:i};window.history.pushState(e,"",i)}return h(i),m(i,{shallow:!0}),Promise.resolve(!0)}return e.push(i,{scroll:s?.scroll??!0}),Promise.resolve(!0)},replace:(t,r,s)=>{let i=o(t,r);if(s?.shallow){{let e={...window.history.state,as:i,url:i};window.history.replaceState(e,"",i)}return h(i),m(i,{shallow:!0}),Promise.resolve(!0)}return e.replace(i,{scroll:s?.scroll??!0}),Promise.resolve(!0)},back:()=>{e.back()},forward:()=>{e.forward()},reload:()=>{e.refresh()},prefetch:t=>(e.prefetch(t),Promise.resolve()),beforePopState:e=>{g.current=e},events:p.current},"app")},[d.pathname,d.search,d.hash,e,h,JSON.stringify(n)])}();return e&&!n(e)?e:i}],213907)},707326,e=>{"use strict";e.s(["OnUnloadCaller",0,class{constructor(e,t){this.callback=e,this.subscribed=!1,this.events=t||["beforeunload","unload","visibilitychange","pagehide"]}callback;events;subscribed;subscribe(){this.subscribed||(this.subscribed=!0,this.events.forEach(e=>{"visibilitychange"===e?document.addEventListener(e,this.handleVisibilityChange):window.addEventListener(e,this.handleUnload)}))}unsubscribe(){this.subscribed&&(this.subscribed=!1,this.events.forEach(e=>{"visibilitychange"===e?document.removeEventListener(e,this.handleVisibilityChange):window.removeEventListener(e,this.handleUnload)}))}handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.handleUnload()};handleUnload=()=>{this.callback(),this.unsubscribe()}}])}]);
3
4//# sourceMappingURL=https://www.litres.ru/_next/static/chunks/2p6_xuwpmwbco.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.