1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[303],{40303:(t,e,o)=>{o.r(e),o.d(e,{default:()=>E});var n=o(86715),a=o(96540),l=o(74368),i=o(69500),r=o(4120),s=o(21650),c=o(82927),u=o(98126);let E=()=>{let t=(0,l.wA)(),e=(0,n.useRouter)();return(0,a.useEffect)(()=>{let o=()=>{t((0,i.QO)(!1)),t((0,i.sK)(!1)),t(r.wq.setPopStated(!1)),t((0,u.si)(!1))};return e.events.on("routeChangeComplete",o),e.beforePopState(e=>{let{as:o,url:n}=e;return!n||((t((0,u.si)(!0)),/\/new/.test(n))?(t((0,i.QO)(!0)),!0):/\/category/.test(n)?(t((0,i.sK)(!0)),!0):(null==n?void 0:n.startsWith("/archive"))?(t(r.wq.setPopStated(!0)),!0):/^\/collections(\/page\d+)?$/.test(o)?(t(s.h.setPopStated(!0)),!0):/^\/collections\/[^\/]+(\/page\d+)?$/.test(o)?(t(c.m.setPopStated(!0)),!0):!/\/\??(kids)?\??/.test(n)||(t((0,i.Ow)(!0)),!0))}),()=>{e.beforePopState(()=>!0),e.events.off("routeChangeComplete",o)}},[e]),null}},21650:(t,e,o)=>{o.d(e,{h:()=>r});var n=o(48095),a=o(79907),l=o(27116);function i(){return{type:"COLLECTIONS_REJECTED"}}let r={fetchCollections:function(t){let{for_kids:e,skip:o}=t;return async(t,r)=>{var s,c,u;let{collections:{skip:E},pageSettings:{isPopStated:L}}=r().collections,_=(null===(s=r().systemInformation)||void 0===s?void 0:s.API_URL)||l.H$,d=(null===(c=r().systemInformation)||void 0===c?void 0:c.API_KEY)||l.Lq,I=L?n.md+E:n.md,O=null;try{(t({type:"COLLECTIONS_LOADING"}),O=await a.V.getCollections({apiUrl:_,apiKey:d,for_kids:e,skip:o,limit:I}))?t((u=O,{type:"COLLECTIONS_FULFILLED",payload:u})):t(i())}catch(e){t(i())}finally{return O}}},fetchMoreCollections:function(t){let{skip:e}=t;return async(t,o)=>{var i,r,s;let c=(null===(i=o().systemInformation)||void 0===i?void 0:i.API_URL)||l.H$,u=(null===(r=o().systemInformation)||void 0===r?void 0:r.API_KEY)||l.Lq,E=(null===(s=o().registration.authData)||void 0===s?void 0:s.profile_for_child)||!1;try{t({type:"COLLECTIONS_MORE_LOADING"});let o=await a.V.getCollections({apiUrl:c,apiKey:u,for_kids:E,skip:e,limit:n.md});t({type:"COLLECTIONS_MORE_FULFILLED",payload:o})}catch(e){t({type:"COLLECTIONS_MORE_REJECTED"})}}},fetchHashtags:function(t){let{profileId:e,skip:o}=t;return async(t,i)=>{var r,s,c;let{hashtags:{skip:u},pageSettings:{isPopStated:E}}=i().collections,L=(null===(r=i().systemInformation)||void 0===r?void 0:r.API_URL)||l.H$,_=(null===(s=i().systemInformation)||void 0===s?void 0:s.API_KEY)||l.Lq,d=i().systemInformation.locale||"ru",I=(null===(c=i().registration.authData)||void 0===c?void 0:c.profile_for_child)||!1,O=E?n.md+u:n.md;try{t({type:"COLLECTIONS_HASHTAGS_LOADING"});let n=await a.V.getHashtags({apiUrl:L,apiKey:_,profileId:e,for_kids:I,locale:d,skip:o,limit:O});t({type:"COLLECTIONS_HASHTAGS_FULFILLED",payload:n})}catch(e){t({type:"COLLECTIONS_HASHTAGS_REJECTED"})}}},fetchMoreHashtags:function(t){let{profileId:e,skip:o}=t;return async(t,i)=>{var r,s,c;let u=(null===(r=i().systemInformation)||void 0===r?void 0:r.API_URL)||l.H$,E=(null===(s=i().systemInformation)||void 0===s?void 0:s.API_KEY)||l.Lq,L=i().systemInformation.locale||"ru",_=(null===(c=i().registration.authData)||void 0===c?void 0:c.profile_for_child)||!1;try{t({type:"COLLECTIONS_HASHTAGS_MORE_LOADING"});let l=await a.V.getHashtags({apiUrl:u,apiKey:E,profileId:e,for_kids:_,locale:L,skip:o,limit:n.md});t({type:"COLLECTIONS_HASHTAGS_MORE_FULFILLED",payload:l})}catch(e){t({type:"COLLECTIONS_HASHTAGS_MORE_REJECTED"})}}},setPopStated:function(t){return{type:"SET_COLLECTIONS_POP_STATED",payload:t}},setScrollYPosition:function(t){return{type:"SET_COLLECTIONS_SCROLL_POSITION",payload:t}},resetState:function(){return{type:"RESET_COLLECTIONS_STATE"}}}},82927:(t,e,o)=>{o.d(e,{m:()=>r});var n=o(79907),a=o(27116),l=o(83904);function i(){return{type:"COLLECTIONS_ITEM_REJECTED"}}let r={fetch:function(t){let{alias:e,for_kids:o,skip:r}=t;return async(t,s)=>{var c,u,E;let{skip:L,pageSettings:{isPopStated:_}}=s().collectionsItem,d=(null===(c=s().systemInformation)||void 0===c?void 0:c.API_URL)||a.H$,I=(null===(u=s().systemInformation)||void 0===u?void 0:u.API_KEY)||a.Lq,O=_?l.md+L:l.md,C=null;try{(t({type:"COLLECTIONS_ITEM_LOADING"}),C=await n.V.getCollectionsItem({apiUrl:d,apiKey:I,for_kids:o,alias:e,skip:r,limit:O}))?t((E=C,{type:"COLLECTIONS_ITEM_FULFILLED",payload:E})):t(i())}catch(e){t(i())}finally{return C}}},fetchMore:function(t){let{alias:e,skip:o}=t;return async(t,i)=>{var r,s,c;let u=(null===(r=i().systemInformation)||void 0===r?void 0:r.API_URL)||a.H$,E=(null===(s=i().systemInformation)||void 0===s?void 0:s.API_KEY)||a.Lq,L=(null===(c=i().registration.authData)||void 0===c?void 0:c.profile_for_child)||!1;try{t({type:"COLLECTIONS_ITEM_MORE_LOADING"});let a=await n.V.getCollectionsItem({apiUrl:u,apiKey:E,for_kids:L,alias:e,skip:o,limit:l.md});t({type:"COLLECTIONS_ITEM_MORE_FULFILLED",payload:a})}catch(e){t({type:"COLLECTIONS_ITEM_MORE_REJECTED"})}}},setPopStated:function(t){return{type:"SET_COLLECTIONS_ITEM_POP_STATED",payload:t}},setScrollYPosition:function(t){return{type:"SET_COLLECTIONS_ITEM_SCROLL_POSITION",payload:t}},setSequencePosition:function(t){return{type:"SET_COLLECTIONS_ITEM_SEQUENCE_POSITION",payload:t}},resetState:function(){return{type:"RESET_COLLECTIONS_ITEM_STATE"}}}},79907:(t,e,o)=>{o.d(e,{V:()=>l});var n=o(47819);let a=t=>{let{apiUrl:e,apiKey:o,endpoint:n,params:a}=t;
1return fetch("".concat(e).concat(n,"?").concat(new URLSearchParams({...a})).concat(o.replace("?","&")),{credentials:"include"})},l={getCollections:async t=>{let{apiUrl:e,apiKey:o,for_kids:l,skip:i,limit:r}=t,s=await a({apiUrl:e,apiKey:o,endpoint:n.PI.collections,params:{for_kids:l,skip:i,limit:r}});if(s.status<400){var c;let t=await s.json();return(null==t?void 0:null===(c=t.items)||void 0===c?void 0:c.length)?t:null}return console.error("Api Error in ".concat(s.url," status:").concat(s.status)),null},getCollectionsItem:async t=>{let{apiUrl:e,apiKey:o,for_kids:l,alias:i,skip:r,limit:s}=t,c=await a({apiUrl:e,apiKey:o,endpoint:"".concat(n.PI.collections,"/").concat(i),params:{for_kids:l,products_skip:r,products_limit:s}});if(c.status<400){var u;let t=await c.json();return(null==t?void 0:null===(u=t.items)||void 0===u?void 0:u.length)?t:null}return console.error("Api Error in ".concat(c.url," status:").concat(c.status)),null},getHashtags:async t=>{let{apiUrl:e,apiKey:o,profileId:l,for_kids:i,locale:r,skip:s,limit:c}=t,u=await a({apiUrl:e,apiKey:o,endpoint:"".concat(n.PI.hashtagList,"/").concat(l),params:{for_kids:i,locale:r,skip:s,limit:c}});if(u.status<400)return await u.json();console.error("Api Error in ".concat(u.url," status:").concat(u.status))}}}}]);
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.